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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 1175973005: dart2js cps: Introduce some built-in operators in type propagation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status files 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 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_builder; 5 library tree_ir_builder;
6 6
7 import '../dart2jslib.dart' as dart2js; 7 import '../dart2jslib.dart' as dart2js;
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE; 10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE;
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return continueWithExpression(node.continuation, value); 576 return continueWithExpression(node.continuation, value);
577 } 577 }
578 578
579 Statement visitSetStatic(cps_ir.SetStatic node) { 579 Statement visitSetStatic(cps_ir.SetStatic node) {
580 SetStatic setStatic = new SetStatic( 580 SetStatic setStatic = new SetStatic(
581 node.element, 581 node.element,
582 getVariableUse(node.value), 582 getVariableUse(node.value),
583 node.sourceInformation); 583 node.sourceInformation);
584 return new ExpressionStatement(setStatic, visit(node.body)); 584 return new ExpressionStatement(setStatic, visit(node.body));
585 } 585 }
586
587 Expression visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
588 if (node.operator == BuiltinOperator.IsFalsy) {
589 return new Not(getVariableUse(node.arguments.single));
590 }
591 return new ApplyBuiltinOperator(node.operator,
592 translateArguments(node.arguments));
593 }
586 } 594 }
587 595
OLDNEW
« 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