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

Unified Diff: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.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/optimization/statement_rewriter.dart
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
index 4c2ad52f8e9d85f21e3ca44d01a08d9418af7d9e..68b84593ebdbc9b236477d96851e83fd25ef4a24 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
@@ -288,6 +288,7 @@ class StatementRewriter extends Transformer implements Pass {
exp is This ||
exp is CreateInvocationMirror ||
exp is InvokeStatic && exp.isEffectivelyConstant ||
+ exp is Interceptor ||
exp is ApplyBuiltinOperator ||
exp is VariableUse && constantEnvironment.containsKey(exp.variable);
}
@@ -630,6 +631,11 @@ class StatementRewriter extends Transformer implements Pass {
return node;
}
+ Expression visitInterceptor(Interceptor node) {
+ node.input = visitExpression(node.input);
+ return node;
+ }
+
/// True if [operator] is a binary operator that always has the same value
/// if its arguments are swapped.
bool isSymmetricOperator(BuiltinOperator operator) {

Powered by Google App Engine
This is Rietveld 408576698