| 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 * The delta between [updateEndNew] and [updateEndOld]. | 871 * The delta between [updateEndNew] and [updateEndOld]. |
| 872 */ | 872 */ |
| 873 final int updateDelta; | 873 final int updateDelta; |
| 874 | 874 |
| 875 IncrementalBodyDelta(Source source, this.updateOffset, this.updateEndOld, | 875 IncrementalBodyDelta(Source source, this.updateOffset, this.updateEndOld, |
| 876 this.updateEndNew, this.updateDelta) | 876 this.updateEndNew, this.updateDelta) |
| 877 : super(source); | 877 : super(source); |
| 878 | 878 |
| 879 @override | 879 @override |
| 880 DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target, | 880 DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target, |
| 881 ResultDescriptor descriptor) { | 881 ResultDescriptor descriptor, CacheState state, Object value) { |
| 882 // A body change delta should never leak outside its source. | 882 // A body change delta should never leak outside its source. |
| 883 // It can cause invalidation of results (e.g. hints) in other sources, | 883 // It can cause invalidation of results (e.g. hints) in other sources, |
| 884 // but only when a result in the updated source is INVALIDATE_NO_DELTA. | 884 // but only when a result in the updated source is INVALIDATE_NO_DELTA. |
| 885 if (target.source != source) { | 885 if (target.source != source) { |
| 886 return DeltaResult.STOP; | 886 return DeltaResult.STOP; |
| 887 } | 887 } |
| 888 // don't invalidate results of standard Dart tasks | 888 // don't invalidate results of standard Dart tasks |
| 889 bool isByTask(TaskDescriptor taskDescriptor) { | 889 bool isByTask(TaskDescriptor taskDescriptor) { |
| 890 return taskDescriptor.results.contains(descriptor); | 890 return taskDescriptor.results.contains(descriptor); |
| 891 } | 891 } |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2218 @override | 2218 @override |
| 2219 String toString() => name; | 2219 String toString() => name; |
| 2220 } | 2220 } |
| 2221 | 2221 |
| 2222 class _TokenPair { | 2222 class _TokenPair { |
| 2223 final _TokenDifferenceKind kind; | 2223 final _TokenDifferenceKind kind; |
| 2224 final Token oldToken; | 2224 final Token oldToken; |
| 2225 final Token newToken; | 2225 final Token newToken; |
| 2226 _TokenPair(this.kind, this.oldToken, this.newToken); | 2226 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 2227 } | 2227 } |
| OLD | NEW |