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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 | 688 |
689 bool Object::IsJSReceiver() const { | 689 bool Object::IsJSReceiver() const { |
690 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 690 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
691 return IsHeapObject() && | 691 return IsHeapObject() && |
692 HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_RECEIVER_TYPE; | 692 HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_RECEIVER_TYPE; |
693 } | 693 } |
694 | 694 |
695 | 695 |
696 bool Object::IsJSObject() const { | 696 bool Object::IsJSObject() const { |
697 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); | 697 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); |
698 return IsHeapObject() && | 698 return IsHeapObject() && HeapObject::cast(this)->map()->IsJSObjectMap(); |
699 HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_OBJECT_TYPE; | |
700 } | 699 } |
701 | 700 |
702 | 701 |
703 bool Object::IsJSProxy() const { | 702 bool Object::IsJSProxy() const { |
704 if (!Object::IsHeapObject()) return false; | 703 if (!Object::IsHeapObject()) return false; |
705 return HeapObject::cast(this)->map()->IsJSProxyMap(); | 704 return HeapObject::cast(this)->map()->IsJSProxyMap(); |
706 } | 705 } |
707 | 706 |
708 | 707 |
709 TYPE_CHECKER(JSFunctionProxy, JS_FUNCTION_PROXY_TYPE) | 708 TYPE_CHECKER(JSFunctionProxy, JS_FUNCTION_PROXY_TYPE) |
(...skipping 6587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7297 #undef READ_SHORT_FIELD | 7296 #undef READ_SHORT_FIELD |
7298 #undef WRITE_SHORT_FIELD | 7297 #undef WRITE_SHORT_FIELD |
7299 #undef READ_BYTE_FIELD | 7298 #undef READ_BYTE_FIELD |
7300 #undef WRITE_BYTE_FIELD | 7299 #undef WRITE_BYTE_FIELD |
7301 #undef NOBARRIER_READ_BYTE_FIELD | 7300 #undef NOBARRIER_READ_BYTE_FIELD |
7302 #undef NOBARRIER_WRITE_BYTE_FIELD | 7301 #undef NOBARRIER_WRITE_BYTE_FIELD |
7303 | 7302 |
7304 } } // namespace v8::internal | 7303 } } // namespace v8::internal |
7305 | 7304 |
7306 #endif // V8_OBJECTS_INL_H_ | 7305 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |