| 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 "code-stubs.h" | 7 #include "code-stubs.h" |
| 8 #include "compilation-cache.h" | 8 #include "compilation-cache.h" |
| 9 #include "cpu-profiler.h" | 9 #include "cpu-profiler.h" |
| 10 #include "deoptimizer.h" | 10 #include "deoptimizer.h" |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 if (!o->IsHeapObject()) continue; | 1465 if (!o->IsHeapObject()) continue; |
| 1466 collector->RecordSlot(start, p, o); | 1466 collector->RecordSlot(start, p, o); |
| 1467 HeapObject* obj = HeapObject::cast(o); | 1467 HeapObject* obj = HeapObject::cast(o); |
| 1468 MarkBit mark = Marking::MarkBitFrom(obj); | 1468 MarkBit mark = Marking::MarkBitFrom(obj); |
| 1469 if (mark.Get()) continue; | 1469 if (mark.Get()) continue; |
| 1470 VisitUnmarkedObject(collector, obj); | 1470 VisitUnmarkedObject(collector, obj); |
| 1471 } | 1471 } |
| 1472 return true; | 1472 return true; |
| 1473 } | 1473 } |
| 1474 | 1474 |
| 1475 INLINE(static void BeforeVisitingSharedFunctionInfo(HeapObject* object)) { | |
| 1476 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); | |
| 1477 shared->BeforeVisitingPointers(); | |
| 1478 } | |
| 1479 | |
| 1480 static void VisitWeakCollection(Map* map, HeapObject* object) { | 1475 static void VisitWeakCollection(Map* map, HeapObject* object) { |
| 1481 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); | 1476 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); |
| 1482 JSWeakCollection* weak_collection = | 1477 JSWeakCollection* weak_collection = |
| 1483 reinterpret_cast<JSWeakCollection*>(object); | 1478 reinterpret_cast<JSWeakCollection*>(object); |
| 1484 | 1479 |
| 1485 // Enqueue weak map in linked list of encountered weak maps. | 1480 // Enqueue weak map in linked list of encountered weak maps. |
| 1486 if (weak_collection->next() == Smi::FromInt(0)) { | 1481 if (weak_collection->next() == Smi::FromInt(0)) { |
| 1487 weak_collection->set_next(collector->encountered_weak_collections()); | 1482 weak_collection->set_next(collector->encountered_weak_collections()); |
| 1488 collector->set_encountered_weak_collections(weak_collection); | 1483 collector->set_encountered_weak_collections(weak_collection); |
| 1489 } | 1484 } |
| (...skipping 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4506 while (buffer != NULL) { | 4501 while (buffer != NULL) { |
| 4507 SlotsBuffer* next_buffer = buffer->next(); | 4502 SlotsBuffer* next_buffer = buffer->next(); |
| 4508 DeallocateBuffer(buffer); | 4503 DeallocateBuffer(buffer); |
| 4509 buffer = next_buffer; | 4504 buffer = next_buffer; |
| 4510 } | 4505 } |
| 4511 *buffer_address = NULL; | 4506 *buffer_address = NULL; |
| 4512 } | 4507 } |
| 4513 | 4508 |
| 4514 | 4509 |
| 4515 } } // namespace v8::internal | 4510 } } // namespace v8::internal |
| OLD | NEW |