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

Unified Diff: vm/flow_graph_compiler_x64.cc

Issue 10383147: Fix issue with stack layout assumption going wrong when a dart function has optional parameters and… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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
« vm/code_generator_ia32.cc ('K') | « vm/code_generator_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_compiler_x64.cc
===================================================================
--- vm/flow_graph_compiler_x64.cc (revision 7573)
+++ vm/flow_graph_compiler_x64.cc (working copy)
@@ -1450,6 +1450,12 @@
__ j(EQUAL, &all_arguments_processed, Assembler::kNearJump);
__ Bind(&wrong_num_arguments);
+ if (StackSize() != 0) {
+ // We need to unwind the space we reserved for locals/copied parms etc.
+ // for this method as the NoSuchMethodFunction stub does not expect to
regis 2012/05/14 16:25:16 ditto
siva 2012/05/15 21:51:15 Done.
+ // see that area on the stack.
+ __ addq(RSP, Immediate(StackSize() * kWordSize));
+ }
if (function.IsClosureFunction()) {
GenerateCallRuntime(AstNode::kNoId,
0,
« vm/code_generator_ia32.cc ('K') | « vm/code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698