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

Side by Side Diff: pkg/compiler/lib/src/inferrer/inferrer_engine.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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart'; 8 import '../common/names.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 reporter.log('Inferred $overallRefineCount types.'); 467 reporter.log('Inferred $overallRefineCount types.');
468 468
469 processLoopInformation(); 469 processLoopInformation();
470 } 470 }
471 471
472 void analyze(ResolvedAst resolvedAst, ArgumentsTypes arguments) { 472 void analyze(ResolvedAst resolvedAst, ArgumentsTypes arguments) {
473 AstElement element = resolvedAst.element.implementation; 473 AstElement element = resolvedAst.element.implementation;
474 if (analyzedElements.contains(element)) return; 474 if (analyzedElements.contains(element)) return;
475 analyzedElements.add(element); 475 analyzedElements.add(element);
476 476
477 var visitor = compiler.options.kernelGlobalInference 477 dynamic visitor = compiler.options.kernelGlobalInference
478 ? new KernelTypeGraphBuilder(element, resolvedAst, compiler, this) 478 ? new KernelTypeGraphBuilder(element, resolvedAst, compiler, this)
479 : new ElementGraphBuilder(element, resolvedAst, compiler, this); 479 : new ElementGraphBuilder(element, resolvedAst, compiler, this);
480 TypeInformation type; 480 TypeInformation type;
481 reporter.withCurrentElement(element, () { 481 reporter.withCurrentElement(element, () {
482 // ignore: UNDEFINED_METHOD
482 type = visitor.run(); 483 type = visitor.run();
483 }); 484 });
484 addedInGraph++; 485 addedInGraph++;
485 486
486 if (element.isField) { 487 if (element.isField) {
487 VariableElement fieldElement = element; 488 VariableElement fieldElement = element;
488 ast.Node node = resolvedAst.node; 489 ast.Node node = resolvedAst.node;
489 ast.Node initializer = resolvedAst.body; 490 ast.Node initializer = resolvedAst.body;
490 if (element.isFinal || element.isConst) { 491 if (element.isFinal || element.isConst) {
491 // If [element] is final and has an initializer, we record 492 // If [element] is final and has an initializer, we record
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 /** 1057 /**
1057 * Records that the captured variable [local] is read. 1058 * Records that the captured variable [local] is read.
1058 */ 1059 */
1059 void recordCapturedLocalRead(Local local) {} 1060 void recordCapturedLocalRead(Local local) {}
1060 1061
1061 /** 1062 /**
1062 * Records that the variable [local] is being updated. 1063 * Records that the variable [local] is being updated.
1063 */ 1064 */
1064 void recordLocalUpdate(Local local, TypeInformation type) {} 1065 void recordLocalUpdate(Local local, TypeInformation type) {}
1065 } 1066 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder_kernel.dart ('k') | pkg/compiler/lib/src/io/line_column_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698