Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Unified Diff: src/type-feedback-vector.cc

Issue 2394873002: [ic] Avoid feedback metadata names table reallocations. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index e0e6e95a14b9f3e603034b470affbefaf5262e9d..30bc2d41535c6af7383f6e57e29e8c86dc8050b7 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -102,9 +102,7 @@ Handle<TypeFeedbackMetadata> TypeFeedbackMetadata::New(Isolate* isolate,
Handle<UnseededNumberDictionary> names;
if (name_count) {
- names = UnseededNumberDictionary::New(
- isolate, base::bits::RoundUpToPowerOfTwo32(name_count), TENURED,
- USE_CUSTOM_MINIMUM_CAPACITY);
+ names = UnseededNumberDictionary::New(isolate, name_count, TENURED);
}
int name_index = 0;
@@ -114,7 +112,10 @@ Handle<TypeFeedbackMetadata> TypeFeedbackMetadata::New(Isolate* isolate,
if (SlotRequiresName(kind)) {
Handle<String> name = spec->GetName(name_index);
DCHECK(!name.is_null());
- names = UnseededNumberDictionary::AtNumberPut(names, i, name);
+ Handle<UnseededNumberDictionary> new_names =
+ UnseededNumberDictionary::AtNumberPut(names, i, name);
+ DCHECK_EQ(*new_names, *names);
+ names = new_names;
name_index++;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698