Chromium Code Reviews| 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..681a87dc172f1f4ffd84dd9a7e2dce31084b14b9 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart |
| @@ -178,6 +178,31 @@ 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); |
| + print("${selector.kind} ${arguments};"); |
|
asgerf
2014/06/27 08:09:56
Stray print call.
sigurdm
2014/06/27 09:20:21
Done.
|
| + 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 +425,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 +675,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); |
| } |