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

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

Issue 1668913002: dart2js cps: More aggressive operator specialization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update test expectations Created 4 years, 10 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_builder.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 15dc292cb6ad4335e15cf8436cf80f7e054ccaeb..a9c283184802fcba3a8755457a2472b3dd16263e 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -699,12 +699,16 @@ class Builder implements cps_ir.Visitor/*<NodeCallback|Node>*/ {
}
}
- visitNullCheck(cps_ir.NullCheck node) => (Statement next) {
- return new NullCheck(
+ visitReceiverCheck(cps_ir.ReceiverCheck node) => (Statement next) {
+ // The CPS IR uses 'isNullCheck' because the semantics are important.
+ // In the Tree IR, syntax is more important, so the receiver check uses
+ // "useInvoke" to denote if an invocation should be emitted.
+ return new ReceiverCheck(
condition: getVariableUseOrNull(node.condition),
value: getVariableUse(node.value),
selector: node.selector,
useSelector: node.useSelector,
+ useInvoke: !node.isNullCheck,
next: next,
sourceInformation: node.sourceInformation);
};
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698