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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 bool HeapObject::IsDependentCode() const { | 731 bool HeapObject::IsDependentCode() const { |
732 if (!IsFixedArray()) return false; | 732 if (!IsFixedArray()) return false; |
733 // There's actually no way to see the difference between a fixed array and | 733 // There's actually no way to see the difference between a fixed array and |
734 // a dependent codes array. | 734 // a dependent codes array. |
735 return true; | 735 return true; |
736 } | 736 } |
737 | 737 |
738 bool HeapObject::IsContext() const { | 738 bool HeapObject::IsContext() const { |
739 Map* map = this->map(); | 739 Map* map = this->map(); |
740 Heap* heap = GetHeap(); | 740 Heap* heap = GetHeap(); |
741 return (map == heap->function_context_map() || | 741 return ( |
742 map == heap->catch_context_map() || | 742 map == heap->function_context_map() || map == heap->catch_context_map() || |
743 map == heap->with_context_map() || | 743 map == heap->with_context_map() || map == heap->native_context_map() || |
744 map == heap->native_context_map() || | 744 map == heap->block_context_map() || map == heap->module_context_map() || |
745 map == heap->block_context_map() || | 745 map == heap->script_context_map() || |
746 map == heap->module_context_map() || | 746 map == heap->debug_evaluate_context_map()); |
747 map == heap->script_context_map()); | |
748 } | 747 } |
749 | 748 |
750 bool HeapObject::IsNativeContext() const { | 749 bool HeapObject::IsNativeContext() const { |
751 return map() == GetHeap()->native_context_map(); | 750 return map() == GetHeap()->native_context_map(); |
752 } | 751 } |
753 | 752 |
754 bool HeapObject::IsScriptContextTable() const { | 753 bool HeapObject::IsScriptContextTable() const { |
755 return map() == GetHeap()->script_context_table_map(); | 754 return map() == GetHeap()->script_context_table_map(); |
756 } | 755 } |
757 | 756 |
(...skipping 7042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7800 #undef WRITE_INT64_FIELD | 7799 #undef WRITE_INT64_FIELD |
7801 #undef READ_BYTE_FIELD | 7800 #undef READ_BYTE_FIELD |
7802 #undef WRITE_BYTE_FIELD | 7801 #undef WRITE_BYTE_FIELD |
7803 #undef NOBARRIER_READ_BYTE_FIELD | 7802 #undef NOBARRIER_READ_BYTE_FIELD |
7804 #undef NOBARRIER_WRITE_BYTE_FIELD | 7803 #undef NOBARRIER_WRITE_BYTE_FIELD |
7805 | 7804 |
7806 } // namespace internal | 7805 } // namespace internal |
7807 } // namespace v8 | 7806 } // namespace v8 |
7808 | 7807 |
7809 #endif // V8_OBJECTS_INL_H_ | 7808 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |