| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js.ir_builder_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closurelib; | 7 import '../closure.dart' as closurelib; |
| 8 import '../closure.dart' hide ClosureScope; | 8 import '../closure.dart' hide ClosureScope; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 | 837 |
| 838 ir.Primitive buildRightValue(IrBuilder rightBuilder) { | 838 ir.Primitive buildRightValue(IrBuilder rightBuilder) { |
| 839 return withBuilder(rightBuilder, () => visit(right)); | 839 return withBuilder(rightBuilder, () => visit(right)); |
| 840 } | 840 } |
| 841 | 841 |
| 842 return irBuilder.buildLogicalOperator( | 842 return irBuilder.buildLogicalOperator( |
| 843 leftValue, buildRightValue, isLazyOr: isLazyOr); | 843 leftValue, buildRightValue, isLazyOr: isLazyOr); |
| 844 } | 844 } |
| 845 | 845 |
| 846 @override | 846 @override |
| 847 ir.Primitive visitIfNull( |
| 848 ast.Send node, ast.Node left, ast.Node right, _) { |
| 849 internalError(node, "If-null not yet implemented in cps_ir"); |
| 850 } |
| 851 |
| 852 @override |
| 847 ir.Primitive visitLogicalAnd( | 853 ir.Primitive visitLogicalAnd( |
| 848 ast.Send node, ast.Node left, ast.Node right, _) { | 854 ast.Send node, ast.Node left, ast.Node right, _) { |
| 849 return translateLogicalOperator(left, right, isLazyOr: false); | 855 return translateLogicalOperator(left, right, isLazyOr: false); |
| 850 } | 856 } |
| 851 | 857 |
| 852 @override | 858 @override |
| 853 ir.Primitive visitLogicalOr( | 859 ir.Primitive visitLogicalOr( |
| 854 ast.Send node, ast.Node left, ast.Node right, _) { | 860 ast.Send node, ast.Node left, ast.Node right, _) { |
| 855 return translateLogicalOperator(left, right, isLazyOr: true); | 861 return translateLogicalOperator(left, right, isLazyOr: true); |
| 856 } | 862 } |
| (...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3073 node.body = replacementFor(node.body); | 3079 node.body = replacementFor(node.body); |
| 3074 } | 3080 } |
| 3075 } | 3081 } |
| 3076 | 3082 |
| 3077 /// Visit a just-deleted subterm and unlink all [Reference]s in it. | 3083 /// Visit a just-deleted subterm and unlink all [Reference]s in it. |
| 3078 class RemovalVisitor extends ir.RecursiveVisitor { | 3084 class RemovalVisitor extends ir.RecursiveVisitor { |
| 3079 processReference(ir.Reference reference) { | 3085 processReference(ir.Reference reference) { |
| 3080 reference.unlink(); | 3086 reference.unlink(); |
| 3081 } | 3087 } |
| 3082 } | 3088 } |
| OLD | NEW |