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 are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); | 149 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); |
150 Assembler::set_target_address_at(pc_, target); | 150 Assembler::set_target_address_at(pc_, target); |
151 if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) { | 151 if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) { |
152 Object* target_code = Code::GetCodeFromTargetAddress(target); | 152 Object* target_code = Code::GetCodeFromTargetAddress(target); |
153 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | 153 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( |
154 host(), this, HeapObject::cast(target_code)); | 154 host(), this, HeapObject::cast(target_code)); |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 | 158 |
| 159 Address Assembler::target_address_from_return_address(Address pc) { |
| 160 return pc - kCallTargetAddressOffset; |
| 161 } |
| 162 |
| 163 |
159 Object* RelocInfo::target_object() { | 164 Object* RelocInfo::target_object() { |
160 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 165 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
161 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_)); | 166 return reinterpret_cast<Object*>(Assembler::target_address_at(pc_)); |
162 } | 167 } |
163 | 168 |
164 | 169 |
165 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { | 170 Handle<Object> RelocInfo::target_object_handle(Assembler* origin) { |
166 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 171 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
167 return Handle<Object>(reinterpret_cast<Object**>( | 172 return Handle<Object>(reinterpret_cast<Object**>( |
168 Assembler::target_address_at(pc_))); | 173 Assembler::target_address_at(pc_))); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 } | 366 } |
362 *reinterpret_cast<Instr*>(pc_) = x; | 367 *reinterpret_cast<Instr*>(pc_) = x; |
363 pc_ += kInstrSize; | 368 pc_ += kInstrSize; |
364 CheckTrampolinePoolQuick(); | 369 CheckTrampolinePoolQuick(); |
365 } | 370 } |
366 | 371 |
367 | 372 |
368 } } // namespace v8::internal | 373 } } // namespace v8::internal |
369 | 374 |
370 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 375 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |