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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |