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

Unified Diff: runtime/vm/ast_printer.cc

Issue 10928160: Limit the maximum number of formal parameters (32K fixed and 32K optional) (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
Index: runtime/vm/ast_printer.cc
===================================================================
--- runtime/vm/ast_printer.cc (revision 12282)
+++ runtime/vm/ast_printer.cc (working copy)
@@ -449,10 +449,7 @@
}
OS::Print("llev %d ", scope->loop_level());
const int num_fixed_params = function.num_fixed_parameters();
- 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;
+ const int num_params = num_fixed_params + function.NumOptionalParameters();
// 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 | « runtime/lib/object.cc ('k') | runtime/vm/class_finalizer.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698