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 } |
13832 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 13838 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
13833 it.rinfo()->apply(delta); | 13839 it.rinfo()->apply(delta); |
13834 } | 13840 } |
13835 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); | 13841 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
13836 } | 13842 } |
13837 | 13843 |
13838 | 13844 |
13839 void Code::CopyFrom(const CodeDesc& desc) { | 13845 void Code::CopyFrom(const CodeDesc& desc) { |
13840 // copy code | 13846 // copy code |
13841 CopyBytes(instruction_start(), desc.buffer, | 13847 CopyBytes(instruction_start(), desc.buffer, |
(...skipping 6392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20234 // depend on this. | 20240 // depend on this. |
20235 return DICTIONARY_ELEMENTS; | 20241 return DICTIONARY_ELEMENTS; |
20236 } | 20242 } |
20237 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20243 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20238 return kind; | 20244 return kind; |
20239 } | 20245 } |
20240 } | 20246 } |
20241 | 20247 |
20242 } // namespace internal | 20248 } // namespace internal |
20243 } // namespace v8 | 20249 } // namespace v8 |
OLD | NEW |