diff options
Diffstat (limited to 'deps/v8/src/allocation-site-scopes-inl.h')
-rw-r--r-- | deps/v8/src/allocation-site-scopes-inl.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/deps/v8/src/allocation-site-scopes-inl.h b/deps/v8/src/allocation-site-scopes-inl.h index e114bb3885..6500e9efdc 100644 --- a/deps/v8/src/allocation-site-scopes-inl.h +++ b/deps/v8/src/allocation-site-scopes-inl.h @@ -12,12 +12,19 @@ namespace v8 { namespace internal { +void AllocationSiteContext::InitializeTraversal(Handle<AllocationSite> site) { + top_ = site; + // {current_} is updated in place to not create unnecessary Handles, hence + // we initially need a separate handle. + current_ = Handle<AllocationSite>::New(*top_, isolate()); +} + Handle<AllocationSite> AllocationSiteUsageContext::EnterNewScope() { if (top().is_null()) { InitializeTraversal(top_site_); } else { // Advance current site - Object* nested_site = current()->nested_site(); + Object nested_site = current()->nested_site(); // Something is wrong if we advance to the end of the list here. update_current_site(AllocationSite::cast(nested_site)); } @@ -38,7 +45,7 @@ bool AllocationSiteUsageContext::ShouldCreateMemento(Handle<JSObject> object) { if (FLAG_trace_creation_allocation_sites) { PrintF("*** Creating Memento for %s %p\n", object->IsJSArray() ? "JSArray" : "JSObject", - static_cast<void*>(*object)); + reinterpret_cast<void*>(object->ptr())); } return true; } |