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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "incremental-marking.h" | 7 #include "incremental-marking.h" |
8 | 8 |
9 #include "code-stubs.h" | 9 #include "code-stubs.h" |
10 #include "compilation-cache.h" | 10 #include "compilation-cache.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 229 } |
230 | 230 |
231 static void VisitWeakCollection(Map* map, HeapObject* object) { | 231 static void VisitWeakCollection(Map* map, HeapObject* object) { |
232 Heap* heap = map->GetHeap(); | 232 Heap* heap = map->GetHeap(); |
233 VisitPointers(heap, | 233 VisitPointers(heap, |
234 HeapObject::RawField(object, | 234 HeapObject::RawField(object, |
235 JSWeakCollection::kPropertiesOffset), | 235 JSWeakCollection::kPropertiesOffset), |
236 HeapObject::RawField(object, JSWeakCollection::kSize)); | 236 HeapObject::RawField(object, JSWeakCollection::kSize)); |
237 } | 237 } |
238 | 238 |
239 static void BeforeVisitingSharedFunctionInfo(HeapObject* object) {} | |
240 | |
241 INLINE(static void VisitPointer(Heap* heap, Object** p)) { | 239 INLINE(static void VisitPointer(Heap* heap, Object** p)) { |
242 Object* obj = *p; | 240 Object* obj = *p; |
243 if (obj->IsHeapObject()) { | 241 if (obj->IsHeapObject()) { |
244 heap->mark_compact_collector()->RecordSlot(p, p, obj); | 242 heap->mark_compact_collector()->RecordSlot(p, p, obj); |
245 MarkObject(heap, obj); | 243 MarkObject(heap, obj); |
246 } | 244 } |
247 } | 245 } |
248 | 246 |
249 INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) { | 247 INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) { |
250 for (Object** p = start; p < end; p++) { | 248 for (Object** p = start; p < end; p++) { |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 bytes_scanned_ = 0; | 990 bytes_scanned_ = 0; |
993 write_barriers_invoked_since_last_step_ = 0; | 991 write_barriers_invoked_since_last_step_ = 0; |
994 } | 992 } |
995 | 993 |
996 | 994 |
997 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 995 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
998 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 996 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
999 } | 997 } |
1000 | 998 |
1001 } } // namespace v8::internal | 999 } } // namespace v8::internal |
OLD | NEW |