| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer.src.generated.sdk_io; | 5 library analyzer.src.generated.sdk_io; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 @override | 278 @override |
| 279 AnalysisContext get context { | 279 AnalysisContext get context { |
| 280 if (_analysisContext == null) { | 280 if (_analysisContext == null) { |
| 281 _analysisContext = new SdkAnalysisContext(_analysisOptions); | 281 _analysisContext = new SdkAnalysisContext(_analysisOptions); |
| 282 SourceFactory factory = new SourceFactory([new DartUriResolver(this)]); | 282 SourceFactory factory = new SourceFactory([new DartUriResolver(this)]); |
| 283 _analysisContext.sourceFactory = factory; | 283 _analysisContext.sourceFactory = factory; |
| 284 if (_useSummary) { | 284 if (_useSummary) { |
| 285 PackageBundle sdkBundle = getSummarySdkBundle(); | 285 PackageBundle sdkBundle = getSummarySdkBundle(); |
| 286 if (sdkBundle != null) { | 286 if (sdkBundle != null) { |
| 287 _analysisContext.resultProvider = | 287 bool strongMode = _analysisOptions?.strongMode ?? false; |
| 288 new SdkSummaryResultProvider(_analysisContext, sdkBundle); | 288 _analysisContext.resultProvider = new SdkSummaryResultProvider( |
| 289 _analysisContext, sdkBundle, strongMode); |
| 289 } | 290 } |
| 290 } | 291 } |
| 291 } | 292 } |
| 292 return _analysisContext; | 293 return _analysisContext; |
| 293 } | 294 } |
| 294 | 295 |
| 295 /** | 296 /** |
| 296 * Return the file containing the dart2js executable, or `null` if it does not | 297 * Return the file containing the dart2js executable, or `null` if it does not |
| 297 * exist. | 298 * exist. |
| 298 */ | 299 */ |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 SdkLibrariesReader_LibraryBuilder libraryBuilder = | 684 SdkLibrariesReader_LibraryBuilder libraryBuilder = |
| 684 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); | 685 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); |
| 685 // If any syntactic errors were found then don't try to visit the AST | 686 // If any syntactic errors were found then don't try to visit the AST |
| 686 // structure. | 687 // structure. |
| 687 if (!errorListener.errorReported) { | 688 if (!errorListener.errorReported) { |
| 688 unit.accept(libraryBuilder); | 689 unit.accept(libraryBuilder); |
| 689 } | 690 } |
| 690 return libraryBuilder.librariesMap; | 691 return libraryBuilder.librariesMap; |
| 691 } | 692 } |
| 692 } | 693 } |
| OLD | NEW |