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 8929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8940 // Equality operations. | 8940 // Equality operations. |
8941 inline bool Equals(Name* other); | 8941 inline bool Equals(Name* other); |
8942 inline static bool Equals(Handle<Name> one, Handle<Name> two); | 8942 inline static bool Equals(Handle<Name> one, Handle<Name> two); |
8943 | 8943 |
8944 // Conversion. | 8944 // Conversion. |
8945 inline bool AsArrayIndex(uint32_t* index); | 8945 inline bool AsArrayIndex(uint32_t* index); |
8946 | 8946 |
8947 // Casting. | 8947 // Casting. |
8948 static inline Name* cast(Object* obj); | 8948 static inline Name* cast(Object* obj); |
8949 | 8949 |
8950 bool IsCacheable(Isolate* isolate); | |
8951 | |
8952 DECLARE_PRINTER(Name) | 8950 DECLARE_PRINTER(Name) |
8953 | 8951 |
8954 // Layout description. | 8952 // Layout description. |
8955 static const int kHashFieldOffset = HeapObject::kHeaderSize; | 8953 static const int kHashFieldOffset = HeapObject::kHeaderSize; |
8956 static const int kSize = kHashFieldOffset + kPointerSize; | 8954 static const int kSize = kHashFieldOffset + kPointerSize; |
8957 | 8955 |
8958 // Mask constant for checking if a name has a computed hash code | 8956 // Mask constant for checking if a name has a computed hash code |
8959 // and if it is a string that is an array index. The least significant bit | 8957 // and if it is a string that is an array index. The least significant bit |
8960 // indicates whether a hash code has been computed. If the hash code has | 8958 // indicates whether a hash code has been computed. If the hash code has |
8961 // been computed the 2nd bit tells whether the string can be used as an | 8959 // been computed the 2nd bit tells whether the string can be used as an |
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11269 } else { | 11267 } else { |
11270 value &= ~(1 << bit_position); | 11268 value &= ~(1 << bit_position); |
11271 } | 11269 } |
11272 return value; | 11270 return value; |
11273 } | 11271 } |
11274 }; | 11272 }; |
11275 | 11273 |
11276 } } // namespace v8::internal | 11274 } } // namespace v8::internal |
11277 | 11275 |
11278 #endif // V8_OBJECTS_H_ | 11276 #endif // V8_OBJECTS_H_ |
OLD | NEW |