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

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

Issue 1357713006: Remove redundant call (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 3 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 | test/codegen_test.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 /// Command line tool to run the checker on a Dart program. 5 /// Command line tool to run the checker on a Dart program.
6 library dev_compiler.src.compiler; 6 library dev_compiler.src.compiler;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 import 'dart:math' as math; 10 import 'dart:math' as math;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 abstract class AbstractCompiler { 281 abstract class AbstractCompiler {
282 final CompilerOptions options; 282 final CompilerOptions options;
283 final AnalysisContext context; 283 final AnalysisContext context;
284 final CodeChecker checker; 284 final CodeChecker checker;
285 285
286 AbstractCompiler(AnalysisContext context, CompilerOptions options, 286 AbstractCompiler(AnalysisContext context, CompilerOptions options,
287 [AnalysisErrorListener reporter]) 287 [AnalysisErrorListener reporter])
288 : context = context, 288 : context = context,
289 options = options, 289 options = options,
290 checker = createChecker(context.typeProvider, options.strongOptions, 290 checker = createChecker(context.typeProvider, options.strongOptions,
291 reporter ?? AnalysisErrorListener.NULL_LISTENER) { 291 reporter ?? AnalysisErrorListener.NULL_LISTENER);
292 enableDevCompilerInference(context, options.strongOptions);
vsm 2015/09/18 22:29:39 I think this call is redundant with the one in ana
293 }
294 292
295 static CodeChecker createChecker(TypeProvider typeProvider, 293 static CodeChecker createChecker(TypeProvider typeProvider,
296 StrongModeOptions options, AnalysisErrorListener reporter) { 294 StrongModeOptions options, AnalysisErrorListener reporter) {
297 return new CodeChecker( 295 return new CodeChecker(
298 new RestrictedRules(typeProvider, options: options), reporter, options); 296 new RestrictedRules(typeProvider, options: options), reporter, options);
299 } 297 }
300 298
301 String get outputDir => options.codegenOptions.outputDir; 299 String get outputDir => options.codegenOptions.outputDir;
302 TypeRules get rules => checker.rules; 300 TypeRules get rules => checker.rules;
303 AnalysisErrorListener get reporter => checker.reporter; 301 AnalysisErrorListener get reporter => checker.reporter;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 '_rtti.js', 453 '_rtti.js',
456 '_classes.js', 454 '_classes.js',
457 '_operations.js', 455 '_operations.js',
458 'dart_runtime.js', 456 'dart_runtime.js',
459 ]; 457 ];
460 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); 458 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js'));
461 return files; 459 return files;
462 }(); 460 }();
463 461
464 final _log = new Logger('dev_compiler.src.compiler'); 462 final _log = new Logger('dev_compiler.src.compiler');
OLDNEW
« no previous file with comments | « no previous file | test/codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698