Chromium Code Reviews| 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 // 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:math" as math; | 10 import "dart:math" as math; |
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1565 if (!source.isInSystemLibrary && | 1565 if (!source.isInSystemLibrary && |
| 1566 (sourceEntry is DartEntry || sourceEntry is HtmlEntry)) { | 1566 (sourceEntry is DartEntry || sourceEntry is HtmlEntry)) { |
| 1567 sourcesToInvalidate.add(source); | 1567 sourcesToInvalidate.add(source); |
| 1568 } | 1568 } |
| 1569 } | 1569 } |
| 1570 int count = sourcesToInvalidate.length; | 1570 int count = sourcesToInvalidate.length; |
| 1571 for (int i = 0; i < count; i++) { | 1571 for (int i = 0; i < count; i++) { |
| 1572 Source source = sourcesToInvalidate[i]; | 1572 Source source = sourcesToInvalidate[i]; |
| 1573 SourceEntry entry = _getReadableSourceEntry(source); | 1573 SourceEntry entry = _getReadableSourceEntry(source); |
| 1574 if (entry is DartEntry) { | 1574 if (entry is DartEntry) { |
| 1575 entry.invalidateAllResolutionInformation(false); | 1575 entry.invalidateParseInformation(); |
| 1576 _workManager.add(source, _computePriority(entry)); | 1576 _workManager.add(source, _computePriority(entry)); |
| 1577 } else if (entry is HtmlEntry) { | 1577 } else if (entry is HtmlEntry) { |
| 1578 entry.invalidateAllResolutionInformation(false); | 1578 entry.invalidateParseInformation(); |
| 1579 _workManager.add(source, SourcePriority.HTML); | 1579 _workManager.add(source, SourcePriority.HTML); |
| 1580 } | 1580 } |
| 1581 } | 1581 } |
| 1582 } | 1582 } |
| 1583 _onSourcesChangedController.add(new SourcesChangedEvent(changeSet)); | 1583 _onSourcesChangedController.add(new SourcesChangedEvent(changeSet)); |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 @override | 1586 @override |
| 1587 String computeDocumentationComment(Element element) { | 1587 String computeDocumentationComment(Element element) { |
| 1588 if (element == null) { | 1588 if (element == null) { |
| (...skipping 6559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8148 setValue(PARSED_UNIT, unit.accept(new AstCloner())); | 8148 setValue(PARSED_UNIT, unit.accept(new AstCloner())); |
| 8149 break; | 8149 break; |
| 8150 } | 8150 } |
| 8151 state = state._nextState; | 8151 state = state._nextState; |
| 8152 } | 8152 } |
| 8153 } | 8153 } |
| 8154 _discardCachedResolutionInformation(invalidateUris); | 8154 _discardCachedResolutionInformation(invalidateUris); |
| 8155 } | 8155 } |
| 8156 | 8156 |
| 8157 /** | 8157 /** |
| 8158 * Invalidate all of the parse and resolution information associated with | |
| 8159 * this source. | |
| 8160 */ | |
| 8161 void invalidateParseInformation() { | |
| 8162 setState(SOURCE_KIND, CacheState.INVALID); | |
| 8163 setState(PARSE_ERRORS, CacheState.INVALID); | |
| 8164 setState(PARSED_UNIT, CacheState.INVALID); | |
| 8165 _containingLibraries.clear(); | |
| 8166 _discardCachedResolutionInformation(true); | |
| 8167 } | |
| 8168 | |
| 8169 /** | |
| 8158 * Record that an [exception] occurred while attempting to build the element | 8170 * Record that an [exception] occurred while attempting to build the element |
| 8159 * model for the source represented by this entry in the context of the given | 8171 * model for the source represented by this entry in the context of the given |
| 8160 * [library]. This will set the state of all resolution-based information as | 8172 * [library]. This will set the state of all resolution-based information as |
| 8161 * being in error, but will not change the state of any parse results. | 8173 * being in error, but will not change the state of any parse results. |
| 8162 */ | 8174 */ |
| 8163 void recordBuildElementErrorInLibrary(Source librarySource, | 8175 void recordBuildElementErrorInLibrary(Source librarySource, |
| 8164 CaughtException exception) { | 8176 CaughtException exception) { |
| 8165 setStateInLibrary(BUILT_ELEMENT, librarySource, CacheState.ERROR); | 8177 setStateInLibrary(BUILT_ELEMENT, librarySource, CacheState.ERROR); |
| 8166 setStateInLibrary(BUILT_UNIT, librarySource, CacheState.ERROR); | 8178 setStateInLibrary(BUILT_UNIT, librarySource, CacheState.ERROR); |
| 8167 recordResolutionErrorInLibrary(librarySource, exception); | 8179 recordResolutionErrorInLibrary(librarySource, exception); |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9153 */ | 9165 */ |
| 9154 void invalidateAllResolutionInformation(bool invalidateUris) { | 9166 void invalidateAllResolutionInformation(bool invalidateUris) { |
| 9155 setState(ELEMENT, CacheState.INVALID); | 9167 setState(ELEMENT, CacheState.INVALID); |
| 9156 setState(RESOLUTION_ERRORS, CacheState.INVALID); | 9168 setState(RESOLUTION_ERRORS, CacheState.INVALID); |
| 9157 setState(HINTS, CacheState.INVALID); | 9169 setState(HINTS, CacheState.INVALID); |
| 9158 if (invalidateUris) { | 9170 if (invalidateUris) { |
| 9159 setState(REFERENCED_LIBRARIES, CacheState.INVALID); | 9171 setState(REFERENCED_LIBRARIES, CacheState.INVALID); |
| 9160 } | 9172 } |
| 9161 } | 9173 } |
| 9162 | 9174 |
| 9175 /** | |
| 9176 * Invalidate all of the parse and resolution information associated with | |
| 9177 * this source. | |
| 9178 */ | |
| 9179 void invalidateParseInformation() { | |
| 9180 setState(PARSE_ERRORS, CacheState.INVALID); | |
| 9181 setState(PARSED_UNIT, CacheState.INVALID); | |
| 9182 setState(RESOLVED_UNIT, CacheState.INVALID); | |
|
Brian Wilkerson
2015/01/20 21:32:04
I would have expected the RESOLVED_UNIT to get inv
scheglov
2015/01/20 23:12:29
Done.
| |
| 9183 invalidateAllResolutionInformation(true); | |
| 9184 } | |
| 9185 | |
| 9163 @override | 9186 @override |
| 9164 void recordContentError(CaughtException exception) { | 9187 void recordContentError(CaughtException exception) { |
| 9165 super.recordContentError(exception); | 9188 super.recordContentError(exception); |
| 9166 recordParseError(exception); | 9189 recordParseError(exception); |
| 9167 } | 9190 } |
| 9168 | 9191 |
| 9169 /** | 9192 /** |
| 9170 * Record that an [exception] was encountered while attempting to parse the | 9193 * Record that an [exception] was encountered while attempting to parse the |
| 9171 * source associated with this entry. | 9194 * source associated with this entry. |
| 9172 */ | 9195 */ |
| (...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12248 if (element.id == _id) { | 12271 if (element.id == _id) { |
| 12249 result = element; | 12272 result = element; |
| 12250 throw new _ElementByIdFinderException(); | 12273 throw new _ElementByIdFinderException(); |
| 12251 } | 12274 } |
| 12252 super.visitElement(element); | 12275 super.visitElement(element); |
| 12253 } | 12276 } |
| 12254 } | 12277 } |
| 12255 | 12278 |
| 12256 class _ElementByIdFinderException { | 12279 class _ElementByIdFinderException { |
| 12257 } | 12280 } |
| OLD | NEW |