| 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 6634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6645 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) | 6645 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) |
| 6646 INT_ACCESSORS(Code, prologue_offset, kPrologueOffset) | 6646 INT_ACCESSORS(Code, prologue_offset, kPrologueOffset) |
| 6647 INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset) | 6647 INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset) |
| 6648 #define CODE_ACCESSORS(name, type, offset) \ | 6648 #define CODE_ACCESSORS(name, type, offset) \ |
| 6649 ACCESSORS_CHECKED2(Code, name, type, offset, true, \ | 6649 ACCESSORS_CHECKED2(Code, name, type, offset, true, \ |
| 6650 !GetHeap()->InNewSpace(value)) | 6650 !GetHeap()->InNewSpace(value)) |
| 6651 CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset) | 6651 CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset) |
| 6652 CODE_ACCESSORS(handler_table, FixedArray, kHandlerTableOffset) | 6652 CODE_ACCESSORS(handler_table, FixedArray, kHandlerTableOffset) |
| 6653 CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset) | 6653 CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset) |
| 6654 CODE_ACCESSORS(source_position_table, ByteArray, kSourcePositionTableOffset) | 6654 CODE_ACCESSORS(source_position_table, ByteArray, kSourcePositionTableOffset) |
| 6655 CODE_ACCESSORS(trap_handler_index, Smi, kTrapHandlerIndex) | |
| 6656 CODE_ACCESSORS(raw_type_feedback_info, Object, kTypeFeedbackInfoOffset) | 6655 CODE_ACCESSORS(raw_type_feedback_info, Object, kTypeFeedbackInfoOffset) |
| 6657 CODE_ACCESSORS(next_code_link, Object, kNextCodeLinkOffset) | 6656 CODE_ACCESSORS(next_code_link, Object, kNextCodeLinkOffset) |
| 6658 #undef CODE_ACCESSORS | 6657 #undef CODE_ACCESSORS |
| 6659 | 6658 |
| 6660 void Code::WipeOutHeader() { | 6659 void Code::WipeOutHeader() { |
| 6661 WRITE_FIELD(this, kRelocationInfoOffset, NULL); | 6660 WRITE_FIELD(this, kRelocationInfoOffset, NULL); |
| 6662 WRITE_FIELD(this, kHandlerTableOffset, NULL); | 6661 WRITE_FIELD(this, kHandlerTableOffset, NULL); |
| 6663 WRITE_FIELD(this, kDeoptimizationDataOffset, NULL); | 6662 WRITE_FIELD(this, kDeoptimizationDataOffset, NULL); |
| 6664 WRITE_FIELD(this, kSourcePositionTableOffset, NULL); | 6663 WRITE_FIELD(this, kSourcePositionTableOffset, NULL); |
| 6665 // Do not wipe out major/minor keys on a code stub or IC | 6664 // Do not wipe out major/minor keys on a code stub or IC |
| (...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8272 #undef WRITE_INT64_FIELD | 8271 #undef WRITE_INT64_FIELD |
| 8273 #undef READ_BYTE_FIELD | 8272 #undef READ_BYTE_FIELD |
| 8274 #undef WRITE_BYTE_FIELD | 8273 #undef WRITE_BYTE_FIELD |
| 8275 #undef NOBARRIER_READ_BYTE_FIELD | 8274 #undef NOBARRIER_READ_BYTE_FIELD |
| 8276 #undef NOBARRIER_WRITE_BYTE_FIELD | 8275 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8277 | 8276 |
| 8278 } // namespace internal | 8277 } // namespace internal |
| 8279 } // namespace v8 | 8278 } // namespace v8 |
| 8280 | 8279 |
| 8281 #endif // V8_OBJECTS_INL_H_ | 8280 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |