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 13811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13822 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 13822 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
13823 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); | 13823 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
13824 } else if (mode == RelocInfo::CELL) { | 13824 } else if (mode == RelocInfo::CELL) { |
13825 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); | 13825 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); |
13826 } | 13826 } |
13827 } | 13827 } |
13828 } | 13828 } |
13829 | 13829 |
13830 | 13830 |
13831 void Code::Relocate(intptr_t delta) { | 13831 void Code::Relocate(intptr_t delta) { |
13832 if (trap_handler::UseTrapHandler() && is_wasm_code()) { | |
13833 const int index = trap_handler_index()->value(); | |
13834 if (index >= 0) { | |
13835 trap_handler::UpdateHandlerDataCodePointer(index, instruction_start()); | |
13836 } | |
13837 } | |
13838 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 13832 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
13839 it.rinfo()->apply(delta); | 13833 it.rinfo()->apply(delta); |
13840 } | 13834 } |
13841 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); | 13835 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
13842 } | 13836 } |
13843 | 13837 |
13844 | 13838 |
13845 void Code::CopyFrom(const CodeDesc& desc) { | 13839 void Code::CopyFrom(const CodeDesc& desc) { |
13846 // copy code | 13840 // copy code |
13847 CopyBytes(instruction_start(), desc.buffer, | 13841 CopyBytes(instruction_start(), desc.buffer, |
(...skipping 6392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20240 // depend on this. | 20234 // depend on this. |
20241 return DICTIONARY_ELEMENTS; | 20235 return DICTIONARY_ELEMENTS; |
20242 } | 20236 } |
20243 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20237 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20244 return kind; | 20238 return kind; |
20245 } | 20239 } |
20246 } | 20240 } |
20247 | 20241 |
20248 } // namespace internal | 20242 } // namespace internal |
20249 } // namespace v8 | 20243 } // namespace v8 |
OLD | NEW |