| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 171 TYPE_CHECKER(JSStringIterator, JS_STRING_ITERATOR_TYPE) | 171 TYPE_CHECKER(JSStringIterator, JS_STRING_ITERATOR_TYPE) | 
| 172 TYPE_CHECKER(JSTypedArray, JS_TYPED_ARRAY_TYPE) | 172 TYPE_CHECKER(JSTypedArray, JS_TYPED_ARRAY_TYPE) | 
| 173 TYPE_CHECKER(JSValue, JS_VALUE_TYPE) | 173 TYPE_CHECKER(JSValue, JS_VALUE_TYPE) | 
| 174 TYPE_CHECKER(JSWeakMap, JS_WEAK_MAP_TYPE) | 174 TYPE_CHECKER(JSWeakMap, JS_WEAK_MAP_TYPE) | 
| 175 TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE) | 175 TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE) | 
| 176 TYPE_CHECKER(Map, MAP_TYPE) | 176 TYPE_CHECKER(Map, MAP_TYPE) | 
| 177 TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE) | 177 TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE) | 
| 178 TYPE_CHECKER(Oddball, ODDBALL_TYPE) | 178 TYPE_CHECKER(Oddball, ODDBALL_TYPE) | 
| 179 TYPE_CHECKER(PropertyCell, PROPERTY_CELL_TYPE) | 179 TYPE_CHECKER(PropertyCell, PROPERTY_CELL_TYPE) | 
| 180 TYPE_CHECKER(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE) | 180 TYPE_CHECKER(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE) | 
|  | 181 TYPE_CHECKER(SourcePositionTableWithFrameCache, TUPLE2_TYPE) | 
| 181 TYPE_CHECKER(Symbol, SYMBOL_TYPE) | 182 TYPE_CHECKER(Symbol, SYMBOL_TYPE) | 
| 182 TYPE_CHECKER(TransitionArray, TRANSITION_ARRAY_TYPE) | 183 TYPE_CHECKER(TransitionArray, TRANSITION_ARRAY_TYPE) | 
| 183 TYPE_CHECKER(WeakCell, WEAK_CELL_TYPE) | 184 TYPE_CHECKER(WeakCell, WEAK_CELL_TYPE) | 
| 184 TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE) | 185 TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE) | 
| 185 | 186 | 
| 186 #define TYPED_ARRAY_TYPE_CHECKER(Type, type, TYPE, ctype, size) \ | 187 #define TYPED_ARRAY_TYPE_CHECKER(Type, type, TYPE, ctype, size) \ | 
| 187   TYPE_CHECKER(Fixed##Type##Array, FIXED_##TYPE##_ARRAY_TYPE) | 188   TYPE_CHECKER(Fixed##Type##Array, FIXED_##TYPE##_ARRAY_TYPE) | 
| 188 TYPED_ARRAYS(TYPED_ARRAY_TYPE_CHECKER) | 189 TYPED_ARRAYS(TYPED_ARRAY_TYPE_CHECKER) | 
| 189 #undef TYPED_ARRAY_TYPE_CHECKER | 190 #undef TYPED_ARRAY_TYPE_CHECKER | 
| 190 | 191 | 
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 677 CAST_ACCESSOR(OrderedHashSet) | 678 CAST_ACCESSOR(OrderedHashSet) | 
| 678 CAST_ACCESSOR(PropertyCell) | 679 CAST_ACCESSOR(PropertyCell) | 
| 679 CAST_ACCESSOR(TemplateList) | 680 CAST_ACCESSOR(TemplateList) | 
| 680 CAST_ACCESSOR(RegExpMatchInfo) | 681 CAST_ACCESSOR(RegExpMatchInfo) | 
| 681 CAST_ACCESSOR(ScopeInfo) | 682 CAST_ACCESSOR(ScopeInfo) | 
| 682 CAST_ACCESSOR(SeededNumberDictionary) | 683 CAST_ACCESSOR(SeededNumberDictionary) | 
| 683 CAST_ACCESSOR(SeqOneByteString) | 684 CAST_ACCESSOR(SeqOneByteString) | 
| 684 CAST_ACCESSOR(SeqString) | 685 CAST_ACCESSOR(SeqString) | 
| 685 CAST_ACCESSOR(SeqTwoByteString) | 686 CAST_ACCESSOR(SeqTwoByteString) | 
| 686 CAST_ACCESSOR(SharedFunctionInfo) | 687 CAST_ACCESSOR(SharedFunctionInfo) | 
|  | 688 CAST_ACCESSOR(SourcePositionTableWithFrameCache) | 
| 687 CAST_ACCESSOR(SlicedString) | 689 CAST_ACCESSOR(SlicedString) | 
| 688 CAST_ACCESSOR(Smi) | 690 CAST_ACCESSOR(Smi) | 
| 689 CAST_ACCESSOR(String) | 691 CAST_ACCESSOR(String) | 
| 690 CAST_ACCESSOR(StringSet) | 692 CAST_ACCESSOR(StringSet) | 
| 691 CAST_ACCESSOR(StringTable) | 693 CAST_ACCESSOR(StringTable) | 
| 692 CAST_ACCESSOR(Struct) | 694 CAST_ACCESSOR(Struct) | 
| 693 CAST_ACCESSOR(Symbol) | 695 CAST_ACCESSOR(Symbol) | 
| 694 CAST_ACCESSOR(TemplateInfo) | 696 CAST_ACCESSOR(TemplateInfo) | 
| 695 CAST_ACCESSOR(ThinString) | 697 CAST_ACCESSOR(ThinString) | 
| 696 CAST_ACCESSOR(UnseededNumberDictionary) | 698 CAST_ACCESSOR(UnseededNumberDictionary) | 
| (...skipping 3321 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4018 } | 4020 } | 
| 4019 | 4021 | 
| 4020 int BytecodeArray::parameter_count() const { | 4022 int BytecodeArray::parameter_count() const { | 
| 4021   // Parameter count is stored as the size on stack of the parameters to allow | 4023   // Parameter count is stored as the size on stack of the parameters to allow | 
| 4022   // it to be used directly by generated code. | 4024   // it to be used directly by generated code. | 
| 4023   return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2; | 4025   return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2; | 
| 4024 } | 4026 } | 
| 4025 | 4027 | 
| 4026 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) | 4028 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) | 
| 4027 ACCESSORS(BytecodeArray, handler_table, FixedArray, kHandlerTableOffset) | 4029 ACCESSORS(BytecodeArray, handler_table, FixedArray, kHandlerTableOffset) | 
| 4028 ACCESSORS(BytecodeArray, source_position_table, ByteArray, | 4030 ACCESSORS(BytecodeArray, source_position_table, Object, | 
| 4029           kSourcePositionTableOffset) | 4031           kSourcePositionTableOffset) | 
| 4030 | 4032 | 
| 4031 Address BytecodeArray::GetFirstBytecodeAddress() { | 4033 Address BytecodeArray::GetFirstBytecodeAddress() { | 
| 4032   return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize; | 4034   return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize; | 
| 4033 } | 4035 } | 
| 4034 | 4036 | 
|  | 4037 ByteArray* BytecodeArray::SourcePositionTable() { | 
|  | 4038   Object* maybe_table = source_position_table(); | 
|  | 4039   if (maybe_table->IsByteArray()) return ByteArray::cast(maybe_table); | 
|  | 4040   DCHECK(maybe_table->IsSourcePositionTableWithFrameCache()); | 
|  | 4041   return SourcePositionTableWithFrameCache::cast(maybe_table) | 
|  | 4042       ->source_position_table(); | 
|  | 4043 } | 
| 4035 | 4044 | 
| 4036 int BytecodeArray::BytecodeArraySize() { return SizeFor(this->length()); } | 4045 int BytecodeArray::BytecodeArraySize() { return SizeFor(this->length()); } | 
| 4037 | 4046 | 
| 4038 int BytecodeArray::SizeIncludingMetadata() { | 4047 int BytecodeArray::SizeIncludingMetadata() { | 
| 4039   int size = BytecodeArraySize(); | 4048   int size = BytecodeArraySize(); | 
| 4040   size += constant_pool()->Size(); | 4049   size += constant_pool()->Size(); | 
| 4041   size += handler_table()->Size(); | 4050   size += handler_table()->Size(); | 
| 4042   size += source_position_table()->Size(); | 4051   size += SourcePositionTable()->Size(); | 
| 4043   return size; | 4052   return size; | 
| 4044 } | 4053 } | 
| 4045 | 4054 | 
| 4046 ACCESSORS(FixedTypedArrayBase, base_pointer, Object, kBasePointerOffset) | 4055 ACCESSORS(FixedTypedArrayBase, base_pointer, Object, kBasePointerOffset) | 
| 4047 | 4056 | 
| 4048 | 4057 | 
| 4049 void* FixedTypedArrayBase::external_pointer() const { | 4058 void* FixedTypedArrayBase::external_pointer() const { | 
| 4050   intptr_t ptr = READ_INTPTR_FIELD(this, kExternalPointerOffset); | 4059   intptr_t ptr = READ_INTPTR_FIELD(this, kExternalPointerOffset); | 
| 4051   return reinterpret_cast<void*>(ptr); | 4060   return reinterpret_cast<void*>(ptr); | 
| 4052 } | 4061 } | 
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5232 int AbstractCode::instruction_size() { | 5241 int AbstractCode::instruction_size() { | 
| 5233   if (IsCode()) { | 5242   if (IsCode()) { | 
| 5234     return GetCode()->instruction_size(); | 5243     return GetCode()->instruction_size(); | 
| 5235   } else { | 5244   } else { | 
| 5236     return GetBytecodeArray()->length(); | 5245     return GetBytecodeArray()->length(); | 
| 5237   } | 5246   } | 
| 5238 } | 5247 } | 
| 5239 | 5248 | 
| 5240 ByteArray* AbstractCode::source_position_table() { | 5249 ByteArray* AbstractCode::source_position_table() { | 
| 5241   if (IsCode()) { | 5250   if (IsCode()) { | 
| 5242     return GetCode()->source_position_table(); | 5251     return GetCode()->SourcePositionTable(); | 
| 5243   } else { | 5252   } else { | 
| 5244     return GetBytecodeArray()->source_position_table(); | 5253     return GetBytecodeArray()->SourcePositionTable(); | 
| 5245   } | 5254   } | 
| 5246 } | 5255 } | 
| 5247 | 5256 | 
| 5248 void AbstractCode::set_source_position_table(ByteArray* source_position_table) { | 5257 void AbstractCode::set_source_position_table(ByteArray* source_position_table) { | 
| 5249   if (IsCode()) { | 5258   if (IsCode()) { | 
| 5250     GetCode()->set_source_position_table(source_position_table); | 5259     GetCode()->set_source_position_table(source_position_table); | 
| 5251   } else { | 5260   } else { | 
| 5252     GetBytecodeArray()->set_source_position_table(source_position_table); | 5261     GetBytecodeArray()->set_source_position_table(source_position_table); | 
| 5253   } | 5262   } | 
| 5254 } | 5263 } | 
| 5255 | 5264 | 
|  | 5265 Object* AbstractCode::stack_frame_cache() { | 
|  | 5266   Object* maybe_table; | 
|  | 5267   if (IsCode()) { | 
|  | 5268     maybe_table = GetCode()->source_position_table(); | 
|  | 5269   } else { | 
|  | 5270     maybe_table = GetBytecodeArray()->source_position_table(); | 
|  | 5271   } | 
|  | 5272   if (maybe_table->IsSourcePositionTableWithFrameCache()) { | 
|  | 5273     return SourcePositionTableWithFrameCache::cast(maybe_table) | 
|  | 5274         ->stack_frame_cache(); | 
|  | 5275   } | 
|  | 5276   return Smi::kZero; | 
|  | 5277 } | 
|  | 5278 | 
| 5256 int AbstractCode::SizeIncludingMetadata() { | 5279 int AbstractCode::SizeIncludingMetadata() { | 
| 5257   if (IsCode()) { | 5280   if (IsCode()) { | 
| 5258     return GetCode()->SizeIncludingMetadata(); | 5281     return GetCode()->SizeIncludingMetadata(); | 
| 5259   } else { | 5282   } else { | 
| 5260     return GetBytecodeArray()->SizeIncludingMetadata(); | 5283     return GetBytecodeArray()->SizeIncludingMetadata(); | 
| 5261   } | 5284   } | 
| 5262 } | 5285 } | 
| 5263 int AbstractCode::ExecutableSize() { | 5286 int AbstractCode::ExecutableSize() { | 
| 5264   if (IsCode()) { | 5287   if (IsCode()) { | 
| 5265     return GetCode()->ExecutableSize(); | 5288     return GetCode()->ExecutableSize(); | 
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5818 SMI_ACCESSORS(StackFrameInfo, script_id, kScriptIdIndex) | 5841 SMI_ACCESSORS(StackFrameInfo, script_id, kScriptIdIndex) | 
| 5819 ACCESSORS(StackFrameInfo, script_name, Object, kScriptNameIndex) | 5842 ACCESSORS(StackFrameInfo, script_name, Object, kScriptNameIndex) | 
| 5820 ACCESSORS(StackFrameInfo, script_name_or_source_url, Object, | 5843 ACCESSORS(StackFrameInfo, script_name_or_source_url, Object, | 
| 5821           kScriptNameOrSourceUrlIndex) | 5844           kScriptNameOrSourceUrlIndex) | 
| 5822 ACCESSORS(StackFrameInfo, function_name, Object, kFunctionNameIndex) | 5845 ACCESSORS(StackFrameInfo, function_name, Object, kFunctionNameIndex) | 
| 5823 SMI_ACCESSORS(StackFrameInfo, flag, kFlagIndex) | 5846 SMI_ACCESSORS(StackFrameInfo, flag, kFlagIndex) | 
| 5824 BOOL_ACCESSORS(StackFrameInfo, flag, is_eval, kIsEvalBit) | 5847 BOOL_ACCESSORS(StackFrameInfo, flag, is_eval, kIsEvalBit) | 
| 5825 BOOL_ACCESSORS(StackFrameInfo, flag, is_constructor, kIsConstructorBit) | 5848 BOOL_ACCESSORS(StackFrameInfo, flag, is_constructor, kIsConstructorBit) | 
| 5826 BOOL_ACCESSORS(StackFrameInfo, flag, is_wasm, kIsWasmBit) | 5849 BOOL_ACCESSORS(StackFrameInfo, flag, is_wasm, kIsWasmBit) | 
| 5827 | 5850 | 
|  | 5851 ACCESSORS(SourcePositionTableWithFrameCache, source_position_table, ByteArray, | 
|  | 5852           kSourcePositionTableIndex) | 
|  | 5853 ACCESSORS(SourcePositionTableWithFrameCache, stack_frame_cache, | 
|  | 5854           UnseededNumberDictionary, kStackFrameCacheIndex) | 
|  | 5855 | 
| 5828 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 5856 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 
| 5829 ACCESSORS(SharedFunctionInfo, optimized_code_map, FixedArray, | 5857 ACCESSORS(SharedFunctionInfo, optimized_code_map, FixedArray, | 
| 5830           kOptimizedCodeMapOffset) | 5858           kOptimizedCodeMapOffset) | 
| 5831 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 5859 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 
| 5832 ACCESSORS(SharedFunctionInfo, feedback_metadata, FeedbackMetadata, | 5860 ACCESSORS(SharedFunctionInfo, feedback_metadata, FeedbackMetadata, | 
| 5833           kFeedbackMetadataOffset) | 5861           kFeedbackMetadataOffset) | 
| 5834 SMI_ACCESSORS(SharedFunctionInfo, function_literal_id, kFunctionLiteralIdOffset) | 5862 SMI_ACCESSORS(SharedFunctionInfo, function_literal_id, kFunctionLiteralIdOffset) | 
| 5835 #if TRACE_MAPS | 5863 #if TRACE_MAPS | 
| 5836 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) | 5864 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) | 
| 5837 #endif | 5865 #endif | 
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6644 | 6672 | 
| 6645 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) | 6673 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) | 
| 6646 INT_ACCESSORS(Code, prologue_offset, kPrologueOffset) | 6674 INT_ACCESSORS(Code, prologue_offset, kPrologueOffset) | 
| 6647 INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset) | 6675 INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset) | 
| 6648 #define CODE_ACCESSORS(name, type, offset)           \ | 6676 #define CODE_ACCESSORS(name, type, offset)           \ | 
| 6649   ACCESSORS_CHECKED2(Code, name, type, offset, true, \ | 6677   ACCESSORS_CHECKED2(Code, name, type, offset, true, \ | 
| 6650                      !GetHeap()->InNewSpace(value)) | 6678                      !GetHeap()->InNewSpace(value)) | 
| 6651 CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset) | 6679 CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset) | 
| 6652 CODE_ACCESSORS(handler_table, FixedArray, kHandlerTableOffset) | 6680 CODE_ACCESSORS(handler_table, FixedArray, kHandlerTableOffset) | 
| 6653 CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset) | 6681 CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset) | 
| 6654 CODE_ACCESSORS(source_position_table, ByteArray, kSourcePositionTableOffset) | 6682 CODE_ACCESSORS(source_position_table, Object, kSourcePositionTableOffset) | 
| 6655 CODE_ACCESSORS(trap_handler_index, Smi, kTrapHandlerIndex) | 6683 CODE_ACCESSORS(trap_handler_index, Smi, kTrapHandlerIndex) | 
| 6656 CODE_ACCESSORS(raw_type_feedback_info, Object, kTypeFeedbackInfoOffset) | 6684 CODE_ACCESSORS(raw_type_feedback_info, Object, kTypeFeedbackInfoOffset) | 
| 6657 CODE_ACCESSORS(next_code_link, Object, kNextCodeLinkOffset) | 6685 CODE_ACCESSORS(next_code_link, Object, kNextCodeLinkOffset) | 
| 6658 #undef CODE_ACCESSORS | 6686 #undef CODE_ACCESSORS | 
| 6659 | 6687 | 
| 6660 void Code::WipeOutHeader() { | 6688 void Code::WipeOutHeader() { | 
| 6661   WRITE_FIELD(this, kRelocationInfoOffset, NULL); | 6689   WRITE_FIELD(this, kRelocationInfoOffset, NULL); | 
| 6662   WRITE_FIELD(this, kHandlerTableOffset, NULL); | 6690   WRITE_FIELD(this, kHandlerTableOffset, NULL); | 
| 6663   WRITE_FIELD(this, kDeoptimizationDataOffset, NULL); | 6691   WRITE_FIELD(this, kDeoptimizationDataOffset, NULL); | 
| 6664   WRITE_FIELD(this, kSourcePositionTableOffset, NULL); | 6692   WRITE_FIELD(this, kSourcePositionTableOffset, NULL); | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 6677 } | 6705 } | 
| 6678 | 6706 | 
| 6679 | 6707 | 
| 6680 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { | 6708 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { | 
| 6681   DCHECK(kind() == FUNCTION); | 6709   DCHECK(kind() == FUNCTION); | 
| 6682   set_raw_type_feedback_info(value, mode); | 6710   set_raw_type_feedback_info(value, mode); | 
| 6683   CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, | 6711   CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, | 
| 6684                             value, mode); | 6712                             value, mode); | 
| 6685 } | 6713 } | 
| 6686 | 6714 | 
|  | 6715 ByteArray* Code::SourcePositionTable() { | 
|  | 6716   Object* maybe_table = source_position_table(); | 
|  | 6717   if (maybe_table->IsByteArray()) return ByteArray::cast(maybe_table); | 
|  | 6718   DCHECK(maybe_table->IsSourcePositionTableWithFrameCache()); | 
|  | 6719   return SourcePositionTableWithFrameCache::cast(maybe_table) | 
|  | 6720       ->source_position_table(); | 
|  | 6721 } | 
| 6687 | 6722 | 
| 6688 uint32_t Code::stub_key() { | 6723 uint32_t Code::stub_key() { | 
| 6689   DCHECK(IsCodeStubOrIC()); | 6724   DCHECK(IsCodeStubOrIC()); | 
| 6690   Smi* smi_key = Smi::cast(raw_type_feedback_info()); | 6725   Smi* smi_key = Smi::cast(raw_type_feedback_info()); | 
| 6691   return static_cast<uint32_t>(smi_key->value()); | 6726   return static_cast<uint32_t>(smi_key->value()); | 
| 6692 } | 6727 } | 
| 6693 | 6728 | 
| 6694 | 6729 | 
| 6695 void Code::set_stub_key(uint32_t key) { | 6730 void Code::set_stub_key(uint32_t key) { | 
| 6696   DCHECK(IsCodeStubOrIC()); | 6731   DCHECK(IsCodeStubOrIC()); | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6743           ? static_cast<int>(unwinding_info_end() - instruction_start()) | 6778           ? static_cast<int>(unwinding_info_end() - instruction_start()) | 
| 6744           : instruction_size(); | 6779           : instruction_size(); | 
| 6745   return RoundUp(unpadded_body_size, kObjectAlignment); | 6780   return RoundUp(unpadded_body_size, kObjectAlignment); | 
| 6746 } | 6781 } | 
| 6747 | 6782 | 
| 6748 int Code::SizeIncludingMetadata() { | 6783 int Code::SizeIncludingMetadata() { | 
| 6749   int size = CodeSize(); | 6784   int size = CodeSize(); | 
| 6750   size += relocation_info()->Size(); | 6785   size += relocation_info()->Size(); | 
| 6751   size += deoptimization_data()->Size(); | 6786   size += deoptimization_data()->Size(); | 
| 6752   size += handler_table()->Size(); | 6787   size += handler_table()->Size(); | 
| 6753   if (kind() == FUNCTION) size += source_position_table()->Size(); | 6788   if (kind() == FUNCTION) { | 
|  | 6789     size += SourcePositionTable()->Size(); | 
|  | 6790   } | 
| 6754   return size; | 6791   return size; | 
| 6755 } | 6792 } | 
| 6756 | 6793 | 
| 6757 ByteArray* Code::unchecked_relocation_info() { | 6794 ByteArray* Code::unchecked_relocation_info() { | 
| 6758   return reinterpret_cast<ByteArray*>(READ_FIELD(this, kRelocationInfoOffset)); | 6795   return reinterpret_cast<ByteArray*>(READ_FIELD(this, kRelocationInfoOffset)); | 
| 6759 } | 6796 } | 
| 6760 | 6797 | 
| 6761 | 6798 | 
| 6762 byte* Code::relocation_start() { | 6799 byte* Code::relocation_start() { | 
| 6763   return unchecked_relocation_info()->GetDataStartAddress(); | 6800   return unchecked_relocation_info()->GetDataStartAddress(); | 
| (...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 8274 #undef WRITE_BYTE_FIELD | 8311 #undef WRITE_BYTE_FIELD | 
| 8275 #undef NOBARRIER_READ_BYTE_FIELD | 8312 #undef NOBARRIER_READ_BYTE_FIELD | 
| 8276 #undef NOBARRIER_WRITE_BYTE_FIELD | 8313 #undef NOBARRIER_WRITE_BYTE_FIELD | 
| 8277 | 8314 | 
| 8278 }  // namespace internal | 8315 }  // namespace internal | 
| 8279 }  // namespace v8 | 8316 }  // namespace v8 | 
| 8280 | 8317 | 
| 8281 #include "src/objects/object-macros-undef.h" | 8318 #include "src/objects/object-macros-undef.h" | 
| 8282 | 8319 | 
| 8283 #endif  // V8_OBJECTS_INL_H_ | 8320 #endif  // V8_OBJECTS_INL_H_ | 
| OLD | NEW | 
|---|