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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1855643002: More strong mode changes to analysis_server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Backout changes to options file Created 4 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
« no previous file with comments | « pkg/analyzer/lib/src/codegen/tools.dart ('k') | pkg/analyzer/lib/src/generated/engine.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 library analyzer.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 } 826 }
827 827
828 @override 828 @override
829 CompilationUnitElement getCompilationUnitElement( 829 CompilationUnitElement getCompilationUnitElement(
830 Source unitSource, Source librarySource) { 830 Source unitSource, Source librarySource) {
831 AnalysisTarget target = new LibrarySpecificUnit(librarySource, unitSource); 831 AnalysisTarget target = new LibrarySpecificUnit(librarySource, unitSource);
832 return getResult(target, COMPILATION_UNIT_ELEMENT); 832 return getResult(target, COMPILATION_UNIT_ELEMENT);
833 } 833 }
834 834
835 @override 835 @override
836 Object getConfigurationData(ResultDescriptor key) => 836 Object/*=V*/ getConfigurationData/*<V>*/(ResultDescriptor/*<V>*/ key) =>
837 _configurationData[key] ?? key?.defaultValue; 837 (_configurationData[key] ?? key?.defaultValue) as Object/*=V*/;
838 838
839 @override 839 @override
840 TimestampedData<String> getContents(Source source) { 840 TimestampedData<String> getContents(Source source) {
841 String contents = _contentCache.getContents(source); 841 String contents = _contentCache.getContents(source);
842 if (contents != null) { 842 if (contents != null) {
843 return new TimestampedData<String>( 843 return new TimestampedData<String>(
844 _contentCache.getModificationStamp(source), contents); 844 _contentCache.getModificationStamp(source), contents);
845 } 845 }
846 return source.contents; 846 return source.contents;
847 } 847 }
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 } 2197 }
2198 DartSdk sdk = factory.dartSdk; 2198 DartSdk sdk = factory.dartSdk;
2199 if (sdk == null) { 2199 if (sdk == null) {
2200 throw new IllegalArgumentException( 2200 throw new IllegalArgumentException(
2201 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2201 "The source factory for an SDK analysis context must have a DartUriRes olver");
2202 } 2202 }
2203 return new AnalysisCache( 2203 return new AnalysisCache(
2204 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2204 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2205 } 2205 }
2206 } 2206 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/codegen/tools.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698