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 13799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13810 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 13810 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
13811 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); | 13811 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
13812 } else if (mode == RelocInfo::CELL) { | 13812 } else if (mode == RelocInfo::CELL) { |
13813 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); | 13813 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); |
13814 } | 13814 } |
13815 } | 13815 } |
13816 } | 13816 } |
13817 | 13817 |
13818 | 13818 |
13819 void Code::Relocate(intptr_t delta) { | 13819 void Code::Relocate(intptr_t delta) { |
| 13820 if (trap_handler::EnableTrapHandler() && is_wasm_code()) { |
| 13821 const int index = trap_handler_index()->value(); |
| 13822 if (index >= 0) { |
| 13823 trap_handler::UpdateCodePointer(index, instruction_start()); |
| 13824 } |
| 13825 } |
13820 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 13826 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
13821 it.rinfo()->apply(delta); | 13827 it.rinfo()->apply(delta); |
13822 } | 13828 } |
13823 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); | 13829 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
13824 } | 13830 } |
13825 | 13831 |
13826 | 13832 |
13827 void Code::CopyFrom(const CodeDesc& desc) { | 13833 void Code::CopyFrom(const CodeDesc& desc) { |
13828 // copy code | 13834 // copy code |
13829 CopyBytes(instruction_start(), desc.buffer, | 13835 CopyBytes(instruction_start(), desc.buffer, |
(...skipping 6123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19953 // depend on this. | 19959 // depend on this. |
19954 return DICTIONARY_ELEMENTS; | 19960 return DICTIONARY_ELEMENTS; |
19955 } | 19961 } |
19956 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 19962 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
19957 return kind; | 19963 return kind; |
19958 } | 19964 } |
19959 } | 19965 } |
19960 | 19966 |
19961 } // namespace internal | 19967 } // namespace internal |
19962 } // namespace v8 | 19968 } // namespace v8 |
OLD | NEW |