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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1220193003: dart2js cps: Fuse tear-off and call invocation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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: 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);
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698