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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 return true; | 780 return true; |
781 } | 781 } |
782 | 782 |
783 bool HeapObject::IsContext() const { | 783 bool HeapObject::IsContext() const { |
784 Map* map = this->map(); | 784 Map* map = this->map(); |
785 Heap* heap = GetHeap(); | 785 Heap* heap = GetHeap(); |
786 return ( | 786 return ( |
787 map == heap->function_context_map() || map == heap->catch_context_map() || | 787 map == heap->function_context_map() || map == heap->catch_context_map() || |
788 map == heap->with_context_map() || map == heap->native_context_map() || | 788 map == heap->with_context_map() || map == heap->native_context_map() || |
789 map == heap->block_context_map() || map == heap->module_context_map() || | 789 map == heap->block_context_map() || map == heap->module_context_map() || |
790 map == heap->script_context_map() || | 790 map == heap->eval_context_map() || map == heap->script_context_map() || |
791 map == heap->debug_evaluate_context_map()); | 791 map == heap->debug_evaluate_context_map()); |
792 } | 792 } |
793 | 793 |
794 bool HeapObject::IsNativeContext() const { | 794 bool HeapObject::IsNativeContext() const { |
795 return map() == GetHeap()->native_context_map(); | 795 return map() == GetHeap()->native_context_map(); |
796 } | 796 } |
797 | 797 |
798 bool HeapObject::IsScriptContextTable() const { | 798 bool HeapObject::IsScriptContextTable() const { |
799 return map() == GetHeap()->script_context_table_map(); | 799 return map() == GetHeap()->script_context_table_map(); |
800 } | 800 } |
(...skipping 7684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8485 #undef WRITE_INT64_FIELD | 8485 #undef WRITE_INT64_FIELD |
8486 #undef READ_BYTE_FIELD | 8486 #undef READ_BYTE_FIELD |
8487 #undef WRITE_BYTE_FIELD | 8487 #undef WRITE_BYTE_FIELD |
8488 #undef NOBARRIER_READ_BYTE_FIELD | 8488 #undef NOBARRIER_READ_BYTE_FIELD |
8489 #undef NOBARRIER_WRITE_BYTE_FIELD | 8489 #undef NOBARRIER_WRITE_BYTE_FIELD |
8490 | 8490 |
8491 } // namespace internal | 8491 } // namespace internal |
8492 } // namespace v8 | 8492 } // namespace v8 |
8493 | 8493 |
8494 #endif // V8_OBJECTS_INL_H_ | 8494 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |