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

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

Issue 1900843002: Add ObjectVisitor template parameter to RelocInfo::Visit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/s390/assembler-s390-inl.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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 Assembler::FlushICache(isolate_, 533 Assembler::FlushICache(isolate_,
534 pc_ + Assembler::kPatchDebugBreakSlotAddressOffset, 534 pc_ + Assembler::kPatchDebugBreakSlotAddressOffset,
535 sizeof(Address)); 535 sizeof(Address));
536 if (host() != NULL) { 536 if (host() != NULL) {
537 Object* target_code = Code::GetCodeFromTargetAddress(target); 537 Object* target_code = Code::GetCodeFromTargetAddress(target);
538 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( 538 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
539 host(), this, HeapObject::cast(target_code)); 539 host(), this, HeapObject::cast(target_code));
540 } 540 }
541 } 541 }
542 542
543 543 template <typename ObjectVisitor>
544 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { 544 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
545 RelocInfo::Mode mode = rmode(); 545 RelocInfo::Mode mode = rmode();
546 if (mode == RelocInfo::EMBEDDED_OBJECT) { 546 if (mode == RelocInfo::EMBEDDED_OBJECT) {
547 visitor->VisitEmbeddedPointer(this); 547 visitor->VisitEmbeddedPointer(this);
548 Assembler::FlushICache(isolate, pc_, sizeof(Address)); 548 Assembler::FlushICache(isolate, pc_, sizeof(Address));
549 } else if (RelocInfo::IsCodeTarget(mode)) { 549 } else if (RelocInfo::IsCodeTarget(mode)) {
550 visitor->VisitCodeTarget(this); 550 visitor->VisitCodeTarget(this);
551 } else if (mode == RelocInfo::CELL) { 551 } else if (mode == RelocInfo::CELL) {
552 visitor->VisitCell(this); 552 visitor->VisitCell(this);
553 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 553 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 void Operand::set_disp64(int64_t disp) { 630 void Operand::set_disp64(int64_t disp) {
631 DCHECK_EQ(1, len_); 631 DCHECK_EQ(1, len_);
632 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); 632 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]);
633 *p = disp; 633 *p = disp;
634 len_ += sizeof(disp); 634 len_ += sizeof(disp);
635 } 635 }
636 } // namespace internal 636 } // namespace internal
637 } // namespace v8 637 } // namespace v8
638 638
639 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 639 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/s390/assembler-s390-inl.h ('k') | src/x87/assembler-x87-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698