| 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.incremental_resolver; | 5 library analyzer.src.generated.incremental_resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 isByTask(PropagateVariableTypesInLibraryTask.DESCRIPTOR) || | 928 isByTask(PropagateVariableTypesInLibraryTask.DESCRIPTOR) || |
| 929 isByTask(PropagateVariableTypesInUnitTask.DESCRIPTOR) || | 929 isByTask(PropagateVariableTypesInUnitTask.DESCRIPTOR) || |
| 930 isByTask(PropagateVariableTypeTask.DESCRIPTOR) || | 930 isByTask(PropagateVariableTypeTask.DESCRIPTOR) || |
| 931 isByTask(ScanDartTask.DESCRIPTOR) || | 931 isByTask(ScanDartTask.DESCRIPTOR) || |
| 932 isByTask(ResolveConstantExpressionTask.DESCRIPTOR) || | 932 isByTask(ResolveConstantExpressionTask.DESCRIPTOR) || |
| 933 isByTask(ResolveDirectiveElementsTask.DESCRIPTOR) || | 933 isByTask(ResolveDirectiveElementsTask.DESCRIPTOR) || |
| 934 isByTask(ResolveInstanceFieldsInUnitTask.DESCRIPTOR) || | 934 isByTask(ResolveInstanceFieldsInUnitTask.DESCRIPTOR) || |
| 935 isByTask(ResolveLibraryReferencesTask.DESCRIPTOR) || | 935 isByTask(ResolveLibraryReferencesTask.DESCRIPTOR) || |
| 936 isByTask(ResolveLibraryTask.DESCRIPTOR) || | 936 isByTask(ResolveLibraryTask.DESCRIPTOR) || |
| 937 isByTask(ResolveLibraryTypeNamesTask.DESCRIPTOR) || | 937 isByTask(ResolveLibraryTypeNamesTask.DESCRIPTOR) || |
| 938 isByTask(ResolveTopLevelLibraryTypeBoundsTask.DESCRIPTOR) || |
| 939 isByTask(ResolveTopLevelUnitTypeBoundsTask.DESCRIPTOR) || |
| 938 isByTask(ResolveUnitTask.DESCRIPTOR) || | 940 isByTask(ResolveUnitTask.DESCRIPTOR) || |
| 939 isByTask(ResolveUnitTypeNamesTask.DESCRIPTOR) || | 941 isByTask(ResolveUnitTypeNamesTask.DESCRIPTOR) || |
| 940 isByTask(ResolveVariableReferencesTask.DESCRIPTOR) || | 942 isByTask(ResolveVariableReferencesTask.DESCRIPTOR) || |
| 941 isByTask(StrongModeVerifyUnitTask.DESCRIPTOR) || | 943 isByTask(StrongModeVerifyUnitTask.DESCRIPTOR) || |
| 942 isByTask(VerifyUnitTask.DESCRIPTOR)) { | 944 isByTask(VerifyUnitTask.DESCRIPTOR)) { |
| 943 return DeltaResult.KEEP_CONTINUE; | 945 return DeltaResult.KEEP_CONTINUE; |
| 944 } | 946 } |
| 945 // invalidate all the other results | 947 // invalidate all the other results |
| 946 return DeltaResult.INVALIDATE_NO_DELTA; | 948 return DeltaResult.INVALIDATE_NO_DELTA; |
| 947 } | 949 } |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 } finally { | 1249 } finally { |
| 1248 timer.stop('resolve references'); | 1250 timer.stop('resolve references'); |
| 1249 } | 1251 } |
| 1250 } | 1252 } |
| 1251 | 1253 |
| 1252 void _shiftEntryErrors() { | 1254 void _shiftEntryErrors() { |
| 1253 _shiftErrors_NEW(HINTS); | 1255 _shiftErrors_NEW(HINTS); |
| 1254 _shiftErrors_NEW(LINTS); | 1256 _shiftErrors_NEW(LINTS); |
| 1255 _shiftErrors_NEW(LIBRARY_UNIT_ERRORS); | 1257 _shiftErrors_NEW(LIBRARY_UNIT_ERRORS); |
| 1256 _shiftErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS); | 1258 _shiftErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS); |
| 1259 _shiftErrors_NEW(RESOLVE_TYPE_BOUNDS_ERRORS); |
| 1257 _shiftErrors_NEW(RESOLVE_UNIT_ERRORS); | 1260 _shiftErrors_NEW(RESOLVE_UNIT_ERRORS); |
| 1258 _shiftErrors_NEW(STRONG_MODE_ERRORS); | 1261 _shiftErrors_NEW(STRONG_MODE_ERRORS); |
| 1259 _shiftErrors_NEW(VARIABLE_REFERENCE_ERRORS); | 1262 _shiftErrors_NEW(VARIABLE_REFERENCE_ERRORS); |
| 1260 _shiftErrors_NEW(VERIFY_ERRORS); | 1263 _shiftErrors_NEW(VERIFY_ERRORS); |
| 1261 } | 1264 } |
| 1262 | 1265 |
| 1263 void _shiftErrors(List<AnalysisError> errors) { | 1266 void _shiftErrors(List<AnalysisError> errors) { |
| 1264 for (AnalysisError error in errors) { | 1267 for (AnalysisError error in errors) { |
| 1265 if (_alreadyShiftedErrors.add(error)) { | 1268 if (_alreadyShiftedErrors.add(error)) { |
| 1266 int errorOffset = error.offset; | 1269 int errorOffset = error.offset; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1295 _definingUnit.accept( | 1298 _definingUnit.accept( |
| 1296 new _ElementOffsetUpdater(_updateOffset, _updateDelta, _cache)); | 1299 new _ElementOffsetUpdater(_updateOffset, _updateDelta, _cache)); |
| 1297 _definingUnit.afterIncrementalResolution(); | 1300 _definingUnit.afterIncrementalResolution(); |
| 1298 } finally { | 1301 } finally { |
| 1299 timer.stop('update element offsets'); | 1302 timer.stop('update element offsets'); |
| 1300 } | 1303 } |
| 1301 } | 1304 } |
| 1302 | 1305 |
| 1303 void _updateEntry() { | 1306 void _updateEntry() { |
| 1304 _updateErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS, []); | 1307 _updateErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS, []); |
| 1308 _updateErrors_NEW(RESOLVE_TYPE_BOUNDS_ERRORS, []); |
| 1305 _updateErrors_NEW(RESOLVE_UNIT_ERRORS, _resolveErrors); | 1309 _updateErrors_NEW(RESOLVE_UNIT_ERRORS, _resolveErrors); |
| 1306 _updateErrors_NEW(VARIABLE_REFERENCE_ERRORS, []); | 1310 _updateErrors_NEW(VARIABLE_REFERENCE_ERRORS, []); |
| 1307 _updateErrors_NEW(VERIFY_ERRORS, _verifyErrors); | 1311 _updateErrors_NEW(VERIFY_ERRORS, _verifyErrors); |
| 1308 // invalidate results we don't update incrementally | 1312 // invalidate results we don't update incrementally |
| 1309 newUnitEntry.setState(STRONG_MODE_ERRORS, CacheState.INVALID); | 1313 newUnitEntry.setState(STRONG_MODE_ERRORS, CacheState.INVALID); |
| 1310 newUnitEntry.setState(USED_IMPORTED_ELEMENTS, CacheState.INVALID); | 1314 newUnitEntry.setState(USED_IMPORTED_ELEMENTS, CacheState.INVALID); |
| 1311 newUnitEntry.setState(USED_LOCAL_ELEMENTS, CacheState.INVALID); | 1315 newUnitEntry.setState(USED_LOCAL_ELEMENTS, CacheState.INVALID); |
| 1312 newUnitEntry.setState(HINTS, CacheState.INVALID); | 1316 newUnitEntry.setState(HINTS, CacheState.INVALID); |
| 1313 newUnitEntry.setState(LINTS, CacheState.INVALID); | 1317 newUnitEntry.setState(LINTS, CacheState.INVALID); |
| 1314 } | 1318 } |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2237 @override | 2241 @override |
| 2238 String toString() => name; | 2242 String toString() => name; |
| 2239 } | 2243 } |
| 2240 | 2244 |
| 2241 class _TokenPair { | 2245 class _TokenPair { |
| 2242 final _TokenDifferenceKind kind; | 2246 final _TokenDifferenceKind kind; |
| 2243 final Token oldToken; | 2247 final Token oldToken; |
| 2244 final Token newToken; | 2248 final Token newToken; |
| 2245 _TokenPair(this.kind, this.oldToken, this.newToken); | 2249 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 2246 } | 2250 } |
| OLD | NEW |