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

Unified Diff: src/ic/s390/handler-compiler-s390.cc

Issue 2428473002: [ic] Cache weak cells containing prototypes in respective PrototypeInfo objects. (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 | « src/ic/ppc/handler-compiler-ppc.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/s390/handler-compiler-s390.cc
diff --git a/src/ic/s390/handler-compiler-s390.cc b/src/ic/s390/handler-compiler-s390.cc
index 504bacebaf3f24cdad475ee57a0a801b7eebcc81..7e16a22eb038f9c49d2cef057d40b7504842f413 100644
--- a/src/ic/s390/handler-compiler-s390.cc
+++ b/src/ic/s390/handler-compiler-s390.cc
@@ -461,8 +461,9 @@ Register PropertyHandlerCompiler::CheckPrototypes(
NameDictionary::kNotFound);
if (depth > 1) {
- // TODO(jkummerow): Cache and re-use weak cell.
- __ LoadWeakValue(reg, isolate()->factory()->NewWeakCell(current), miss);
+ Handle<WeakCell> weak_cell =
+ Map::GetOrCreatePrototypeWeakCell(current, isolate());
+ __ LoadWeakValue(reg, weak_cell, miss);
}
GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1,
scratch2);
@@ -481,7 +482,9 @@ Register PropertyHandlerCompiler::CheckPrototypes(
bool return_holder = return_what == RETURN_HOLDER;
if (return_holder && depth != 0) {
- __ LoadWeakValue(reg, isolate()->factory()->NewWeakCell(current), miss);
+ Handle<WeakCell> weak_cell =
+ Map::GetOrCreatePrototypeWeakCell(current, isolate());
+ __ LoadWeakValue(reg, weak_cell, miss);
}
// Return the register containing the holder.
« no previous file with comments | « src/ic/ppc/handler-compiler-ppc.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698