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

Unified Diff: runtime/vm/parser.h

Issue 23020025: Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/lib/mirrors_impl.dart ('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/parser.h
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index e7161a5ead8664aee9e8b8f58da135c9ac072722..f820c066f0251b53fb3ff0e94a756800d3b618cd 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -144,6 +144,15 @@ class Parser : public ValueObject {
// class if the metadata is at the top-level).
static RawObject* ParseMetadata(const Class& cls, intptr_t token_pos);
+ // Parse a function func and retrieve parameter information that can not be
+ // found in its function object. Returns either an error if the parser fails
+ // (which could be the case for local functions), or a flat array of the size
+ // (2*number_of_parameters). For each parameter i in this array, (2*i)
+ // contains a bool indicating whether the parameter has been final, and
+ // (2*i+1) contains an array of its default values (or null if it has no
+ // default values).
+ static RawObject* ParseFunctionParameters(const Function& func);
+
// Format and print a message with source location.
// A null script means no source and a negative token_pos means no position.
static void PrintMessage(const Script& script,
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698