Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 18f2ef4ee53a389932f75bc2dc213ac1b5049438..b41f5683a7baa0121e74e4027945a4f2725813a2 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1502,21 +1502,6 @@ static bool IsUnscavengedHeapObject(Heap* heap, Object** p) { |
!HeapObject::cast(*p)->map_word().IsForwardingAddress(); |
} |
- |
-static bool IsUnmodifiedHeapObject(Object** p) { |
- Object* object = *p; |
- if (object->IsSmi()) return false; |
- HeapObject* heap_object = HeapObject::cast(object); |
- if (!object->IsJSObject()) return false; |
- JSObject* js_object = JSObject::cast(object); |
- if (!js_object->WasConstructedFromApiFunction()) return false; |
- JSFunction* constructor = |
- JSFunction::cast(js_object->map()->GetConstructor()); |
- |
- return constructor->initial_map() == heap_object->map(); |
-} |
- |
- |
void PromotionQueue::Initialize() { |
// The last to-space page may be used for promotion queue. On promotion |
// conflict, we use the emergency stack. |
@@ -1691,8 +1676,10 @@ void Heap::Scavenge() { |
isolate()->global_handles()->MarkNewSpaceWeakUnmodifiedObjectsPending( |
&IsUnscavengedHeapObject); |
- isolate()->global_handles()->IterateNewSpaceWeakUnmodifiedRoots( |
- &scavenge_visitor); |
+ isolate() |
+ ->global_handles() |
+ ->IterateNewSpaceWeakUnmodifiedRoots< |
+ GlobalHandles::HANDLE_PHANTOM_NODES_VISIT_OTHERS>(&scavenge_visitor); |
new_space_front = DoScavenge(&scavenge_visitor, new_space_front); |
UpdateNewSpaceReferencesInExternalStringTable( |
@@ -2912,6 +2899,18 @@ bool Heap::RootCanBeTreatedAsConstant(RootListIndex root_index) { |
!InNewSpace(root(root_index)); |
} |
+bool Heap::IsUnmodifiedHeapObject(Object** p) { |
+ Object* object = *p; |
+ if (object->IsSmi()) return false; |
+ HeapObject* heap_object = HeapObject::cast(object); |
+ if (!object->IsJSObject()) return false; |
+ JSObject* js_object = JSObject::cast(object); |
+ if (!js_object->WasConstructedFromApiFunction()) return false; |
+ JSFunction* constructor = |
+ JSFunction::cast(js_object->map()->GetConstructor()); |
+ |
+ return constructor->initial_map() == heap_object->map(); |
+} |
int Heap::FullSizeNumberStringCacheLength() { |
// Compute the size of the number string cache based on the max newspace size. |