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

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

Issue 2486573002: Provide LINE_INFO using just UnlinkedUnit even though the full info is not available. (Closed)
Patch Set: Created 4 years, 1 month 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 | pkg/analyzer/lib/src/summary/package_bundle_reader.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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 713
714 @override 714 @override
715 Object/*=V*/ computeResult/*<V>*/( 715 Object/*=V*/ computeResult/*<V>*/(
716 AnalysisTarget target, ResultDescriptor/*<V>*/ descriptor) { 716 AnalysisTarget target, ResultDescriptor/*<V>*/ descriptor) {
717 // Make sure we are not trying to invoke the task model in a reentrant 717 // Make sure we are not trying to invoke the task model in a reentrant
718 // fashion. 718 // fashion.
719 assert(!driver.isTaskRunning); 719 assert(!driver.isTaskRunning);
720 CacheEntry entry = getCacheEntry(target); 720 CacheEntry entry = getCacheEntry(target);
721 CacheState state = entry.getState(descriptor); 721 CacheState state = entry.getState(descriptor);
722 if (state == CacheState.FLUSHED || state == CacheState.INVALID) { 722 if (state == CacheState.FLUSHED || state == CacheState.INVALID) {
723 // Check the result provider.
724 bool success = aboutToComputeResult(entry, descriptor);
725 if (success) {
726 return entry.getValue(descriptor);
727 }
728 // Compute the result.
723 driver.computeResult(target, descriptor); 729 driver.computeResult(target, descriptor);
724 entry = getCacheEntry(target); 730 entry = getCacheEntry(target);
725 } 731 }
726 state = entry.getState(descriptor); 732 state = entry.getState(descriptor);
727 if (state == CacheState.ERROR) { 733 if (state == CacheState.ERROR) {
728 throw new AnalysisException( 734 throw new AnalysisException(
729 'Cannot compute $descriptor for $target', entry.exception); 735 'Cannot compute $descriptor for $target', entry.exception);
730 } 736 }
731 return entry.getValue(descriptor); 737 return entry.getValue(descriptor);
732 } 738 }
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 } 2235 }
2230 DartSdk sdk = factory.dartSdk; 2236 DartSdk sdk = factory.dartSdk;
2231 if (sdk == null) { 2237 if (sdk == null) {
2232 throw new ArgumentError( 2238 throw new ArgumentError(
2233 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2239 "The source factory for an SDK analysis context must have a DartUriRes olver");
2234 } 2240 }
2235 return new AnalysisCache( 2241 return new AnalysisCache(
2236 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2242 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2237 } 2243 }
2238 } 2244 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/package_bundle_reader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698