| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 3 // All Rights Reserved. | 3 // All Rights Reserved. |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // - Redistributions of source code must retain the above copyright notice, | 9 // - Redistributions of source code must retain the above copyright notice, |
| 10 // this list of conditions and the following disclaimer. | 10 // this list of conditions and the following disclaimer. |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 183 } |
| 184 | 184 |
| 185 | 185 |
| 186 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { | 186 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { |
| 187 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 187 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
| 188 return Handle<Object>(reinterpret_cast<Object**>( | 188 return Handle<Object>(reinterpret_cast<Object**>( |
| 189 Assembler::target_address_at(pc_))); | 189 Assembler::target_address_at(pc_))); |
| 190 } | 190 } |
| 191 | 191 |
| 192 | 192 |
| 193 Object** RelocInfo::target_object_address() { | |
| 194 // Provide a "natural pointer" to the embedded object, | |
| 195 // which can be de-referenced during heap iteration. | |
| 196 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | |
| 197 reconstructed_obj_ptr_ = | |
| 198 reinterpret_cast<Object*>(Assembler::target_address_at(pc_)); | |
| 199 return &reconstructed_obj_ptr_; | |
| 200 } | |
| 201 | |
| 202 | |
| 203 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { | 193 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { |
| 204 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 194 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
| 205 ASSERT(!target->IsConsString()); | 195 ASSERT(!target->IsConsString()); |
| 206 Assembler::set_target_address_at(pc_, reinterpret_cast<Address>(target)); | 196 Assembler::set_target_address_at(pc_, reinterpret_cast<Address>(target)); |
| 207 if (mode == UPDATE_WRITE_BARRIER && | 197 if (mode == UPDATE_WRITE_BARRIER && |
| 208 host() != NULL && | 198 host() != NULL && |
| 209 target->IsHeapObject()) { | 199 target->IsHeapObject()) { |
| 210 host()->GetHeap()->incremental_marking()->RecordWrite( | 200 host()->GetHeap()->incremental_marking()->RecordWrite( |
| 211 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); | 201 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); |
| 212 } | 202 } |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 } | 411 } |
| 422 *reinterpret_cast<Instr*>(pc_) = x; | 412 *reinterpret_cast<Instr*>(pc_) = x; |
| 423 pc_ += kInstrSize; | 413 pc_ += kInstrSize; |
| 424 CheckTrampolinePoolQuick(); | 414 CheckTrampolinePoolQuick(); |
| 425 } | 415 } |
| 426 | 416 |
| 427 | 417 |
| 428 } } // namespace v8::internal | 418 } } // namespace v8::internal |
| 429 | 419 |
| 430 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 420 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
| OLD | NEW |