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

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

Issue 2397573004: [stubs] Reduce number of StoreTransitionStub instances. (Closed)
Patch Set: Cleanup 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/arm64/handler-compiler-arm64.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/handler-compiler.cc
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc
index b88f6db0ca26e504d78b9d54715b1ed862d9f640..3b2e115b4f4a1c02bddd0e16bbb65ffae0d44c13 100644
--- a/src/ic/handler-compiler.cc
+++ b/src/ic/handler-compiler.cc
@@ -504,7 +504,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition(
PopVectorAndSlot();
}
GenerateRestoreName(name);
- StoreTransitionStub stub(isolate());
+ StoreMapStub stub(isolate());
GenerateTailCall(masm(), stub.GetCode());
} else {
@@ -520,10 +520,17 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition(
if (need_save_restore) {
PopVectorAndSlot();
}
- GenerateRestoreName(name);
- StoreTransitionStub stub(isolate(),
- FieldIndex::ForDescriptor(*transition, descriptor),
- representation, store_mode);
+ // We need to pass name on the stack.
+ PopReturnAddress(this->name());
+ __ Push(name);
+ PushReturnAddress(this->name());
+
+ FieldIndex index = FieldIndex::ForDescriptor(*transition, descriptor);
+ __ Move(StoreNamedTransitionDescriptor::FieldOffsetRegister(),
+ Smi::FromInt(index.index() << kPointerSizeLog2));
+
+ StoreTransitionStub stub(isolate(), index.is_inobject(), representation,
+ store_mode);
GenerateTailCall(masm(), stub.GetCode());
}
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698