| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 13726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13737 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 13737 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 13738 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); | 13738 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
| 13739 } else if (mode == RelocInfo::CELL) { | 13739 } else if (mode == RelocInfo::CELL) { |
| 13740 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); | 13740 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); |
| 13741 } | 13741 } |
| 13742 } | 13742 } |
| 13743 } | 13743 } |
| 13744 | 13744 |
| 13745 | 13745 |
| 13746 void Code::Relocate(intptr_t delta) { | 13746 void Code::Relocate(intptr_t delta) { |
| 13747 if (trap_handler::UseTrapHandler() && is_wasm_code()) { |
| 13748 const int index = trap_handler_index()->value(); |
| 13749 if (index >= 0) { |
| 13750 trap_handler::UpdateHandlerDataCodePointer(index, instruction_start()); |
| 13751 } |
| 13752 } |
| 13747 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 13753 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
| 13748 it.rinfo()->apply(delta); | 13754 it.rinfo()->apply(delta); |
| 13749 } | 13755 } |
| 13750 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); | 13756 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
| 13751 } | 13757 } |
| 13752 | 13758 |
| 13753 | 13759 |
| 13754 void Code::CopyFrom(const CodeDesc& desc) { | 13760 void Code::CopyFrom(const CodeDesc& desc) { |
| 13755 // copy code | 13761 // copy code |
| 13756 CopyBytes(instruction_start(), desc.buffer, | 13762 CopyBytes(instruction_start(), desc.buffer, |
| (...skipping 6357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20114 // depend on this. | 20120 // depend on this. |
| 20115 return DICTIONARY_ELEMENTS; | 20121 return DICTIONARY_ELEMENTS; |
| 20116 } | 20122 } |
| 20117 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20123 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
| 20118 return kind; | 20124 return kind; |
| 20119 } | 20125 } |
| 20120 } | 20126 } |
| 20121 | 20127 |
| 20122 } // namespace internal | 20128 } // namespace internal |
| 20123 } // namespace v8 | 20129 } // namespace v8 |
| OLD | NEW |