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

Side by Side Diff: lib/src/codegen/reify_coercions.dart

Issue 1059873002: Tweaks to warning level and reporting (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Fix up tests Created 5 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 | « no previous file | lib/src/info.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dev_compiler.src.codegen.reify_coercions; 5 library dev_compiler.src.codegen.reify_coercions;
6 6
7 import 'package:analyzer/analyzer.dart' as analyzer; 7 import 'package:analyzer/analyzer.dart' as analyzer;
8 import 'package:analyzer/src/generated/ast.dart'; 8 import 'package:analyzer/src/generated/ast.dart';
9 import 'package:analyzer/src/generated/element.dart'; 9 import 'package:analyzer/src/generated/element.dart';
10 import 'package:logging/logging.dart' as logger; 10 import 'package:logging/logging.dart' as logger;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 } 123 }
124 return null; 124 return null;
125 } 125 }
126 126
127 static String _conversionKind(Conversion node) { 127 static String _conversionKind(Conversion node) {
128 if (node is ClosureWrapLiteral) return "WrapLiteral"; 128 if (node is ClosureWrapLiteral) return "WrapLiteral";
129 if (node is ClosureWrap) return "Wrap"; 129 if (node is ClosureWrap) return "Wrap";
130 if (node is DynamicCast) return "DynamicCast"; 130 if (node is DynamicCast) return "DynamicCast";
131 if (node is AssignmentCast) return "AssignmentCast"; 131 if (node is AssignmentCast) return "AssignmentCast";
132 if (node is InferableClosure) return "InferableClosure"; 132 if (node is UninferredClosure) return "InferableClosure";
133 if (node is DownCastComposite) return "CompositeCast"; 133 if (node is DownCastComposite) return "CompositeCast";
134 if (node is DownCastImplicit) return "ImplicitCast"; 134 if (node is DownCastImplicit) return "ImplicitCast";
135 assert(false); 135 assert(false);
136 return ""; 136 return "";
137 } 137 }
138 138
139 @override 139 @override
140 Object visitAsExpression(AsExpression e) { 140 Object visitAsExpression(AsExpression e) {
141 var cast = Coercion.cast(_rules.getStaticType(e.expression), e.type.type); 141 var cast = Coercion.cast(_rules.getStaticType(e.expression), e.type.type);
142 var loc = _locationInfo(e); 142 var loc = _locationInfo(e);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 Expression _typeExpression(TypeName t) { 721 Expression _typeExpression(TypeName t) {
722 if (t.typeArguments != null && t.typeArguments.length > 0) { 722 if (t.typeArguments != null && t.typeArguments.length > 0) {
723 var w = AstBuilder.identifierFromString("_"); 723 var w = AstBuilder.identifierFromString("_");
724 var fp = AstBuilder.simpleFormal(w, t); 724 var fp = AstBuilder.simpleFormal(w, t);
725 var f = AstBuilder.blockFunction(<FormalParameter>[fp], <Statement>[]); 725 var f = AstBuilder.blockFunction(<FormalParameter>[fp], <Statement>[]);
726 return new RuntimeOperation("type", <Expression>[f]); 726 return new RuntimeOperation("type", <Expression>[f]);
727 } 727 }
728 return t.name; 728 return t.name;
729 } 729 }
730 } 730 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698