| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 return map()->instance_type() >= FIRST_JS_RECEIVER_TYPE; | 673 return map()->instance_type() >= FIRST_JS_RECEIVER_TYPE; |
| 674 } | 674 } |
| 675 | 675 |
| 676 bool HeapObject::IsJSObject() const { | 676 bool HeapObject::IsJSObject() const { |
| 677 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); | 677 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); |
| 678 return map()->IsJSObjectMap(); | 678 return map()->IsJSObjectMap(); |
| 679 } | 679 } |
| 680 | 680 |
| 681 bool HeapObject::IsJSProxy() const { return map()->IsJSProxyMap(); } | 681 bool HeapObject::IsJSProxy() const { return map()->IsJSProxyMap(); } |
| 682 | 682 |
| 683 bool HeapObject::IsJSError() const { |
| 684 return map()->instance_type() == JS_ERROR_TYPE; |
| 685 } |
| 686 |
| 683 TYPE_CHECKER(JSSet, JS_SET_TYPE) | 687 TYPE_CHECKER(JSSet, JS_SET_TYPE) |
| 684 TYPE_CHECKER(JSMap, JS_MAP_TYPE) | 688 TYPE_CHECKER(JSMap, JS_MAP_TYPE) |
| 685 TYPE_CHECKER(JSSetIterator, JS_SET_ITERATOR_TYPE) | 689 TYPE_CHECKER(JSSetIterator, JS_SET_ITERATOR_TYPE) |
| 686 TYPE_CHECKER(JSMapIterator, JS_MAP_ITERATOR_TYPE) | 690 TYPE_CHECKER(JSMapIterator, JS_MAP_ITERATOR_TYPE) |
| 687 TYPE_CHECKER(JSWeakMap, JS_WEAK_MAP_TYPE) | 691 TYPE_CHECKER(JSWeakMap, JS_WEAK_MAP_TYPE) |
| 688 TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE) | 692 TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE) |
| 689 TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE) | 693 TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE) |
| 690 TYPE_CHECKER(Map, MAP_TYPE) | 694 TYPE_CHECKER(Map, MAP_TYPE) |
| 691 TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE) | 695 TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE) |
| 692 TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE) | 696 TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE) |
| (...skipping 7241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7934 #undef WRITE_INT64_FIELD | 7938 #undef WRITE_INT64_FIELD |
| 7935 #undef READ_BYTE_FIELD | 7939 #undef READ_BYTE_FIELD |
| 7936 #undef WRITE_BYTE_FIELD | 7940 #undef WRITE_BYTE_FIELD |
| 7937 #undef NOBARRIER_READ_BYTE_FIELD | 7941 #undef NOBARRIER_READ_BYTE_FIELD |
| 7938 #undef NOBARRIER_WRITE_BYTE_FIELD | 7942 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7939 | 7943 |
| 7940 } // namespace internal | 7944 } // namespace internal |
| 7941 } // namespace v8 | 7945 } // namespace v8 |
| 7942 | 7946 |
| 7943 #endif // V8_OBJECTS_INL_H_ | 7947 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |