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

Unified Diff: src/api.cc

Issue 1149863005: Move hash code from hidden string to a private symbol (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix global object hash code. This eated about 5% of weak collection performance Created 5 years, 7 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 | src/collection.js » ('j') | src/collection.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 125a31be06f94b802e9f61a465335ee641b8c189..cb60c7a47c4985c756f3e0c76769b76ef0e30ede 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2532,7 +2532,8 @@ void NativeWeakMap::Set(Handle<Value> v8_key, Handle<Value> v8_value) {
DCHECK(false);
return;
}
- i::Runtime::WeakCollectionSet(weak_collection, key, value);
+ int32_t hash = i::Object::GetOrCreateHash(isolate, key)->value();
+ i::Runtime::WeakCollectionSet(weak_collection, key, value, hash);
}
« no previous file with comments | « no previous file | src/collection.js » ('j') | src/collection.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698