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

Unified Diff: runtime/vm/object.h

Issue 10695137: Provide better error message when passing wrong number of arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 9601)
+++ runtime/vm/object.h (working copy)
@@ -1460,10 +1460,21 @@
bool HasOptimizedCode() const;
intptr_t NumberOfParameters() const;
+ intptr_t NumberOfImplicitParameters() const;
- bool AreValidArgumentCounts(int num_arguments, int num_named_arguments) const;
- bool AreValidArguments(int num_arguments, const Array& argument_names) const;
+ // Returns true if the argument counts are valid for calling this function.
+ // Otherwise, it returns false and the reason (if error_message is not NULL).
+ bool AreValidArgumentCounts(int num_arguments,
+ int num_named_arguments,
+ String* error_message) const;
+ // Returns true if the total argument count and the names of optional
+ // arguments are valid for calling this function.
+ // Otherwise, it returns false and the reason (if error_message is not NULL).
+ bool AreValidArguments(int num_arguments,
+ const Array& argument_names,
+ String* error_message) const;
+
// Fully qualified name uniquely identifying the function under gdb and during
// ast printing. The special ':' character, if present, is replaced by '_'.
const char* ToFullyQualifiedCString() const;
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698