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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart

Issue 1204733002: dart2js cps: Make Identical a built-in and add Interceptor to Tree IR. (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/tree_ir/tree_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
index 523314dff9a8ff5a42e894a276e20df42aae5f3f..93c87e9b5b0aa225c8f774ad313583d55d56334a 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
@@ -768,6 +768,21 @@ class CreateInvocationMirror extends Expression {
}
}
+class Interceptor extends Expression {
+ Expression input;
+ Set<ClassElement> interceptedClasses;
+
+ Interceptor(this.input, this.interceptedClasses);
+
+ accept(ExpressionVisitor visitor) {
+ return visitor.visitInterceptor(this);
+ }
+
+ accept1(ExpressionVisitor1 visitor, arg) {
+ return visitor.visitInterceptor(this, arg);
+ }
+}
+
class ForeignCode extends Node {
final js.Template codeTemplate;
final types.TypeMask type;
@@ -862,6 +877,7 @@ abstract class ExpressionVisitor<E> {
E visitReadTypeVariable(ReadTypeVariable node);
E visitTypeExpression(TypeExpression node);
E visitCreateInvocationMirror(CreateInvocationMirror node);
+ E visitInterceptor(Interceptor node);
E visitApplyBuiltinOperator(ApplyBuiltinOperator node);
E visitForeignExpression(ForeignExpression node);
}
@@ -893,6 +909,7 @@ abstract class ExpressionVisitor1<E, A> {
E visitReadTypeVariable(ReadTypeVariable node, A arg);
E visitTypeExpression(TypeExpression node, A arg);
E visitCreateInvocationMirror(CreateInvocationMirror node, A arg);
+ E visitInterceptor(Interceptor node, A arg);
E visitApplyBuiltinOperator(ApplyBuiltinOperator node, A arg);
E visitForeignExpression(ForeignExpression node, A arg);
}
@@ -1097,6 +1114,10 @@ abstract class RecursiveVisitor implements StatementVisitor, ExpressionVisitor {
node.arguments.forEach(visitExpression);
}
+ visitInterceptor(Interceptor node) {
+ visitExpression(node.input);
+ }
+
visitForeignCode(ForeignCode node) {
node.arguments.forEach(visitExpression);
}
@@ -1313,4 +1334,9 @@ class RecursiveTransformer extends Transformer {
_replaceExpressions(node.arguments);
return node;
}
+
+ visitInterceptor(Interceptor node) {
+ node.input = visitExpression(node.input);
+ return node;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698