| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 233 } |
| 234 | 234 |
| 235 static void VisitWeakCollection(Map* map, HeapObject* object) { | 235 static void VisitWeakCollection(Map* map, HeapObject* object) { |
| 236 Heap* heap = map->GetHeap(); | 236 Heap* heap = map->GetHeap(); |
| 237 VisitPointers(heap, | 237 VisitPointers(heap, |
| 238 HeapObject::RawField(object, | 238 HeapObject::RawField(object, |
| 239 JSWeakCollection::kPropertiesOffset), | 239 JSWeakCollection::kPropertiesOffset), |
| 240 HeapObject::RawField(object, JSWeakCollection::kSize)); | 240 HeapObject::RawField(object, JSWeakCollection::kSize)); |
| 241 } | 241 } |
| 242 | 242 |
| 243 static void BeforeVisitingSharedFunctionInfo(HeapObject* object) {} | |
| 244 | |
| 245 INLINE(static void VisitPointer(Heap* heap, Object** p)) { | 243 INLINE(static void VisitPointer(Heap* heap, Object** p)) { |
| 246 Object* obj = *p; | 244 Object* obj = *p; |
| 247 if (obj->IsHeapObject()) { | 245 if (obj->IsHeapObject()) { |
| 248 heap->mark_compact_collector()->RecordSlot(p, p, obj); | 246 heap->mark_compact_collector()->RecordSlot(p, p, obj); |
| 249 MarkObject(heap, obj); | 247 MarkObject(heap, obj); |
| 250 } | 248 } |
| 251 } | 249 } |
| 252 | 250 |
| 253 INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) { | 251 INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) { |
| 254 for (Object** p = start; p < end; p++) { | 252 for (Object** p = start; p < end; p++) { |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 bytes_scanned_ = 0; | 994 bytes_scanned_ = 0; |
| 997 write_barriers_invoked_since_last_step_ = 0; | 995 write_barriers_invoked_since_last_step_ = 0; |
| 998 } | 996 } |
| 999 | 997 |
| 1000 | 998 |
| 1001 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 999 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 1002 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 1000 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
| 1003 } | 1001 } |
| 1004 | 1002 |
| 1005 } } // namespace v8::internal | 1003 } } // namespace v8::internal |
| OLD | NEW |