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 6321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6332 | 6332 |
6333 bool CanTransition() { | 6333 bool CanTransition() { |
6334 // Only JSObject and subtypes have map transitions and back pointers. | 6334 // Only JSObject and subtypes have map transitions and back pointers. |
6335 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE); | 6335 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE); |
6336 return instance_type() >= FIRST_JS_OBJECT_TYPE; | 6336 return instance_type() >= FIRST_JS_OBJECT_TYPE; |
6337 } | 6337 } |
6338 | 6338 |
6339 bool IsJSObjectMap() { | 6339 bool IsJSObjectMap() { |
6340 return instance_type() >= FIRST_JS_OBJECT_TYPE; | 6340 return instance_type() >= FIRST_JS_OBJECT_TYPE; |
6341 } | 6341 } |
| 6342 bool IsJSReceiverMap() { return instance_type() >= FIRST_JS_RECEIVER_TYPE; } |
6342 bool IsStringMap() { return instance_type() < FIRST_NONSTRING_TYPE; } | 6343 bool IsStringMap() { return instance_type() < FIRST_NONSTRING_TYPE; } |
6343 bool IsJSProxyMap() { | 6344 bool IsJSProxyMap() { |
6344 InstanceType type = instance_type(); | 6345 InstanceType type = instance_type(); |
6345 return FIRST_JS_PROXY_TYPE <= type && type <= LAST_JS_PROXY_TYPE; | 6346 return FIRST_JS_PROXY_TYPE <= type && type <= LAST_JS_PROXY_TYPE; |
6346 } | 6347 } |
6347 bool IsJSGlobalProxyMap() { | 6348 bool IsJSGlobalProxyMap() { |
6348 return instance_type() == JS_GLOBAL_PROXY_TYPE; | 6349 return instance_type() == JS_GLOBAL_PROXY_TYPE; |
6349 } | 6350 } |
6350 bool IsJSGlobalObjectMap() { | 6351 bool IsJSGlobalObjectMap() { |
6351 return instance_type() == JS_GLOBAL_OBJECT_TYPE; | 6352 return instance_type() == JS_GLOBAL_OBJECT_TYPE; |
(...skipping 4739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11091 } else { | 11092 } else { |
11092 value &= ~(1 << bit_position); | 11093 value &= ~(1 << bit_position); |
11093 } | 11094 } |
11094 return value; | 11095 return value; |
11095 } | 11096 } |
11096 }; | 11097 }; |
11097 | 11098 |
11098 } } // namespace v8::internal | 11099 } } // namespace v8::internal |
11099 | 11100 |
11100 #endif // V8_OBJECTS_H_ | 11101 #endif // V8_OBJECTS_H_ |
OLD | NEW |