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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { | 296 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { |
297 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 297 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
298 if (rmode_ == EMBEDDED_OBJECT) { | 298 if (rmode_ == EMBEDDED_OBJECT) { |
299 return Memory::Object_Handle_at(pc_); | 299 return Memory::Object_Handle_at(pc_); |
300 } else { | 300 } else { |
301 return origin->code_target_object_handle_at(pc_); | 301 return origin->code_target_object_handle_at(pc_); |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 | 305 |
306 Object** RelocInfo::target_object_address() { | |
307 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | |
308 return reinterpret_cast<Object**>(pc_); | |
309 } | |
310 | |
311 | |
312 Address RelocInfo::target_reference() { | 306 Address RelocInfo::target_reference() { |
313 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); | 307 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); |
314 return Memory::Address_at(pc_); | 308 return Memory::Address_at(pc_); |
315 } | 309 } |
316 | 310 |
317 | 311 |
318 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { | 312 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { |
319 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 313 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
320 ASSERT(!target->IsConsString()); | 314 ASSERT(!target->IsConsString()); |
321 Memory::Object_at(pc_) = target; | 315 Memory::Object_at(pc_) = target; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 ASSERT(len_ == 1 || len_ == 2); | 539 ASSERT(len_ == 1 || len_ == 2); |
546 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 540 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
547 *p = disp; | 541 *p = disp; |
548 len_ += sizeof(int32_t); | 542 len_ += sizeof(int32_t); |
549 } | 543 } |
550 | 544 |
551 | 545 |
552 } } // namespace v8::internal | 546 } } // namespace v8::internal |
553 | 547 |
554 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 548 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |