| 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 engine.incremental_resolver; | 5 library engine.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/src/context/cache.dart' | 10 import 'package:analyzer/src/context/cache.dart' | 
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1232   void _shiftEntryErrors() { | 1232   void _shiftEntryErrors() { | 
| 1233     if (oldEntry != null) { | 1233     if (oldEntry != null) { | 
| 1234       _shiftEntryErrors_OLD(); | 1234       _shiftEntryErrors_OLD(); | 
| 1235     } else { | 1235     } else { | 
| 1236       _shiftEntryErrors_NEW(); | 1236       _shiftEntryErrors_NEW(); | 
| 1237     } | 1237     } | 
| 1238   } | 1238   } | 
| 1239 | 1239 | 
| 1240   void _shiftEntryErrors_NEW() { | 1240   void _shiftEntryErrors_NEW() { | 
| 1241     _shiftErrors_NEW(HINTS); | 1241     _shiftErrors_NEW(HINTS); | 
|  | 1242     _shiftErrors_NEW(LINTS); | 
| 1242     _shiftErrors_NEW(INFER_STATIC_VARIABLE_TYPES_ERRORS); | 1243     _shiftErrors_NEW(INFER_STATIC_VARIABLE_TYPES_ERRORS); | 
| 1243     _shiftErrors_NEW(LIBRARY_UNIT_ERRORS); | 1244     _shiftErrors_NEW(LIBRARY_UNIT_ERRORS); | 
| 1244     _shiftErrors_NEW(PARTIALLY_RESOLVE_REFERENCES_ERRORS); | 1245     _shiftErrors_NEW(PARTIALLY_RESOLVE_REFERENCES_ERRORS); | 
| 1245     _shiftErrors_NEW(RESOLVE_FUNCTION_BODIES_ERRORS); | 1246     _shiftErrors_NEW(RESOLVE_FUNCTION_BODIES_ERRORS); | 
| 1246     _shiftErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS); | 1247     _shiftErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS); | 
| 1247     _shiftErrors_NEW(VARIABLE_REFERENCE_ERRORS); | 1248     _shiftErrors_NEW(VARIABLE_REFERENCE_ERRORS); | 
| 1248     _shiftErrors_NEW(VERIFY_ERRORS); | 1249     _shiftErrors_NEW(VERIFY_ERRORS); | 
| 1249   } | 1250   } | 
| 1250 | 1251 | 
| 1251   void _shiftEntryErrors_OLD() { | 1252   void _shiftEntryErrors_OLD() { | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1313     _updateErrors_NEW(INFER_STATIC_VARIABLE_TYPES_ERRORS, _resolveErrors); | 1314     _updateErrors_NEW(INFER_STATIC_VARIABLE_TYPES_ERRORS, _resolveErrors); | 
| 1314     _updateErrors_NEW(PARTIALLY_RESOLVE_REFERENCES_ERRORS, _resolveErrors); | 1315     _updateErrors_NEW(PARTIALLY_RESOLVE_REFERENCES_ERRORS, _resolveErrors); | 
| 1315     _updateErrors_NEW(RESOLVE_FUNCTION_BODIES_ERRORS, _resolveErrors); | 1316     _updateErrors_NEW(RESOLVE_FUNCTION_BODIES_ERRORS, _resolveErrors); | 
| 1316     _updateErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS, []); | 1317     _updateErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS, []); | 
| 1317     _updateErrors_NEW(VARIABLE_REFERENCE_ERRORS, []); | 1318     _updateErrors_NEW(VARIABLE_REFERENCE_ERRORS, []); | 
| 1318     _updateErrors_NEW(VERIFY_ERRORS, _verifyErrors); | 1319     _updateErrors_NEW(VERIFY_ERRORS, _verifyErrors); | 
| 1319     // invalidate results we don't update incrementally | 1320     // invalidate results we don't update incrementally | 
| 1320     newUnitEntry.setState(USED_IMPORTED_ELEMENTS, CacheState.INVALID); | 1321     newUnitEntry.setState(USED_IMPORTED_ELEMENTS, CacheState.INVALID); | 
| 1321     newUnitEntry.setState(USED_LOCAL_ELEMENTS, CacheState.INVALID); | 1322     newUnitEntry.setState(USED_LOCAL_ELEMENTS, CacheState.INVALID); | 
| 1322     newUnitEntry.setState(HINTS, CacheState.INVALID); | 1323     newUnitEntry.setState(HINTS, CacheState.INVALID); | 
|  | 1324     newUnitEntry.setState(LINTS, CacheState.INVALID); | 
| 1323   } | 1325   } | 
| 1324 | 1326 | 
| 1325   void _updateEntry_OLD() { | 1327   void _updateEntry_OLD() { | 
| 1326     _updateErrors_OLD(DartEntry.RESOLUTION_ERRORS, _resolveErrors); | 1328     _updateErrors_OLD(DartEntry.RESOLUTION_ERRORS, _resolveErrors); | 
| 1327     _updateErrors_OLD(DartEntry.VERIFICATION_ERRORS, _verifyErrors); | 1329     _updateErrors_OLD(DartEntry.VERIFICATION_ERRORS, _verifyErrors); | 
| 1328   } | 1330   } | 
| 1329 | 1331 | 
| 1330   List<AnalysisError> _updateErrors( | 1332   List<AnalysisError> _updateErrors( | 
| 1331       List<AnalysisError> oldErrors, List<AnalysisError> newErrors) { | 1333       List<AnalysisError> oldErrors, List<AnalysisError> newErrors) { | 
| 1332     List<AnalysisError> errors = new List<AnalysisError>(); | 1334     List<AnalysisError> errors = new List<AnalysisError>(); | 
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2141   @override | 2143   @override | 
| 2142   String toString() => name; | 2144   String toString() => name; | 
| 2143 } | 2145 } | 
| 2144 | 2146 | 
| 2145 class _TokenPair { | 2147 class _TokenPair { | 
| 2146   final _TokenDifferenceKind kind; | 2148   final _TokenDifferenceKind kind; | 
| 2147   final Token oldToken; | 2149   final Token oldToken; | 
| 2148   final Token newToken; | 2150   final Token newToken; | 
| 2149   _TokenPair(this.kind, this.oldToken, this.newToken); | 2151   _TokenPair(this.kind, this.oldToken, this.newToken); | 
| 2150 } | 2152 } | 
| OLD | NEW | 
|---|