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 <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 8574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8585 // Equality operations. | 8585 // Equality operations. |
8586 inline bool Equals(Name* other); | 8586 inline bool Equals(Name* other); |
8587 inline static bool Equals(Handle<Name> one, Handle<Name> two); | 8587 inline static bool Equals(Handle<Name> one, Handle<Name> two); |
8588 | 8588 |
8589 // Conversion. | 8589 // Conversion. |
8590 inline bool AsArrayIndex(uint32_t* index); | 8590 inline bool AsArrayIndex(uint32_t* index); |
8591 | 8591 |
8592 // If the name is private, it can only name own properties. | 8592 // If the name is private, it can only name own properties. |
8593 inline bool IsPrivate(); | 8593 inline bool IsPrivate(); |
8594 | 8594 |
| 8595 // If the name is a non-flat string, this method returns a flat version of the |
| 8596 // string. Otherwise it'll just return the input. |
| 8597 static inline Handle<Name> Flatten(Handle<Name> name, |
| 8598 PretenureFlag pretenure = NOT_TENURED); |
| 8599 |
8595 DECLARE_CAST(Name) | 8600 DECLARE_CAST(Name) |
8596 | 8601 |
8597 DECLARE_PRINTER(Name) | 8602 DECLARE_PRINTER(Name) |
8598 #if TRACE_MAPS | 8603 #if TRACE_MAPS |
8599 void NameShortPrint(); | 8604 void NameShortPrint(); |
8600 int NameShortPrint(Vector<char> str); | 8605 int NameShortPrint(Vector<char> str); |
8601 #endif | 8606 #endif |
8602 | 8607 |
8603 // Layout description. | 8608 // Layout description. |
8604 static const int kHashFieldSlot = HeapObject::kHeaderSize; | 8609 static const int kHashFieldSlot = HeapObject::kHeaderSize; |
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10867 } else { | 10872 } else { |
10868 value &= ~(1 << bit_position); | 10873 value &= ~(1 << bit_position); |
10869 } | 10874 } |
10870 return value; | 10875 return value; |
10871 } | 10876 } |
10872 }; | 10877 }; |
10873 | 10878 |
10874 } } // namespace v8::internal | 10879 } } // namespace v8::internal |
10875 | 10880 |
10876 #endif // V8_OBJECTS_H_ | 10881 #endif // V8_OBJECTS_H_ |
OLD | NEW |