Revision f230a1cf deps/v8/src/objects-visiting-inl.h
deps/v8/src/objects-visiting-inl.h | ||
---|---|---|
185 | 185 |
|
186 | 186 |
table_.Register(kVisitFixedDoubleArray, &DataObjectVisitor::Visit); |
187 | 187 |
|
188 |
table_.Register(kVisitConstantPoolArray, &VisitConstantPoolArray); |
|
189 |
|
|
188 | 190 |
table_.Register(kVisitNativeContext, &VisitNativeContext); |
189 | 191 |
|
190 | 192 |
table_.Register(kVisitAllocationSite, |
... | ... | |
261 | 263 |
ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
262 | 264 |
ASSERT(!rinfo->target_object()->IsConsString()); |
263 | 265 |
HeapObject* object = HeapObject::cast(rinfo->target_object()); |
264 |
if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps || |
|
265 |
rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || |
|
266 |
!object->IsMap() || !Map::cast(object)->CanTransition()) { |
|
267 |
heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); |
|
266 |
heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); |
|
267 |
if (!Code::IsWeakEmbeddedObject(rinfo->host()->kind(), object)) { |
|
268 | 268 |
StaticVisitor::MarkObject(heap, object); |
269 | 269 |
} |
270 | 270 |
} |
... | ... | |
452 | 452 |
|
453 | 453 |
|
454 | 454 |
template<typename StaticVisitor> |
455 |
void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray( |
|
456 |
Map* map, HeapObject* object) { |
|
457 |
Heap* heap = map->GetHeap(); |
|
458 |
ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object); |
|
459 |
int first_ptr_offset = constant_pool->OffsetOfElementAt( |
|
460 |
constant_pool->first_ptr_index()); |
|
461 |
int last_ptr_offset = constant_pool->OffsetOfElementAt( |
|
462 |
constant_pool->first_ptr_index() + constant_pool->count_of_ptr_entries()); |
|
463 |
StaticVisitor::VisitPointers( |
|
464 |
heap, |
|
465 |
HeapObject::RawField(object, first_ptr_offset), |
|
466 |
HeapObject::RawField(object, last_ptr_offset)); |
|
467 |
} |
|
468 |
|
|
469 |
|
|
470 |
template<typename StaticVisitor> |
|
455 | 471 |
void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction( |
456 | 472 |
Map* map, HeapObject* object) { |
457 | 473 |
Heap* heap = map->GetHeap(); |
Also available in: Unified diff