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

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

Issue 1206183002: Clean up and rename RESOLVED_UNIT* vars. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | pkg/analyzer/lib/src/task/dart.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/instrumentation/instrumentation.dart'; 10 import 'package:analyzer/instrumentation/instrumentation.dart';
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 1107
1108 LibrarySpecificUnit unit = 1108 LibrarySpecificUnit unit =
1109 new LibrarySpecificUnit(librarySource, librarySource); 1109 new LibrarySpecificUnit(librarySource, librarySource);
1110 entry = getCacheEntry(unit); 1110 entry = getCacheEntry(unit);
1111 setValue(HINTS, AnalysisError.NO_ERRORS); 1111 setValue(HINTS, AnalysisError.NO_ERRORS);
1112 // dartEntry.setValue(LINTS, AnalysisError.NO_ERRORS); 1112 // dartEntry.setValue(LINTS, AnalysisError.NO_ERRORS);
1113 entry.setState(RESOLVE_REFERENCES_ERRORS, CacheState.FLUSHED); 1113 entry.setState(RESOLVE_REFERENCES_ERRORS, CacheState.FLUSHED);
1114 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); 1114 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
1115 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); 1115 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED);
1116 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); 1116 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED);
1117 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
1117 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); 1118 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
1118 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); 1119 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
1119 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
1120 // USED_IMPORTED_ELEMENTS 1120 // USED_IMPORTED_ELEMENTS
1121 // USED_LOCAL_ELEMENTS 1121 // USED_LOCAL_ELEMENTS
1122 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); 1122 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS);
1123 }); 1123 });
1124 1124
1125 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); 1125 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request);
1126 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); 1126 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST);
1127 } 1127 }
1128 1128
1129 @override 1129 @override
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 return true; 1184 return true;
1185 } 1185 }
1186 } 1186 }
1187 1187
1188 @override 1188 @override
1189 void test_flushAstStructures(Source source) { 1189 void test_flushAstStructures(Source source) {
1190 CacheEntry entry = getCacheEntry(source); 1190 CacheEntry entry = getCacheEntry(source);
1191 entry.setState(PARSED_UNIT, CacheState.FLUSHED); 1191 entry.setState(PARSED_UNIT, CacheState.FLUSHED);
1192 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); 1192 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED);
1193 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); 1193 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED);
1194 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
1194 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); 1195 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
1195 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); 1196 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
1196 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
1197 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); 1197 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
1198 } 1198 }
1199 1199
1200 @override 1200 @override
1201 bool validateCacheConsistency() { 1201 bool validateCacheConsistency() {
1202 int consistencyCheckStart = JavaSystem.nanoTime(); 1202 int consistencyCheckStart = JavaSystem.nanoTime();
1203 HashSet<Source> changedSources = new HashSet<Source>(); 1203 HashSet<Source> changedSources = new HashSet<Source>();
1204 HashSet<Source> missingSources = new HashSet<Source>(); 1204 HashSet<Source> missingSources = new HashSet<Source>();
1205 for (Source source in _cache.sources) { 1205 for (Source source in _cache.sources) {
1206 CacheEntry entry = _cache.get(source); 1206 CacheEntry entry = _cache.get(source);
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 new PendingFuture<T>(_context, target, computeValue); 2015 new PendingFuture<T>(_context, target, computeValue);
2016 if (!pendingFuture.evaluate(entry)) { 2016 if (!pendingFuture.evaluate(entry)) {
2017 _context._pendingFutureTargets 2017 _context._pendingFutureTargets
2018 .putIfAbsent(target, () => <PendingFuture>[]) 2018 .putIfAbsent(target, () => <PendingFuture>[])
2019 .add(pendingFuture); 2019 .add(pendingFuture);
2020 scheduleComputation(); 2020 scheduleComputation();
2021 } 2021 }
2022 return pendingFuture.future; 2022 return pendingFuture.future;
2023 } 2023 }
2024 } 2024 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698