| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 DCHECK(IsInConstantPool()); | 92 DCHECK(IsInConstantPool()); |
| 93 return Assembler::constant_pool_entry_address(pc_, host_->constant_pool()); | 93 return Assembler::constant_pool_entry_address(pc_, host_->constant_pool()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 | 96 |
| 97 int RelocInfo::target_address_size() { | 97 int RelocInfo::target_address_size() { |
| 98 return kPointerSize; | 98 return kPointerSize; |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| 102 void RelocInfo::set_target_address(Address target, | |
| 103 WriteBarrierMode write_barrier_mode, | |
| 104 ICacheFlushMode icache_flush_mode) { | |
| 105 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | |
| 106 Assembler::set_target_address_at(isolate_, pc_, host_, target, | |
| 107 icache_flush_mode); | |
| 108 if (write_barrier_mode == UPDATE_WRITE_BARRIER && | |
| 109 host() != NULL && IsCodeTarget(rmode_)) { | |
| 110 Object* target_code = Code::GetCodeFromTargetAddress(target); | |
| 111 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | |
| 112 host(), this, HeapObject::cast(target_code)); | |
| 113 } | |
| 114 } | |
| 115 | |
| 116 Object* RelocInfo::target_object() { | 102 Object* RelocInfo::target_object() { |
| 117 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 103 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
| 118 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_)); | 104 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_)); |
| 119 } | 105 } |
| 120 | 106 |
| 121 | 107 |
| 122 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { | 108 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { |
| 123 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 109 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
| 124 return Handle<Object>(reinterpret_cast<Object**>( | 110 return Handle<Object>(reinterpret_cast<Object**>( |
| 125 Assembler::target_address_at(pc_, host_))); | 111 Assembler::target_address_at(pc_, host_))); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 Assembler::FlushICache(isolate, pc, 4 * kInstrSize); | 588 Assembler::FlushICache(isolate, pc, 4 * kInstrSize); |
| 603 } | 589 } |
| 604 } | 590 } |
| 605 } | 591 } |
| 606 | 592 |
| 607 | 593 |
| 608 } // namespace internal | 594 } // namespace internal |
| 609 } // namespace v8 | 595 } // namespace v8 |
| 610 | 596 |
| 611 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ | 597 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ |
| OLD | NEW |