| 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 13844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13855 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 13855 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 13856 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); | 13856 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
| 13857 } else if (mode == RelocInfo::CELL) { | 13857 } else if (mode == RelocInfo::CELL) { |
| 13858 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); | 13858 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); |
| 13859 } | 13859 } |
| 13860 } | 13860 } |
| 13861 } | 13861 } |
| 13862 | 13862 |
| 13863 | 13863 |
| 13864 void Code::Relocate(intptr_t delta) { | 13864 void Code::Relocate(intptr_t delta) { |
| 13865 if (trap_handler::EnableTrapHandler() && is_wasm_code()) { |
| 13866 const int index = trap_handler_index()->value(); |
| 13867 if (index >= 0) { |
| 13868 trap_handler::UpdateCodePointer(index, instruction_start()); |
| 13869 } |
| 13870 } |
| 13865 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 13871 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
| 13866 it.rinfo()->apply(delta); | 13872 it.rinfo()->apply(delta); |
| 13867 } | 13873 } |
| 13868 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); | 13874 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
| 13869 } | 13875 } |
| 13870 | 13876 |
| 13871 | 13877 |
| 13872 void Code::CopyFrom(const CodeDesc& desc) { | 13878 void Code::CopyFrom(const CodeDesc& desc) { |
| 13873 // copy code | 13879 // copy code |
| 13874 CopyBytes(instruction_start(), desc.buffer, | 13880 CopyBytes(instruction_start(), desc.buffer, |
| (...skipping 6150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20025 // depend on this. | 20031 // depend on this. |
| 20026 return DICTIONARY_ELEMENTS; | 20032 return DICTIONARY_ELEMENTS; |
| 20027 } | 20033 } |
| 20028 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20034 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
| 20029 return kind; | 20035 return kind; |
| 20030 } | 20036 } |
| 20031 } | 20037 } |
| 20032 | 20038 |
| 20033 } // namespace internal | 20039 } // namespace internal |
| 20034 } // namespace v8 | 20040 } // namespace v8 |
| OLD | NEW |