OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <iomanip> | 7 #include <iomanip> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 11102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11113 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); | 11113 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); |
11114 } | 11114 } |
11115 } | 11115 } |
11116 } | 11116 } |
11117 | 11117 |
11118 | 11118 |
11119 void Code::Relocate(intptr_t delta) { | 11119 void Code::Relocate(intptr_t delta) { |
11120 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 11120 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
11121 it.rinfo()->apply(delta); | 11121 it.rinfo()->apply(delta); |
11122 } | 11122 } |
11123 CpuFeatures::FlushICache(instruction_start(), instruction_size()); | 11123 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
11124 } | 11124 } |
11125 | 11125 |
11126 | 11126 |
11127 void Code::CopyFrom(const CodeDesc& desc) { | 11127 void Code::CopyFrom(const CodeDesc& desc) { |
11128 DCHECK(Marking::Color(this) == Marking::WHITE_OBJECT); | 11128 DCHECK(Marking::Color(this) == Marking::WHITE_OBJECT); |
11129 | 11129 |
11130 // copy code | 11130 // copy code |
11131 CopyBytes(instruction_start(), desc.buffer, | 11131 CopyBytes(instruction_start(), desc.buffer, |
11132 static_cast<size_t>(desc.instr_size)); | 11132 static_cast<size_t>(desc.instr_size)); |
11133 | 11133 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11167 it.rinfo()->set_target_runtime_entry(p, SKIP_WRITE_BARRIER, | 11167 it.rinfo()->set_target_runtime_entry(p, SKIP_WRITE_BARRIER, |
11168 SKIP_ICACHE_FLUSH); | 11168 SKIP_ICACHE_FLUSH); |
11169 } else if (mode == RelocInfo::CODE_AGE_SEQUENCE) { | 11169 } else if (mode == RelocInfo::CODE_AGE_SEQUENCE) { |
11170 Handle<Object> p = it.rinfo()->code_age_stub_handle(origin); | 11170 Handle<Object> p = it.rinfo()->code_age_stub_handle(origin); |
11171 Code* code = Code::cast(*p); | 11171 Code* code = Code::cast(*p); |
11172 it.rinfo()->set_code_age_stub(code, SKIP_ICACHE_FLUSH); | 11172 it.rinfo()->set_code_age_stub(code, SKIP_ICACHE_FLUSH); |
11173 } else { | 11173 } else { |
11174 it.rinfo()->apply(delta); | 11174 it.rinfo()->apply(delta); |
11175 } | 11175 } |
11176 } | 11176 } |
11177 CpuFeatures::FlushICache(instruction_start(), instruction_size()); | 11177 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); |
11178 } | 11178 } |
11179 | 11179 |
11180 | 11180 |
11181 // Locate the source position which is closest to the address in the code. This | 11181 // Locate the source position which is closest to the address in the code. This |
11182 // is using the source position information embedded in the relocation info. | 11182 // is using the source position information embedded in the relocation info. |
11183 // The position returned is relative to the beginning of the script where the | 11183 // The position returned is relative to the beginning of the script where the |
11184 // source for this function is found. | 11184 // source for this function is found. |
11185 int Code::SourcePosition(Address pc) { | 11185 int Code::SourcePosition(Address pc) { |
11186 int distance = kMaxInt; | 11186 int distance = kMaxInt; |
11187 int position = RelocInfo::kNoPosition; // Initially no position found. | 11187 int position = RelocInfo::kNoPosition; // Initially no position found. |
(...skipping 5164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16352 if (cell->value() != *new_value) { | 16352 if (cell->value() != *new_value) { |
16353 cell->set_value(*new_value); | 16353 cell->set_value(*new_value); |
16354 Isolate* isolate = cell->GetIsolate(); | 16354 Isolate* isolate = cell->GetIsolate(); |
16355 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16355 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
16356 isolate, DependentCode::kPropertyCellChangedGroup); | 16356 isolate, DependentCode::kPropertyCellChangedGroup); |
16357 } | 16357 } |
16358 } | 16358 } |
16359 | 16359 |
16360 } // namespace internal | 16360 } // namespace internal |
16361 } // namespace v8 | 16361 } // namespace v8 |
OLD | NEW |