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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library tree_ir.optimization.statement_rewriter; 5 library tree_ir.optimization.statement_rewriter;
6 6
7 import 'optimization.dart' show Pass; 7 import 'optimization.dart' show Pass;
8 import '../tree_ir_nodes.dart'; 8 import '../tree_ir_nodes.dart';
9 import '../../io/source_information.dart'; 9 import '../../io/source_information.dart';
10 import '../../elements/elements.dart'; 10 import '../../elements/elements.dart';
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 } 1254 }
1255 1255
1256 @override 1256 @override
1257 Statement visitYield(Yield node) { 1257 Statement visitYield(Yield node) {
1258 node.next = visitStatement(node.next); 1258 node.next = visitStatement(node.next);
1259 node.input = visitExpression(node.input); 1259 node.input = visitExpression(node.input);
1260 return node; 1260 return node;
1261 } 1261 }
1262 1262
1263 @override 1263 @override
1264 Statement visitNullCheck(NullCheck node) { 1264 Statement visitReceiverCheck(ReceiverCheck node) {
1265 inEmptyEnvironment(() { 1265 inEmptyEnvironment(() {
1266 node.next = visitStatement(node.next); 1266 node.next = visitStatement(node.next);
1267 }); 1267 });
1268 if (node.condition != null) { 1268 if (node.condition != null) {
1269 inEmptyEnvironment(() { 1269 inEmptyEnvironment(() {
1270 // Value occurs in conditional context. 1270 // Value occurs in conditional context.
1271 node.value = visitExpression(node.value); 1271 node.value = visitExpression(node.value);
1272 }); 1272 });
1273 node.condition = visitExpression(node.condition); 1273 node.condition = visitExpression(node.condition);
1274 } else { 1274 } else {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 } 1381 }
1382 1382
1383 /// Decrement the reference count for [e] if it is a variable use. 1383 /// Decrement the reference count for [e] if it is a variable use.
1384 void destroyPrimaryExpression(Expression e) { 1384 void destroyPrimaryExpression(Expression e) {
1385 if (e is VariableUse) { 1385 if (e is VariableUse) {
1386 --e.variable.readCount; 1386 --e.variable.readCount;
1387 } else { 1387 } else {
1388 assert(e is This); 1388 assert(e is This);
1389 } 1389 }
1390 } 1390 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698