-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
deps: backport e093a04, 09db540 from upstream V8 #6398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2422,6 +2422,13 @@ void MarkCompactCollector::ClearWeakCollections() { | |
table->RemoveEntry(i); | ||
} | ||
} | ||
// Rehash if more than 25% of the entries are deleted entries. | ||
// TODO(jochen): Consider to shrink the fixed array in place. | ||
if ((table->NumberOfDeletedElements() << kJSWeakCollectionLoadFactorExp) > | ||
table->NumberOfElements()) { | ||
HandleScope scope(heap()->isolate()); | ||
table->Rehash(heap()->isolate()->factory()->undefined_value()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ofrobots this is the wrong CL, you should only merge the "Reland" CL. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jeisinger: Applying the two patches from the 'Reland CL' (https://codereview.chromium.org/1890123002/#ps20001) produces the same patch as 3e8d7a7. Maybe I am missing something? /cc @matthewloring re: #7883 |
||
} | ||
} | ||
weak_collection_obj = weak_collection->next(); | ||
weak_collection->set_next(heap()->undefined_value()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More than 50%, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, it's 1/3, but in any case the comment is wrong