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 6106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6117 | 6117 |
6118 bool CanTransition() { | 6118 bool CanTransition() { |
6119 // Only JSObject and subtypes have map transitions and back pointers. | 6119 // Only JSObject and subtypes have map transitions and back pointers. |
6120 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE); | 6120 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE); |
6121 return instance_type() >= FIRST_JS_OBJECT_TYPE; | 6121 return instance_type() >= FIRST_JS_OBJECT_TYPE; |
6122 } | 6122 } |
6123 | 6123 |
6124 bool IsJSObjectMap() { | 6124 bool IsJSObjectMap() { |
6125 return instance_type() >= FIRST_JS_OBJECT_TYPE; | 6125 return instance_type() >= FIRST_JS_OBJECT_TYPE; |
6126 } | 6126 } |
| 6127 bool IsStringMap() { return instance_type() < FIRST_NONSTRING_TYPE; } |
6127 bool IsJSProxyMap() { | 6128 bool IsJSProxyMap() { |
6128 InstanceType type = instance_type(); | 6129 InstanceType type = instance_type(); |
6129 return FIRST_JS_PROXY_TYPE <= type && type <= LAST_JS_PROXY_TYPE; | 6130 return FIRST_JS_PROXY_TYPE <= type && type <= LAST_JS_PROXY_TYPE; |
6130 } | 6131 } |
6131 bool IsJSGlobalProxyMap() { | 6132 bool IsJSGlobalProxyMap() { |
6132 return instance_type() == JS_GLOBAL_PROXY_TYPE; | 6133 return instance_type() == JS_GLOBAL_PROXY_TYPE; |
6133 } | 6134 } |
6134 bool IsJSGlobalObjectMap() { | 6135 bool IsJSGlobalObjectMap() { |
6135 return instance_type() == JS_GLOBAL_OBJECT_TYPE; | 6136 return instance_type() == JS_GLOBAL_OBJECT_TYPE; |
6136 } | 6137 } |
(...skipping 4668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10805 } else { | 10806 } else { |
10806 value &= ~(1 << bit_position); | 10807 value &= ~(1 << bit_position); |
10807 } | 10808 } |
10808 return value; | 10809 return value; |
10809 } | 10810 } |
10810 }; | 10811 }; |
10811 | 10812 |
10812 } } // namespace v8::internal | 10813 } } // namespace v8::internal |
10813 | 10814 |
10814 #endif // V8_OBJECTS_H_ | 10815 #endif // V8_OBJECTS_H_ |
OLD | NEW |