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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 CPU::FlushICache(pc_, sizeof(Address)); | 278 CPU::FlushICache(pc_, sizeof(Address)); |
279 } else if (RelocInfo::IsCodeTarget(mode)) { | 279 } else if (RelocInfo::IsCodeTarget(mode)) { |
280 visitor->VisitCodeTarget(this); | 280 visitor->VisitCodeTarget(this); |
281 } else if (mode == RelocInfo::CELL) { | 281 } else if (mode == RelocInfo::CELL) { |
282 visitor->VisitCell(this); | 282 visitor->VisitCell(this); |
283 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 283 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
284 visitor->VisitExternalReference(this); | 284 visitor->VisitExternalReference(this); |
285 CPU::FlushICache(pc_, sizeof(Address)); | 285 CPU::FlushICache(pc_, sizeof(Address)); |
286 } else if (RelocInfo::IsCodeAgeSequence(mode)) { | 286 } else if (RelocInfo::IsCodeAgeSequence(mode)) { |
287 visitor->VisitCodeAgeSequence(this); | 287 visitor->VisitCodeAgeSequence(this); |
288 #ifdef ENABLE_DEBUGGER_SUPPORT | |
289 } else if (((RelocInfo::IsJSReturn(mode) && | 288 } else if (((RelocInfo::IsJSReturn(mode) && |
290 IsPatchedReturnSequence()) || | 289 IsPatchedReturnSequence()) || |
291 (RelocInfo::IsDebugBreakSlot(mode) && | 290 (RelocInfo::IsDebugBreakSlot(mode) && |
292 IsPatchedDebugBreakSlotSequence())) && | 291 IsPatchedDebugBreakSlotSequence())) && |
293 isolate->debug()->has_break_points()) { | 292 isolate->debug()->has_break_points()) { |
294 visitor->VisitDebugTarget(this); | 293 visitor->VisitDebugTarget(this); |
295 #endif | |
296 } else if (IsRuntimeEntry(mode)) { | 294 } else if (IsRuntimeEntry(mode)) { |
297 visitor->VisitRuntimeEntry(this); | 295 visitor->VisitRuntimeEntry(this); |
298 } | 296 } |
299 } | 297 } |
300 | 298 |
301 | 299 |
302 template<typename StaticVisitor> | 300 template<typename StaticVisitor> |
303 void RelocInfo::Visit(Heap* heap) { | 301 void RelocInfo::Visit(Heap* heap) { |
304 RelocInfo::Mode mode = rmode(); | 302 RelocInfo::Mode mode = rmode(); |
305 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 303 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
306 StaticVisitor::VisitEmbeddedPointer(heap, this); | 304 StaticVisitor::VisitEmbeddedPointer(heap, this); |
307 CPU::FlushICache(pc_, sizeof(Address)); | 305 CPU::FlushICache(pc_, sizeof(Address)); |
308 } else if (RelocInfo::IsCodeTarget(mode)) { | 306 } else if (RelocInfo::IsCodeTarget(mode)) { |
309 StaticVisitor::VisitCodeTarget(heap, this); | 307 StaticVisitor::VisitCodeTarget(heap, this); |
310 } else if (mode == RelocInfo::CELL) { | 308 } else if (mode == RelocInfo::CELL) { |
311 StaticVisitor::VisitCell(heap, this); | 309 StaticVisitor::VisitCell(heap, this); |
312 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 310 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
313 StaticVisitor::VisitExternalReference(this); | 311 StaticVisitor::VisitExternalReference(this); |
314 CPU::FlushICache(pc_, sizeof(Address)); | 312 CPU::FlushICache(pc_, sizeof(Address)); |
315 } else if (RelocInfo::IsCodeAgeSequence(mode)) { | 313 } else if (RelocInfo::IsCodeAgeSequence(mode)) { |
316 StaticVisitor::VisitCodeAgeSequence(heap, this); | 314 StaticVisitor::VisitCodeAgeSequence(heap, this); |
317 #ifdef ENABLE_DEBUGGER_SUPPORT | |
318 } else if (heap->isolate()->debug()->has_break_points() && | 315 } else if (heap->isolate()->debug()->has_break_points() && |
319 ((RelocInfo::IsJSReturn(mode) && | 316 ((RelocInfo::IsJSReturn(mode) && |
320 IsPatchedReturnSequence()) || | 317 IsPatchedReturnSequence()) || |
321 (RelocInfo::IsDebugBreakSlot(mode) && | 318 (RelocInfo::IsDebugBreakSlot(mode) && |
322 IsPatchedDebugBreakSlotSequence()))) { | 319 IsPatchedDebugBreakSlotSequence()))) { |
323 StaticVisitor::VisitDebugTarget(heap, this); | 320 StaticVisitor::VisitDebugTarget(heap, this); |
324 #endif | |
325 } else if (IsRuntimeEntry(mode)) { | 321 } else if (IsRuntimeEntry(mode)) { |
326 StaticVisitor::VisitRuntimeEntry(this); | 322 StaticVisitor::VisitRuntimeEntry(this); |
327 } | 323 } |
328 } | 324 } |
329 | 325 |
330 | 326 |
331 | 327 |
332 Immediate::Immediate(int x) { | 328 Immediate::Immediate(int x) { |
333 x_ = x; | 329 x_ = x; |
334 rmode_ = RelocInfo::NONE32; | 330 rmode_ = RelocInfo::NONE32; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 | 535 |
540 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 536 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
541 // [disp/r] | 537 // [disp/r] |
542 set_modrm(0, ebp); | 538 set_modrm(0, ebp); |
543 set_dispr(disp, rmode); | 539 set_dispr(disp, rmode); |
544 } | 540 } |
545 | 541 |
546 } } // namespace v8::internal | 542 } } // namespace v8::internal |
547 | 543 |
548 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 544 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |