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

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/resolver.dart

Issue 23461019: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months 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
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.resolver; 3 library engine.resolver;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'java_engine.dart'; 6 import 'java_engine.dart';
7 import 'instrumentation.dart'; 7 import 'instrumentation.dart';
8 import 'source.dart'; 8 import 'source.dart';
9 import 'error.dart'; 9 import 'error.dart';
10 import 'scanner.dart' as sc; 10 import 'scanner.dart' as sc;
(...skipping 4991 matching lines...) Expand 10 before | Expand all | Expand 10 after
5002 } 5002 }
5003 5003
5004 /** 5004 /**
5005 * Return the source specifying the defining compilation unit of this library. 5005 * Return the source specifying the defining compilation unit of this library.
5006 * 5006 *
5007 * @return the source specifying the defining compilation unit of this library 5007 * @return the source specifying the defining compilation unit of this library
5008 */ 5008 */
5009 Source get librarySource => _librarySource; 5009 Source get librarySource => _librarySource;
5010 5010
5011 /** 5011 /**
5012 * Return the modification stamp associated with the given source. 5012 * Return the modification time associated with the given source.
5013 * 5013 *
5014 * @param source the source representing the compilation unit whose AST is to be returned 5014 * @param source the source representing the compilation unit whose modificati on time is to be
5015 * @return the AST structure associated with the given source 5015 * returned
5016 * @return the modification time associated with the given source
5016 * @throws AnalysisException if an AST structure could not be created for the compilation unit 5017 * @throws AnalysisException if an AST structure could not be created for the compilation unit
5017 */ 5018 */
5018 int getModificationStamp(Source source) { 5019 int getModificationTime(Source source) {
5019 ResolvableCompilationUnit holder = _astMap[source]; 5020 ResolvableCompilationUnit holder = _astMap[source];
5020 if (holder == null) { 5021 if (holder == null) {
5021 holder = _analysisContext.computeResolvableCompilationUnit(source); 5022 holder = _analysisContext.computeResolvableCompilationUnit(source);
5022 _astMap[source] = holder; 5023 _astMap[source] = holder;
5023 } 5024 }
5024 return holder.modificationStamp; 5025 return holder.modificationTime;
5025 } 5026 }
5026 5027
5027 /** 5028 /**
5028 * Return the result of resolving the URI of the given URI-based directive aga inst the URI of the 5029 * Return the result of resolving the URI of the given URI-based directive aga inst the URI of the
5029 * library, or `null` if the URI is not valid. If the URI is not valid, report the error. 5030 * library, or `null` if the URI is not valid. If the URI is not valid, report the error.
5030 * 5031 *
5031 * @param directive the directive which URI should be resolved 5032 * @param directive the directive which URI should be resolved
5032 * @return the result of resolving the URI against the URI of the library 5033 * @return the result of resolving the URI against the URI of the library
5033 */ 5034 */
5034 Source getSource(UriBasedDirective directive) { 5035 Source getSource(UriBasedDirective directive) {
(...skipping 6339 matching lines...) Expand 10 before | Expand all | Expand 10 after
11374 } 11375 }
11375 11376
11376 /** 11377 /**
11377 * Validates that the given expression is a compile time constant. 11378 * Validates that the given expression is a compile time constant.
11378 * 11379 *
11379 * @param parameterElements the elements of parameters of constant constructor , they are 11380 * @param parameterElements the elements of parameters of constant constructor , they are
11380 * considered as a valid potentially constant expressions 11381 * considered as a valid potentially constant expressions
11381 * @param expression the expression to validate 11382 * @param expression the expression to validate
11382 */ 11383 */
11383 void validateInitializerExpression(List<ParameterElement> parameterElements, E xpression expression) { 11384 void validateInitializerExpression(List<ParameterElement> parameterElements, E xpression expression) {
11384 EvaluationResultImpl result = expression.accept(new ConstantVisitor_10(this, parameterElements)); 11385 EvaluationResultImpl result = expression.accept(new ConstantVisitor_12(this, parameterElements));
11385 reportErrors(result, CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER) ; 11386 reportErrors(result, CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER) ;
11386 } 11387 }
11387 11388
11388 /** 11389 /**
11389 * Validates that all of the arguments of a constructor initializer are compil e time constants. 11390 * Validates that all of the arguments of a constructor initializer are compil e time constants.
11390 * 11391 *
11391 * @param parameterElements the elements of parameters of constant constructor , they are 11392 * @param parameterElements the elements of parameters of constant constructor , they are
11392 * considered as a valid potentially constant expressions 11393 * considered as a valid potentially constant expressions
11393 * @param argumentList the argument list to validate 11394 * @param argumentList the argument list to validate
11394 */ 11395 */
(...skipping 24 matching lines...) Expand all
11419 RedirectingConstructorInvocation invocation = initializer as Redirecting ConstructorInvocation; 11420 RedirectingConstructorInvocation invocation = initializer as Redirecting ConstructorInvocation;
11420 validateInitializerInvocationArguments(parameterElements, invocation.arg umentList); 11421 validateInitializerInvocationArguments(parameterElements, invocation.arg umentList);
11421 } 11422 }
11422 if (initializer is SuperConstructorInvocation) { 11423 if (initializer is SuperConstructorInvocation) {
11423 SuperConstructorInvocation invocation = initializer as SuperConstructorI nvocation; 11424 SuperConstructorInvocation invocation = initializer as SuperConstructorI nvocation;
11424 validateInitializerInvocationArguments(parameterElements, invocation.arg umentList); 11425 validateInitializerInvocationArguments(parameterElements, invocation.arg umentList);
11425 } 11426 }
11426 } 11427 }
11427 } 11428 }
11428 } 11429 }
11429 class ConstantVisitor_10 extends ConstantVisitor { 11430 class ConstantVisitor_12 extends ConstantVisitor {
11430 final ConstantVerifier ConstantVerifier_this; 11431 final ConstantVerifier ConstantVerifier_this;
11431 List<ParameterElement> parameterElements; 11432 List<ParameterElement> parameterElements;
11432 ConstantVisitor_10(this.ConstantVerifier_this, this.parameterElements) : super (); 11433 ConstantVisitor_12(this.ConstantVerifier_this, this.parameterElements) : super ();
11433 EvaluationResultImpl visitSimpleIdentifier(SimpleIdentifier node) { 11434 EvaluationResultImpl visitSimpleIdentifier(SimpleIdentifier node) {
11434 Element element = node.staticElement; 11435 Element element = node.staticElement;
11435 for (ParameterElement parameterElement in parameterElements) { 11436 for (ParameterElement parameterElement in parameterElements) {
11436 if (identical(parameterElement, element) && parameterElement != null) { 11437 if (identical(parameterElement, element) && parameterElement != null) {
11437 Type2 type = parameterElement.type; 11438 Type2 type = parameterElement.type;
11438 if (type != null) { 11439 if (type != null) {
11439 if (type.isDynamic) { 11440 if (type.isDynamic) {
11440 return ValidResult.RESULT_DYNAMIC; 11441 return ValidResult.RESULT_DYNAMIC;
11441 } 11442 }
11442 if (type.isSubtypeOf(ConstantVerifier_this._boolType)) { 11443 if (type.isSubtypeOf(ConstantVerifier_this._boolType)) {
(...skipping 3923 matching lines...) Expand 10 before | Expand all | Expand 10 after
15366 firstIteration = false; 15367 firstIteration = false;
15367 break; 15368 break;
15368 } else { 15369 } else {
15369 return true; 15370 return true;
15370 } 15371 }
15371 } 15372 }
15372 if (current != null && !checked.contains(current)) { 15373 if (current != null && !checked.contains(current)) {
15373 break; 15374 break;
15374 } 15375 }
15375 } 15376 }
15376 current.accept(new GeneralizingElementVisitor_11(target, toCheck)); 15377 current.accept(new GeneralizingElementVisitor_13(target, toCheck));
15377 javaSetAdd(checked, current); 15378 javaSetAdd(checked, current);
15378 } 15379 }
15379 } 15380 }
15380 bool isFunctionType(Type2 type) { 15381 bool isFunctionType(Type2 type) {
15381 if (type.isDynamic || identical(type, BottomTypeImpl.instance)) { 15382 if (type.isDynamic || identical(type, BottomTypeImpl.instance)) {
15382 return true; 15383 return true;
15383 } else if (type is InterfaceType) { 15384 } else if (type is InterfaceType) {
15384 if (identical(type, _typeProvider.functionType)) { 15385 if (identical(type, _typeProvider.functionType)) {
15385 return true; 15386 return true;
15386 } 15387 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
15545 static final INIT_STATE INIT_IN_DECLARATION = new INIT_STATE('INIT_IN_DECLARAT ION', 1); 15546 static final INIT_STATE INIT_IN_DECLARATION = new INIT_STATE('INIT_IN_DECLARAT ION', 1);
15546 static final INIT_STATE INIT_IN_FIELD_FORMAL = new INIT_STATE('INIT_IN_FIELD_F ORMAL', 2); 15547 static final INIT_STATE INIT_IN_FIELD_FORMAL = new INIT_STATE('INIT_IN_FIELD_F ORMAL', 2);
15547 static final INIT_STATE INIT_IN_INITIALIZERS = new INIT_STATE('INIT_IN_INITIAL IZERS', 3); 15548 static final INIT_STATE INIT_IN_INITIALIZERS = new INIT_STATE('INIT_IN_INITIAL IZERS', 3);
15548 static final List<INIT_STATE> values = [ 15549 static final List<INIT_STATE> values = [
15549 NOT_INIT, 15550 NOT_INIT,
15550 INIT_IN_DECLARATION, 15551 INIT_IN_DECLARATION,
15551 INIT_IN_FIELD_FORMAL, 15552 INIT_IN_FIELD_FORMAL,
15552 INIT_IN_INITIALIZERS]; 15553 INIT_IN_INITIALIZERS];
15553 INIT_STATE(String name, int ordinal) : super(name, ordinal); 15554 INIT_STATE(String name, int ordinal) : super(name, ordinal);
15554 } 15555 }
15555 class GeneralizingElementVisitor_11 extends GeneralizingElementVisitor<Object> { 15556 class GeneralizingElementVisitor_13 extends GeneralizingElementVisitor<Object> {
15556 Element target; 15557 Element target;
15557 List<Element> toCheck; 15558 List<Element> toCheck;
15558 GeneralizingElementVisitor_11(this.target, this.toCheck) : super(); 15559 GeneralizingElementVisitor_13(this.target, this.toCheck) : super();
15559 bool _inClass = false; 15560 bool _inClass = false;
15560 Object visitClassElement(ClassElement element) { 15561 Object visitClassElement(ClassElement element) {
15561 addTypeToCheck(element.supertype); 15562 addTypeToCheck(element.supertype);
15562 for (InterfaceType mixin in element.mixins) { 15563 for (InterfaceType mixin in element.mixins) {
15563 addTypeToCheck(mixin); 15564 addTypeToCheck(mixin);
15564 } 15565 }
15565 _inClass = !element.isTypedef; 15566 _inClass = !element.isTypedef;
15566 try { 15567 try {
15567 return super.visitClassElement(element); 15568 return super.visitClassElement(element);
15568 } finally { 15569 } finally {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
15660 ResolverErrorCode.con2(String name, int ordinal, ErrorType type, String messag e, String correction) : super(name, ordinal) { 15661 ResolverErrorCode.con2(String name, int ordinal, ErrorType type, String messag e, String correction) : super(name, ordinal) {
15661 this._type = type; 15662 this._type = type;
15662 this._message = message; 15663 this._message = message;
15663 this.correction9 = correction; 15664 this.correction9 = correction;
15664 } 15665 }
15665 String get correction => correction9; 15666 String get correction => correction9;
15666 ErrorSeverity get errorSeverity => _type.severity; 15667 ErrorSeverity get errorSeverity => _type.severity;
15667 String get message => _message; 15668 String get message => _message;
15668 ErrorType get type => _type; 15669 ErrorType get type => _type;
15669 } 15670 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698