OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ | 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ |
6 #define V8_X64_ASSEMBLER_X64_INL_H_ | 6 #define V8_X64_ASSEMBLER_X64_INL_H_ |
7 | 7 |
8 #include "src/x64/assembler-x64.h" | 8 #include "src/x64/assembler-x64.h" |
9 | 9 |
10 #include "src/base/cpu.h" | 10 #include "src/base/cpu.h" |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 visitor->VisitCodeTarget(this); | 546 visitor->VisitCodeTarget(this); |
547 } else if (mode == RelocInfo::CELL) { | 547 } else if (mode == RelocInfo::CELL) { |
548 visitor->VisitCell(this); | 548 visitor->VisitCell(this); |
549 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 549 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
550 visitor->VisitExternalReference(this); | 550 visitor->VisitExternalReference(this); |
551 } else if (mode == RelocInfo::INTERNAL_REFERENCE) { | 551 } else if (mode == RelocInfo::INTERNAL_REFERENCE) { |
552 visitor->VisitInternalReference(this); | 552 visitor->VisitInternalReference(this); |
553 } else if (RelocInfo::IsCodeAgeSequence(mode)) { | 553 } else if (RelocInfo::IsCodeAgeSequence(mode)) { |
554 visitor->VisitCodeAgeSequence(this); | 554 visitor->VisitCodeAgeSequence(this); |
555 } else if (RelocInfo::IsDebugBreakSlot(mode) && | 555 } else if (RelocInfo::IsDebugBreakSlot(mode) && |
556 IsPatchedDebugBreakSlotSequence() && | 556 IsPatchedDebugBreakSlotSequence()) { |
557 isolate->debug()->has_break_points()) { | |
558 visitor->VisitDebugTarget(this); | 557 visitor->VisitDebugTarget(this); |
559 } else if (RelocInfo::IsRuntimeEntry(mode)) { | 558 } else if (RelocInfo::IsRuntimeEntry(mode)) { |
560 visitor->VisitRuntimeEntry(this); | 559 visitor->VisitRuntimeEntry(this); |
561 } | 560 } |
562 } | 561 } |
563 | 562 |
564 | 563 |
565 template<typename StaticVisitor> | 564 template<typename StaticVisitor> |
566 void RelocInfo::Visit(Heap* heap) { | 565 void RelocInfo::Visit(Heap* heap) { |
567 RelocInfo::Mode mode = rmode(); | 566 RelocInfo::Mode mode = rmode(); |
568 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 567 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
569 StaticVisitor::VisitEmbeddedPointer(heap, this); | 568 StaticVisitor::VisitEmbeddedPointer(heap, this); |
570 CpuFeatures::FlushICache(pc_, sizeof(Address)); | 569 CpuFeatures::FlushICache(pc_, sizeof(Address)); |
571 } else if (RelocInfo::IsCodeTarget(mode)) { | 570 } else if (RelocInfo::IsCodeTarget(mode)) { |
572 StaticVisitor::VisitCodeTarget(heap, this); | 571 StaticVisitor::VisitCodeTarget(heap, this); |
573 } else if (mode == RelocInfo::CELL) { | 572 } else if (mode == RelocInfo::CELL) { |
574 StaticVisitor::VisitCell(heap, this); | 573 StaticVisitor::VisitCell(heap, this); |
575 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 574 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
576 StaticVisitor::VisitExternalReference(this); | 575 StaticVisitor::VisitExternalReference(this); |
577 } else if (mode == RelocInfo::INTERNAL_REFERENCE) { | 576 } else if (mode == RelocInfo::INTERNAL_REFERENCE) { |
578 StaticVisitor::VisitInternalReference(this); | 577 StaticVisitor::VisitInternalReference(this); |
579 } else if (RelocInfo::IsCodeAgeSequence(mode)) { | 578 } else if (RelocInfo::IsCodeAgeSequence(mode)) { |
580 StaticVisitor::VisitCodeAgeSequence(heap, this); | 579 StaticVisitor::VisitCodeAgeSequence(heap, this); |
581 } else if (heap->isolate()->debug()->has_break_points() && | 580 } else if (RelocInfo::IsDebugBreakSlot(mode) && |
582 RelocInfo::IsDebugBreakSlot(mode) && | |
583 IsPatchedDebugBreakSlotSequence()) { | 581 IsPatchedDebugBreakSlotSequence()) { |
584 StaticVisitor::VisitDebugTarget(heap, this); | 582 StaticVisitor::VisitDebugTarget(heap, this); |
585 } else if (RelocInfo::IsRuntimeEntry(mode)) { | 583 } else if (RelocInfo::IsRuntimeEntry(mode)) { |
586 StaticVisitor::VisitRuntimeEntry(this); | 584 StaticVisitor::VisitRuntimeEntry(this); |
587 } | 585 } |
588 } | 586 } |
589 | 587 |
590 | 588 |
591 // ----------------------------------------------------------------------------- | 589 // ----------------------------------------------------------------------------- |
592 // Implementation of Operand | 590 // Implementation of Operand |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 | 625 |
628 void Operand::set_disp64(int64_t disp) { | 626 void Operand::set_disp64(int64_t disp) { |
629 DCHECK_EQ(1, len_); | 627 DCHECK_EQ(1, len_); |
630 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); | 628 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); |
631 *p = disp; | 629 *p = disp; |
632 len_ += sizeof(disp); | 630 len_ += sizeof(disp); |
633 } | 631 } |
634 } } // namespace v8::internal | 632 } } // namespace v8::internal |
635 | 633 |
636 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 634 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |