| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 (RelocInfo::IsDebugBreakSlot(mode) && | 176 (RelocInfo::IsDebugBreakSlot(mode) && |
| 177 IsPatchedDebugBreakSlotSequence()))) { | 177 IsPatchedDebugBreakSlotSequence()))) { |
| 178 visitor->VisitDebugTarget(this); | 178 visitor->VisitDebugTarget(this); |
| 179 #endif | 179 #endif |
| 180 } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 180 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
| 181 visitor->VisitRuntimeEntry(this); | 181 visitor->VisitRuntimeEntry(this); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 | 185 |
| 186 template<typename StaticVisitor> |
| 187 void RelocInfo::Visit() { |
| 188 RelocInfo::Mode mode = rmode(); |
| 189 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 190 StaticVisitor::VisitPointer(target_object_address()); |
| 191 } else if (RelocInfo::IsCodeTarget(mode)) { |
| 192 StaticVisitor::VisitCodeTarget(this); |
| 193 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
| 194 StaticVisitor::VisitExternalReference(target_reference_address()); |
| 195 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 196 } else if (Debug::has_break_points() && |
| 197 ((RelocInfo::IsJSReturn(mode) && |
| 198 IsPatchedReturnSequence()) || |
| 199 (RelocInfo::IsDebugBreakSlot(mode) && |
| 200 IsPatchedDebugBreakSlotSequence()))) { |
| 201 StaticVisitor::VisitDebugTarget(this); |
| 202 #endif |
| 203 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
| 204 StaticVisitor::VisitRuntimeEntry(this); |
| 205 } |
| 206 } |
| 207 |
| 208 |
| 209 |
| 186 Immediate::Immediate(int x) { | 210 Immediate::Immediate(int x) { |
| 187 x_ = x; | 211 x_ = x; |
| 188 rmode_ = RelocInfo::NONE; | 212 rmode_ = RelocInfo::NONE; |
| 189 } | 213 } |
| 190 | 214 |
| 191 | 215 |
| 192 Immediate::Immediate(const ExternalReference& ext) { | 216 Immediate::Immediate(const ExternalReference& ext) { |
| 193 x_ = reinterpret_cast<int32_t>(ext.address()); | 217 x_ = reinterpret_cast<int32_t>(ext.address()); |
| 194 rmode_ = RelocInfo::EXTERNAL_REFERENCE; | 218 rmode_ = RelocInfo::EXTERNAL_REFERENCE; |
| 195 } | 219 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 376 |
| 353 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 377 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
| 354 // [disp/r] | 378 // [disp/r] |
| 355 set_modrm(0, ebp); | 379 set_modrm(0, ebp); |
| 356 set_dispr(disp, rmode); | 380 set_dispr(disp, rmode); |
| 357 } | 381 } |
| 358 | 382 |
| 359 } } // namespace v8::internal | 383 } } // namespace v8::internal |
| 360 | 384 |
| 361 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 385 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
| OLD | NEW |