| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 MemoryChunk::kWriteBarrierCounterGranularity); | 101 MemoryChunk::kWriteBarrierCounterGranularity); |
| 102 } | 102 } |
| 103 | 103 |
| 104 marking->RecordWrite(obj, slot, *slot); | 104 marking->RecordWrite(obj, slot, *slot); |
| 105 } | 105 } |
| 106 | 106 |
| 107 | 107 |
| 108 void IncrementalMarking::RecordCodeTargetPatch(Code* host, Address pc, | 108 void IncrementalMarking::RecordCodeTargetPatch(Code* host, Address pc, |
| 109 HeapObject* value) { | 109 HeapObject* value) { |
| 110 if (IsMarking()) { | 110 if (IsMarking()) { |
| 111 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); | 111 RelocInfo rinfo(heap_->isolate(), pc, RelocInfo::CODE_TARGET, 0, host); |
| 112 RecordWriteIntoCode(host, &rinfo, value); | 112 RecordWriteIntoCode(host, &rinfo, value); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 | 116 |
| 117 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { | 117 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { |
| 118 if (IsMarking()) { | 118 if (IsMarking()) { |
| 119 Code* host = heap_->isolate() | 119 Code* host = heap_->isolate() |
| 120 ->inner_pointer_to_code_cache() | 120 ->inner_pointer_to_code_cache() |
| 121 ->GcSafeFindCodeForInnerPointer(pc); | 121 ->GcSafeFindCodeForInnerPointer(pc); |
| 122 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); | 122 RelocInfo rinfo(heap_->isolate(), pc, RelocInfo::CODE_TARGET, 0, host); |
| 123 RecordWriteIntoCode(host, &rinfo, value); | 123 RecordWriteIntoCode(host, &rinfo, value); |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, | 128 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, |
| 129 Object** slot, | 129 Object** slot, |
| 130 Code* value) { | 130 Code* value) { |
| 131 if (BaseRecordWrite(host, slot, value)) { | 131 if (BaseRecordWrite(host, slot, value)) { |
| 132 DCHECK(slot != NULL); | 132 DCHECK(slot != NULL); |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1154 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 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 } // namespace internal | 1162 } // namespace internal |
| 1163 } // namespace v8 | 1163 } // namespace v8 |
| OLD | NEW |