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

Unified Diff: runtime/vm/object_test.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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
===================================================================
--- runtime/vm/object_test.cc (revision 12287)
+++ runtime/vm/object_test.cc (working copy)
@@ -41,9 +41,9 @@
const int kNumFixedParameters = 2;
const int kNumOptionalParameters = 3;
const bool kAreOptionalPositional = true;
- function.SetNumberOfParameters(kNumFixedParameters,
- kNumOptionalParameters,
- kAreOptionalPositional);
+ function.set_num_fixed_parameters(kNumFixedParameters);
+ function.SetNumOptionalParameters(kNumOptionalParameters,
+ kAreOptionalPositional);
functions.SetAt(1, function);
function_name = Symbols::New("baz");
@@ -99,9 +99,7 @@
function = cls.LookupDynamicFunction(function_name);
EXPECT(!function.IsNull());
EXPECT_EQ(kNumFixedParameters, function.num_fixed_parameters());
- EXPECT_EQ(kNumOptionalParameters,
- function.num_optional_positional_parameters() +
- function.num_optional_named_parameters());
+ EXPECT_EQ(kNumOptionalParameters, function.NumOptionalParameters());
const Array& interfaces = Array::Handle(Array::New(2));
Class& interface = Class::Handle();
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698