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

Side by Side Diff: pkg/compiler/lib/src/constants/expressions.dart

Issue 2791993002: Fix dart2js warnings and add test to ensure it stays clean. (Closed)
Patch Set: Address comments and fix duplicated library names. Created 3 years, 8 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dart2js.constants.expressions; 5 library dart2js.constants.expressions;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/constant_system.dart'; 8 import '../constants/constant_system.dart';
9 import '../common_elements.dart'; 9 import '../common_elements.dart';
10 import '../elements/types.dart'; 10 import '../elements/types.dart';
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 .lookupBinary(operator) 934 .lookupBinary(operator)
935 .fold(leftValue, rightValue); 935 .fold(leftValue, rightValue);
936 } 936 }
937 } 937 }
938 938
939 ConstantExpression apply(NormalizedArguments arguments) { 939 ConstantExpression apply(NormalizedArguments arguments) {
940 return new BinaryConstantExpression( 940 return new BinaryConstantExpression(
941 left.apply(arguments), operator, right.apply(arguments)); 941 left.apply(arguments), operator, right.apply(arguments));
942 } 942 }
943 943
944 // ignore: MISSING_RETURN
944 InterfaceType getKnownType(CommonElements commonElements) { 945 InterfaceType getKnownType(CommonElements commonElements) {
945 DartType knownLeftType = left.getKnownType(commonElements); 946 DartType knownLeftType = left.getKnownType(commonElements);
946 DartType knownRightType = right.getKnownType(commonElements); 947 DartType knownRightType = right.getKnownType(commonElements);
947 switch (operator.kind) { 948 switch (operator.kind) {
948 case BinaryOperatorKind.EQ: 949 case BinaryOperatorKind.EQ:
949 case BinaryOperatorKind.NOT_EQ: 950 case BinaryOperatorKind.NOT_EQ:
950 case BinaryOperatorKind.LOGICAL_AND: 951 case BinaryOperatorKind.LOGICAL_AND:
951 case BinaryOperatorKind.LOGICAL_OR: 952 case BinaryOperatorKind.LOGICAL_OR:
952 case BinaryOperatorKind.GT: 953 case BinaryOperatorKind.GT:
953 case BinaryOperatorKind.LT: 954 case BinaryOperatorKind.LT:
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 visit(exp.name); 1942 visit(exp.name);
1942 if (exp.defaultValue != null) { 1943 if (exp.defaultValue != null) {
1943 sb.write(', defaultValue: '); 1944 sb.write(', defaultValue: ');
1944 visit(exp.defaultValue); 1945 visit(exp.defaultValue);
1945 } 1946 }
1946 sb.write(')'); 1947 sb.write(')');
1947 } 1948 }
1948 1949
1949 String toString() => sb.toString(); 1950 String toString() => sb.toString();
1950 } 1951 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698