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

Unified Diff: runtime/vm/parser.h

Issue 12210127: First stab at mixins in VM compiler (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 18363)
+++ runtime/vm/parser.h (working copy)
@@ -305,7 +305,8 @@
// Support for parsing of scripts.
void ParseTopLevel();
void ParseClassDefinition(const GrowableObjectArray& pending_classes);
- void ParseFunctionTypeAlias(const GrowableObjectArray& pending_classes);
+ void ParseMixinTypedef(const GrowableObjectArray& pending_classes);
+ void ParseTypedef(const GrowableObjectArray& pending_classes);
void ParseTopLevelVariable(TopLevel* top_level);
void ParseTopLevelFunction(TopLevel* top_level);
void ParseTopLevelAccessor(TopLevel* top_level);
@@ -343,7 +344,7 @@
void ParseFormalParameterList(bool allow_explicit_default_values,
ParamList* params);
void CheckConstFieldsInitialized(const Class& cls);
- void AddImplicitConstructor(ClassDesc* members);
+ void AddImplicitConstructor(const Class& cls);
void CheckConstructors(ClassDesc* members);
void ParseInitializedInstanceFields(
const Class& cls,
@@ -364,6 +365,7 @@
GrowableArray<Field*>* initialized_fields);
String& ParseNativeDeclaration();
RawArray* ParseInterfaceList(const Type& super_type);
+ RawType* ParseMixins(const Type& super_type);
void AddInterfaceIfUnique(intptr_t interfaces_pos,
const GrowableObjectArray& interface_list,
const AbstractType& interface);
@@ -466,6 +468,7 @@
bool IsIdentifier();
bool IsSimpleLiteral(const AbstractType& type, Instance* value);
bool IsFunctionTypeAliasName();
+ bool IsMixinTypedef();
bool TryParseTypeParameter();
bool TryParseOptionalType();
bool TryParseReturnType();
@@ -634,6 +637,9 @@
Class& current_class_;
// The current library (and thus class dictionary) used to resolve names.
+ // When parsing a function, this is the library in which the function
+ // is defined. This can be the library in which the current_class_ is
+ // defined, or the library of a mixin class where the function originates.
const Library& library_;
// List of try blocks seen so far, this is used to generate inlined finally

Powered by Google App Engine
This is Rietveld 408576698