| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 Isolate::Current()->debug()->has_break_points()) { | 345 Isolate::Current()->debug()->has_break_points()) { |
| 346 visitor->VisitDebugTarget(this); | 346 visitor->VisitDebugTarget(this); |
| 347 #endif | 347 #endif |
| 348 } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 348 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
| 349 visitor->VisitRuntimeEntry(this); | 349 visitor->VisitRuntimeEntry(this); |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 | 352 |
| 353 | 353 |
| 354 template<typename StaticVisitor> | 354 template<typename StaticVisitor> |
| 355 void RelocInfo::Visit() { | 355 void RelocInfo::Visit(Heap* heap) { |
| 356 RelocInfo::Mode mode = rmode(); | 356 RelocInfo::Mode mode = rmode(); |
| 357 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 357 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 358 StaticVisitor::VisitPointer(target_object_address()); | 358 StaticVisitor::VisitPointer(heap, target_object_address()); |
| 359 } else if (RelocInfo::IsCodeTarget(mode)) { | 359 } else if (RelocInfo::IsCodeTarget(mode)) { |
| 360 StaticVisitor::VisitCodeTarget(this); | 360 StaticVisitor::VisitCodeTarget(this); |
| 361 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 361 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
| 362 StaticVisitor::VisitExternalReference(target_reference_address()); | 362 StaticVisitor::VisitExternalReference(target_reference_address()); |
| 363 #ifdef ENABLE_DEBUGGER_SUPPORT | 363 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 364 } else if (Isolate::Current()->debug()->has_break_points() && | 364 } else if (heap->isolate()->debug()->has_break_points() && |
| 365 ((RelocInfo::IsJSReturn(mode) && | 365 ((RelocInfo::IsJSReturn(mode) && |
| 366 IsPatchedReturnSequence()) || | 366 IsPatchedReturnSequence()) || |
| 367 (RelocInfo::IsDebugBreakSlot(mode) && | 367 (RelocInfo::IsDebugBreakSlot(mode) && |
| 368 IsPatchedDebugBreakSlotSequence()))) { | 368 IsPatchedDebugBreakSlotSequence()))) { |
| 369 StaticVisitor::VisitDebugTarget(this); | 369 StaticVisitor::VisitDebugTarget(this); |
| 370 #endif | 370 #endif |
| 371 } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 371 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
| 372 StaticVisitor::VisitRuntimeEntry(this); | 372 StaticVisitor::VisitRuntimeEntry(this); |
| 373 } | 373 } |
| 374 } | 374 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 ASSERT(len_ == 1 || len_ == 2); | 408 ASSERT(len_ == 1 || len_ == 2); |
| 409 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 409 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
| 410 *p = disp; | 410 *p = disp; |
| 411 len_ += sizeof(int32_t); | 411 len_ += sizeof(int32_t); |
| 412 } | 412 } |
| 413 | 413 |
| 414 | 414 |
| 415 } } // namespace v8::internal | 415 } } // namespace v8::internal |
| 416 | 416 |
| 417 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 417 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
| OLD | NEW |