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

Unified Diff: src/codegen-arm.cc

Issue 20454: Experimental (ARM): remember to adjust the virtual frame height at... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 10 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 | no next file » | 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 1298)
+++ src/codegen-arm.cc (working copy)
@@ -1290,12 +1290,24 @@
void CodeGenerator::VisitReturnStatement(ReturnStatement* node) {
VirtualFrame::SpilledScope spilled_scope(this);
Comment cmnt(masm_, "[ ReturnStatement");
- CodeForStatementPosition(node);
- LoadAndSpill(node->expression());
- // Move the function result into r0.
- frame_->EmitPop(r0);
- function_return_.Jump();
+ if (function_return_is_shadowed_) {
+ CodeForStatementPosition(node);
+ LoadAndSpill(node->expression());
+ frame_->EmitPop(r0);
+ function_return_.Jump();
+ } else {
+ // Load the returned value.
+ CodeForStatementPosition(node);
+ LoadAndSpill(node->expression());
+
+ // Pop the result from the frame and prepare the frame for
+ // returning thus making it easier to merge.
+ frame_->EmitPop(r0);
+ frame_->PrepareForReturn();
+
+ function_return_.Jump();
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698