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 13827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13838 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 13838 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
13839 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); | 13839 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
13840 } else if (mode == RelocInfo::CELL) { | 13840 } else if (mode == RelocInfo::CELL) { |
13841 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); | 13841 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); |
13842 } | 13842 } |
13843 } | 13843 } |
13844 } | 13844 } |
13845 | 13845 |
13846 | 13846 |
13847 void Code::Relocate(intptr_t delta) { | 13847 void Code::Relocate(intptr_t delta) { |
13848 if (trap_handler::UseTrapHandler() && is_wasm_code()) { | |
13849 const int index = trap_handler_index()->value(); | |
13850 if (index >= 0) { | |
13851 trap_handler::UpdateHandlerDataCodePointer(index, instruction_start()); | |
13852 } | |
13853 } | |
13854 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 13848 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
13855 it.rinfo()->apply(delta); | 13849 it.rinfo()->apply(delta); |
13856 } | 13850 } |
13857 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); | 13851 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
13858 } | 13852 } |
13859 | 13853 |
13860 | 13854 |
13861 void Code::CopyFrom(const CodeDesc& desc) { | 13855 void Code::CopyFrom(const CodeDesc& desc) { |
13862 // copy code | 13856 // copy code |
13863 CopyBytes(instruction_start(), desc.buffer, | 13857 CopyBytes(instruction_start(), desc.buffer, |
(...skipping 6409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20273 // depend on this. | 20267 // depend on this. |
20274 return DICTIONARY_ELEMENTS; | 20268 return DICTIONARY_ELEMENTS; |
20275 } | 20269 } |
20276 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20270 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20277 return kind; | 20271 return kind; |
20278 } | 20272 } |
20279 } | 20273 } |
20280 | 20274 |
20281 } // namespace internal | 20275 } // namespace internal |
20282 } // namespace v8 | 20276 } // namespace v8 |
OLD | NEW |