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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 } | 760 } |
761 | 761 |
762 | 762 |
763 bool Object::IsNativeContext() const { | 763 bool Object::IsNativeContext() const { |
764 return Object::IsHeapObject() && | 764 return Object::IsHeapObject() && |
765 HeapObject::cast(this)->map() == | 765 HeapObject::cast(this)->map() == |
766 HeapObject::cast(this)->GetHeap()->native_context_map(); | 766 HeapObject::cast(this)->GetHeap()->native_context_map(); |
767 } | 767 } |
768 | 768 |
769 | 769 |
| 770 bool Object::IsGlobalContextTable() const { |
| 771 if (!Object::IsHeapObject()) return false; |
| 772 Map* map = HeapObject::cast(this)->map(); |
| 773 Heap* heap = map->GetHeap(); |
| 774 return map == heap->global_context_table_map(); |
| 775 } |
| 776 |
| 777 |
770 bool Object::IsScopeInfo() const { | 778 bool Object::IsScopeInfo() const { |
771 return Object::IsHeapObject() && | 779 return Object::IsHeapObject() && |
772 HeapObject::cast(this)->map() == | 780 HeapObject::cast(this)->map() == |
773 HeapObject::cast(this)->GetHeap()->scope_info_map(); | 781 HeapObject::cast(this)->GetHeap()->scope_info_map(); |
774 } | 782 } |
775 | 783 |
776 | 784 |
777 TYPE_CHECKER(JSFunction, JS_FUNCTION_TYPE) | 785 TYPE_CHECKER(JSFunction, JS_FUNCTION_TYPE) |
778 | 786 |
779 | 787 |
(...skipping 6560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7340 #undef READ_SHORT_FIELD | 7348 #undef READ_SHORT_FIELD |
7341 #undef WRITE_SHORT_FIELD | 7349 #undef WRITE_SHORT_FIELD |
7342 #undef READ_BYTE_FIELD | 7350 #undef READ_BYTE_FIELD |
7343 #undef WRITE_BYTE_FIELD | 7351 #undef WRITE_BYTE_FIELD |
7344 #undef NOBARRIER_READ_BYTE_FIELD | 7352 #undef NOBARRIER_READ_BYTE_FIELD |
7345 #undef NOBARRIER_WRITE_BYTE_FIELD | 7353 #undef NOBARRIER_WRITE_BYTE_FIELD |
7346 | 7354 |
7347 } } // namespace v8::internal | 7355 } } // namespace v8::internal |
7348 | 7356 |
7349 #endif // V8_OBJECTS_INL_H_ | 7357 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |