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

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

Issue 1398873002: remove "infer from overrides" option which is now obsolete (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 2 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 | « lib/src/checker/resolver.dart ('k') | lib/strong_mode.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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 abstract class AbstractCompiler { 348 abstract class AbstractCompiler {
349 final CompilerOptions options; 349 final CompilerOptions options;
350 final AnalysisContext context; 350 final AnalysisContext context;
351 final CodeChecker checker; 351 final CodeChecker checker;
352 352
353 AbstractCompiler(AnalysisContext context, CompilerOptions options, 353 AbstractCompiler(AnalysisContext context, CompilerOptions options,
354 [AnalysisErrorListener reporter]) 354 [AnalysisErrorListener reporter])
355 : context = context, 355 : context = context,
356 options = options, 356 options = options,
357 checker = createChecker(context.typeProvider, options.strongOptions, 357 checker = new CodeChecker(
358 new RestrictedRules(context.typeProvider,
359 options: options.strongOptions),
358 reporter ?? AnalysisErrorListener.NULL_LISTENER); 360 reporter ?? AnalysisErrorListener.NULL_LISTENER);
359 361
360 static CodeChecker createChecker(TypeProvider typeProvider,
361 StrongModeOptions options, AnalysisErrorListener reporter) {
362 return new CodeChecker(
363 new RestrictedRules(typeProvider, options: options), reporter, options);
364 }
365
366 String get outputDir => options.codegenOptions.outputDir; 362 String get outputDir => options.codegenOptions.outputDir;
367 TypeRules get rules => checker.rules; 363 TypeRules get rules => checker.rules;
368 AnalysisErrorListener get reporter => checker.reporter; 364 AnalysisErrorListener get reporter => checker.reporter;
369 365
370 Uri stringToUri(String uriString) { 366 Uri stringToUri(String uriString) {
371 var uri = uriString.startsWith('dart:') || uriString.startsWith('package:') 367 var uri = uriString.startsWith('dart:') || uriString.startsWith('package:')
372 ? Uri.parse(uriString) 368 ? Uri.parse(uriString)
373 : new Uri.file(path.absolute(uriString)); 369 : new Uri.file(path.absolute(uriString));
374 return uri; 370 return uri;
375 } 371 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 '_rtti.js', 516 '_rtti.js',
521 '_classes.js', 517 '_classes.js',
522 '_operations.js', 518 '_operations.js',
523 'dart_runtime.js', 519 'dart_runtime.js',
524 ]; 520 ];
525 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); 521 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js'));
526 return files; 522 return files;
527 }(); 523 }();
528 524
529 final _log = new Logger('dev_compiler.src.compiler'); 525 final _log = new Logger('dev_compiler.src.compiler');
OLDNEW
« no previous file with comments | « lib/src/checker/resolver.dart ('k') | lib/strong_mode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698