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

Unified Diff: runtime/vm/parser.h

Issue 14820028: Delay Class parsing until the class is actually used. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/parser.h
===================================================================
--- runtime/vm/parser.h (revision 22914)
+++ runtime/vm/parser.h (working copy)
@@ -143,7 +143,7 @@
class Parser : public ValueObject {
public:
- Parser(const Script& script, const Library& library);
+ Parser(const Script& script, const Library& library, intptr_t token_pos);
Parser(const Script& script, ParsedFunction* function, intptr_t token_pos);
// Parse the top level of a whole script file and register declared classes
@@ -151,6 +151,9 @@
static void ParseCompilationUnit(const Library& library,
const Script& script);
+ // Parse top level of a class and register all functions/fields.
+ static void ParseClass(const Class& cls);
+
static void ParseFunction(ParsedFunction* parsed_function);
// Format and print a message with source location.
@@ -270,6 +273,7 @@
void SkipBlock();
void SkipMetadata();
void SkipToMatchingParenthesis();
+ void SkipToMatchingBraces();
void SkipTypeArguments();
void SkipType(bool allow_void);
void SkipInitializers();
@@ -332,7 +336,8 @@
// Support for parsing of scripts.
void ParseTopLevel();
- void ParseClassDefinition(const GrowableObjectArray& pending_classes);
+ void ParseClassDeclaration(const GrowableObjectArray& pending_classes);
+ void ParseClassDefinition(const Class& cls);
void ParseMixinTypedef(const GrowableObjectArray& pending_classes);
void ParseTypedef(const GrowableObjectArray& pending_classes);
void ParseTopLevelVariable(TopLevel* top_level);

Powered by Google App Engine
This is Rietveld 408576698