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

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 5964005: Shorten live ranges of argument subexpressions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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/arm/lithium-arm.cc ('k') | src/hydrogen.h » ('j') | src/hydrogen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index 533d32c747427cb9ee3a9aad1d3fb54af98c3b62..bc3d5513133429b3cc1338813c6f97a7010918e5 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -1609,9 +1609,18 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) {
+ ASSERT(ToRegister(instr->input()).is(r0));
ASSERT(ToRegister(instr->result()).is(r0));
+
+ // The receiver slot in the outgoing arguments holds the global object,
+ // because that's what the unoptimized code expects if we deoptimize the
+ // argument subexpressions. Patch it to the global receiver before making
+ // the call.
+ int arity = instr->arity(); // Arity does not include receiver.
+ __ str(r0, MemOperand(sp, arity * kPointerSize));
+
__ mov(r1, Operand(instr->target()));
- CallKnownFunction(instr->target(), instr->arity(), instr);
+ CallKnownFunction(instr->target(), arity, instr);
}
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698