| 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 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 4879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4890 } | 4890 } |
| 4891 | 4891 |
| 4892 | 4892 |
| 4893 bool Map::CanTransition() { | 4893 bool Map::CanTransition() { |
| 4894 // Only JSObject and subtypes have map transitions and back pointers. | 4894 // Only JSObject and subtypes have map transitions and back pointers. |
| 4895 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE); | 4895 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE); |
| 4896 return instance_type() >= FIRST_JS_OBJECT_TYPE; | 4896 return instance_type() >= FIRST_JS_OBJECT_TYPE; |
| 4897 } | 4897 } |
| 4898 | 4898 |
| 4899 | 4899 |
| 4900 bool Map::IsBooleanMap() { return this == GetHeap()->boolean_map(); } |
| 4900 bool Map::IsPrimitiveMap() { | 4901 bool Map::IsPrimitiveMap() { |
| 4901 STATIC_ASSERT(FIRST_PRIMITIVE_TYPE == FIRST_TYPE); | 4902 STATIC_ASSERT(FIRST_PRIMITIVE_TYPE == FIRST_TYPE); |
| 4902 return instance_type() <= LAST_PRIMITIVE_TYPE; | 4903 return instance_type() <= LAST_PRIMITIVE_TYPE; |
| 4903 } | 4904 } |
| 4904 bool Map::IsJSObjectMap() { | 4905 bool Map::IsJSObjectMap() { |
| 4905 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); | 4906 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); |
| 4906 return instance_type() >= FIRST_JS_OBJECT_TYPE; | 4907 return instance_type() >= FIRST_JS_OBJECT_TYPE; |
| 4907 } | 4908 } |
| 4908 bool Map::IsJSArrayMap() { return instance_type() == JS_ARRAY_TYPE; } | 4909 bool Map::IsJSArrayMap() { return instance_type() == JS_ARRAY_TYPE; } |
| 4909 bool Map::IsJSFunctionMap() { return instance_type() == JS_FUNCTION_TYPE; } | 4910 bool Map::IsJSFunctionMap() { return instance_type() == JS_FUNCTION_TYPE; } |
| (...skipping 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8129 #undef WRITE_INT64_FIELD | 8130 #undef WRITE_INT64_FIELD |
| 8130 #undef READ_BYTE_FIELD | 8131 #undef READ_BYTE_FIELD |
| 8131 #undef WRITE_BYTE_FIELD | 8132 #undef WRITE_BYTE_FIELD |
| 8132 #undef NOBARRIER_READ_BYTE_FIELD | 8133 #undef NOBARRIER_READ_BYTE_FIELD |
| 8133 #undef NOBARRIER_WRITE_BYTE_FIELD | 8134 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8134 | 8135 |
| 8135 } // namespace internal | 8136 } // namespace internal |
| 8136 } // namespace v8 | 8137 } // namespace v8 |
| 8137 | 8138 |
| 8138 #endif // V8_OBJECTS_INL_H_ | 8139 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |