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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 Instr current_instr = Assembler::instr_at(pc_); | 237 Instr current_instr = Assembler::instr_at(pc_); |
238 return !Assembler::IsNop(current_instr, Assembler::DEBUG_BREAK_NOP); | 238 return !Assembler::IsNop(current_instr, Assembler::DEBUG_BREAK_NOP); |
239 } | 239 } |
240 | 240 |
241 | 241 |
242 void RelocInfo::Visit(ObjectVisitor* visitor) { | 242 void RelocInfo::Visit(ObjectVisitor* visitor) { |
243 RelocInfo::Mode mode = rmode(); | 243 RelocInfo::Mode mode = rmode(); |
244 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 244 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
245 Object** p = target_object_address(); | 245 Object** p = target_object_address(); |
246 Object* orig = *p; | 246 Object* orig = *p; |
247 visitor->VisitPointer(p); | 247 visitor->VisitEmbeddedPointer(host(), p); |
248 if (*p != orig) { | 248 if (*p != orig) { |
249 set_target_object(*p); | 249 set_target_object(*p); |
250 } | 250 } |
251 } else if (RelocInfo::IsCodeTarget(mode)) { | 251 } else if (RelocInfo::IsCodeTarget(mode)) { |
252 visitor->VisitCodeTarget(this); | 252 visitor->VisitCodeTarget(this); |
253 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { | 253 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { |
254 visitor->VisitGlobalPropertyCell(this); | 254 visitor->VisitGlobalPropertyCell(this); |
255 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 255 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
256 visitor->VisitExternalReference(target_reference_address()); | 256 visitor->VisitExternalReference(target_reference_address()); |
257 #ifdef ENABLE_DEBUGGER_SUPPORT | 257 #ifdef ENABLE_DEBUGGER_SUPPORT |
258 // TODO(isolates): Get a cached isolate below. | 258 // TODO(isolates): Get a cached isolate below. |
259 } else if (((RelocInfo::IsJSReturn(mode) && | 259 } else if (((RelocInfo::IsJSReturn(mode) && |
260 IsPatchedReturnSequence()) || | 260 IsPatchedReturnSequence()) || |
261 (RelocInfo::IsDebugBreakSlot(mode) && | 261 (RelocInfo::IsDebugBreakSlot(mode) && |
262 IsPatchedDebugBreakSlotSequence())) && | 262 IsPatchedDebugBreakSlotSequence())) && |
263 Isolate::Current()->debug()->has_break_points()) { | 263 Isolate::Current()->debug()->has_break_points()) { |
264 visitor->VisitDebugTarget(this); | 264 visitor->VisitDebugTarget(this); |
265 #endif | 265 #endif |
266 } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 266 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
267 visitor->VisitRuntimeEntry(this); | 267 visitor->VisitRuntimeEntry(this); |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 | 271 |
272 template<typename StaticVisitor> | 272 template<typename StaticVisitor> |
273 void RelocInfo::Visit(Heap* heap) { | 273 void RelocInfo::Visit(Heap* heap) { |
274 RelocInfo::Mode mode = rmode(); | 274 RelocInfo::Mode mode = rmode(); |
275 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 275 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
276 StaticVisitor::VisitPointer(heap, target_object_address()); | 276 StaticVisitor::VisitEmbeddedPointer(heap, host(), target_object_address()); |
277 } else if (RelocInfo::IsCodeTarget(mode)) { | 277 } else if (RelocInfo::IsCodeTarget(mode)) { |
278 StaticVisitor::VisitCodeTarget(heap, this); | 278 StaticVisitor::VisitCodeTarget(heap, this); |
279 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { | 279 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { |
280 StaticVisitor::VisitGlobalPropertyCell(heap, this); | 280 StaticVisitor::VisitGlobalPropertyCell(heap, this); |
281 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 281 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
282 StaticVisitor::VisitExternalReference(target_reference_address()); | 282 StaticVisitor::VisitExternalReference(target_reference_address()); |
283 #ifdef ENABLE_DEBUGGER_SUPPORT | 283 #ifdef ENABLE_DEBUGGER_SUPPORT |
284 } else if (heap->isolate()->debug()->has_break_points() && | 284 } else if (heap->isolate()->debug()->has_break_points() && |
285 ((RelocInfo::IsJSReturn(mode) && | 285 ((RelocInfo::IsJSReturn(mode) && |
286 IsPatchedReturnSequence()) || | 286 IsPatchedReturnSequence()) || |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 } | 318 } |
319 *reinterpret_cast<Instr*>(pc_) = x; | 319 *reinterpret_cast<Instr*>(pc_) = x; |
320 pc_ += kInstrSize; | 320 pc_ += kInstrSize; |
321 CheckTrampolinePoolQuick(); | 321 CheckTrampolinePoolQuick(); |
322 } | 322 } |
323 | 323 |
324 | 324 |
325 } } // namespace v8::internal | 325 } } // namespace v8::internal |
326 | 326 |
327 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 327 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |