OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ | 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ |
6 #define V8_X64_ASSEMBLER_X64_INL_H_ | 6 #define V8_X64_ASSEMBLER_X64_INL_H_ |
7 | 7 |
8 #include "src/x64/assembler-x64.h" | 8 #include "src/x64/assembler-x64.h" |
9 | 9 |
10 #include "src/base/cpu.h" | 10 #include "src/base/cpu.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 Address RelocInfo::target_reference() { | 300 Address RelocInfo::target_reference() { |
301 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); | 301 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); |
302 return Memory::Address_at(pc_); | 302 return Memory::Address_at(pc_); |
303 } | 303 } |
304 | 304 |
305 | 305 |
306 void RelocInfo::set_target_object(Object* target, | 306 void RelocInfo::set_target_object(Object* target, |
307 WriteBarrierMode write_barrier_mode, | 307 WriteBarrierMode write_barrier_mode, |
308 ICacheFlushMode icache_flush_mode) { | 308 ICacheFlushMode icache_flush_mode) { |
309 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 309 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
310 ASSERT(!target->IsConsString()); | |
311 Memory::Object_at(pc_) = target; | 310 Memory::Object_at(pc_) = target; |
312 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 311 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
313 CpuFeatures::FlushICache(pc_, sizeof(Address)); | 312 CpuFeatures::FlushICache(pc_, sizeof(Address)); |
314 } | 313 } |
315 if (write_barrier_mode == UPDATE_WRITE_BARRIER && | 314 if (write_barrier_mode == UPDATE_WRITE_BARRIER && |
316 host() != NULL && | 315 host() != NULL && |
317 target->IsHeapObject()) { | 316 target->IsHeapObject()) { |
318 host()->GetHeap()->incremental_marking()->RecordWrite( | 317 host()->GetHeap()->incremental_marking()->RecordWrite( |
319 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); | 318 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); |
320 } | 319 } |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 ASSERT(len_ == 1 || len_ == 2); | 549 ASSERT(len_ == 1 || len_ == 2); |
551 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 550 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
552 *p = disp; | 551 *p = disp; |
553 len_ += sizeof(int32_t); | 552 len_ += sizeof(int32_t); |
554 } | 553 } |
555 | 554 |
556 | 555 |
557 } } // namespace v8::internal | 556 } } // namespace v8::internal |
558 | 557 |
559 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 558 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |