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

Side by Side Diff: src/heap/incremental-marking.cc

Issue 2732273003: Disentangle assembler from isolate. (Closed)
Patch Set: Address feedback. Created 3 years, 9 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/disassembler.cc ('k') | src/heap/mark-compact.cc » ('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 #include "src/heap/incremental-marking.h" 5 #include "src/heap/incremental-marking.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/heap/gc-idle-time-handler.h" 10 #include "src/heap/gc-idle-time-handler.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DCHECK(host->IsJSFunction()); 74 DCHECK(host->IsJSFunction());
75 IncrementalMarking* marking = isolate->heap()->incremental_marking(); 75 IncrementalMarking* marking = isolate->heap()->incremental_marking();
76 Code* value = Code::cast( 76 Code* value = Code::cast(
77 Code::GetObjectFromEntryAddress(reinterpret_cast<Address>(slot))); 77 Code::GetObjectFromEntryAddress(reinterpret_cast<Address>(slot)));
78 marking->RecordWriteOfCodeEntry(host, slot, value); 78 marking->RecordWriteOfCodeEntry(host, slot, value);
79 } 79 }
80 80
81 void IncrementalMarking::RecordCodeTargetPatch(Code* host, Address pc, 81 void IncrementalMarking::RecordCodeTargetPatch(Code* host, Address pc,
82 HeapObject* value) { 82 HeapObject* value) {
83 if (IsMarking()) { 83 if (IsMarking()) {
84 RelocInfo rinfo(heap_->isolate(), pc, RelocInfo::CODE_TARGET, 0, host); 84 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host);
85 RecordWriteIntoCode(host, &rinfo, value); 85 RecordWriteIntoCode(host, &rinfo, value);
86 } 86 }
87 } 87 }
88 88
89 89
90 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { 90 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) {
91 if (IsMarking()) { 91 if (IsMarking()) {
92 Code* host = heap_->isolate() 92 Code* host = heap_->isolate()
93 ->inner_pointer_to_code_cache() 93 ->inner_pointer_to_code_cache()
94 ->GcSafeFindCodeForInnerPointer(pc); 94 ->GcSafeFindCodeForInnerPointer(pc);
95 RelocInfo rinfo(heap_->isolate(), pc, RelocInfo::CODE_TARGET, 0, host); 95 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host);
96 RecordWriteIntoCode(host, &rinfo, value); 96 RecordWriteIntoCode(host, &rinfo, value);
97 } 97 }
98 } 98 }
99 99
100 100
101 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, 101 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host,
102 Object** slot, 102 Object** slot,
103 Code* value) { 103 Code* value) {
104 if (BaseRecordWrite(host, value)) { 104 if (BaseRecordWrite(host, value)) {
105 DCHECK(slot != NULL); 105 DCHECK(slot != NULL);
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 idle_marking_delay_counter_++; 1155 idle_marking_delay_counter_++;
1156 } 1156 }
1157 1157
1158 1158
1159 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1159 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1160 idle_marking_delay_counter_ = 0; 1160 idle_marking_delay_counter_ = 0;
1161 } 1161 }
1162 1162
1163 } // namespace internal 1163 } // namespace internal
1164 } // namespace v8 1164 } // namespace v8
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698