Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 2810653002: Add a host parameter to ObjectVisitor methods. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/visitors.h ('k') | src/x87/assembler-x87-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 Code* target_code = Code::GetCodeFromTargetAddress(target); 514 Code* target_code = Code::GetCodeFromTargetAddress(target);
515 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, 515 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
516 target_code); 516 target_code);
517 } 517 }
518 } 518 }
519 519
520 template <typename ObjectVisitor> 520 template <typename ObjectVisitor>
521 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { 521 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
522 RelocInfo::Mode mode = rmode(); 522 RelocInfo::Mode mode = rmode();
523 if (mode == RelocInfo::EMBEDDED_OBJECT) { 523 if (mode == RelocInfo::EMBEDDED_OBJECT) {
524 visitor->VisitEmbeddedPointer(this); 524 visitor->VisitEmbeddedPointer(host(), this);
525 Assembler::FlushICache(isolate, pc_, sizeof(Address)); 525 Assembler::FlushICache(isolate, pc_, sizeof(Address));
526 } else if (RelocInfo::IsCodeTarget(mode)) { 526 } else if (RelocInfo::IsCodeTarget(mode)) {
527 visitor->VisitCodeTarget(this); 527 visitor->VisitCodeTarget(host(), this);
528 } else if (mode == RelocInfo::CELL) { 528 } else if (mode == RelocInfo::CELL) {
529 visitor->VisitCell(this); 529 visitor->VisitCellPointer(host(), this);
530 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 530 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
531 visitor->VisitExternalReference(this); 531 visitor->VisitExternalReference(host(), this);
532 } else if (mode == RelocInfo::INTERNAL_REFERENCE) { 532 } else if (mode == RelocInfo::INTERNAL_REFERENCE) {
533 visitor->VisitInternalReference(this); 533 visitor->VisitInternalReference(host(), this);
534 } else if (RelocInfo::IsCodeAgeSequence(mode)) { 534 } else if (RelocInfo::IsCodeAgeSequence(mode)) {
535 visitor->VisitCodeAgeSequence(this); 535 visitor->VisitCodeAgeSequence(host(), this);
536 } else if (RelocInfo::IsDebugBreakSlot(mode) && 536 } else if (RelocInfo::IsDebugBreakSlot(mode) &&
537 IsPatchedDebugBreakSlotSequence()) { 537 IsPatchedDebugBreakSlotSequence()) {
538 visitor->VisitDebugTarget(this); 538 visitor->VisitDebugTarget(host(), this);
539 } else if (RelocInfo::IsRuntimeEntry(mode)) { 539 } else if (RelocInfo::IsRuntimeEntry(mode)) {
540 visitor->VisitRuntimeEntry(this); 540 visitor->VisitRuntimeEntry(host(), this);
541 } 541 }
542 } 542 }
543 543
544 544
545 template<typename StaticVisitor> 545 template<typename StaticVisitor>
546 void RelocInfo::Visit(Heap* heap) { 546 void RelocInfo::Visit(Heap* heap) {
547 RelocInfo::Mode mode = rmode(); 547 RelocInfo::Mode mode = rmode();
548 if (mode == RelocInfo::EMBEDDED_OBJECT) { 548 if (mode == RelocInfo::EMBEDDED_OBJECT) {
549 StaticVisitor::VisitEmbeddedPointer(heap, this); 549 StaticVisitor::VisitEmbeddedPointer(heap, this);
550 Assembler::FlushICache(heap->isolate(), pc_, sizeof(Address)); 550 Assembler::FlushICache(heap->isolate(), pc_, sizeof(Address));
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 void Operand::set_disp64(int64_t disp) { 607 void Operand::set_disp64(int64_t disp) {
608 DCHECK_EQ(1, len_); 608 DCHECK_EQ(1, len_);
609 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); 609 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]);
610 *p = disp; 610 *p = disp;
611 len_ += sizeof(disp); 611 len_ += sizeof(disp);
612 } 612 }
613 } // namespace internal 613 } // namespace internal
614 } // namespace v8 614 } // namespace v8
615 615
616 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 616 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/visitors.h ('k') | src/x87/assembler-x87-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698