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

Unified Diff: src/codegen-arm.cc

Issue 5667: In the code generator, avoid loading the arguments object to the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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 | « no previous file | src/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-arm.cc
===================================================================
--- src/codegen-arm.cc (revision 409)
+++ src/codegen-arm.cc (working copy)
@@ -576,22 +576,18 @@
if (scope->arguments() != NULL) {
ASSERT(scope->arguments_shadow() != NULL);
Comment cmnt(masm_, "[ allocate arguments object");
- {
- Reference target(this, scope->arguments());
- __ ldr(r0, FunctionOperand());
- __ push(r0);
- __ CallRuntime(Runtime::kNewArguments, 1);
- __ push(r0);
- SetValue(&target);
+ { Reference shadow_ref(this, scope->arguments_shadow());
+ { Reference arguments_ref(this, scope->arguments());
+
+ __ ldr(r0, FunctionOperand());
+ __ push(r0);
+ __ CallRuntime(Runtime::kNewArguments, 1);
+ __ push(r0);
+ SetValue(&arguments_ref);
+ }
+ SetValue(&shadow_ref);
}
- // The value of arguments must also be stored in .arguments.
- // TODO(1241813): This code can probably be improved by fusing it with
- // the code that stores the arguments object above.
- {
- Reference target(this, scope->arguments_shadow());
- Load(scope->arguments());
- SetValue(&target);
- }
+ __ pop(r0); // Value is no longer needed.
}
// Generate code to 'execute' declarations and initialize
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698