| 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 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 source, DartEntry.IMPORTED_LIBRARIES, Source.EMPTY_ARRAY); | 1751 source, DartEntry.IMPORTED_LIBRARIES, Source.EMPTY_ARRAY); |
| 1752 | 1752 |
| 1753 @override | 1753 @override |
| 1754 SourceKind computeKindOf(Source source) { | 1754 SourceKind computeKindOf(Source source) { |
| 1755 SourceEntry sourceEntry = _getReadableSourceEntry(source); | 1755 SourceEntry sourceEntry = _getReadableSourceEntry(source); |
| 1756 if (sourceEntry == null) { | 1756 if (sourceEntry == null) { |
| 1757 return SourceKind.UNKNOWN; | 1757 return SourceKind.UNKNOWN; |
| 1758 } else if (sourceEntry is DartEntry) { | 1758 } else if (sourceEntry is DartEntry) { |
| 1759 try { | 1759 try { |
| 1760 return _getDartParseData(source, sourceEntry, DartEntry.SOURCE_KIND); | 1760 return _getDartParseData(source, sourceEntry, DartEntry.SOURCE_KIND); |
| 1761 } on AnalysisException catch (exception) { | 1761 } on AnalysisException { |
| 1762 return SourceKind.UNKNOWN; | 1762 return SourceKind.UNKNOWN; |
| 1763 } | 1763 } |
| 1764 } | 1764 } |
| 1765 return sourceEntry.kind; | 1765 return sourceEntry.kind; |
| 1766 } | 1766 } |
| 1767 | 1767 |
| 1768 @override | 1768 @override |
| 1769 LibraryElement computeLibraryElement(Source source) => | 1769 LibraryElement computeLibraryElement(Source source) => |
| 1770 _getDartResolutionData2(source, source, DartEntry.ELEMENT, null); | 1770 _getDartResolutionData2(source, source, DartEntry.ELEMENT, null); |
| 1771 | 1771 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 while (iterator.moveNext()) { | 1912 while (iterator.moveNext()) { |
| 1913 SourceEntry sourceEntry = iterator.value; | 1913 SourceEntry sourceEntry = iterator.value; |
| 1914 if (sourceEntry.kind == SourceKind.LIBRARY) { | 1914 if (sourceEntry.kind == SourceKind.LIBRARY) { |
| 1915 DartEntry dartEntry = sourceEntry; | 1915 DartEntry dartEntry = sourceEntry; |
| 1916 LibraryElement library = dartEntry.getValue(DartEntry.ELEMENT); | 1916 LibraryElement library = dartEntry.getValue(DartEntry.ELEMENT); |
| 1917 if (library != null) { | 1917 if (library != null) { |
| 1918 library.accept(finder); | 1918 library.accept(finder); |
| 1919 } | 1919 } |
| 1920 } | 1920 } |
| 1921 } | 1921 } |
| 1922 } on _ElementByIdFinderException catch (e) { | 1922 } on _ElementByIdFinderException { |
| 1923 return finder.result; | 1923 return finder.result; |
| 1924 } | 1924 } |
| 1925 return null; | 1925 return null; |
| 1926 } | 1926 } |
| 1927 | 1927 |
| 1928 @override | 1928 @override |
| 1929 CompilationUnitElement getCompilationUnitElement( | 1929 CompilationUnitElement getCompilationUnitElement( |
| 1930 Source unitSource, Source librarySource) { | 1930 Source unitSource, Source librarySource) { |
| 1931 LibraryElement libraryElement = getLibraryElement(librarySource); | 1931 LibraryElement libraryElement = getLibraryElement(librarySource); |
| 1932 if (libraryElement != null) { | 1932 if (libraryElement != null) { |
| (...skipping 4870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6803 */ | 6803 */ |
| 6804 void _safelyPerform() { | 6804 void _safelyPerform() { |
| 6805 try { | 6805 try { |
| 6806 String contextName = context.name; | 6806 String contextName = context.name; |
| 6807 if (contextName == null) { | 6807 if (contextName == null) { |
| 6808 contextName = 'unnamed'; | 6808 contextName = 'unnamed'; |
| 6809 } | 6809 } |
| 6810 AnalysisEngine.instance.instrumentationService.logAnalysisTask( | 6810 AnalysisEngine.instance.instrumentationService.logAnalysisTask( |
| 6811 contextName, taskDescription); | 6811 contextName, taskDescription); |
| 6812 internalPerform(); | 6812 internalPerform(); |
| 6813 } on AnalysisException catch (exception) { | 6813 } on AnalysisException { |
| 6814 rethrow; | 6814 rethrow; |
| 6815 } catch (exception, stackTrace) { | 6815 } catch (exception, stackTrace) { |
| 6816 throw new AnalysisException( | 6816 throw new AnalysisException( |
| 6817 exception.toString(), new CaughtException(exception, stackTrace)); | 6817 exception.toString(), new CaughtException(exception, stackTrace)); |
| 6818 } | 6818 } |
| 6819 } | 6819 } |
| 6820 } | 6820 } |
| 6821 | 6821 |
| 6822 /** | 6822 /** |
| 6823 * An `AnalysisTaskVisitor` visits tasks. While tasks are not structured in any | 6823 * An `AnalysisTaskVisitor` visits tasks. While tasks are not structured in any |
| (...skipping 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9467 "incremental analysis ${cache != null ? cache.source : "null"}"; | 9467 "incremental analysis ${cache != null ? cache.source : "null"}"; |
| 9468 | 9468 |
| 9469 /** | 9469 /** |
| 9470 * Return the type provider used for incremental resolution. | 9470 * Return the type provider used for incremental resolution. |
| 9471 * | 9471 * |
| 9472 * @return the type provider (or `null` if an exception occurs) | 9472 * @return the type provider (or `null` if an exception occurs) |
| 9473 */ | 9473 */ |
| 9474 TypeProvider get typeProvider { | 9474 TypeProvider get typeProvider { |
| 9475 try { | 9475 try { |
| 9476 return context.typeProvider; | 9476 return context.typeProvider; |
| 9477 } on AnalysisException catch (exception) { | 9477 } on AnalysisException { |
| 9478 return null; | 9478 return null; |
| 9479 } | 9479 } |
| 9480 } | 9480 } |
| 9481 | 9481 |
| 9482 @override | 9482 @override |
| 9483 accept(AnalysisTaskVisitor visitor) => | 9483 accept(AnalysisTaskVisitor visitor) => |
| 9484 visitor.visitIncrementalAnalysisTask(this); | 9484 visitor.visitIncrementalAnalysisTask(this); |
| 9485 | 9485 |
| 9486 @override | 9486 @override |
| 9487 void internalPerform() { | 9487 void internalPerform() { |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10153 } | 10153 } |
| 10154 if (scriptAttribute != null) { | 10154 if (scriptAttribute != null) { |
| 10155 try { | 10155 try { |
| 10156 Uri uri = Uri.parse(scriptAttribute.text); | 10156 Uri uri = Uri.parse(scriptAttribute.text); |
| 10157 String fileName = uri.path; | 10157 String fileName = uri.path; |
| 10158 Source librarySource = | 10158 Source librarySource = |
| 10159 _task.context.sourceFactory.resolveUri(_task.source, fileName); | 10159 _task.context.sourceFactory.resolveUri(_task.source, fileName); |
| 10160 if (_task.context.exists(librarySource)) { | 10160 if (_task.context.exists(librarySource)) { |
| 10161 libraries.add(librarySource); | 10161 libraries.add(librarySource); |
| 10162 } | 10162 } |
| 10163 } on FormatException catch (e) { | 10163 } on FormatException { |
| 10164 // ignored - invalid URI reported during resolution phase | 10164 // ignored - invalid URI reported during resolution phase |
| 10165 } | 10165 } |
| 10166 } | 10166 } |
| 10167 return super.visitHtmlScriptTagNode(node); | 10167 return super.visitHtmlScriptTagNode(node); |
| 10168 } | 10168 } |
| 10169 } | 10169 } |
| 10170 | 10170 |
| 10171 /** | 10171 /** |
| 10172 * Instances of the class `PartitionManager` manage the partitions that can be s
hared between | 10172 * Instances of the class `PartitionManager` manage the partitions that can be s
hared between |
| 10173 * analysis contexts. | 10173 * analysis contexts. |
| (...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12232 visitElement(Element element) { | 12232 visitElement(Element element) { |
| 12233 if (element.id == _id) { | 12233 if (element.id == _id) { |
| 12234 result = element; | 12234 result = element; |
| 12235 throw new _ElementByIdFinderException(); | 12235 throw new _ElementByIdFinderException(); |
| 12236 } | 12236 } |
| 12237 super.visitElement(element); | 12237 super.visitElement(element); |
| 12238 } | 12238 } |
| 12239 } | 12239 } |
| 12240 | 12240 |
| 12241 class _ElementByIdFinderException {} | 12241 class _ElementByIdFinderException {} |
| OLD | NEW |