OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 301 |
302 | 302 |
303 Address* RelocInfo::target_reference_address() { | 303 Address* RelocInfo::target_reference_address() { |
304 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); | 304 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); |
305 return reinterpret_cast<Address*>(pc_); | 305 return reinterpret_cast<Address*>(pc_); |
306 } | 306 } |
307 | 307 |
308 | 308 |
309 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { | 309 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { |
310 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 310 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
311 ASSERT(!target->IsConsString()); | |
312 Memory::Object_at(pc_) = target; | 311 Memory::Object_at(pc_) = target; |
313 CPU::FlushICache(pc_, sizeof(Address)); | 312 CPU::FlushICache(pc_, sizeof(Address)); |
314 if (mode == UPDATE_WRITE_BARRIER && | 313 if (mode == UPDATE_WRITE_BARRIER && |
315 host() != NULL && | 314 host() != NULL && |
316 target->IsHeapObject()) { | 315 target->IsHeapObject()) { |
317 host()->GetHeap()->incremental_marking()->RecordWrite( | 316 host()->GetHeap()->incremental_marking()->RecordWrite( |
318 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); | 317 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); |
319 } | 318 } |
320 } | 319 } |
321 | 320 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 ASSERT(len_ == 1 || len_ == 2); | 528 ASSERT(len_ == 1 || len_ == 2); |
530 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 529 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
531 *p = disp; | 530 *p = disp; |
532 len_ += sizeof(int32_t); | 531 len_ += sizeof(int32_t); |
533 } | 532 } |
534 | 533 |
535 | 534 |
536 } } // namespace v8::internal | 535 } } // namespace v8::internal |
537 | 536 |
538 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 537 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |