| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 isByTask(LibraryErrorsReadyTask.DESCRIPTOR) || | 111 isByTask(LibraryErrorsReadyTask.DESCRIPTOR) || |
| 112 isByTask(LibraryUnitErrorsTask.DESCRIPTOR) || | 112 isByTask(LibraryUnitErrorsTask.DESCRIPTOR) || |
| 113 isByTask(ParseDartTask.DESCRIPTOR) || | 113 isByTask(ParseDartTask.DESCRIPTOR) || |
| 114 isByTask(PartiallyResolveUnitReferencesTask.DESCRIPTOR) || | 114 isByTask(PartiallyResolveUnitReferencesTask.DESCRIPTOR) || |
| 115 isByTask(PropagateVariableTypesInLibraryClosureTask.DESCRIPTOR) || | 115 isByTask(PropagateVariableTypesInLibraryClosureTask.DESCRIPTOR) || |
| 116 isByTask(PropagateVariableTypesInLibraryTask.DESCRIPTOR) || | 116 isByTask(PropagateVariableTypesInLibraryTask.DESCRIPTOR) || |
| 117 isByTask(PropagateVariableTypesInUnitTask.DESCRIPTOR) || | 117 isByTask(PropagateVariableTypesInUnitTask.DESCRIPTOR) || |
| 118 isByTask(PropagateVariableTypeTask.DESCRIPTOR) || | 118 isByTask(PropagateVariableTypeTask.DESCRIPTOR) || |
| 119 isByTask(ScanDartTask.DESCRIPTOR) || | 119 isByTask(ScanDartTask.DESCRIPTOR) || |
| 120 isByTask(ResolveConstantExpressionTask.DESCRIPTOR) || | 120 isByTask(ResolveConstantExpressionTask.DESCRIPTOR) || |
| 121 isByTask(ResolveDirectivesTask.DESCRIPTOR) || | |
| 122 isByTask(ResolveDirectiveElementsTask.DESCRIPTOR) || | 121 isByTask(ResolveDirectiveElementsTask.DESCRIPTOR) || |
| 123 isByTask(ResolveInstanceFieldsInUnitTask.DESCRIPTOR) || | 122 isByTask(ResolveInstanceFieldsInUnitTask.DESCRIPTOR) || |
| 124 isByTask(ResolveLibraryReferencesTask.DESCRIPTOR) || | 123 isByTask(ResolveLibraryReferencesTask.DESCRIPTOR) || |
| 125 isByTask(ResolveLibraryTask.DESCRIPTOR) || | 124 isByTask(ResolveLibraryTask.DESCRIPTOR) || |
| 126 isByTask(ResolveLibraryTypeNamesTask.DESCRIPTOR) || | 125 isByTask(ResolveLibraryTypeNamesTask.DESCRIPTOR) || |
| 127 isByTask(ResolveTopLevelLibraryTypeBoundsTask.DESCRIPTOR) || | 126 isByTask(ResolveTopLevelLibraryTypeBoundsTask.DESCRIPTOR) || |
| 128 isByTask(ResolveTopLevelUnitTypeBoundsTask.DESCRIPTOR) || | 127 isByTask(ResolveTopLevelUnitTypeBoundsTask.DESCRIPTOR) || |
| 129 isByTask(ResolveUnitTask.DESCRIPTOR) || | 128 isByTask(ResolveUnitTask.DESCRIPTOR) || |
| 130 isByTask(ResolveUnitTypeNamesTask.DESCRIPTOR) || | 129 isByTask(ResolveUnitTypeNamesTask.DESCRIPTOR) || |
| 131 isByTask(ResolveVariableReferencesTask.DESCRIPTOR) || | 130 isByTask(ResolveVariableReferencesTask.DESCRIPTOR) || |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 token = token.next; | 869 token = token.next; |
| 871 } | 870 } |
| 872 } | 871 } |
| 873 | 872 |
| 874 void _updateEntry() { | 873 void _updateEntry() { |
| 875 // scan results | 874 // scan results |
| 876 _sourceEntry.setValueIncremental(SCAN_ERRORS, _newScanErrors, true); | 875 _sourceEntry.setValueIncremental(SCAN_ERRORS, _newScanErrors, true); |
| 877 _sourceEntry.setValueIncremental(LINE_INFO, _newLineInfo, false); | 876 _sourceEntry.setValueIncremental(LINE_INFO, _newLineInfo, false); |
| 878 // parse results | 877 // parse results |
| 879 _sourceEntry.setValueIncremental(PARSE_ERRORS, _newParseErrors, true); | 878 _sourceEntry.setValueIncremental(PARSE_ERRORS, _newParseErrors, true); |
| 880 _sourceEntry.setValueIncremental(PARSED_UNIT1, _oldUnit, false); | |
| 881 _sourceEntry.setValueIncremental(PARSED_UNIT, _oldUnit, false); | 879 _sourceEntry.setValueIncremental(PARSED_UNIT, _oldUnit, false); |
| 882 _sourceEntry.setValueIncremental(RESOLVE_DIRECTIVES_ERRORS, _newParseErrors,
true); | |
| 883 // referenced names | 880 // referenced names |
| 884 ReferencedNames referencedNames = new ReferencedNames(_unitSource); | 881 ReferencedNames referencedNames = new ReferencedNames(_unitSource); |
| 885 new ReferencedNamesBuilder(referencedNames).build(_oldUnit); | 882 new ReferencedNamesBuilder(referencedNames).build(_oldUnit); |
| 886 _sourceEntry.setValueIncremental(REFERENCED_NAMES, referencedNames, false); | 883 _sourceEntry.setValueIncremental(REFERENCED_NAMES, referencedNames, false); |
| 887 } | 884 } |
| 888 | 885 |
| 889 /** | 886 /** |
| 890 * Checks if [token] has a balanced number of open and closed curly brackets. | 887 * Checks if [token] has a balanced number of open and closed curly brackets. |
| 891 */ | 888 */ |
| 892 static bool _areCurlyBracketsBalanced(Token token) { | 889 static bool _areCurlyBracketsBalanced(Token token) { |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 @override | 1314 @override |
| 1318 String toString() => name; | 1315 String toString() => name; |
| 1319 } | 1316 } |
| 1320 | 1317 |
| 1321 class _TokenPair { | 1318 class _TokenPair { |
| 1322 final _TokenDifferenceKind kind; | 1319 final _TokenDifferenceKind kind; |
| 1323 final Token oldToken; | 1320 final Token oldToken; |
| 1324 final Token newToken; | 1321 final Token newToken; |
| 1325 _TokenPair(this.kind, this.oldToken, this.newToken); | 1322 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 1326 } | 1323 } |
| OLD | NEW |