| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  274  |  274  | 
|  275 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { |  275 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { | 
|  276   return !Assembler::IsNop(pc()); |  276   return !Assembler::IsNop(pc()); | 
|  277 } |  277 } | 
|  278  |  278  | 
|  279  |  279  | 
|  280 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { |  280 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { | 
|  281   RelocInfo::Mode mode = rmode(); |  281   RelocInfo::Mode mode = rmode(); | 
|  282   if (mode == RelocInfo::EMBEDDED_OBJECT) { |  282   if (mode == RelocInfo::EMBEDDED_OBJECT) { | 
|  283     visitor->VisitEmbeddedPointer(this); |  283     visitor->VisitEmbeddedPointer(this); | 
|  284     Assembler::FlushICacheWithoutIsolate(pc_, sizeof(Address)); |  284     Assembler::FlushICache(isolate, pc_, sizeof(Address)); | 
|  285   } else if (RelocInfo::IsCodeTarget(mode)) { |  285   } else if (RelocInfo::IsCodeTarget(mode)) { | 
|  286     visitor->VisitCodeTarget(this); |  286     visitor->VisitCodeTarget(this); | 
|  287   } else if (mode == RelocInfo::CELL) { |  287   } else if (mode == RelocInfo::CELL) { | 
|  288     visitor->VisitCell(this); |  288     visitor->VisitCell(this); | 
|  289   } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |  289   } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 
|  290     visitor->VisitExternalReference(this); |  290     visitor->VisitExternalReference(this); | 
|  291   } else if (mode == RelocInfo::INTERNAL_REFERENCE) { |  291   } else if (mode == RelocInfo::INTERNAL_REFERENCE) { | 
|  292     visitor->VisitInternalReference(this); |  292     visitor->VisitInternalReference(this); | 
|  293   } else if (RelocInfo::IsCodeAgeSequence(mode)) { |  293   } else if (RelocInfo::IsCodeAgeSequence(mode)) { | 
|  294     visitor->VisitCodeAgeSequence(this); |  294     visitor->VisitCodeAgeSequence(this); | 
|  295   } else if (RelocInfo::IsDebugBreakSlot(mode) && |  295   } else if (RelocInfo::IsDebugBreakSlot(mode) && | 
|  296              IsPatchedDebugBreakSlotSequence()) { |  296              IsPatchedDebugBreakSlotSequence()) { | 
|  297     visitor->VisitDebugTarget(this); |  297     visitor->VisitDebugTarget(this); | 
|  298   } else if (IsRuntimeEntry(mode)) { |  298   } else if (IsRuntimeEntry(mode)) { | 
|  299     visitor->VisitRuntimeEntry(this); |  299     visitor->VisitRuntimeEntry(this); | 
|  300   } |  300   } | 
|  301 } |  301 } | 
|  302  |  302  | 
|  303  |  303  | 
|  304 template<typename StaticVisitor> |  304 template<typename StaticVisitor> | 
|  305 void RelocInfo::Visit(Heap* heap) { |  305 void RelocInfo::Visit(Heap* heap) { | 
|  306   RelocInfo::Mode mode = rmode(); |  306   RelocInfo::Mode mode = rmode(); | 
|  307   if (mode == RelocInfo::EMBEDDED_OBJECT) { |  307   if (mode == RelocInfo::EMBEDDED_OBJECT) { | 
|  308     StaticVisitor::VisitEmbeddedPointer(heap, this); |  308     StaticVisitor::VisitEmbeddedPointer(heap, this); | 
|  309     Assembler::FlushICacheWithoutIsolate(pc_, sizeof(Address)); |  309     Assembler::FlushICache(heap->isolate(), pc_, sizeof(Address)); | 
|  310   } else if (RelocInfo::IsCodeTarget(mode)) { |  310   } else if (RelocInfo::IsCodeTarget(mode)) { | 
|  311     StaticVisitor::VisitCodeTarget(heap, this); |  311     StaticVisitor::VisitCodeTarget(heap, this); | 
|  312   } else if (mode == RelocInfo::CELL) { |  312   } else if (mode == RelocInfo::CELL) { | 
|  313     StaticVisitor::VisitCell(heap, this); |  313     StaticVisitor::VisitCell(heap, this); | 
|  314   } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |  314   } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 
|  315     StaticVisitor::VisitExternalReference(this); |  315     StaticVisitor::VisitExternalReference(this); | 
|  316   } else if (mode == RelocInfo::INTERNAL_REFERENCE) { |  316   } else if (mode == RelocInfo::INTERNAL_REFERENCE) { | 
|  317     StaticVisitor::VisitInternalReference(this); |  317     StaticVisitor::VisitInternalReference(this); | 
|  318   } else if (RelocInfo::IsCodeAgeSequence(mode)) { |  318   } else if (RelocInfo::IsCodeAgeSequence(mode)) { | 
|  319     StaticVisitor::VisitCodeAgeSequence(heap, this); |  319     StaticVisitor::VisitCodeAgeSequence(heap, this); | 
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  551  |  551  | 
|  552 Operand::Operand(Immediate imm) { |  552 Operand::Operand(Immediate imm) { | 
|  553   // [disp/r] |  553   // [disp/r] | 
|  554   set_modrm(0, ebp); |  554   set_modrm(0, ebp); | 
|  555   set_dispr(imm.x_, imm.rmode_); |  555   set_dispr(imm.x_, imm.rmode_); | 
|  556 } |  556 } | 
|  557 }  // namespace internal |  557 }  // namespace internal | 
|  558 }  // namespace v8 |  558 }  // namespace v8 | 
|  559  |  559  | 
|  560 #endif  // V8_X87_ASSEMBLER_X87_INL_H_ |  560 #endif  // V8_X87_ASSEMBLER_X87_INL_H_ | 
| OLD | NEW |