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

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
« no previous file with comments | « 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 7667)
+++ vm/flow_graph_compiler_x64.cc (working copy)
@@ -1428,6 +1428,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 and copied parmeters.
+ // The NoSuchMethodFunction stub does not expect to see that area on the
+ // stack.
+ __ addq(RSP, Immediate(StackSize() * kWordSize));
+ }
if (function.IsClosureFunction()) {
GenerateCallRuntime(AstNode::kNoId,
0,
« no previous file with comments | « vm/code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698