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

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

Issue 1250563004: HydrogenCodeStubs consume stack arguments via descriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 5 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/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.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 beeea32cc8ffa2a91a282cc50bf8081dda94ded6..379e79fcac3bd0a0e55bb493fc18c775a9069e7a 100644
--- a/src/ic/handler-compiler.cc
+++ b/src/ic/handler-compiler.cc
@@ -465,11 +465,17 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition(
DCHECK(!transition->is_access_check_needed());
// Call to respective StoreTransitionStub.
+ Register transition_map_reg = StoreTransitionDescriptor::MapRegister();
+ bool push_map_on_stack = transition_map_reg.is(no_reg);
+ Register map_reg = push_map_on_stack ? scratch1() : transition_map_reg;
+
if (details.type() == DATA_CONSTANT) {
- GenerateRestoreMap(transition, scratch2(), &miss);
DCHECK(descriptors->GetValue(descriptor)->IsJSFunction());
- Register map_reg = StoreTransitionDescriptor::MapRegister();
+ GenerateRestoreMap(transition, map_reg, scratch2(), &miss);
GenerateConstantCheck(map_reg, descriptor, value(), scratch2(), &miss);
+ if (push_map_on_stack) {
+ GeneratePushMap(map_reg, scratch2());
+ }
GenerateRestoreName(name);
StoreTransitionStub stub(isolate());
GenerateTailCall(masm(), stub.GetCode());
@@ -484,7 +490,10 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition(
? StoreTransitionStub::ExtendStorageAndStoreMapAndValue
: StoreTransitionStub::StoreMapAndValue;
- GenerateRestoreMap(transition, scratch2(), &miss);
+ GenerateRestoreMap(transition, map_reg, scratch2(), &miss);
+ if (push_map_on_stack) {
+ GeneratePushMap(map_reg, scratch2());
+ }
GenerateRestoreName(name);
StoreTransitionStub stub(isolate(),
FieldIndex::ForDescriptor(*transition, descriptor),
« no previous file with comments | « src/ic/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698