| Index: frog/leg/elements/elements.dart
|
| diff --git a/frog/leg/elements/elements.dart b/frog/leg/elements/elements.dart
|
| index 3657d965ac324821cdb874ca10168a078865a4ce..2f6434fe8f2372518876e3d79e990a7c214ef7c0 100644
|
| --- a/frog/leg/elements/elements.dart
|
| +++ b/frog/leg/elements/elements.dart
|
| @@ -30,6 +30,8 @@ class ElementKind {
|
| static final ElementKind CLASS = const ElementKind('class');
|
| static final ElementKind FOREIGN = const ElementKind('foreign');
|
| static final ElementKind CONSTRUCTOR = const ElementKind('constructor');
|
| + static final ElementKind CONSTRUCTOR_BODY =
|
| + const ElementKind('constructor_body');
|
|
|
| toString() => id;
|
| }
|
| @@ -137,6 +139,26 @@ class FunctionElement extends Element {
|
| Node parseNode(Canceler canceler, Logger logger) => node;
|
| }
|
|
|
| +class ConstructorBodyElement extends FunctionElement {
|
| + FunctionElement constructor;
|
| +
|
| + ConstructorBodyElement(FunctionElement constructor)
|
| + : this.constructor = constructor,
|
| + super(constructor.name,
|
| + ElementKind.CONSTRUCTOR_BODY,
|
| + constructor.enclosingElement) {
|
| + assert(constructor.node !== null);
|
| + }
|
| +
|
| + Link<Element> get parameters() => constructor.parameters;
|
| + FunctionExpression get node() => constructor.node;
|
| + Type get type() => constructor.type;
|
| + bool isStatic() => false;
|
| +
|
| + FunctionType computeType(Compiler compiler, types) { unreachable(); }
|
| + Node parseNode(Canceler canceler, Logger logger) { unreachable(); }
|
| +}
|
| +
|
| class SynthesizedConstructorElement extends FunctionElement {
|
| SynthesizedConstructorElement(Element enclosing)
|
| : super(const SourceString(''), ElementKind.CONSTRUCTOR, enclosing) {
|
| @@ -166,9 +188,14 @@ class ClassElement extends Element {
|
| Link<Type> interfaces = const EmptyLink<Type>();
|
| bool isResolved = false;
|
| ClassNode node;
|
| + // backendMembers are members that have been added by the backend to simplify
|
| + // compilation. They don't have any user-side counter-part.
|
| + Link<Element> backendMembers;
|
| SynthesizedConstructorElement synthesizedConstructor;
|
|
|
| - ClassElement(SourceString name) : super(name, ElementKind.CLASS, null);
|
| + ClassElement(SourceString name)
|
| + : backendMembers = const EmptyLink(),
|
| + super(name, ElementKind.CLASS, null);
|
|
|
| Type computeType(compiler, types) {
|
| if (type === null) {
|
|
|