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

Unified Diff: src/objects.cc

Issue 1741623003: [api] Speed up template instantiation cache a bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 10 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 | « src/contexts.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index a49bc807f1707ece12e9087c4a1a5b9e71147e74..02f93fc04a98a1dce343df35f6f2b432fd046627 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8023,7 +8023,10 @@ MaybeHandle<JSObject> JSObjectWalkVisitor<
auto serial_number = handle(Smi::cast(data->serial_number()), isolate);
CHECK(serial_number->value());
auto cache = isolate->template_instantiations_cache();
- Object* element = cache->Lookup(serial_number);
+ int entry =
+ cache->FindEntry(static_cast<uint32_t>(serial_number->value()));
+ CHECK(entry != UnseededNumberDictionary::kNotFound);
+ Object* element = cache->ValueAt(entry);
CHECK_EQ(function, element);
#endif
return object;
@@ -17511,6 +17514,10 @@ template Handle<Object>
Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape,
uint32_t>::DeleteProperty(Handle<SeededNumberDictionary>, int);
+template Handle<Object>
+Dictionary<UnseededNumberDictionary, UnseededNumberDictionaryShape,
+ uint32_t>::DeleteProperty(Handle<UnseededNumberDictionary>, int);
+
template Handle<NameDictionary>
HashTable<NameDictionary, NameDictionaryShape, Handle<Name> >::
New(Isolate*, int, MinimumCapacity, PretenureFlag);
@@ -17523,6 +17530,10 @@ template Handle<SeededNumberDictionary>
HashTable<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>::
Shrink(Handle<SeededNumberDictionary>, uint32_t);
+template Handle<UnseededNumberDictionary>
+ HashTable<UnseededNumberDictionary, UnseededNumberDictionaryShape,
+ uint32_t>::Shrink(Handle<UnseededNumberDictionary>, uint32_t);
+
template Handle<NameDictionary>
Dictionary<NameDictionary, NameDictionaryShape, Handle<Name> >::Add(
Handle<NameDictionary>, Handle<Name>, Handle<Object>, PropertyDetails);
« no previous file with comments | « src/contexts.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698