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

Unified Diff: src/ic/mips/handler-compiler-mips.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/ic.cc ('k') | src/ic/mips64/handler-compiler-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/mips/handler-compiler-mips.cc
diff --git a/src/ic/mips/handler-compiler-mips.cc b/src/ic/mips/handler-compiler-mips.cc
index df7a0df175ca44259daa119a918fcbf5f3931b2c..34d06cfe2058b22ddcf2dfc2aed02cc210a6f296 100644
--- a/src/ic/mips/handler-compiler-mips.cc
+++ b/src/ic/mips/handler-compiler-mips.cc
@@ -473,8 +473,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);
@@ -493,7 +494,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/ic.cc ('k') | src/ic/mips64/handler-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698