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 13680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13691 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 13691 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
13692 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); | 13692 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
13693 } else if (mode == RelocInfo::CELL) { | 13693 } else if (mode == RelocInfo::CELL) { |
13694 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); | 13694 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); |
13695 } | 13695 } |
13696 } | 13696 } |
13697 } | 13697 } |
13698 | 13698 |
13699 | 13699 |
13700 void Code::Relocate(intptr_t delta) { | 13700 void Code::Relocate(intptr_t delta) { |
| 13701 if (trap_handler::ShouldEnableTrapHandler() && is_wasm_code()) { |
| 13702 const int index = trap_handler_index()->value(); |
| 13703 if (index >= 0) { |
| 13704 trap_handler::UpdateCodePointer(index, instruction_start()); |
| 13705 } |
| 13706 } |
13701 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 13707 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
13702 it.rinfo()->apply(delta); | 13708 it.rinfo()->apply(delta); |
13703 } | 13709 } |
13704 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); | 13710 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
13705 } | 13711 } |
13706 | 13712 |
13707 | 13713 |
13708 void Code::CopyFrom(const CodeDesc& desc) { | 13714 void Code::CopyFrom(const CodeDesc& desc) { |
13709 // copy code | 13715 // copy code |
13710 CopyBytes(instruction_start(), desc.buffer, | 13716 CopyBytes(instruction_start(), desc.buffer, |
(...skipping 6357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20068 // depend on this. | 20074 // depend on this. |
20069 return DICTIONARY_ELEMENTS; | 20075 return DICTIONARY_ELEMENTS; |
20070 } | 20076 } |
20071 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20077 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20072 return kind; | 20078 return kind; |
20073 } | 20079 } |
20074 } | 20080 } |
20075 | 20081 |
20076 } // namespace internal | 20082 } // namespace internal |
20077 } // namespace v8 | 20083 } // namespace v8 |
OLD | NEW |