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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1151163004: Implementation of null-aware operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart2js.dart » ('j') | pkg/compiler/lib/src/dart2js.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart2js.dart » ('j') | pkg/compiler/lib/src/dart2js.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698