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

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 23046)
+++ 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);
Ivan Posva 2013/05/23 05:10:37 Do these constructors need to be public?
siva 2013/05/23 20:19:46 Made them private. On 2013/05/23 05:10:37, Ivan P
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.
@@ -332,7 +335,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);
« runtime/vm/compiler.cc ('K') | « runtime/vm/object_test.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698