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

Side by Side Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 2647043002: Fix hints reported by analyzer. (Closed)
Patch Set: Created 3 years, 11 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.compile_time_constant_evaluator; 5 library dart2js.compile_time_constant_evaluator;
6 6
7 import 'common/resolution.dart' show Resolution; 7 import 'common/resolution.dart' show Resolution;
8 import 'common/tasks.dart' show CompilerTask, Measurer; 8 import 'common/tasks.dart' show CompilerTask, Measurer;
9 import 'common.dart'; 9 import 'common.dart';
10 import 'compiler.dart' show Compiler; 10 import 'compiler.dart' show Compiler;
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 * the [fieldValues] map. 1287 * the [fieldValues] map.
1288 */ 1288 */
1289 void evaluateConstructorInitializers() { 1289 void evaluateConstructorInitializers() {
1290 ResolvedAst resolvedAst = constructor.resolvedAst; 1290 ResolvedAst resolvedAst = constructor.resolvedAst;
1291 if (resolvedAst.kind != ResolvedAstKind.PARSED) { 1291 if (resolvedAst.kind != ResolvedAstKind.PARSED) {
1292 List<AstConstant> compiledArguments = <AstConstant>[]; 1292 List<AstConstant> compiledArguments = <AstConstant>[];
1293 1293
1294 Function compileArgument = (element) => definitions[element]; 1294 Function compileArgument = (element) => definitions[element];
1295 Function compileConstant = handler.compileConstant; 1295 Function compileConstant = handler.compileConstant;
1296 FunctionElement target = constructor.definingConstructor.implementation; 1296 FunctionElement target = constructor.definingConstructor.implementation;
1297 Elements.addForwardingElementArgumentsToList<AstConstant>(constructor, 1297 Elements.addForwardingElementArgumentsToList(constructor,
Siggi Cherem (dart-lang) 2017/01/20 18:12:32 oh my, this actually seems to be a bit broken. I t
Johnni Winther 2017/01/23 09:31:55 It should. Weird why this hasn't failed at runtime
ahe 2017/01/23 09:45:22 What should I do?
Johnni Winther 2017/01/23 10:13:43 Just remove the type argument to avoid the hint. I
1298 compiledArguments, target, compileArgument, compileConstant); 1298 compiledArguments, target, compileArgument, compileConstant);
1299 CallStructure callStructure = new CallStructure( 1299 CallStructure callStructure = new CallStructure(
1300 target.functionSignature.parameterCount, target.type.namedParameters); 1300 target.functionSignature.parameterCount, target.type.namedParameters);
1301 evaluateSuperOrRedirectSend(compiledArguments, callStructure, target); 1301 evaluateSuperOrRedirectSend(compiledArguments, callStructure, target);
1302 return; 1302 return;
1303 } 1303 }
1304 FunctionExpression functionNode = resolvedAst.node; 1304 FunctionExpression functionNode = resolvedAst.node;
1305 NodeList initializerList = functionNode.initializers; 1305 NodeList initializerList = functionNode.initializers;
1306 1306
1307 bool foundSuperOrRedirect = false; 1307 bool foundSuperOrRedirect = false;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 class _CompilerEnvironment implements Environment { 1448 class _CompilerEnvironment implements Environment {
1449 final Compiler compiler; 1449 final Compiler compiler;
1450 1450
1451 _CompilerEnvironment(this.compiler); 1451 _CompilerEnvironment(this.compiler);
1452 1452
1453 @override 1453 @override
1454 String readFromEnvironment(String name) { 1454 String readFromEnvironment(String name) {
1455 return compiler.fromEnvironment(name); 1455 return compiler.fromEnvironment(name);
1456 } 1456 }
1457 } 1457 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698