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

Unified Diff: runtime/vm/ast_printer.cc

Issue 10910119: Implement new optional parameters syntax in the vm (issue 4290). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast_printer.cc
===================================================================
--- runtime/vm/ast_printer.cc (revision 12003)
+++ runtime/vm/ast_printer.cc (working copy)
@@ -449,8 +449,10 @@
}
OS::Print("llev %d ", scope->loop_level());
const int num_fixed_params = function.num_fixed_parameters();
- const int num_opt_params = function.num_optional_parameters();
- const int num_params = num_fixed_params + num_opt_params;
+ const int num_opt_pos_params = function.num_optional_positional_parameters();
+ const int num_opt_named_params = function.num_optional_named_parameters();
+ const int num_params =
+ num_fixed_params + num_opt_pos_params + num_opt_named_params;
// Parameters must be listed first and must all appear in the top scope.
ASSERT(num_params <= scope->num_variables());
int pos = 0; // Current position of variable in scope.
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698