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()); |
311 Memory::Object_at(pc_) = target; | 312 Memory::Object_at(pc_) = target; |
312 CPU::FlushICache(pc_, sizeof(Address)); | 313 CPU::FlushICache(pc_, sizeof(Address)); |
313 if (mode == UPDATE_WRITE_BARRIER && | 314 if (mode == UPDATE_WRITE_BARRIER && |
314 host() != NULL && | 315 host() != NULL && |
315 target->IsHeapObject()) { | 316 target->IsHeapObject()) { |
316 host()->GetHeap()->incremental_marking()->RecordWrite( | 317 host()->GetHeap()->incremental_marking()->RecordWrite( |
317 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); | 318 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); |
318 } | 319 } |
319 } | 320 } |
320 | 321 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 ASSERT(len_ == 1 || len_ == 2); | 529 ASSERT(len_ == 1 || len_ == 2); |
529 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 530 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
530 *p = disp; | 531 *p = disp; |
531 len_ += sizeof(int32_t); | 532 len_ += sizeof(int32_t); |
532 } | 533 } |
533 | 534 |
534 | 535 |
535 } } // namespace v8::internal | 536 } } // namespace v8::internal |
536 | 537 |
537 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 538 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |