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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 696343002: Fix early erasure of resolution data (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine; 8 library engine;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 8171 matching lines...) Expand 10 before | Expand all | Expand 10 after
8182 * Invalidate all of the resolution information associated with the 8182 * Invalidate all of the resolution information associated with the
8183 * compilation unit. The flag [invalidateUris] should be `true` if the cached 8183 * compilation unit. The flag [invalidateUris] should be `true` if the cached
8184 * results of converting URIs to source files should also be invalidated. 8184 * results of converting URIs to source files should also be invalidated.
8185 */ 8185 */
8186 void invalidateAllResolutionInformation(bool invalidateUris) { 8186 void invalidateAllResolutionInformation(bool invalidateUris) {
8187 if (getState(PARSED_UNIT) == CacheState.FLUSHED) { 8187 if (getState(PARSED_UNIT) == CacheState.FLUSHED) {
8188 ResolutionState state = _resolutionState; 8188 ResolutionState state = _resolutionState;
8189 while (state != null) { 8189 while (state != null) {
8190 if (state.getState(BUILT_UNIT) == CacheState.VALID) { 8190 if (state.getState(BUILT_UNIT) == CacheState.VALID) {
8191 CompilationUnit unit = state.getValue(BUILT_UNIT); 8191 CompilationUnit unit = state.getValue(BUILT_UNIT);
8192 ResolutionEraser.erase(unit); 8192 setValue(PARSED_UNIT, unit.accept(new AstCloner()));
8193 setValue(PARSED_UNIT, unit);
8194 break; 8193 break;
8195 } else if (state.getState(RESOLVED_UNIT) == CacheState.VALID) { 8194 } else if (state.getState(RESOLVED_UNIT) == CacheState.VALID) {
8196 CompilationUnit unit = state.getValue(RESOLVED_UNIT); 8195 CompilationUnit unit = state.getValue(RESOLVED_UNIT);
8197 ResolutionEraser.erase(unit); 8196 setValue(PARSED_UNIT, unit.accept(new AstCloner()));
8198 setValue(PARSED_UNIT, unit);
8199 break; 8197 break;
8200 } 8198 }
8201 state = state._nextState; 8199 state = state._nextState;
8202 } 8200 }
8203 } 8201 }
8204 _discardCachedResolutionInformation(invalidateUris); 8202 _discardCachedResolutionInformation(invalidateUris);
8205 } 8203 }
8206 8204
8207 /** 8205 /**
8208 * Return `true` if this data is safe to use in refactoring. 8206 * Return `true` if this data is safe to use in refactoring.
(...skipping 5352 matching lines...) Expand 10 before | Expand all | Expand 10 after
13561 _index++; 13559 _index++;
13562 if (_index >= _manager._workQueues[_queueIndex].length) { 13560 if (_index >= _manager._workQueues[_queueIndex].length) {
13563 _index = 0; 13561 _index = 0;
13564 _queueIndex++; 13562 _queueIndex++;
13565 while (_queueIndex < _manager._workQueues.length && _manager._workQueues[_ queueIndex].isEmpty) { 13563 while (_queueIndex < _manager._workQueues.length && _manager._workQueues[_ queueIndex].isEmpty) {
13566 _queueIndex++; 13564 _queueIndex++;
13567 } 13565 }
13568 } 13566 }
13569 } 13567 }
13570 } 13568 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698