| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
| 10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
| (...skipping 9292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9303 } | 9303 } |
| 9304 | 9304 |
| 9305 template<class Visitor> | 9305 template<class Visitor> |
| 9306 static inline ConsString* VisitFlat(Visitor* visitor, | 9306 static inline ConsString* VisitFlat(Visitor* visitor, |
| 9307 String* string, | 9307 String* string, |
| 9308 int offset = 0); | 9308 int offset = 0); |
| 9309 | 9309 |
| 9310 static Handle<FixedArray> CalculateLineEnds(Handle<String> string, | 9310 static Handle<FixedArray> CalculateLineEnds(Handle<String> string, |
| 9311 bool include_ending_line); | 9311 bool include_ending_line); |
| 9312 | 9312 |
| 9313 // Use the hash field to forward to the canonical internalized string |
| 9314 // when deserializing an internalized string. |
| 9315 inline void SetForwardedInternalizedString(String* string); |
| 9316 inline String* GetForwardedInternalizedString(); |
| 9317 |
| 9313 private: | 9318 private: |
| 9314 friend class Name; | 9319 friend class Name; |
| 9315 friend class StringTableInsertionKey; | 9320 friend class StringTableInsertionKey; |
| 9316 | 9321 |
| 9317 static Handle<String> SlowFlatten(Handle<ConsString> cons, | 9322 static Handle<String> SlowFlatten(Handle<ConsString> cons, |
| 9318 PretenureFlag tenure); | 9323 PretenureFlag tenure); |
| 9319 | 9324 |
| 9320 // Slow case of String::Equals. This implementation works on any strings | 9325 // Slow case of String::Equals. This implementation works on any strings |
| 9321 // but it is most efficient on strings that are almost flat. | 9326 // but it is most efficient on strings that are almost flat. |
| 9322 bool SlowEquals(String* other); | 9327 bool SlowEquals(String* other); |
| (...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11199 } else { | 11204 } else { |
| 11200 value &= ~(1 << bit_position); | 11205 value &= ~(1 << bit_position); |
| 11201 } | 11206 } |
| 11202 return value; | 11207 return value; |
| 11203 } | 11208 } |
| 11204 }; | 11209 }; |
| 11205 | 11210 |
| 11206 } } // namespace v8::internal | 11211 } } // namespace v8::internal |
| 11207 | 11212 |
| 11208 #endif // V8_OBJECTS_H_ | 11213 #endif // V8_OBJECTS_H_ |
| OLD | NEW |