| 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:collection'; | 10 import 'dart:collection'; |
| (...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 sourcesToInvalidate.add(source); | 1001 sourcesToInvalidate.add(source); |
| 1002 } | 1002 } |
| 1003 } | 1003 } |
| 1004 int count = sourcesToInvalidate.length; | 1004 int count = sourcesToInvalidate.length; |
| 1005 for (int i = 0; i < count; i++) { | 1005 for (int i = 0; i < count; i++) { |
| 1006 Source source = sourcesToInvalidate[i]; | 1006 Source source = sourcesToInvalidate[i]; |
| 1007 SourceEntry entry = _getReadableSourceEntry(source); | 1007 SourceEntry entry = _getReadableSourceEntry(source); |
| 1008 if (entry is DartEntry) { | 1008 if (entry is DartEntry) { |
| 1009 DartEntry dartEntry = entry; | 1009 DartEntry dartEntry = entry; |
| 1010 DartEntryImpl dartCopy = dartEntry.writableCopy; | 1010 DartEntryImpl dartCopy = dartEntry.writableCopy; |
| 1011 dartCopy.invalidateAllResolutionInformation(); | 1011 dartCopy.invalidateAllResolutionInformation(false); |
| 1012 _cache.put(source, dartCopy); | 1012 _cache.put(source, dartCopy); |
| 1013 SourcePriority priority = SourcePriority.UNKNOWN; | 1013 SourcePriority priority = SourcePriority.UNKNOWN; |
| 1014 SourceKind kind = dartCopy.kind; | 1014 SourceKind kind = dartCopy.kind; |
| 1015 if (kind == SourceKind.LIBRARY) { | 1015 if (kind == SourceKind.LIBRARY) { |
| 1016 priority = SourcePriority.LIBRARY; | 1016 priority = SourcePriority.LIBRARY; |
| 1017 } else if (kind == SourceKind.PART) { | 1017 } else if (kind == SourceKind.PART) { |
| 1018 priority = SourcePriority.NORMAL_PART; | 1018 priority = SourcePriority.NORMAL_PART; |
| 1019 } | 1019 } |
| 1020 _workManager.add(source, priority); | 1020 _workManager.add(source, priority); |
| 1021 } else if (entry is HtmlEntry) { | 1021 } else if (entry is HtmlEntry) { |
| 1022 HtmlEntry htmlEntry = entry; | 1022 HtmlEntry htmlEntry = entry; |
| 1023 HtmlEntryImpl htmlCopy = htmlEntry.writableCopy; | 1023 HtmlEntryImpl htmlCopy = htmlEntry.writableCopy; |
| 1024 htmlCopy.invalidateAllResolutionInformation(); | 1024 htmlCopy.invalidateAllResolutionInformation(false); |
| 1025 _cache.put(source, htmlCopy); | 1025 _cache.put(source, htmlCopy); |
| 1026 _workManager.add(source, SourcePriority.HTML); | 1026 _workManager.add(source, SourcePriority.HTML); |
| 1027 } | 1027 } |
| 1028 } | 1028 } |
| 1029 } | 1029 } |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 @override | 1032 @override |
| 1033 String computeDocumentationComment(Element element) { | 1033 String computeDocumentationComment(Element element) { |
| 1034 if (element == null) { | 1034 if (element == null) { |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 this._options.analyzeAngular = options.analyzeAngular; | 1774 this._options.analyzeAngular = options.analyzeAngular; |
| 1775 this._options.analyzeFunctionBodies = options.analyzeFunctionBodies; | 1775 this._options.analyzeFunctionBodies = options.analyzeFunctionBodies; |
| 1776 this._options.generateSdkErrors = options.generateSdkErrors; | 1776 this._options.generateSdkErrors = options.generateSdkErrors; |
| 1777 this._options.enableDeferredLoading = options.enableDeferredLoading; | 1777 this._options.enableDeferredLoading = options.enableDeferredLoading; |
| 1778 this._options.dart2jsHint = options.dart2jsHint; | 1778 this._options.dart2jsHint = options.dart2jsHint; |
| 1779 this._options.hint = options.hint; | 1779 this._options.hint = options.hint; |
| 1780 this._options.incremental = options.incremental; | 1780 this._options.incremental = options.incremental; |
| 1781 this._options.preserveComments = options.preserveComments; | 1781 this._options.preserveComments = options.preserveComments; |
| 1782 _generateSdkErrors = options.generateSdkErrors; | 1782 _generateSdkErrors = options.generateSdkErrors; |
| 1783 if (needsRecompute) { | 1783 if (needsRecompute) { |
| 1784 _invalidateAllLocalResolutionInformation(); | 1784 _invalidateAllLocalResolutionInformation(false); |
| 1785 } | 1785 } |
| 1786 } | 1786 } |
| 1787 | 1787 |
| 1788 @override | 1788 @override |
| 1789 void set analysisPriorityOrder(List<Source> sources) { | 1789 void set analysisPriorityOrder(List<Source> sources) { |
| 1790 if (sources == null || sources.isEmpty) { | 1790 if (sources == null || sources.isEmpty) { |
| 1791 _priorityOrder = Source.EMPTY_ARRAY; | 1791 _priorityOrder = Source.EMPTY_ARRAY; |
| 1792 } else { | 1792 } else { |
| 1793 while (sources.remove(null)) { | 1793 while (sources.remove(null)) { |
| 1794 } | 1794 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1861 } else if (factory.context != null) { | 1861 } else if (factory.context != null) { |
| 1862 throw new IllegalStateException("Source factories cannot be shared between
contexts"); | 1862 throw new IllegalStateException("Source factories cannot be shared between
contexts"); |
| 1863 } | 1863 } |
| 1864 if (_sourceFactory != null) { | 1864 if (_sourceFactory != null) { |
| 1865 _sourceFactory.context = null; | 1865 _sourceFactory.context = null; |
| 1866 } | 1866 } |
| 1867 factory.context = this; | 1867 factory.context = this; |
| 1868 _sourceFactory = factory; | 1868 _sourceFactory = factory; |
| 1869 _coreLibrarySource = _sourceFactory.forUri(DartSdk.DART_CORE); | 1869 _coreLibrarySource = _sourceFactory.forUri(DartSdk.DART_CORE); |
| 1870 _cache = createCacheFromSourceFactory(factory); | 1870 _cache = createCacheFromSourceFactory(factory); |
| 1871 _invalidateAllLocalResolutionInformation(); | 1871 _invalidateAllLocalResolutionInformation(true); |
| 1872 } | 1872 } |
| 1873 | 1873 |
| 1874 /** | 1874 /** |
| 1875 * Create an analysis cache based on the given source factory. | 1875 * Create an analysis cache based on the given source factory. |
| 1876 * | 1876 * |
| 1877 * @param factory the source factory containing the information needed to crea
te the cache | 1877 * @param factory the source factory containing the information needed to crea
te the cache |
| 1878 * @return the cache that was created | 1878 * @return the cache that was created |
| 1879 */ | 1879 */ |
| 1880 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 1880 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
| 1881 if (factory == null) { | 1881 if (factory == null) { |
| (...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3636 sources.add(source); | 3636 sources.add(source); |
| 3637 } | 3637 } |
| 3638 } | 3638 } |
| 3639 } | 3639 } |
| 3640 } | 3640 } |
| 3641 | 3641 |
| 3642 /** | 3642 /** |
| 3643 * Invalidate all of the resolution results computed by this context. | 3643 * Invalidate all of the resolution results computed by this context. |
| 3644 * | 3644 * |
| 3645 * <b>Note:</b> This method must only be invoked while we are synchronized on
[cacheLock]. | 3645 * <b>Note:</b> This method must only be invoked while we are synchronized on
[cacheLock]. |
| 3646 * |
| 3647 * @param invalidateUris true if the cached results of converting URIs to sour
ce files should also |
| 3648 * be invalidated. |
| 3646 */ | 3649 */ |
| 3647 void _invalidateAllLocalResolutionInformation() { | 3650 void _invalidateAllLocalResolutionInformation(bool invalidateUris) { |
| 3648 HashMap<Source, List<Source>> oldPartMap = new HashMap<Source, List<Source>>
(); | 3651 HashMap<Source, List<Source>> oldPartMap = new HashMap<Source, List<Source>>
(); |
| 3649 MapIterator<Source, SourceEntry> iterator = _privatePartition.iterator(); | 3652 MapIterator<Source, SourceEntry> iterator = _privatePartition.iterator(); |
| 3650 while (iterator.moveNext()) { | 3653 while (iterator.moveNext()) { |
| 3651 Source source = iterator.key; | 3654 Source source = iterator.key; |
| 3652 SourceEntry sourceEntry = iterator.value; | 3655 SourceEntry sourceEntry = iterator.value; |
| 3653 if (sourceEntry is HtmlEntry) { | 3656 if (sourceEntry is HtmlEntry) { |
| 3654 HtmlEntryImpl htmlCopy = sourceEntry.writableCopy; | 3657 HtmlEntryImpl htmlCopy = sourceEntry.writableCopy; |
| 3655 htmlCopy.invalidateAllResolutionInformation(); | 3658 htmlCopy.invalidateAllResolutionInformation(invalidateUris); |
| 3656 iterator.value = htmlCopy; | 3659 iterator.value = htmlCopy; |
| 3657 } else if (sourceEntry is DartEntry) { | 3660 } else if (sourceEntry is DartEntry) { |
| 3658 DartEntry dartEntry = sourceEntry; | 3661 DartEntry dartEntry = sourceEntry; |
| 3659 oldPartMap[source] = dartEntry.getValue(DartEntry.INCLUDED_PARTS); | 3662 oldPartMap[source] = dartEntry.getValue(DartEntry.INCLUDED_PARTS); |
| 3660 DartEntryImpl dartCopy = dartEntry.writableCopy; | 3663 DartEntryImpl dartCopy = dartEntry.writableCopy; |
| 3661 dartCopy.invalidateAllResolutionInformation(); | 3664 dartCopy.invalidateAllResolutionInformation(invalidateUris); |
| 3662 iterator.value = dartCopy; | 3665 iterator.value = dartCopy; |
| 3663 _workManager.add(source, SourcePriority.UNKNOWN); | 3666 _workManager.add(source, SourcePriority.UNKNOWN); |
| 3664 } | 3667 } |
| 3665 } | 3668 } |
| 3666 _removeFromPartsUsingMap(oldPartMap); | 3669 _removeFromPartsUsingMap(oldPartMap); |
| 3667 } | 3670 } |
| 3668 | 3671 |
| 3669 /** | 3672 /** |
| 3670 * In response to a change to Angular entry point [HtmlElement], invalidate an
y results that | 3673 * In response to a change to Angular entry point [HtmlElement], invalidate an
y results that |
| 3671 * depend on it. | 3674 * depend on it. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3727 * @param librarySource the source of the library being invalidated | 3730 * @param librarySource the source of the library being invalidated |
| 3728 */ | 3731 */ |
| 3729 void _invalidateLibraryResolution(Source librarySource) { | 3732 void _invalidateLibraryResolution(Source librarySource) { |
| 3730 // TODO(brianwilkerson) This could be optimized. There's no need to flush al
l of these entries | 3733 // TODO(brianwilkerson) This could be optimized. There's no need to flush al
l of these entries |
| 3731 // if the public namespace hasn't changed, which will be a fairly common cas
e. The question is | 3734 // if the public namespace hasn't changed, which will be a fairly common cas
e. The question is |
| 3732 // whether we can afford the time to compute the namespace to look for diffe
rences. | 3735 // whether we can afford the time to compute the namespace to look for diffe
rences. |
| 3733 DartEntry libraryEntry = _getReadableDartEntry(librarySource); | 3736 DartEntry libraryEntry = _getReadableDartEntry(librarySource); |
| 3734 if (libraryEntry != null) { | 3737 if (libraryEntry != null) { |
| 3735 List<Source> includedParts = libraryEntry.getValue(DartEntry.INCLUDED_PART
S); | 3738 List<Source> includedParts = libraryEntry.getValue(DartEntry.INCLUDED_PART
S); |
| 3736 DartEntryImpl libraryCopy = libraryEntry.writableCopy; | 3739 DartEntryImpl libraryCopy = libraryEntry.writableCopy; |
| 3737 libraryCopy.invalidateAllResolutionInformation(); | 3740 libraryCopy.invalidateAllResolutionInformation(false); |
| 3738 _cache.put(librarySource, libraryCopy); | 3741 _cache.put(librarySource, libraryCopy); |
| 3739 _workManager.add(librarySource, SourcePriority.LIBRARY); | 3742 _workManager.add(librarySource, SourcePriority.LIBRARY); |
| 3740 for (Source partSource in includedParts) { | 3743 for (Source partSource in includedParts) { |
| 3741 SourceEntry partEntry = _cache.get(partSource); | 3744 SourceEntry partEntry = _cache.get(partSource); |
| 3742 if (partEntry is DartEntry) { | 3745 if (partEntry is DartEntry) { |
| 3743 DartEntryImpl partCopy = partEntry.writableCopy; | 3746 DartEntryImpl partCopy = partEntry.writableCopy; |
| 3744 partCopy.invalidateAllResolutionInformation(); | 3747 partCopy.invalidateAllResolutionInformation(false); |
| 3745 _cache.put(partSource, partCopy); | 3748 _cache.put(partSource, partCopy); |
| 3746 } | 3749 } |
| 3747 } | 3750 } |
| 3748 } | 3751 } |
| 3749 // invalidate Angular applications | 3752 // invalidate Angular applications |
| 3750 List<AngularApplication> angularApplicationsCopy = []; | 3753 List<AngularApplication> angularApplicationsCopy = []; |
| 3751 for (AngularApplication application in angularApplicationsCopy) { | 3754 for (AngularApplication application in angularApplicationsCopy) { |
| 3752 if (application.dependsOn(librarySource)) { | 3755 if (application.dependsOn(librarySource)) { |
| 3753 Source entryPointSource = application.entryPoint; | 3756 Source entryPointSource = application.entryPoint; |
| 3754 HtmlEntry entry = _getReadableHtmlEntry(entryPointSource); | 3757 HtmlEntry entry = _getReadableHtmlEntry(entryPointSource); |
| (...skipping 5597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9352 _scanErrorsState = CacheState.INVALID; | 9355 _scanErrorsState = CacheState.INVALID; |
| 9353 _tokenStream = null; | 9356 _tokenStream = null; |
| 9354 _tokenStreamState = CacheState.INVALID; | 9357 _tokenStreamState = CacheState.INVALID; |
| 9355 _sourceKind = SourceKind.UNKNOWN; | 9358 _sourceKind = SourceKind.UNKNOWN; |
| 9356 _sourceKindState = CacheState.INVALID; | 9359 _sourceKindState = CacheState.INVALID; |
| 9357 _parseErrors = AnalysisError.NO_ERRORS; | 9360 _parseErrors = AnalysisError.NO_ERRORS; |
| 9358 _parseErrorsState = CacheState.INVALID; | 9361 _parseErrorsState = CacheState.INVALID; |
| 9359 _parsedUnit = null; | 9362 _parsedUnit = null; |
| 9360 _parsedUnitAccessed = false; | 9363 _parsedUnitAccessed = false; |
| 9361 _parsedUnitState = CacheState.INVALID; | 9364 _parsedUnitState = CacheState.INVALID; |
| 9362 _importedLibraries = Source.EMPTY_ARRAY; | 9365 _discardCachedResolutionInformation(true); |
| 9363 _importedLibrariesState = CacheState.INVALID; | |
| 9364 _exportedLibraries = Source.EMPTY_ARRAY; | |
| 9365 _exportedLibrariesState = CacheState.INVALID; | |
| 9366 _includedParts = Source.EMPTY_ARRAY; | |
| 9367 _includedPartsState = CacheState.INVALID; | |
| 9368 _discardCachedResolutionInformation(); | |
| 9369 } | 9366 } |
| 9370 | 9367 |
| 9371 /** | 9368 /** |
| 9372 * Invalidate all of the resolution information associated with the compilatio
n unit. | 9369 * Invalidate all of the resolution information associated with the compilatio
n unit. |
| 9370 * |
| 9371 * @param invalidateUris true if the cached results of converting URIs to sour
ce files should also |
| 9372 * be invalidated. |
| 9373 */ | 9373 */ |
| 9374 void invalidateAllResolutionInformation() { | 9374 void invalidateAllResolutionInformation(bool invalidateUris) { |
| 9375 if (_parsedUnitState == CacheState.FLUSHED) { | 9375 if (_parsedUnitState == CacheState.FLUSHED) { |
| 9376 DartEntryImpl_ResolutionState state = _resolutionState; | 9376 DartEntryImpl_ResolutionState state = _resolutionState; |
| 9377 while (state != null) { | 9377 while (state != null) { |
| 9378 if (state._builtUnitState == CacheState.VALID) { | 9378 if (state._builtUnitState == CacheState.VALID) { |
| 9379 _parsedUnit = state._builtUnit; | 9379 _parsedUnit = state._builtUnit; |
| 9380 _parsedUnitAccessed = true; | 9380 _parsedUnitAccessed = true; |
| 9381 _parsedUnitState = CacheState.VALID; | 9381 _parsedUnitState = CacheState.VALID; |
| 9382 break; | 9382 break; |
| 9383 } else if (state._resolvedUnitState == CacheState.VALID) { | 9383 } else if (state._resolvedUnitState == CacheState.VALID) { |
| 9384 _parsedUnit = state._resolvedUnit; | 9384 _parsedUnit = state._resolvedUnit; |
| 9385 _parsedUnitAccessed = true; | 9385 _parsedUnitAccessed = true; |
| 9386 _parsedUnitState = CacheState.VALID; | 9386 _parsedUnitState = CacheState.VALID; |
| 9387 break; | 9387 break; |
| 9388 } | 9388 } |
| 9389 state = state._nextState; | 9389 state = state._nextState; |
| 9390 } | 9390 } |
| 9391 } | 9391 } |
| 9392 _discardCachedResolutionInformation(); | 9392 _discardCachedResolutionInformation(invalidateUris); |
| 9393 } | 9393 } |
| 9394 | 9394 |
| 9395 @override | 9395 @override |
| 9396 bool get isRefactoringSafe { | 9396 bool get isRefactoringSafe { |
| 9397 DartEntryImpl_ResolutionState state = _resolutionState; | 9397 DartEntryImpl_ResolutionState state = _resolutionState; |
| 9398 while (state != null) { | 9398 while (state != null) { |
| 9399 CacheState resolvedState = state._resolvedUnitState; | 9399 CacheState resolvedState = state._resolvedUnitState; |
| 9400 if (resolvedState != CacheState.VALID && resolvedState != CacheState.FLUSH
ED) { | 9400 if (resolvedState != CacheState.VALID && resolvedState != CacheState.FLUSH
ED) { |
| 9401 return false; | 9401 return false; |
| 9402 } | 9402 } |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9935 builder.append("; clientServer = "); | 9935 builder.append("; clientServer = "); |
| 9936 builder.append(_clientServerState); | 9936 builder.append(_clientServerState); |
| 9937 builder.append("; launchable = "); | 9937 builder.append("; launchable = "); |
| 9938 builder.append(_launchableState); | 9938 builder.append(_launchableState); |
| 9939 // builder.append("; angularElements = "); | 9939 // builder.append("; angularElements = "); |
| 9940 _resolutionState.writeOn(builder); | 9940 _resolutionState.writeOn(builder); |
| 9941 } | 9941 } |
| 9942 | 9942 |
| 9943 /** | 9943 /** |
| 9944 * Invalidate all of the resolution information associated with the compilatio
n unit. | 9944 * Invalidate all of the resolution information associated with the compilatio
n unit. |
| 9945 * |
| 9946 * @param invalidateUris true if the cached results of converting URIs to sour
ce files should also |
| 9947 * be invalidated. |
| 9945 */ | 9948 */ |
| 9946 void _discardCachedResolutionInformation() { | 9949 void _discardCachedResolutionInformation(bool invalidateUris) { |
| 9947 _element = null; | 9950 _element = null; |
| 9948 _elementState = CacheState.INVALID; | 9951 _elementState = CacheState.INVALID; |
| 9949 clearFlags([_LAUNCHABLE_INDEX, _CLIENT_CODE_INDEX]); | 9952 clearFlags([_LAUNCHABLE_INDEX, _CLIENT_CODE_INDEX]); |
| 9950 _clientServerState = CacheState.INVALID; | 9953 _clientServerState = CacheState.INVALID; |
| 9951 _launchableState = CacheState.INVALID; | 9954 _launchableState = CacheState.INVALID; |
| 9952 _publicNamespace = null; | 9955 _publicNamespace = null; |
| 9953 _publicNamespaceState = CacheState.INVALID; | 9956 _publicNamespaceState = CacheState.INVALID; |
| 9954 _resolutionState.invalidateAllResolutionInformation(); | 9957 _resolutionState.invalidateAllResolutionInformation(); |
| 9958 if (invalidateUris) { |
| 9959 _importedLibraries = Source.EMPTY_ARRAY; |
| 9960 _importedLibrariesState = CacheState.INVALID; |
| 9961 _exportedLibraries = Source.EMPTY_ARRAY; |
| 9962 _exportedLibrariesState = CacheState.INVALID; |
| 9963 _includedParts = Source.EMPTY_ARRAY; |
| 9964 _includedPartsState = CacheState.INVALID; |
| 9965 } |
| 9955 } | 9966 } |
| 9956 | 9967 |
| 9957 /** | 9968 /** |
| 9958 * Return a resolution state for the specified library, creating one as necess
ary. | 9969 * Return a resolution state for the specified library, creating one as necess
ary. |
| 9959 * | 9970 * |
| 9960 * @param librarySource the library source (not `null`) | 9971 * @param librarySource the library source (not `null`) |
| 9961 * @return the resolution state (not `null`) | 9972 * @return the resolution state (not `null`) |
| 9962 */ | 9973 */ |
| 9963 DartEntryImpl_ResolutionState _getOrCreateResolutionState(Source librarySource
) { | 9974 DartEntryImpl_ResolutionState _getOrCreateResolutionState(Source librarySource
) { |
| 9964 DartEntryImpl_ResolutionState state = _resolutionState; | 9975 DartEntryImpl_ResolutionState state = _resolutionState; |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11026 | 11037 |
| 11027 @override | 11038 @override |
| 11028 void invalidateAllInformation() { | 11039 void invalidateAllInformation() { |
| 11029 super.invalidateAllInformation(); | 11040 super.invalidateAllInformation(); |
| 11030 _parseErrors = AnalysisError.NO_ERRORS; | 11041 _parseErrors = AnalysisError.NO_ERRORS; |
| 11031 _parseErrorsState = CacheState.INVALID; | 11042 _parseErrorsState = CacheState.INVALID; |
| 11032 _parsedUnit = null; | 11043 _parsedUnit = null; |
| 11033 _parsedUnitState = CacheState.INVALID; | 11044 _parsedUnitState = CacheState.INVALID; |
| 11034 _resolvedUnit = null; | 11045 _resolvedUnit = null; |
| 11035 _resolvedUnitState = CacheState.INVALID; | 11046 _resolvedUnitState = CacheState.INVALID; |
| 11036 _referencedLibraries = Source.EMPTY_ARRAY; | 11047 invalidateAllResolutionInformation(true); |
| 11037 _referencedLibrariesState = CacheState.INVALID; | |
| 11038 invalidateAllResolutionInformation(); | |
| 11039 } | 11048 } |
| 11040 | 11049 |
| 11041 /** | 11050 /** |
| 11042 * Invalidate all of the resolution information associated with the HTML file. | 11051 * Invalidate all of the resolution information associated with the HTML file. |
| 11052 * |
| 11053 * @param invalidateUris true if the cached results of converting URIs to sour
ce files should also |
| 11054 * be invalidated. |
| 11043 */ | 11055 */ |
| 11044 void invalidateAllResolutionInformation() { | 11056 void invalidateAllResolutionInformation(bool invalidateUris) { |
| 11045 _angularEntry = null; | 11057 _angularEntry = null; |
| 11046 _angularEntryState = CacheState.INVALID; | 11058 _angularEntryState = CacheState.INVALID; |
| 11047 _angularErrors = AnalysisError.NO_ERRORS; | 11059 _angularErrors = AnalysisError.NO_ERRORS; |
| 11048 _angularErrorsState = CacheState.INVALID; | 11060 _angularErrorsState = CacheState.INVALID; |
| 11049 _polymerBuildErrors = AnalysisError.NO_ERRORS; | 11061 _polymerBuildErrors = AnalysisError.NO_ERRORS; |
| 11050 _polymerBuildErrorsState = CacheState.INVALID; | 11062 _polymerBuildErrorsState = CacheState.INVALID; |
| 11051 _polymerResolutionErrors = AnalysisError.NO_ERRORS; | 11063 _polymerResolutionErrors = AnalysisError.NO_ERRORS; |
| 11052 _polymerResolutionErrorsState = CacheState.INVALID; | 11064 _polymerResolutionErrorsState = CacheState.INVALID; |
| 11053 _element = null; | 11065 _element = null; |
| 11054 _elementState = CacheState.INVALID; | 11066 _elementState = CacheState.INVALID; |
| 11055 _resolutionErrors = AnalysisError.NO_ERRORS; | 11067 _resolutionErrors = AnalysisError.NO_ERRORS; |
| 11056 _resolutionErrorsState = CacheState.INVALID; | 11068 _resolutionErrorsState = CacheState.INVALID; |
| 11057 _hints = AnalysisError.NO_ERRORS; | 11069 _hints = AnalysisError.NO_ERRORS; |
| 11058 _hintsState = CacheState.INVALID; | 11070 _hintsState = CacheState.INVALID; |
| 11071 if (invalidateUris) { |
| 11072 _referencedLibraries = Source.EMPTY_ARRAY; |
| 11073 _referencedLibrariesState = CacheState.INVALID; |
| 11074 } |
| 11059 } | 11075 } |
| 11060 | 11076 |
| 11061 @override | 11077 @override |
| 11062 void recordContentError(CaughtException exception) { | 11078 void recordContentError(CaughtException exception) { |
| 11063 super.recordContentError(exception); | 11079 super.recordContentError(exception); |
| 11064 recordParseError(exception); | 11080 recordParseError(exception); |
| 11065 } | 11081 } |
| 11066 | 11082 |
| 11067 /** | 11083 /** |
| 11068 * Record that an error was encountered while attempting to parse the source a
ssociated with this | 11084 * Record that an error was encountered while attempting to parse the source a
ssociated with this |
| (...skipping 4339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15408 _index++; | 15424 _index++; |
| 15409 if (_index >= WorkManager_this._workQueues[_queueIndex].length) { | 15425 if (_index >= WorkManager_this._workQueues[_queueIndex].length) { |
| 15410 _index = 0; | 15426 _index = 0; |
| 15411 _queueIndex++; | 15427 _queueIndex++; |
| 15412 while (_queueIndex < WorkManager_this._workQueues.length && WorkManager_th
is._workQueues[_queueIndex].isEmpty) { | 15428 while (_queueIndex < WorkManager_this._workQueues.length && WorkManager_th
is._workQueues[_queueIndex].isEmpty) { |
| 15413 _queueIndex++; | 15429 _queueIndex++; |
| 15414 } | 15430 } |
| 15415 } | 15431 } |
| 15416 } | 15432 } |
| 15417 } | 15433 } |
| OLD | NEW |