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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 | 305 |
306 Object** RelocInfo::target_object_address() { | 306 Object** RelocInfo::target_object_address() { |
307 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 307 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
308 return reinterpret_cast<Object**>(pc_); | 308 return reinterpret_cast<Object**>(pc_); |
309 } | 309 } |
310 | 310 |
311 | 311 |
312 Address* RelocInfo::target_reference_address() { | 312 Address RelocInfo::target_reference() { |
313 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); | 313 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); |
314 return reinterpret_cast<Address*>(pc_); | 314 return Memory::Address_at(pc_); |
315 } | 315 } |
316 | 316 |
317 | 317 |
318 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { | 318 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { |
319 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 319 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
320 ASSERT(!target->IsConsString()); | 320 ASSERT(!target->IsConsString()); |
321 Memory::Object_at(pc_) = target; | 321 Memory::Object_at(pc_) = target; |
322 CPU::FlushICache(pc_, sizeof(Address)); | 322 CPU::FlushICache(pc_, sizeof(Address)); |
323 if (mode == UPDATE_WRITE_BARRIER && | 323 if (mode == UPDATE_WRITE_BARRIER && |
324 host() != NULL && | 324 host() != NULL && |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 ASSERT(len_ == 1 || len_ == 2); | 545 ASSERT(len_ == 1 || len_ == 2); |
546 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 546 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
547 *p = disp; | 547 *p = disp; |
548 len_ += sizeof(int32_t); | 548 len_ += sizeof(int32_t); |
549 } | 549 } |
550 | 550 |
551 | 551 |
552 } } // namespace v8::internal | 552 } } // namespace v8::internal |
553 | 553 |
554 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 554 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |