Chromium Code Reviews| Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
| index 561f8aca34ee99025a7b4e7f1be9ae977e73bd22..8d6dc06172dc5b17fc3ec6db2d1507bcb0469b5b 100644 |
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
| @@ -124,6 +124,15 @@ class Reference<T extends Definition<T>> { |
| } |
| if (next != null) next.previous = previous; |
| } |
| + |
| + void changeTo(Definition<T> newDefinition) { |
|
floitsch
2015/07/02 18:02:40
Add a comment.
is this a "replaceWith" ?
asgerf
2015/07/03 08:44:46
I wanted a name that doesn't give the impression t
|
| + unlink(); |
| + definition = newDefinition; |
| + previous = null; |
| + next = definition.firstRef; |
| + if (next != null) next.previous = this; |
| + definition.firstRef = this; |
| + } |
| } |
| /// Evaluates a primitive and binds it to variable: `let val x = V in E`. |
| @@ -266,6 +275,12 @@ class InvokeStatic extends Expression implements Invoke { |
| : arguments = _referenceList(args), |
| continuation = new Reference<Continuation>(cont); |
| + InvokeStatic.byReference(this.target, |
| + this.selector, |
| + this.arguments, |
| + this.continuation, |
| + [this.sourceInformation]); |
| + |
| accept(Visitor visitor) => visitor.visitInvokeStatic(this); |
| } |