| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 (RelocInfo::IsDebugBreakSlot(mode) && | 199 (RelocInfo::IsDebugBreakSlot(mode) && |
| 200 IsPatchedDebugBreakSlotSequence()))) { | 200 IsPatchedDebugBreakSlotSequence()))) { |
| 201 StaticVisitor::VisitDebugTarget(this); | 201 StaticVisitor::VisitDebugTarget(this); |
| 202 #endif | 202 #endif |
| 203 } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 203 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
| 204 StaticVisitor::VisitRuntimeEntry(this); | 204 StaticVisitor::VisitRuntimeEntry(this); |
| 205 } | 205 } |
| 206 } | 206 } |
| 207 | 207 |
| 208 | 208 |
| 209 template<typename StaticVisitor, typename Data> |
| 210 void RelocInfo::Visit(Data data) { |
| 211 RelocInfo::Mode mode = rmode(); |
| 212 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 213 StaticVisitor::VisitPointer(target_object_address(), data); |
| 214 } else if (RelocInfo::IsCodeTarget(mode)) { |
| 215 StaticVisitor::VisitCodeTarget(this, data); |
| 216 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
| 217 StaticVisitor::VisitExternalReference(target_reference_address(), data); |
| 218 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 219 } else if (Debug::has_break_points() && |
| 220 ((RelocInfo::IsJSReturn(mode) && |
| 221 IsPatchedReturnSequence()) || |
| 222 (RelocInfo::IsDebugBreakSlot(mode) && |
| 223 IsPatchedDebugBreakSlotSequence()))) { |
| 224 StaticVisitor::VisitDebugTarget(this, data); |
| 225 #endif |
| 226 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
| 227 StaticVisitor::VisitRuntimeEntry(this, data); |
| 228 } |
| 229 } |
| 230 |
| 231 |
| 232 |
| 209 | 233 |
| 210 Immediate::Immediate(int x) { | 234 Immediate::Immediate(int x) { |
| 211 x_ = x; | 235 x_ = x; |
| 212 rmode_ = RelocInfo::NONE; | 236 rmode_ = RelocInfo::NONE; |
| 213 } | 237 } |
| 214 | 238 |
| 215 | 239 |
| 216 Immediate::Immediate(const ExternalReference& ext) { | 240 Immediate::Immediate(const ExternalReference& ext) { |
| 217 x_ = reinterpret_cast<int32_t>(ext.address()); | 241 x_ = reinterpret_cast<int32_t>(ext.address()); |
| 218 rmode_ = RelocInfo::EXTERNAL_REFERENCE; | 242 rmode_ = RelocInfo::EXTERNAL_REFERENCE; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 400 |
| 377 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 401 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
| 378 // [disp/r] | 402 // [disp/r] |
| 379 set_modrm(0, ebp); | 403 set_modrm(0, ebp); |
| 380 set_dispr(disp, rmode); | 404 set_dispr(disp, rmode); |
| 381 } | 405 } |
| 382 | 406 |
| 383 } } // namespace v8::internal | 407 } } // namespace v8::internal |
| 384 | 408 |
| 385 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 409 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
| OLD | NEW |