| Index: sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart b/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
|
| index 6d6e7ee49f994eb7c5f2a92e19404a243152c990..b5d25d38dc0b29a301e28584601206582005625c 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
|
| @@ -178,6 +178,30 @@ class InvokeMethod extends Expression implements Invoke {
|
| accept(Visitor visitor) => visitor.visitInvokeMethod(this);
|
| }
|
|
|
| +/// Invoke a method, operator, getter, setter, or index getter/setter from the
|
| +/// super class in tail position.
|
| +class InvokeSuperMethod extends Expression implements Invoke {
|
| + final Selector selector;
|
| + final Reference continuation;
|
| + final List<Reference> arguments;
|
| +
|
| + InvokeSuperMethod(this.selector,
|
| + Continuation cont,
|
| + List<Definition> args)
|
| + : continuation = new Reference(cont),
|
| + arguments = _referenceList(args) {
|
| + assert(selector != null);
|
| + assert(selector.kind == SelectorKind.CALL ||
|
| + selector.kind == SelectorKind.OPERATOR ||
|
| + (selector.kind == SelectorKind.GETTER && arguments.isEmpty) ||
|
| + (selector.kind == SelectorKind.SETTER && arguments.length == 1) ||
|
| + (selector.kind == SelectorKind.INDEX && arguments.length == 1) ||
|
| + (selector.kind == SelectorKind.INDEX && arguments.length == 2));
|
| + }
|
| +
|
| + accept(Visitor visitor) => visitor.visitInvokeSuperMethod(this);
|
| +}
|
| +
|
| /// Non-const call to a constructor. The [target] may be a generative
|
| /// constructor, factory, or redirecting factory.
|
| class InvokeConstructor extends Expression implements Invoke {
|
| @@ -400,6 +424,7 @@ abstract class Visitor<T> {
|
| T visitInvokeStatic(InvokeStatic node) => visitExpression(node);
|
| T visitInvokeContinuation(InvokeContinuation node) => visitExpression(node);
|
| T visitInvokeMethod(InvokeMethod node) => visitExpression(node);
|
| + T visitInvokeSuperMethod(InvokeSuperMethod node) => visitExpression(node);
|
| T visitInvokeConstructor(InvokeConstructor node) => visitExpression(node);
|
| T visitConcatenateStrings(ConcatenateStrings node) => visitExpression(node);
|
| T visitBranch(Branch node) => visitExpression(node);
|
| @@ -649,6 +674,10 @@ class RegisterAllocator extends Visitor {
|
| node.arguments.forEach(visitReference);
|
| }
|
|
|
| + void visitInvokeSuperMethod(InvokeSuperMethod node) {
|
| + node.arguments.forEach(visitReference);
|
| + }
|
| +
|
| void visitInvokeConstructor(InvokeConstructor node) {
|
| node.arguments.forEach(visitReference);
|
| }
|
|
|