| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 */ | 412 */ |
| 413 String get name; | 413 String get name; |
| 414 | 414 |
| 415 /** | 415 /** |
| 416 * Set the client-provided name used to identify this context to the given | 416 * Set the client-provided name used to identify this context to the given |
| 417 * [name]. | 417 * [name]. |
| 418 */ | 418 */ |
| 419 set name(String name); | 419 set name(String name); |
| 420 | 420 |
| 421 /** | 421 /** |
| 422 * Returns a type provider for this context or throws [AnalysisException] if |
| 423 * `dart:core` or `dart:async` cannot be resolved. |
| 424 */ |
| 425 TypeProvider get typeProvider; |
| 426 |
| 427 /** |
| 422 * The stream that is notified when sources have been added or removed, | 428 * The stream that is notified when sources have been added or removed, |
| 423 * or the source's content has changed. | 429 * or the source's content has changed. |
| 424 */ | 430 */ |
| 425 Stream<SourcesChangedEvent> get onSourcesChanged; | 431 Stream<SourcesChangedEvent> get onSourcesChanged; |
| 426 | 432 |
| 427 /** | 433 /** |
| 428 * Return an array containing all of the sources known to this context and the
ir resolution state | 434 * Return an array containing all of the sources known to this context and the
ir resolution state |
| 429 * is not valid or flush. So, these sources are not safe to update during refa
ctoring, because we | 435 * is not valid or flush. So, these sources are not safe to update during refa
ctoring, because we |
| 430 * may be don't know all the references in them. | 436 * may be don't know all the references in them. |
| 431 * | 437 * |
| (...skipping 9035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9467 List<Source> get prioritySources; | 9473 List<Source> get prioritySources; |
| 9468 | 9474 |
| 9469 /** A factory to override how [ResolverVisitor] is created. */ | 9475 /** A factory to override how [ResolverVisitor] is created. */ |
| 9470 ResolverVisitorFactory get resolverVisitorFactory; | 9476 ResolverVisitorFactory get resolverVisitorFactory; |
| 9471 | 9477 |
| 9472 /** | 9478 /** |
| 9473 * Returns a statistics about this context. | 9479 * Returns a statistics about this context. |
| 9474 */ | 9480 */ |
| 9475 AnalysisContextStatistics get statistics; | 9481 AnalysisContextStatistics get statistics; |
| 9476 | 9482 |
| 9477 /** | |
| 9478 * Returns a type provider for this context or throws an exception if dart:cor
e cannot be | |
| 9479 * resolved. | |
| 9480 * | |
| 9481 * @return the type provider (not `null`) | |
| 9482 * @throws AnalysisException if dart:core cannot be resolved | |
| 9483 */ | |
| 9484 TypeProvider get typeProvider; | |
| 9485 | |
| 9486 /** A factory to override how [TypeResolverVisitor] is created. */ | 9483 /** A factory to override how [TypeResolverVisitor] is created. */ |
| 9487 TypeResolverVisitorFactory get typeResolverVisitorFactory; | 9484 TypeResolverVisitorFactory get typeResolverVisitorFactory; |
| 9488 | 9485 |
| 9489 /** | 9486 /** |
| 9490 * Add the given source with the given information to this context. | 9487 * Add the given source with the given information to this context. |
| 9491 * | 9488 * |
| 9492 * @param source the source to be added | 9489 * @param source the source to be added |
| 9493 * @param info the information about the source | 9490 * @param info the information about the source |
| 9494 */ | 9491 */ |
| 9495 void addSourceInfo(Source source, SourceEntry info); | 9492 void addSourceInfo(Source source, SourceEntry info); |
| (...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11000 return "resolve unit null source"; | 10997 return "resolve unit null source"; |
| 11001 } | 10998 } |
| 11002 return "resolve unit ${librarySource.fullName}"; | 10999 return "resolve unit ${librarySource.fullName}"; |
| 11003 } | 11000 } |
| 11004 | 11001 |
| 11005 @override | 11002 @override |
| 11006 accept(AnalysisTaskVisitor visitor) => visitor.visitResolveDartUnitTask(this); | 11003 accept(AnalysisTaskVisitor visitor) => visitor.visitResolveDartUnitTask(this); |
| 11007 | 11004 |
| 11008 @override | 11005 @override |
| 11009 void internalPerform() { | 11006 void internalPerform() { |
| 11010 TypeProvider typeProvider = | 11007 TypeProvider typeProvider = _libraryElement.context.typeProvider; |
| 11011 (_libraryElement.context as InternalAnalysisContext).typeProvider; | |
| 11012 CompilationUnit unit = context.computeResolvableCompilationUnit(source); | 11008 CompilationUnit unit = context.computeResolvableCompilationUnit(source); |
| 11013 if (unit == null) { | 11009 if (unit == null) { |
| 11014 throw new AnalysisException( | 11010 throw new AnalysisException( |
| 11015 "Internal error: computeResolvableCompilationUnit returned a value wit
hout a parsed Dart unit"); | 11011 "Internal error: computeResolvableCompilationUnit returned a value wit
hout a parsed Dart unit"); |
| 11016 } | 11012 } |
| 11017 // | 11013 // |
| 11018 // Resolve names in declarations. | 11014 // Resolve names in declarations. |
| 11019 // | 11015 // |
| 11020 new DeclarationResolver().resolve(unit, _find(_libraryElement, source)); | 11016 new DeclarationResolver().resolve(unit, _find(_libraryElement, source)); |
| 11021 // | 11017 // |
| (...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12160 visitElement(Element element) { | 12156 visitElement(Element element) { |
| 12161 if (element.id == _id) { | 12157 if (element.id == _id) { |
| 12162 result = element; | 12158 result = element; |
| 12163 throw new _ElementByIdFinderException(); | 12159 throw new _ElementByIdFinderException(); |
| 12164 } | 12160 } |
| 12165 super.visitElement(element); | 12161 super.visitElement(element); |
| 12166 } | 12162 } |
| 12167 } | 12163 } |
| 12168 | 12164 |
| 12169 class _ElementByIdFinderException {} | 12165 class _ElementByIdFinderException {} |
| OLD | NEW |