| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 7181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7192 // do any heap allocations. This is useful when printing stack traces. | 7192 // do any heap allocations. This is useful when printing stack traces. |
| 7193 SmartArrayPointer<uc16> ToWideCString( | 7193 SmartArrayPointer<uc16> ToWideCString( |
| 7194 RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL); | 7194 RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL); |
| 7195 | 7195 |
| 7196 // Tells whether the hash code has been computed. | 7196 // Tells whether the hash code has been computed. |
| 7197 inline bool HasHashCode(); | 7197 inline bool HasHashCode(); |
| 7198 | 7198 |
| 7199 // Returns a hash value used for the property table | 7199 // Returns a hash value used for the property table |
| 7200 inline uint32_t Hash(); | 7200 inline uint32_t Hash(); |
| 7201 | 7201 |
| 7202 static bool ComputeArrayIndex(unibrow::CharacterStream* buffer, | 7202 bool ComputeArrayIndex(uint32_t* index); |
| 7203 uint32_t* index, | |
| 7204 int length); | |
| 7205 | 7203 |
| 7206 // Externalization. | 7204 // Externalization. |
| 7207 bool MakeExternal(v8::String::ExternalStringResource* resource); | 7205 bool MakeExternal(v8::String::ExternalStringResource* resource); |
| 7208 bool MakeExternal(v8::String::ExternalAsciiStringResource* resource); | 7206 bool MakeExternal(v8::String::ExternalAsciiStringResource* resource); |
| 7209 | 7207 |
| 7210 // Conversion. | 7208 // Conversion. |
| 7211 inline bool AsArrayIndex(uint32_t* index); | 7209 inline bool AsArrayIndex(uint32_t* index); |
| 7212 | 7210 |
| 7213 // Casting. | 7211 // Casting. |
| 7214 static inline String* cast(Object* obj); | 7212 static inline String* cast(Object* obj); |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7890 unsigned consumed_; | 7888 unsigned consumed_; |
| 7891 ConsString* root_; | 7889 ConsString* root_; |
| 7892 DISALLOW_COPY_AND_ASSIGN(ConsStringIteratorOp); | 7890 DISALLOW_COPY_AND_ASSIGN(ConsStringIteratorOp); |
| 7893 }; | 7891 }; |
| 7894 | 7892 |
| 7895 | 7893 |
| 7896 // Note: this class is not GC-safe. | 7894 // Note: this class is not GC-safe. |
| 7897 class StringCharacterStream { | 7895 class StringCharacterStream { |
| 7898 public: | 7896 public: |
| 7899 inline StringCharacterStream(String* string, | 7897 inline StringCharacterStream(String* string, |
| 7900 unsigned offset, | 7898 ConsStringIteratorOp* op, |
| 7901 ConsStringIteratorOp* op); | 7899 unsigned offset = 0); |
| 7902 inline uint16_t GetNext(); | 7900 inline uint16_t GetNext(); |
| 7903 inline bool HasMore(); | 7901 inline bool HasMore(); |
| 7904 inline void Reset(String* string, unsigned offset, ConsStringIteratorOp* op); | 7902 inline void Reset(String* string, unsigned offset = 0); |
| 7905 inline void VisitOneByteString(const uint8_t* chars, unsigned length); | 7903 inline void VisitOneByteString(const uint8_t* chars, unsigned length); |
| 7906 inline void VisitTwoByteString(const uint16_t* chars, unsigned length); | 7904 inline void VisitTwoByteString(const uint16_t* chars, unsigned length); |
| 7907 | 7905 |
| 7908 private: | 7906 private: |
| 7909 bool is_one_byte_; | 7907 bool is_one_byte_; |
| 7910 union { | 7908 union { |
| 7911 const uint8_t* buffer8_; | 7909 const uint8_t* buffer8_; |
| 7912 const uint16_t* buffer16_; | 7910 const uint16_t* buffer16_; |
| 7913 }; | 7911 }; |
| 7914 const uint8_t* end_; | 7912 const uint8_t* end_; |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8886 } else { | 8884 } else { |
| 8887 value &= ~(1 << bit_position); | 8885 value &= ~(1 << bit_position); |
| 8888 } | 8886 } |
| 8889 return value; | 8887 return value; |
| 8890 } | 8888 } |
| 8891 }; | 8889 }; |
| 8892 | 8890 |
| 8893 } } // namespace v8::internal | 8891 } } // namespace v8::internal |
| 8894 | 8892 |
| 8895 #endif // V8_OBJECTS_H_ | 8893 #endif // V8_OBJECTS_H_ |
| OLD | NEW |