Version 1.3.0-dev.2.0
$ svn merge -r 33148:33322 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
git-svn-id: http://dart.googlecode.com/svn/trunk@33327 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/WATCHLISTS b/WATCHLISTS
index ceb0027..16951ab 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -10,10 +10,14 @@
'runtime': {
'filepath': 'runtime/',
},
+ 'tools': {
+ 'filepath': 'tools/',
+ },
},
'WATCHLISTS': {
'runtime': ['vm-dev@dartlang.org'],
+ 'tools': ['ricow@google.com'],
},
}
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 23770e1..094a9e3 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -3372,21 +3372,24 @@
Evaluation of an assignment $a$ of the form $v$ \code{=} $e$ proceeds as follows:
-If there is neither a local variable declaration with name $v$ nor a setter declaration with name $v=$ in the lexical scope enclosing $a$, then:
-\begin{itemize}
- \item If $a$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $a$ causes $e$ to be evaluated, after which a \code{NoSuchMethodError} is thrown.
- \item Otherwise, the assignment is equivalent to the assignment \code{ \THIS{}.$v$ = $e$}.
- \end{itemize}
+%If there is neither a local variable declaration with name $v$ nor a setter declaration with name $v=$ in the lexical scope enclosing $a$, then:
+%\begin{itemize}
+% \item If $a$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $a$ causes $e$ to be evaluated, after which a \code{NoSuchMethodError} is thrown.
+% \item Otherwise, the assignment is equivalent to the assignment \code{ \THIS{}.$v$ = $e$}.
+% \end{itemize}
- Otherwise, let $d$ be the innermost declaration whose name is $v$, if it exists.
+%Otherwise,
-If $d$ is the declaration of a local variable, the expression $e$ is evaluated to an object $o$. Then, the variable $v$ is bound to $o$.
-% unless $v$ is \FINAL{}, in which case a \code{NoSuchMethodError} is thrown (even if there is a noSuchMethod).
-The value of the assignment expression is $o$.
+Let $d$ be the innermost declaration whose name is $v$ or $v=$, if it exists.
-If $d$ is the declaration of a library variable, the expression $e$ is evaluated to an object $o$. Then the setter $v=$ is invoked with its formal parameter bound to $o$. The value of the assignment expression is $o$.
+If $d$ is the declaration of a local variable, the expression $e$ is evaluated to an object $o$. Then, the variable $v$ is bound to $o$ unless $v$ is \FINAL{} or \CONST{}, in which case a dynamic error occurs.
+If no error occurs, the value of the assignment expression is $o$.
-Otherwise, if $d$ is the declaration of a static variable in class $C$, then the assignment is equivalent to the assignment \code{$C.v$ = $e$}.
+If $d$ is the declaration of a library variable, top level getter or top level setter, the expression $e$ is evaluated to an object $o$. Then the setter $v=$ is invoked with its formal parameter bound to $o$. The value of the assignment expression is $o$.
+
+Otherwise, if $d$ is the declaration of a static variable, static getter or static setter in class $C$, then the assignment is equivalent to the assignment \code{$C.v$ = $e$}.
+
+Otherwise, If $a$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $a$ causes $e$ to be evaluated, after which a \code{NoSuchMethodError} is thrown.
Otherwise, the assignment is equivalent to the assignment \code{ \THIS{}.$v$ = $e$}.
@@ -3927,7 +3930,8 @@
Evaluation of an identifier expression $e$ of the form $id$ proceeds as follows:
-Let $d$ be the innermost declaration in the enclosing lexical scope whose name is $id$. If no such declaration exists in the lexical scope, let $d$ be the declaration of the inherited member named $id$ if it exists.
+
+Let $d$ be the innermost declaration in the enclosing lexical scope whose name is $id$ or $id=$. If no such declaration exists in the lexical scope, let $d$ be the declaration of the inherited member named $id$ if it exists.
%If no such member exists, let $d$ be the declaration of the static member name $id$ declared in a superclass of the current class, if it exists.
\begin{itemize}
@@ -3945,8 +3949,8 @@
\item If $d$ is a local variable or formal parameter then $e$ evaluates to the current binding of $id$.
%\item If $d$ is a library variable, local variable, or formal parameter, then $e$ evaluates to the current binding of $id$. \commentary{This case also applies if d is a library or local function declaration, as these are equivalent to function-valued variable declarations.}
\item If $d$ is a static method, top-level function or local function then $e$ evaluates to the function defined by $d$.
-\item If $d$ is the declaration of a static variable or static getter declared in class $C$, then $e$ is equivalent to the getter invocation (\ref{getterInvocation}) $C.id$.
-\item If $d$ is the declaration of a library variable or top-level getter, then $e$ is equivalent to the getter invocation $id$.
+\item If $d$ is the declaration of a static variable, static getter or static setter declared in class $C$, then $e$ is equivalent to the getter invocation (\ref{getterInvocation}) $C.id$.
+\item If $d$ is the declaration of a library variable, top-level getter or top-level setter, then $e$ is equivalent to the getter invocation $id$.
\item Otherwise, if $e$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $e$ causes a\code{NoSuchMethod} to be thrown.
\item Otherwise, $e$ is equivalent to the property extraction (\ref{propertyExtraction}) \THIS{}.$id$.
% This implies that referring to an undefined static getter by simple name is an error, whereas doing so by qualified name is only a warning. Same with assignments. Revise?
@@ -3958,12 +3962,18 @@
\item If $d$ is a class, type alias or type parameter the static type of $e$ is \code{Type}.
\item If $d$ is a local variable or formal parameter the static type of $e$ is the type of the variable $id$, unless $id$ is known to have some type $T$, in which case the static type of $e$ is $T$, provided that $T$ is more specific than any other type $S$ such that $v$ is known to have type $S$.
\item If $d$ is a static method, top-level function or local function the static type of $e$ the function type defined by $d$.
-\item If $d$ is the declaration of a static variable or static getter declared in class $C$, the static type of $e$ the static type of the getter invocation (\ref{getterInvocation}) $C.id$.
+\item If $d$ is the declaration of a static variable or static getter declared in class $C$, the static type of $e$ the static type of the getter invocation (\ref{getterInvocation}) $C.id$.
\item If $d$ is the declaration of a library variable or top-level getter, the static type of $e$ is the static type of the getter invocation $id$.
\item Otherwise, if $e$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, the static type of $e$ is \DYNAMIC{}.
\item Otherwise, the static type of $e$ is the type of the property extraction (\ref{propertyExtraction}) \THIS{}.$id$.
\end{itemize}
+ \commentary{Note that if one declares a setter, we bind to the corresponding getter even if it does not exist.}
+
+ \rationale{
+ This prevents situations where one uses uncorrelated setters and getters. The intent is to prevent errors when a getter in a surrounding scope is used accidentally.
+ }
+
It is a static warning if an identifier expression $id$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer and there is no declaration $d$ with name $id$ in the lexical scope enclosing the expression.
\subsection{ Type Test}
@@ -4833,7 +4843,7 @@
A Dart program consists of one or more libraries, and may be built out of one or more {\em compilation units}. A compilation unit may be a library or a part (\ref{parts}).
-A library consists of (a possibly empty) set of imports, a set of exports, and a set of top-level declarations. A top-level declaration is either a class (\ref{classes}), a type alias declaration (\ref{typedef}), a function (\ref{functions}) or a variable declaration (\ref{variables}). The members of a library $L$ are those top level declarations given within a $L$.
+A library consists of (a possibly empty) set of imports, a set of exports, and a set of top-level declarations. A top-level declaration is either a class (\ref{classes}), a type alias declaration (\ref{typedef}), a function (\ref{functions}) or a variable declaration (\ref{variables}). The members of a library $L$ are those top level declarations given within $L$.
\begin{grammar}
{\bf topLevelDefinition:}classDefinition;
diff --git a/pkg/analyzer/bin/analyzer.dart b/pkg/analyzer/bin/analyzer.dart
index 19de8ca..3908fb5 100644
--- a/pkg/analyzer/bin/analyzer.dart
+++ b/pkg/analyzer/bin/analyzer.dart
@@ -33,12 +33,14 @@
if (options.perf) {
int totalTime = JavaSystem.currentTimeMillis() - startTime;
+ int ioTime = PerformanceStatistics.io.result;
int scanTime = PerformanceStatistics.scan.result;
int parseTime = PerformanceStatistics.parse.result;
int resolveTime = PerformanceStatistics.resolve.result;
int errorsTime = PerformanceStatistics.errors.result;
int hintsTime = PerformanceStatistics.hints.result;
int angularTime = PerformanceStatistics.angular.result;
+ print("io:$ioTime");
print("scan:$scanTime");
print("parse:$parseTime");
print("resolve:$resolveTime");
@@ -46,11 +48,9 @@
print("hints:$hintsTime");
print("angular:$angularTime");
print("other:${totalTime
- - (scanTime + parseTime + resolveTime + errorsTime + hintsTime
+ - (ioTime + scanTime + parseTime + resolveTime + errorsTime + hintsTime
+ angularTime)}");
print("total:$totalTime");
- print("");
- print("Time spent in instanceof = ${instanceOfTimer.elapsedMilliseconds}");
}
exitCode = result.ordinal;
}
diff --git a/pkg/analyzer/example/parser_driver.dart b/pkg/analyzer/example/parser_driver.dart
index 4c93836..cae05c6 100644
--- a/pkg/analyzer/example/parser_driver.dart
+++ b/pkg/analyzer/example/parser_driver.dart
@@ -50,8 +50,8 @@
onError(error) => errors.add(error);
}
-class _ASTVisitor extends GeneralizingASTVisitor {
- visitNode(ASTNode node) {
+class _ASTVisitor extends GeneralizingAstVisitor {
+ visitNode(AstNode node) {
print('${node.runtimeType} : <"${node.toString()}">');
return super.visitNode(node);
}
diff --git a/pkg/analyzer/example/resolver_driver.dart b/pkg/analyzer/example/resolver_driver.dart
index 8cb18dc..c139354 100644
--- a/pkg/analyzer/example/resolver_driver.dart
+++ b/pkg/analyzer/example/resolver_driver.dart
@@ -26,8 +26,8 @@
DartSdk sdk = DirectoryBasedDartSdk.defaultSdk;
AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
- context.sourceFactory = new SourceFactory.con2([new DartUriResolver(sdk), new FileUriResolver()]);
- Source source = new FileBasedSource.con1(context.sourceFactory.contentCache, new JavaFile(args[1]));
+ context.sourceFactory = new SourceFactory([new DartUriResolver(sdk), new FileUriResolver()]);
+ Source source = new FileBasedSource.con1(new JavaFile(args[1]));
//
ChangeSet changeSet = new ChangeSet();
changeSet.added(source);
@@ -40,8 +40,8 @@
resolvedUnit.accept(visitor);
}
-class _ASTVisitor extends GeneralizingASTVisitor {
- visitNode(ASTNode node) {
+class _ASTVisitor extends GeneralizingAstVisitor {
+ visitNode(AstNode node) {
String text = '${node.runtimeType} : <"${node.toString()}">';
if (node is SimpleIdentifier) {
Element element = node.staticElement;
diff --git a/pkg/analyzer/lib/analyzer.dart b/pkg/analyzer/lib/analyzer.dart
index 5572950..38942e3 100644
--- a/pkg/analyzer/lib/analyzer.dart
+++ b/pkg/analyzer/lib/analyzer.dart
@@ -25,7 +25,7 @@
CompilationUnit parseDartFile(String path) {
String contents = new File(path).readAsStringSync();
var errorCollector = new _ErrorCollector();
- var sourceFactory = new SourceFactory.con2([new FileUriResolver()]);
+ var sourceFactory = new SourceFactory([new FileUriResolver()]);
var absolutePath = pathos.absolute(path);
var source = sourceFactory.forUri(pathos.toUri(absolutePath).toString());
diff --git a/pkg/analyzer/lib/src/analyzer_impl.dart b/pkg/analyzer/lib/src/analyzer_impl.dart
index 1c63f03..a2b1151 100644
--- a/pkg/analyzer/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer/lib/src/analyzer_impl.dart
@@ -52,7 +52,7 @@
}
var sourceFile = new JavaFile(sourcePath);
var uriKind = getUriKind(sourceFile);
- var librarySource = new FileBasedSource.con2(contentCache, sourceFile, uriKind);
+ var librarySource = new FileBasedSource.con2(sourceFile, uriKind);
// prepare context
prepareAnalysisContext(sourceFile);
// don't try to analyzer parts
@@ -101,7 +101,7 @@
resolvers.add(new PackageUriResolver([packageDirectory]));
}
}
- sourceFactory = new SourceFactory.con1(contentCache, resolvers);
+ sourceFactory = new SourceFactory(resolvers);
context = AnalysisEngine.instance.createAnalysisContext();
context.sourceFactory = sourceFactory;
diff --git a/pkg/analyzer/lib/src/error.dart b/pkg/analyzer/lib/src/error.dart
index 4c9b7af..483c433 100644
--- a/pkg/analyzer/lib/src/error.dart
+++ b/pkg/analyzer/lib/src/error.dart
@@ -44,17 +44,16 @@
String toString() {
var builder = new StringBuffer();
- var receiver = new _ContentReceiver();
- error.source.getContents(receiver);
- var beforeError = receiver.result.substring(0, error.offset);
+ var content = error.source.contents.data;
+ var beforeError = content.substring(0, error.offset);
var lineNumber = "\n".allMatches(beforeError).length + 1;
builder.writeln("Error on line $lineNumber of ${error.source.fullName}: "
"${error.message}");
var errorLineIndex = beforeError.lastIndexOf("\n") + 1;
- var errorEndOfLineIndex = receiver.result.indexOf("\n", error.offset);
- if (errorEndOfLineIndex == -1) errorEndOfLineIndex = receiver.result.length;
- var errorLine = receiver.result.substring(
+ var errorEndOfLineIndex = content.indexOf("\n", error.offset);
+ if (errorEndOfLineIndex == -1) errorEndOfLineIndex = content.length;
+ var errorLine = content.substring(
errorLineIndex, errorEndOfLineIndex);
var errorColumn = error.offset - errorLineIndex;
var errorLength = error.length;
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 738761b7..4cfeec2 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -18,21 +18,969 @@
import 'element.dart';
/**
- * The abstract class `ASTNode` defines the behavior common to all nodes in the AST structure
- * for a Dart program.
+ * Instances of the class `AdjacentStrings` represents two or more string literals that are
+ * implicitly concatenated because of being adjacent (separated only by whitespace).
*
- * @coverage dart.engine.ast
+ * While the grammar only allows adjacent strings when all of the strings are of the same kind
+ * (single line or multi-line), this class doesn't enforce that restriction.
+ *
+ * <pre>
+ * adjacentStrings ::=
+ * [StringLiteral] [StringLiteral]+
+ * </pre>
*/
-abstract class ASTNode {
+class AdjacentStrings extends StringLiteral {
+ /**
+ * The strings that are implicitly concatenated.
+ */
+ NodeList<StringLiteral> _strings;
+
+ /**
+ * Initialize a newly created list of adjacent strings.
+ *
+ * @param strings the strings that are implicitly concatenated
+ */
+ AdjacentStrings(List<StringLiteral> strings) {
+ this._strings = new NodeList<StringLiteral>(this);
+ this._strings.addAll(strings);
+ }
+
+ accept(AstVisitor visitor) => visitor.visitAdjacentStrings(this);
+
+ Token get beginToken => _strings.beginToken;
+
+ Token get endToken => _strings.endToken;
+
+ /**
+ * Return the strings that are implicitly concatenated.
+ *
+ * @return the strings that are implicitly concatenated
+ */
+ NodeList<StringLiteral> get strings => _strings;
+
+ void visitChildren(AstVisitor visitor) {
+ _strings.accept(visitor);
+ }
+
+ void appendStringValue(JavaStringBuilder builder) {
+ for (StringLiteral stringLiteral in strings) {
+ stringLiteral.appendStringValue(builder);
+ }
+ }
+}
+
+/**
+ * The abstract class `AnnotatedNode` defines the behavior of nodes that can be annotated with
+ * both a comment and metadata.
+ */
+abstract class AnnotatedNode extends AstNode {
+ /**
+ * The documentation comment associated with this node, or `null` if this node does not have
+ * a documentation comment associated with it.
+ */
+ Comment _comment;
+
+ /**
+ * The annotations associated with this node.
+ */
+ NodeList<Annotation> _metadata;
+
+ /**
+ * Initialize a newly created node.
+ *
+ * @param comment the documentation comment associated with this node
+ * @param metadata the annotations associated with this node
+ */
+ AnnotatedNode(Comment comment, List<Annotation> metadata) {
+ this._metadata = new NodeList<Annotation>(this);
+ this._comment = becomeParentOf(comment);
+ this._metadata.addAll(metadata);
+ }
+
+ Token get beginToken {
+ if (_comment == null) {
+ if (_metadata.isEmpty) {
+ return firstTokenAfterCommentAndMetadata;
+ } else {
+ return _metadata.beginToken;
+ }
+ } else if (_metadata.isEmpty) {
+ return _comment.beginToken;
+ }
+ Token commentToken = _comment.beginToken;
+ Token metadataToken = _metadata.beginToken;
+ if (commentToken.offset < metadataToken.offset) {
+ return commentToken;
+ }
+ return metadataToken;
+ }
+
+ /**
+ * Return the documentation comment associated with this node, or `null` if this node does
+ * not have a documentation comment associated with it.
+ *
+ * @return the documentation comment associated with this node
+ */
+ Comment get documentationComment => _comment;
+
+ /**
+ * Return the annotations associated with this node.
+ *
+ * @return the annotations associated with this node
+ */
+ NodeList<Annotation> get metadata => _metadata;
+
+ /**
+ * Set the documentation comment associated with this node to the given comment.
+ *
+ * @param comment the documentation comment to be associated with this node
+ */
+ void set documentationComment(Comment comment) {
+ this._comment = becomeParentOf(comment);
+ }
+
+ /**
+ * Set the metadata associated with this node to the given metadata.
+ *
+ * @param metadata the metadata to be associated with this node
+ */
+ void set metadata(List<Annotation> metadata) {
+ this._metadata.clear();
+ this._metadata.addAll(metadata);
+ }
+
+ void visitChildren(AstVisitor visitor) {
+ if (commentIsBeforeAnnotations()) {
+ safelyVisitChild(_comment, visitor);
+ _metadata.accept(visitor);
+ } else {
+ for (AstNode child in sortedCommentAndAnnotations) {
+ child.accept(visitor);
+ }
+ }
+ }
+
+ /**
+ * Return the first token following the comment and metadata.
+ *
+ * @return the first token following the comment and metadata
+ */
+ Token get firstTokenAfterCommentAndMetadata;
+
+ /**
+ * Return `true` if the comment is lexically before any annotations.
+ *
+ * @return `true` if the comment is lexically before any annotations
+ */
+ bool commentIsBeforeAnnotations() {
+ if (_comment == null || _metadata.isEmpty) {
+ return true;
+ }
+ Annotation firstAnnotation = _metadata[0];
+ return _comment.offset < firstAnnotation.offset;
+ }
+
+ /**
+ * Return an array containing the comment and annotations associated with this node, sorted in
+ * lexical order.
+ *
+ * @return the comment and annotations associated with this node in the order in which they
+ * appeared in the original source
+ */
+ List<AstNode> get sortedCommentAndAnnotations {
+ List<AstNode> childList = new List<AstNode>();
+ childList.add(_comment);
+ childList.addAll(_metadata);
+ List<AstNode> children = new List.from(childList);
+ children.sort(AstNode.LEXICAL_ORDER);
+ return children;
+ }
+}
+
+/**
+ * Instances of the class `Annotation` represent an annotation that can be associated with an
+ * AST node.
+ *
+ * <pre>
+ * metadata ::=
+ * annotation*
+ *
+ * annotation ::=
+ * '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]?
+ * </pre>
+ */
+class Annotation extends AstNode {
+ /**
+ * The at sign that introduced the annotation.
+ */
+ Token atSign;
+
+ /**
+ * The name of the class defining the constructor that is being invoked or the name of the field
+ * that is being referenced.
+ */
+ Identifier _name;
+
+ /**
+ * The period before the constructor name, or `null` if this annotation is not the
+ * invocation of a named constructor.
+ */
+ Token period;
+
+ /**
+ * The name of the constructor being invoked, or `null` if this annotation is not the
+ * invocation of a named constructor.
+ */
+ SimpleIdentifier _constructorName;
+
+ /**
+ * The arguments to the constructor being invoked, or `null` if this annotation is not the
+ * invocation of a constructor.
+ */
+ ArgumentList _arguments;
+
+ /**
+ * The element associated with this annotation, or `null` if the AST structure has not been
+ * resolved or if this annotation could not be resolved.
+ */
+ Element _element;
+
+ /**
+ * Initialize a newly created annotation.
+ *
+ * @param atSign the at sign that introduced the annotation
+ * @param name the name of the class defining the constructor that is being invoked or the name of
+ * the field that is being referenced
+ * @param period the period before the constructor name, or `null` if this annotation is not
+ * the invocation of a named constructor
+ * @param constructorName the name of the constructor being invoked, or `null` if this
+ * annotation is not the invocation of a named constructor
+ * @param arguments the arguments to the constructor being invoked, or `null` if this
+ * annotation is not the invocation of a constructor
+ */
+ Annotation(this.atSign, Identifier name, this.period, SimpleIdentifier constructorName, ArgumentList arguments) {
+ this._name = becomeParentOf(name);
+ this._constructorName = becomeParentOf(constructorName);
+ this._arguments = becomeParentOf(arguments);
+ }
+
+ accept(AstVisitor visitor) => visitor.visitAnnotation(this);
+
+ /**
+ * Return the arguments to the constructor being invoked, or `null` if this annotation is
+ * not the invocation of a constructor.
+ *
+ * @return the arguments to the constructor being invoked
+ */
+ ArgumentList get arguments => _arguments;
+
+ Token get beginToken => atSign;
+
+ /**
+ * Return the name of the constructor being invoked, or `null` if this annotation is not the
+ * invocation of a named constructor.
+ *
+ * @return the name of the constructor being invoked
+ */
+ SimpleIdentifier get constructorName => _constructorName;
+
+ /**
+ * Return the element associated with this annotation, or `null` if the AST structure has
+ * not been resolved or if this annotation could not be resolved.
+ *
+ * @return the element associated with this annotation
+ */
+ Element get element {
+ if (_element != null) {
+ return _element;
+ }
+ if (_name != null) {
+ return _name.staticElement;
+ }
+ return null;
+ }
+
+ Token get endToken {
+ if (_arguments != null) {
+ return _arguments.endToken;
+ } else if (_constructorName != null) {
+ return _constructorName.endToken;
+ }
+ return _name.endToken;
+ }
+
+ /**
+ * Return the name of the class defining the constructor that is being invoked or the name of the
+ * field that is being referenced.
+ *
+ * @return the name of the constructor being invoked or the name of the field being referenced
+ */
+ Identifier get name => _name;
+
+ /**
+ * Set the arguments to the constructor being invoked to the given arguments.
+ *
+ * @param arguments the arguments to the constructor being invoked
+ */
+ void set arguments(ArgumentList arguments) {
+ this._arguments = becomeParentOf(arguments);
+ }
+
+ /**
+ * Set the name of the constructor being invoked to the given name.
+ *
+ * @param constructorName the name of the constructor being invoked
+ */
+ void set constructorName(SimpleIdentifier constructorName) {
+ this._constructorName = becomeParentOf(constructorName);
+ }
+
+ /**
+ * Set the element associated with this annotation based.
+ *
+ * @param element the element to be associated with this identifier
+ */
+ void set element(Element element) {
+ this._element = element;
+ }
+
+ /**
+ * Set the name of the class defining the constructor that is being invoked or the name of the
+ * field that is being referenced to the given name.
+ *
+ * @param name the name of the constructor being invoked or the name of the field being referenced
+ */
+ void set name(Identifier name) {
+ this._name = becomeParentOf(name);
+ }
+
+ void visitChildren(AstVisitor visitor) {
+ safelyVisitChild(_name, visitor);
+ safelyVisitChild(_constructorName, visitor);
+ safelyVisitChild(_arguments, visitor);
+ }
+}
+
+/**
+ * Instances of the class `ArgumentDefinitionTest` represent an argument definition test.
+ *
+ * <pre>
+ * argumentDefinitionTest ::=
+ * '?' [SimpleIdentifier]
+ * </pre>
+ */
+class ArgumentDefinitionTest extends Expression {
+ /**
+ * The token representing the question mark.
+ */
+ Token question;
+
+ /**
+ * The identifier representing the argument being tested.
+ */
+ SimpleIdentifier _identifier;
+
+ /**
+ * Initialize a newly created argument definition test.
+ *
+ * @param question the token representing the question mark
+ * @param identifier the identifier representing the argument being tested
+ */
+ ArgumentDefinitionTest(this.question, SimpleIdentifier identifier) {
+ this._identifier = becomeParentOf(identifier);
+ }
+
+ accept(AstVisitor visitor) => visitor.visitArgumentDefinitionTest(this);
+
+ Token get beginToken => question;
+
+ Token get endToken => _identifier.endToken;
+
+ /**
+ * Return the identifier representing the argument being tested.
+ *
+ * @return the identifier representing the argument being tested
+ */
+ SimpleIdentifier get identifier => _identifier;
+
+ int get precedence => 15;
+
+ /**
+ * Set the identifier representing the argument being tested to the given identifier.
+ *
+ * @param identifier the identifier representing the argument being tested
+ */
+ void set identifier(SimpleIdentifier identifier) {
+ this._identifier = becomeParentOf(identifier);
+ }
+
+ void visitChildren(AstVisitor visitor) {
+ safelyVisitChild(_identifier, visitor);
+ }
+}
+
+/**
+ * Instances of the class `ArgumentList` represent a list of arguments in the invocation of a
+ * executable element: a function, method, or constructor.
+ *
+ * <pre>
+ * argumentList ::=
+ * '(' arguments? ')'
+ *
+ * arguments ::=
+ * [NamedExpression] (',' [NamedExpression])*
+ * | [Expression] (',' [NamedExpression])*
+ * </pre>
+ */
+class ArgumentList extends AstNode {
+ /**
+ * The left parenthesis.
+ */
+ Token _leftParenthesis;
+
+ /**
+ * The expressions producing the values of the arguments.
+ */
+ NodeList<Expression> _arguments;
+
+ /**
+ * The right parenthesis.
+ */
+ Token _rightParenthesis;
+
+ /**
+ * An array containing the elements representing the parameters corresponding to each of the
+ * arguments in this list, or `null` if the AST has not been resolved or if the function or
+ * method being invoked could not be determined based on static type information. The array must
+ * be the same length as the number of arguments, but can contain `null` entries if a given
+ * argument does not correspond to a formal parameter.
+ */
+ List<ParameterElement> _correspondingStaticParameters;
+
+ /**
+ * An array containing the elements representing the parameters corresponding to each of the
+ * arguments in this list, or `null` if the AST has not been resolved or if the function or
+ * method being invoked could not be determined based on propagated type information. The array
+ * must be the same length as the number of arguments, but can contain `null` entries if a
+ * given argument does not correspond to a formal parameter.
+ */
+ List<ParameterElement> _correspondingPropagatedParameters;
+
+ /**
+ * Initialize a newly created list of arguments.
+ *
+ * @param leftParenthesis the left parenthesis
+ * @param arguments the expressions producing the values of the arguments
+ * @param rightParenthesis the right parenthesis
+ */
+ ArgumentList(Token leftParenthesis, List<Expression> arguments, Token rightParenthesis) {
+ this._arguments = new NodeList<Expression>(this);
+ this._leftParenthesis = leftParenthesis;
+ this._arguments.addAll(arguments);
+ this._rightParenthesis = rightParenthesis;
+ }
+
+ accept(AstVisitor visitor) => visitor.visitArgumentList(this);
+
+ /**
+ * Return the expressions producing the values of the arguments. Although the language requires
+ * that positional arguments appear before named arguments, this class allows them to be
+ * intermixed.
+ *
+ * @return the expressions producing the values of the arguments
+ */
+ NodeList<Expression> get arguments => _arguments;
+
+ Token get beginToken => _leftParenthesis;
+
+ Token get endToken => _rightParenthesis;
+
+ /**
+ * Return the left parenthesis.
+ *
+ * @return the left parenthesis
+ */
+ Token get leftParenthesis => _leftParenthesis;
+
+ /**
+ * Return the right parenthesis.
+ *
+ * @return the right parenthesis
+ */
+ Token get rightParenthesis => _rightParenthesis;
+
+ /**
+ * Set the parameter elements corresponding to each of the arguments in this list to the given
+ * array of parameters. The array of parameters must be the same length as the number of
+ * arguments, but can contain `null` entries if a given argument does not correspond to a
+ * formal parameter.
+ *
+ * @param parameters the parameter elements corresponding to the arguments
+ */
+ void set correspondingPropagatedParameters(List<ParameterElement> parameters) {
+ if (parameters.length != _arguments.length) {
+ throw new IllegalArgumentException("Expected ${_arguments.length} parameters, not ${parameters.length}");
+ }
+ _correspondingPropagatedParameters = parameters;
+ }
+
+ /**
+ * Set the parameter elements corresponding to each of the arguments in this list to the given
+ * array of parameters. The array of parameters must be the same length as the number of
+ * arguments, but can contain `null` entries if a given argument does not correspond to a
+ * formal parameter.
+ *
+ * @param parameters the parameter elements corresponding to the arguments
+ */
+ void set correspondingStaticParameters(List<ParameterElement> parameters) {
+ if (parameters.length != _arguments.length) {
+ throw new IllegalArgumentException("Expected ${_arguments.length} parameters, not ${parameters.length}");
+ }
+ _correspondingStaticParameters = parameters;
+ }
+
+ /**
+ * Set the left parenthesis to the given token.
+ *
+ * @param parenthesis the left parenthesis
+ */
+ void set leftParenthesis(Token parenthesis) {
+ _leftParenthesis = parenthesis;
+ }
+
+ /**
+ * Set the right parenthesis to the given token.
+ *
+ * @param parenthesis the right parenthesis
+ */
+ void set rightParenthesis(Token parenthesis) {
+ _rightParenthesis = parenthesis;
+ }
+
+ void visitChildren(AstVisitor visitor) {
+ _arguments.accept(visitor);
+ }
+
+ /**
+ * If the given expression is a child of this list, and the AST structure has been resolved, and
+ * the function being invoked is known based on propagated type information, and the expression
+ * corresponds to one of the parameters of the function being invoked, then return the parameter
+ * element representing the parameter to which the value of the given expression will be bound.
+ * Otherwise, return `null`.
+ *
+ * This method is only intended to be used by [Expression#getPropagatedParameterElement].
+ *
+ * @param expression the expression corresponding to the parameter to be returned
+ * @return the parameter element representing the parameter to which the value of the expression
+ * will be bound
+ */
+ ParameterElement getPropagatedParameterElementFor(Expression expression) {
+ if (_correspondingPropagatedParameters == null) {
+ // Either the AST structure has not been resolved or the invocation of which this list is a
+ // part could not be resolved.
+ return null;
+ }
+ int index = _arguments.indexOf(expression);
+ if (index < 0) {
+ // The expression isn't a child of this node.
+ return null;
+ }
+ return _correspondingPropagatedParameters[index];
+ }
+
+ /**
+ * If the given expression is a child of this list, and the AST structure has been resolved, and
+ * the function being invoked is known based on static type information, and the expression
+ * corresponds to one of the parameters of the function being invoked, then return the parameter
+ * element representing the parameter to which the value of the given expression will be bound.
+ * Otherwise, return `null`.
+ *
+ * This method is only intended to be used by [Expression#getStaticParameterElement].
+ *
+ * @param expression the expression corresponding to the parameter to be returned
+ * @return the parameter element representing the parameter to which the value of the expression
+ * will be bound
+ */
+ ParameterElement getStaticParameterElementFor(Expression expression) {
+ if (_correspondingStaticParameters == null) {
+ // Either the AST structure has not been resolved or the invocation of which this list is a
+ // part could not be resolved.
+ return null;
+ }
+ int index = _arguments.indexOf(expression);
+ if (index < 0) {
+ // The expression isn't a child of this node.
+ return null;
+ }
+ return _correspondingStaticParameters[index];
+ }
+}
+
+/**
+ * Instances of the class `AsExpression` represent an 'as' expression.
+ *
+ * <pre>
+ * asExpression ::=
+ * [Expression] 'as' [TypeName]
+ * </pre>
+ */
+class AsExpression extends Expression {
+ /**
+ * The expression used to compute the value being cast.
+ */
+ Expression _expression;
+
+ /**
+ * The as operator.
+ */
+ Token asOperator;
+
+ /**
+ * The name of the type being cast to.
+ */
+ TypeName _type;
+
+ /**
+ * Initialize a newly created as expression.
+ *
+ * @param expression the expression used to compute the value being cast
+ * @param isOperator the is operator
+ * @param type the name of the type being cast to
+ */
+ AsExpression(Expression expression, Token isOperator, TypeName type) {
+ this._expression = becomeParentOf(expression);
+ this.asOperator = isOperator;
+ this._type = becomeParentOf(type);
+ }
+
+ accept(AstVisitor visitor) => visitor.visitAsExpression(this);
+
+ Token get beginToken => _expression.beginToken;
+
+ Token get endToken => _type.endToken;
+
+ /**
+ * Return the expression used to compute the value being cast.
+ *
+ * @return the expression used to compute the value being cast
+ */
+ Expression get expression => _expression;
+
+ int get precedence => 7;
+
+ /**
+ * Return the name of the type being cast to.
+ *
+ * @return the name of the type being cast to
+ */
+ TypeName get type => _type;
+
+ /**
+ * Set the expression used to compute the value being cast to the given expression.
+ *
+ * @param expression the expression used to compute the value being cast
+ */
+ void set expression(Expression expression) {
+ this._expression = becomeParentOf(expression);
+ }
+
+ /**
+ * Set the name of the type being cast to to the given name.
+ *
+ * @param name the name of the type being cast to
+ */
+ void set type(TypeName name) {
+ this._type = becomeParentOf(name);
+ }
+
+ void visitChildren(AstVisitor visitor) {
+ safelyVisitChild(_expression, visitor);
+ safelyVisitChild(_type, visitor);
+ }
+}
+
+/**
+ * Instances of the class `AssertStatement` represent an assert statement.
+ *
+ * <pre>
+ * assertStatement ::=
+ * 'assert' '(' [Expression] ')' ';'
+ * </pre>
+ */
+class AssertStatement extends Statement {
+ /**
+ * The token representing the 'assert' keyword.
+ */
+ Token keyword;
+
+ /**
+ * The left parenthesis.
+ */
+ Token leftParenthesis;
+
+ /**
+ * The condition that is being asserted to be `true`.
+ */
+ Expression _condition;
+
+ /**
+ * The right parenthesis.
+ */
+ Token rightParenthesis;
+
+ /**
+ * The semicolon terminating the statement.
+ */
+ Token semicolon;
+
+ /**
+ * Initialize a newly created assert statement.
+ *
+ * @param keyword the token representing the 'assert' keyword
+ * @param leftParenthesis the left parenthesis
+ * @param condition the condition that is being asserted to be `true`
+ * @param rightParenthesis the right parenthesis
+ * @param semicolon the semicolon terminating the statement
+ */
+ AssertStatement(this.keyword, this.leftParenthesis, Expression condition, this.rightParenthesis, this.semicolon) {
+ this._condition = becomeParentOf(condition);
+ }
+
+ accept(AstVisitor visitor) => visitor.visitAssertStatement(this);
+
+ Token get beginToken => keyword;
+
+ /**
+ * Return the condition that is being asserted to be `true`.
+ *
+ * @return the condition that is being asserted to be `true`
+ */
+ Expression get condition => _condition;
+
+ Token get endToken => semicolon;
+
+ /**
+ * Set the condition that is being asserted to be `true` to the given expression.
+ *
+ * @param the condition that is being asserted to be `true`
+ */
+ void set condition(Expression condition) {
+ this._condition = becomeParentOf(condition);
+ }
+
+ void visitChildren(AstVisitor visitor) {
+ safelyVisitChild(_condition, visitor);
+ }
+}
+
+/**
+ * Instances of the class `AssignmentExpression` represent an assignment expression.
+ *
+ * <pre>
+ * assignmentExpression ::=
+ * [Expression] [Token] [Expression]
+ * </pre>
+ */
+class AssignmentExpression extends Expression {
+ /**
+ * The expression used to compute the left hand side.
+ */
+ Expression _leftHandSide;
+
+ /**
+ * The assignment operator being applied.
+ */
+ Token operator;
+
+ /**
+ * The expression used to compute the right hand side.
+ */
+ Expression _rightHandSide;
+
+ /**
+ * The element associated with the operator based on the static type of the left-hand-side, or
+ * `null` if the AST structure has not been resolved, if the operator is not a compound
+ * operator, or if the operator could not be resolved.
+ */
+ MethodElement _staticElement;
+
+ /**
+ * The element associated with the operator based on the propagated type of the left-hand-side, or
+ * `null` if the AST structure has not been resolved, if the operator is not a compound
+ * operator, or if the operator could not be resolved.
+ */
+ MethodElement _propagatedElement;
+
+ /**
+ * Initialize a newly created assignment expression.
+ *
+ * @param leftHandSide the expression used to compute the left hand side
+ * @param operator the assignment operator being applied
+ * @param rightHandSide the expression used to compute the right hand side
+ */
+ AssignmentExpression(Expression leftHandSide, this.operator, Expression rightHandSide) {
+ this._leftHandSide = becomeParentOf(leftHandSide);
+ this._rightHandSide = becomeParentOf(rightHandSide);
+ }
+
+ accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this);
+
+ Token get beginToken => _leftHandSide.beginToken;
+
+ /**
+ * Return the best element available for this operator. If resolution was able to find a better
+ * element based on type propagation, that element will be returned. Otherwise, the element found
+ * using the result of static analysis will be returned. If resolution has not been performed,
+ * then `null` will be returned.
+ *
+ * @return the best element available for this operator
+ */
+ MethodElement get bestElement {
+ MethodElement element = propagatedElement;
+ if (element == null) {
+ element = staticElement;
+ }
+ return element;
+ }
+
+ Token get endToken => _rightHandSide.endToken;
+
+ /**
+ * Set the expression used to compute the left hand side to the given expression.
+ *
+ * @return the expression used to compute the left hand side
+ */
+ Expression get leftHandSide => _leftHandSide;
+
+ int get precedence => 1;
+
+ /**
+ * Return the element associated with the operator based on the propagated type of the
+ * left-hand-side, or `null` if the AST structure has not been resolved, if the operator is
+ * not a compound operator, or if the operator could not be resolved. One example of the latter
+ * case is an operator that is not defined for the type of the left-hand operand.
+ *
+ * @return the element associated with the operator
+ */
+ MethodElement get propagatedElement => _propagatedElement;
+
+ /**
+ * Return the expression used to compute the right hand side.
+ *
+ * @return the expression used to compute the right hand side
+ */
+ Expression get rightHandSide => _rightHandSide;
+
+ /**
+ * Return the element associated with the operator based on the static type of the left-hand-side,
+ * or `null` if the AST structure has not been resolved, if the operator is not a compound
+ * operator, or if the operator could not be resolved. One example of the latter case is an
+ * operator that is not defined for the type of the left-hand operand.
+ *
+ * @return the element associated with the operator
+ */
+ MethodElement get staticElement => _staticElement;
+
+ /**
+ * Return the expression used to compute the left hand side.
+ *
+ * @param expression the expression used to compute the left hand side
+ */
+ void set leftHandSide(Expression expression) {
+ _leftHandSide = becomeParentOf(expression);
+ }
+
+ /**
+ * Set the element associated with the operator based on the propagated type of the left-hand-side
+ * to the given element.
+ *
+ * @param element the element to be associated with the operator
+ */
+ void set propagatedElement(MethodElement element) {
+ _propagatedElement = element;
+ }
+
+ /**
+ * Set the expression used to compute the left hand side to the given expression.
+ *
+ * @param expression the expression used to compute the left hand side
+ */
+ void set rightHandSide(Expression expression) {
+ _rightHandSide = becomeParentOf(expression);
+ }
+
+ /**
+ * Set the element associated with the operator based on the static type of the left-hand-side to
+ * the given element.
+ *
+ * @param element the static element to be associated with the operator
+ */
+ void set staticElement(MethodElement element) {
+ _staticElement = element;
+ }
+
+ void visitChildren(AstVisitor visitor) {
+ safelyVisitChild(_leftHandSide, visitor);
+ safelyVisitChild(_rightHandSide, visitor);
+ }
+
+ /**
+ * If the AST structure has been resolved, and the function being invoked is known based on
+ * propagated type information, then return the parameter element representing the parameter to
+ * which the value of the right operand will be bound. Otherwise, return `null`.
+ *
+ * This method is only intended to be used by [Expression#getPropagatedParameterElement].
+ *
+ * @return the parameter element representing the parameter to which the value of the right
+ * operand will be bound
+ */
+ ParameterElement get propagatedParameterElementForRightHandSide {
+ if (_propagatedElement == null) {
+ return null;
+ }
+ List<ParameterElement> parameters = _propagatedElement.parameters;
+ if (parameters.length < 1) {
+ return null;
+ }
+ return parameters[0];
+ }
+
+ /**
+ * If the AST structure has been resolved, and the function being invoked is known based on static
+ * type information, then return the parameter element representing the parameter to which the
+ * value of the right operand will be bound. Otherwise, return `null`.
+ *
+ * This method is only intended to be used by [Expression#getStaticParameterElement].
+ *
+ * @return the parameter element representing the parameter to which the value of the right
+ * operand will be bound
+ */
+ ParameterElement get staticParameterElementForRightHandSide {
+ if (_staticElement == null) {
+ return null;
+ }
+ List<ParameterElement> parameters = _staticElement.parameters;
+ if (parameters.length < 1) {
+ return null;
+ }
+ return parameters[0];
+ }
+}
+
+/**
+ * The abstract class `AstNode` defines the behavior common to all nodes in the AST structure
+ * for a Dart program.
+ */
+abstract class AstNode {
/**
* An empty array of ast nodes.
*/
- static List<ASTNode> EMPTY_ARRAY = new List<ASTNode>(0);
+ static List<AstNode> EMPTY_ARRAY = new List<AstNode>(0);
/**
* The parent of the node, or `null` if the node is the root of an AST structure.
*/
- ASTNode _parent;
+ AstNode _parent;
/**
* A table mapping the names of properties to their values, or `null` if this node does not
@@ -46,7 +994,7 @@
* offset of the second node, zero (0) if the nodes have the same offset, and a positive value if
* if the offset of the first node is greater than the offset of the second node.
*/
- static Comparator<ASTNode> LEXICAL_ORDER = (ASTNode first, ASTNode second) => second.offset - first.offset;
+ static Comparator<AstNode> LEXICAL_ORDER = (AstNode first, AstNode second) => second.offset - first.offset;
/**
* Use the given visitor to visit this node.
@@ -54,7 +1002,7 @@
* @param visitor the visitor that will visit this node
* @return the value returned by the visitor as a result of visiting this node
*/
- accept(ASTVisitor visitor);
+ accept(AstVisitor visitor);
/**
* Return the node of the given class that most immediately encloses this node, or `null` if
@@ -63,9 +1011,9 @@
* @param nodeClass the class of the node to be returned
* @return the node of the given type that encloses this node
*/
- ASTNode getAncestor(Type enclosingClass) {
- ASTNode node = this;
- while (node != null && !isInstanceOf(node, enclosingClass)) {
+ AstNode getAncestor(Predicate<AstNode> predicate) {
+ AstNode node = this;
+ while (node != null && !predicate(node)) {
node = node.parent;
}
return node;
@@ -132,7 +1080,7 @@
*
* @return the parent of this node, or `null` if none
*/
- ASTNode get parent => _parent;
+ AstNode get parent => _parent;
/**
* Return the value of the property with the given name, or `null` if this node does not
@@ -153,9 +1101,9 @@
*
* @return the node at the root of this node's AST structure
*/
- ASTNode get root {
- ASTNode root = this;
- ASTNode parent = this.parent;
+ AstNode get root {
+ AstNode root = this;
+ AstNode parent = this.parent;
while (parent != null) {
root = parent;
parent = root.parent;
@@ -215,7 +1163,7 @@
*
* @param visitor the visitor that will be used to visit the children of this node
*/
- void visitChildren(ASTVisitor visitor);
+ void visitChildren(AstVisitor visitor);
/**
* Make this node the parent of the given child node.
@@ -223,9 +1171,9 @@
* @param child the node that will become a child of this node
* @return the node that was made a child of this node
*/
- ASTNode becomeParentOf(ASTNode child) {
+ AstNode becomeParentOf(AstNode child) {
if (child != null) {
- ASTNode node = child;
+ AstNode node = child;
node.parent = this;
}
return child;
@@ -237,7 +1185,7 @@
* @param child the child to be visited
* @param visitor the visitor that will be used to visit the child
*/
- void safelyVisitChild(ASTNode child, ASTVisitor visitor) {
+ void safelyVisitChild(AstNode child, AstVisitor visitor) {
if (child != null) {
child.accept(visitor);
}
@@ -248,22 +1196,16 @@
*
* @param newParent the node that is to be made the parent of this node
*/
- void set parent(ASTNode newParent) {
+ void set parent(AstNode newParent) {
_parent = newParent;
}
-
- static int _hashCodeGenerator = 0;
-
- final int hashCode = ++_hashCodeGenerator;
}
/**
- * The interface `ASTVisitor` defines the behavior of objects that can be used to visit an AST
+ * The interface `AstVisitor` defines the behavior of objects that can be used to visit an AST
* structure.
- *
- * @coverage dart.engine.ast
*/
-abstract class ASTVisitor<R> {
+abstract class AstVisitor<R> {
R visitAdjacentStrings(AdjacentStrings node);
R visitAnnotation(Annotation node);
@@ -472,980 +1414,12 @@
}
/**
- * Instances of the class `AdjacentStrings` represents two or more string literals that are
- * implicitly concatenated because of being adjacent (separated only by whitespace).
- *
- * While the grammar only allows adjacent strings when all of the strings are of the same kind
- * (single line or multi-line), this class doesn't enforce that restriction.
- *
- * <pre>
- * adjacentStrings ::=
- * [StringLiteral] [StringLiteral]+
- * </pre>
- *
- * @coverage dart.engine.ast
- */
-class AdjacentStrings extends StringLiteral {
- /**
- * The strings that are implicitly concatenated.
- */
- NodeList<StringLiteral> _strings;
-
- /**
- * Initialize a newly created list of adjacent strings.
- *
- * @param strings the strings that are implicitly concatenated
- */
- AdjacentStrings(List<StringLiteral> strings) {
- this._strings = new NodeList<StringLiteral>(this);
- this._strings.addAll(strings);
- }
-
- accept(ASTVisitor visitor) => visitor.visitAdjacentStrings(this);
-
- Token get beginToken => _strings.beginToken;
-
- Token get endToken => _strings.endToken;
-
- /**
- * Return the strings that are implicitly concatenated.
- *
- * @return the strings that are implicitly concatenated
- */
- NodeList<StringLiteral> get strings => _strings;
-
- void visitChildren(ASTVisitor visitor) {
- _strings.accept(visitor);
- }
-
- void appendStringValue(JavaStringBuilder builder) {
- for (StringLiteral stringLiteral in strings) {
- stringLiteral.appendStringValue(builder);
- }
- }
-}
-
-/**
- * The abstract class `AnnotatedNode` defines the behavior of nodes that can be annotated with
- * both a comment and metadata.
- *
- * @coverage dart.engine.ast
- */
-abstract class AnnotatedNode extends ASTNode {
- /**
- * The documentation comment associated with this node, or `null` if this node does not have
- * a documentation comment associated with it.
- */
- Comment _comment;
-
- /**
- * The annotations associated with this node.
- */
- NodeList<Annotation> _metadata;
-
- /**
- * Initialize a newly created node.
- *
- * @param comment the documentation comment associated with this node
- * @param metadata the annotations associated with this node
- */
- AnnotatedNode(Comment comment, List<Annotation> metadata) {
- this._metadata = new NodeList<Annotation>(this);
- this._comment = becomeParentOf(comment);
- this._metadata.addAll(metadata);
- }
-
- Token get beginToken {
- if (_comment == null) {
- if (_metadata.isEmpty) {
- return firstTokenAfterCommentAndMetadata;
- } else {
- return _metadata.beginToken;
- }
- } else if (_metadata.isEmpty) {
- return _comment.beginToken;
- }
- Token commentToken = _comment.beginToken;
- Token metadataToken = _metadata.beginToken;
- if (commentToken.offset < metadataToken.offset) {
- return commentToken;
- }
- return metadataToken;
- }
-
- /**
- * Return the documentation comment associated with this node, or `null` if this node does
- * not have a documentation comment associated with it.
- *
- * @return the documentation comment associated with this node
- */
- Comment get documentationComment => _comment;
-
- /**
- * Return the annotations associated with this node.
- *
- * @return the annotations associated with this node
- */
- NodeList<Annotation> get metadata => _metadata;
-
- /**
- * Set the documentation comment associated with this node to the given comment.
- *
- * @param comment the documentation comment to be associated with this node
- */
- void set documentationComment(Comment comment) {
- this._comment = becomeParentOf(comment);
- }
-
- /**
- * Set the metadata associated with this node to the given metadata.
- *
- * @param metadata the metadata to be associated with this node
- */
- void set metadata(List<Annotation> metadata) {
- this._metadata.clear();
- this._metadata.addAll(metadata);
- }
-
- void visitChildren(ASTVisitor visitor) {
- if (commentIsBeforeAnnotations()) {
- safelyVisitChild(_comment, visitor);
- _metadata.accept(visitor);
- } else {
- for (ASTNode child in sortedCommentAndAnnotations) {
- child.accept(visitor);
- }
- }
- }
-
- /**
- * Return the first token following the comment and metadata.
- *
- * @return the first token following the comment and metadata
- */
- Token get firstTokenAfterCommentAndMetadata;
-
- /**
- * Return `true` if the comment is lexically before any annotations.
- *
- * @return `true` if the comment is lexically before any annotations
- */
- bool commentIsBeforeAnnotations() {
- if (_comment == null || _metadata.isEmpty) {
- return true;
- }
- Annotation firstAnnotation = _metadata[0];
- return _comment.offset < firstAnnotation.offset;
- }
-
- /**
- * Return an array containing the comment and annotations associated with this node, sorted in
- * lexical order.
- *
- * @return the comment and annotations associated with this node in the order in which they
- * appeared in the original source
- */
- List<ASTNode> get sortedCommentAndAnnotations {
- List<ASTNode> childList = new List<ASTNode>();
- childList.add(_comment);
- childList.addAll(_metadata);
- List<ASTNode> children = new List.from(childList);
- children.sort(ASTNode.LEXICAL_ORDER);
- return children;
- }
-}
-
-/**
- * Instances of the class `Annotation` represent an annotation that can be associated with an
- * AST node.
- *
- * <pre>
- * metadata ::=
- * annotation*
- *
- * annotation ::=
- * '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]?
- * </pre>
- *
- * @coverage dart.engine.ast
- */
-class Annotation extends ASTNode {
- /**
- * The at sign that introduced the annotation.
- */
- Token atSign;
-
- /**
- * The name of the class defining the constructor that is being invoked or the name of the field
- * that is being referenced.
- */
- Identifier _name;
-
- /**
- * The period before the constructor name, or `null` if this annotation is not the
- * invocation of a named constructor.
- */
- Token period;
-
- /**
- * The name of the constructor being invoked, or `null` if this annotation is not the
- * invocation of a named constructor.
- */
- SimpleIdentifier _constructorName;
-
- /**
- * The arguments to the constructor being invoked, or `null` if this annotation is not the
- * invocation of a constructor.
- */
- ArgumentList _arguments;
-
- /**
- * The element associated with this annotation, or `null` if the AST structure has not been
- * resolved or if this annotation could not be resolved.
- */
- Element _element;
-
- /**
- * Initialize a newly created annotation.
- *
- * @param atSign the at sign that introduced the annotation
- * @param name the name of the class defining the constructor that is being invoked or the name of
- * the field that is being referenced
- * @param period the period before the constructor name, or `null` if this annotation is not
- * the invocation of a named constructor
- * @param constructorName the name of the constructor being invoked, or `null` if this
- * annotation is not the invocation of a named constructor
- * @param arguments the arguments to the constructor being invoked, or `null` if this
- * annotation is not the invocation of a constructor
- */
- Annotation(this.atSign, Identifier name, this.period, SimpleIdentifier constructorName, ArgumentList arguments) {
- this._name = becomeParentOf(name);
- this._constructorName = becomeParentOf(constructorName);
- this._arguments = becomeParentOf(arguments);
- }
-
- accept(ASTVisitor visitor) => visitor.visitAnnotation(this);
-
- /**
- * Return the arguments to the constructor being invoked, or `null` if this annotation is
- * not the invocation of a constructor.
- *
- * @return the arguments to the constructor being invoked
- */
- ArgumentList get arguments => _arguments;
-
- Token get beginToken => atSign;
-
- /**
- * Return the name of the constructor being invoked, or `null` if this annotation is not the
- * invocation of a named constructor.
- *
- * @return the name of the constructor being invoked
- */
- SimpleIdentifier get constructorName => _constructorName;
-
- /**
- * Return the element associated with this annotation, or `null` if the AST structure has
- * not been resolved or if this annotation could not be resolved.
- *
- * @return the element associated with this annotation
- */
- Element get element {
- if (_element != null) {
- return _element;
- }
- if (_name != null) {
- return _name.staticElement;
- }
- return null;
- }
-
- Token get endToken {
- if (_arguments != null) {
- return _arguments.endToken;
- } else if (_constructorName != null) {
- return _constructorName.endToken;
- }
- return _name.endToken;
- }
-
- /**
- * Return the name of the class defining the constructor that is being invoked or the name of the
- * field that is being referenced.
- *
- * @return the name of the constructor being invoked or the name of the field being referenced
- */
- Identifier get name => _name;
-
- /**
- * Set the arguments to the constructor being invoked to the given arguments.
- *
- * @param arguments the arguments to the constructor being invoked
- */
- void set arguments(ArgumentList arguments) {
- this._arguments = becomeParentOf(arguments);
- }
-
- /**
- * Set the name of the constructor being invoked to the given name.
- *
- * @param constructorName the name of the constructor being invoked
- */
- void set constructorName(SimpleIdentifier constructorName) {
- this._constructorName = becomeParentOf(constructorName);
- }
-
- /**
- * Set the element associated with this annotation based.
- *
- * @param element the element to be associated with this identifier
- */
- void set element(Element element) {
- this._element = element;
- }
-
- /**
- * Set the name of the class defining the constructor that is being invoked or the name of the
- * field that is being referenced to the given name.
- *
- * @param name the name of the constructor being invoked or the name of the field being referenced
- */
- void set name(Identifier name) {
- this._name = becomeParentOf(name);
- }
-
- void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_name, visitor);
- safelyVisitChild(_constructorName, visitor);
- safelyVisitChild(_arguments, visitor);
- }
-}
-
-/**
- * Instances of the class `ArgumentDefinitionTest` represent an argument definition test.
- *
- * <pre>
- * argumentDefinitionTest ::=
- * '?' [SimpleIdentifier]
- * </pre>
- *
- * @coverage dart.engine.ast
- */
-class ArgumentDefinitionTest extends Expression {
- /**
- * The token representing the question mark.
- */
- Token question;
-
- /**
- * The identifier representing the argument being tested.
- */
- SimpleIdentifier _identifier;
-
- /**
- * Initialize a newly created argument definition test.
- *
- * @param question the token representing the question mark
- * @param identifier the identifier representing the argument being tested
- */
- ArgumentDefinitionTest(this.question, SimpleIdentifier identifier) {
- this._identifier = becomeParentOf(identifier);
- }
-
- accept(ASTVisitor visitor) => visitor.visitArgumentDefinitionTest(this);
-
- Token get beginToken => question;
-
- Token get endToken => _identifier.endToken;
-
- /**
- * Return the identifier representing the argument being tested.
- *
- * @return the identifier representing the argument being tested
- */
- SimpleIdentifier get identifier => _identifier;
-
- int get precedence => 15;
-
- /**
- * Set the identifier representing the argument being tested to the given identifier.
- *
- * @param identifier the identifier representing the argument being tested
- */
- void set identifier(SimpleIdentifier identifier) {
- this._identifier = becomeParentOf(identifier);
- }
-
- void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_identifier, visitor);
- }
-}
-
-/**
- * Instances of the class `ArgumentList` represent a list of arguments in the invocation of a
- * executable element: a function, method, or constructor.
- *
- * <pre>
- * argumentList ::=
- * '(' arguments? ')'
- *
- * arguments ::=
- * [NamedExpression] (',' [NamedExpression])*
- * | [Expression] (',' [NamedExpression])*
- * </pre>
- *
- * @coverage dart.engine.ast
- */
-class ArgumentList extends ASTNode {
- /**
- * The left parenthesis.
- */
- Token _leftParenthesis;
-
- /**
- * The expressions producing the values of the arguments.
- */
- NodeList<Expression> _arguments;
-
- /**
- * The right parenthesis.
- */
- Token _rightParenthesis;
-
- /**
- * An array containing the elements representing the parameters corresponding to each of the
- * arguments in this list, or `null` if the AST has not been resolved or if the function or
- * method being invoked could not be determined based on static type information. The array must
- * be the same length as the number of arguments, but can contain `null` entries if a given
- * argument does not correspond to a formal parameter.
- */
- List<ParameterElement> _correspondingStaticParameters;
-
- /**
- * An array containing the elements representing the parameters corresponding to each of the
- * arguments in this list, or `null` if the AST has not been resolved or if the function or
- * method being invoked could not be determined based on propagated type information. The array
- * must be the same length as the number of arguments, but can contain `null` entries if a
- * given argument does not correspond to a formal parameter.
- */
- List<ParameterElement> _correspondingPropagatedParameters;
-
- /**
- * Initialize a newly created list of arguments.
- *
- * @param leftParenthesis the left parenthesis
- * @param arguments the expressions producing the values of the arguments
- * @param rightParenthesis the right parenthesis
- */
- ArgumentList(Token leftParenthesis, List<Expression> arguments, Token rightParenthesis) {
- this._arguments = new NodeList<Expression>(this);
- this._leftParenthesis = leftParenthesis;
- this._arguments.addAll(arguments);
- this._rightParenthesis = rightParenthesis;
- }
-
- accept(ASTVisitor visitor) => visitor.visitArgumentList(this);
-
- /**
- * Return the expressions producing the values of the arguments. Although the language requires
- * that positional arguments appear before named arguments, this class allows them to be
- * intermixed.
- *
- * @return the expressions producing the values of the arguments
- */
- NodeList<Expression> get arguments => _arguments;
-
- Token get beginToken => _leftParenthesis;
-
- Token get endToken => _rightParenthesis;
-
- /**
- * Return the left parenthesis.
- *
- * @return the left parenthesis
- */
- Token get leftParenthesis => _leftParenthesis;
-
- /**
- * Return the right parenthesis.
- *
- * @return the right parenthesis
- */
- Token get rightParenthesis => _rightParenthesis;
-
- /**
- * Set the parameter elements corresponding to each of the arguments in this list to the given
- * array of parameters. The array of parameters must be the same length as the number of
- * arguments, but can contain `null` entries if a given argument does not correspond to a
- * formal parameter.
- *
- * @param parameters the parameter elements corresponding to the arguments
- */
- void set correspondingPropagatedParameters(List<ParameterElement> parameters) {
- if (parameters.length != _arguments.length) {
- throw new IllegalArgumentException("Expected ${_arguments.length} parameters, not ${parameters.length}");
- }
- _correspondingPropagatedParameters = parameters;
- }
-
- /**
- * Set the parameter elements corresponding to each of the arguments in this list to the given
- * array of parameters. The array of parameters must be the same length as the number of
- * arguments, but can contain `null` entries if a given argument does not correspond to a
- * formal parameter.
- *
- * @param parameters the parameter elements corresponding to the arguments
- */
- void set correspondingStaticParameters(List<ParameterElement> parameters) {
- if (parameters.length != _arguments.length) {
- throw new IllegalArgumentException("Expected ${_arguments.length} parameters, not ${parameters.length}");
- }
- _correspondingStaticParameters = parameters;
- }
-
- /**
- * Set the left parenthesis to the given token.
- *
- * @param parenthesis the left parenthesis
- */
- void set leftParenthesis(Token parenthesis) {
- _leftParenthesis = parenthesis;
- }
-
- /**
- * Set the right parenthesis to the given token.
- *
- * @param parenthesis the right parenthesis
- */
- void set rightParenthesis(Token parenthesis) {
- _rightParenthesis = parenthesis;
- }
-
- void visitChildren(ASTVisitor visitor) {
- _arguments.accept(visitor);
- }
-
- /**
- * If the given expression is a child of this list, and the AST structure has been resolved, and
- * the function being invoked is known based on propagated type information, and the expression
- * corresponds to one of the parameters of the function being invoked, then return the parameter
- * element representing the parameter to which the value of the given expression will be bound.
- * Otherwise, return `null`.
- *
- * This method is only intended to be used by [Expression#getPropagatedParameterElement].
- *
- * @param expression the expression corresponding to the parameter to be returned
- * @return the parameter element representing the parameter to which the value of the expression
- * will be bound
- */
- ParameterElement getPropagatedParameterElementFor(Expression expression) {
- if (_correspondingPropagatedParameters == null) {
- // Either the AST structure has not been resolved or the invocation of which this list is a
- // part could not be resolved.
- return null;
- }
- int index = _arguments.indexOf(expression);
- if (index < 0) {
- // The expression isn't a child of this node.
- return null;
- }
- return _correspondingPropagatedParameters[index];
- }
-
- /**
- * If the given expression is a child of this list, and the AST structure has been resolved, and
- * the function being invoked is known based on static type information, and the expression
- * corresponds to one of the parameters of the function being invoked, then return the parameter
- * element representing the parameter to which the value of the given expression will be bound.
- * Otherwise, return `null`.
- *
- * This method is only intended to be used by [Expression#getStaticParameterElement].
- *
- * @param expression the expression corresponding to the parameter to be returned
- * @return the parameter element representing the parameter to which the value of the expression
- * will be bound
- */
- ParameterElement getStaticParameterElementFor(Expression expression) {
- if (_correspondingStaticParameters == null) {
- // Either the AST structure has not been resolved or the invocation of which this list is a
- // part could not be resolved.
- return null;
- }
- int index = _arguments.indexOf(expression);
- if (index < 0) {
- // The expression isn't a child of this node.
- return null;
- }
- return _correspondingStaticParameters[index];
- }
-}
-
-/**
- * Instances of the class `AsExpression` represent an 'as' expression.
- *
- * <pre>
- * asExpression ::=
- * [Expression] 'as' [TypeName]
- * </pre>
- *
- * @coverage dart.engine.ast
- */
-class AsExpression extends Expression {
- /**
- * The expression used to compute the value being cast.
- */
- Expression _expression;
-
- /**
- * The as operator.
- */
- Token asOperator;
-
- /**
- * The name of the type being cast to.
- */
- TypeName _type;
-
- /**
- * Initialize a newly created as expression.
- *
- * @param expression the expression used to compute the value being cast
- * @param isOperator the is operator
- * @param type the name of the type being cast to
- */
- AsExpression(Expression expression, Token isOperator, TypeName type) {
- this._expression = becomeParentOf(expression);
- this.asOperator = isOperator;
- this._type = becomeParentOf(type);
- }
-
- accept(ASTVisitor visitor) => visitor.visitAsExpression(this);
-
- Token get beginToken => _expression.beginToken;
-
- Token get endToken => _type.endToken;
-
- /**
- * Return the expression used to compute the value being cast.
- *
- * @return the expression used to compute the value being cast
- */
- Expression get expression => _expression;
-
- int get precedence => 7;
-
- /**
- * Return the name of the type being cast to.
- *
- * @return the name of the type being cast to
- */
- TypeName get type => _type;
-
- /**
- * Set the expression used to compute the value being cast to the given expression.
- *
- * @param expression the expression used to compute the value being cast
- */
- void set expression(Expression expression) {
- this._expression = becomeParentOf(expression);
- }
-
- /**
- * Set the name of the type being cast to to the given name.
- *
- * @param name the name of the type being cast to
- */
- void set type(TypeName name) {
- this._type = becomeParentOf(name);
- }
-
- void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_expression, visitor);
- safelyVisitChild(_type, visitor);
- }
-}
-
-/**
- * Instances of the class `AssertStatement` represent an assert statement.
- *
- * <pre>
- * assertStatement ::=
- * 'assert' '(' [Expression] ')' ';'
- * </pre>
- *
- * @coverage dart.engine.ast
- */
-class AssertStatement extends Statement {
- /**
- * The token representing the 'assert' keyword.
- */
- Token keyword;
-
- /**
- * The left parenthesis.
- */
- Token leftParenthesis;
-
- /**
- * The condition that is being asserted to be `true`.
- */
- Expression _condition;
-
- /**
- * The right parenthesis.
- */
- Token rightParenthesis;
-
- /**
- * The semicolon terminating the statement.
- */
- Token semicolon;
-
- /**
- * Initialize a newly created assert statement.
- *
- * @param keyword the token representing the 'assert' keyword
- * @param leftParenthesis the left parenthesis
- * @param condition the condition that is being asserted to be `true`
- * @param rightParenthesis the right parenthesis
- * @param semicolon the semicolon terminating the statement
- */
- AssertStatement(this.keyword, this.leftParenthesis, Expression condition, this.rightParenthesis, this.semicolon) {
- this._condition = becomeParentOf(condition);
- }
-
- accept(ASTVisitor visitor) => visitor.visitAssertStatement(this);
-
- Token get beginToken => keyword;
-
- /**
- * Return the condition that is being asserted to be `true`.
- *
- * @return the condition that is being asserted to be `true`
- */
- Expression get condition => _condition;
-
- Token get endToken => semicolon;
-
- /**
- * Set the condition that is being asserted to be `true` to the given expression.
- *
- * @param the condition that is being asserted to be `true`
- */
- void set condition(Expression condition) {
- this._condition = becomeParentOf(condition);
- }
-
- void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_condition, visitor);
- }
-}
-
-/**
- * Instances of the class `AssignmentExpression` represent an assignment expression.
- *
- * <pre>
- * assignmentExpression ::=
- * [Expression] [Token] [Expression]
- * </pre>
- *
- * @coverage dart.engine.ast
- */
-class AssignmentExpression extends Expression {
- /**
- * The expression used to compute the left hand side.
- */
- Expression _leftHandSide;
-
- /**
- * The assignment operator being applied.
- */
- Token operator;
-
- /**
- * The expression used to compute the right hand side.
- */
- Expression _rightHandSide;
-
- /**
- * The element associated with the operator based on the static type of the left-hand-side, or
- * `null` if the AST structure has not been resolved, if the operator is not a compound
- * operator, or if the operator could not be resolved.
- */
- MethodElement _staticElement;
-
- /**
- * The element associated with the operator based on the propagated type of the left-hand-side, or
- * `null` if the AST structure has not been resolved, if the operator is not a compound
- * operator, or if the operator could not be resolved.
- */
- MethodElement _propagatedElement;
-
- /**
- * Initialize a newly created assignment expression.
- *
- * @param leftHandSide the expression used to compute the left hand side
- * @param operator the assignment operator being applied
- * @param rightHandSide the expression used to compute the right hand side
- */
- AssignmentExpression(Expression leftHandSide, this.operator, Expression rightHandSide) {
- this._leftHandSide = becomeParentOf(leftHandSide);
- this._rightHandSide = becomeParentOf(rightHandSide);
- }
-
- accept(ASTVisitor visitor) => visitor.visitAssignmentExpression(this);
-
- Token get beginToken => _leftHandSide.beginToken;
-
- /**
- * Return the best element available for this operator. If resolution was able to find a better
- * element based on type propagation, that element will be returned. Otherwise, the element found
- * using the result of static analysis will be returned. If resolution has not been performed,
- * then `null` will be returned.
- *
- * @return the best element available for this operator
- */
- MethodElement get bestElement {
- MethodElement element = propagatedElement;
- if (element == null) {
- element = staticElement;
- }
- return element;
- }
-
- Token get endToken => _rightHandSide.endToken;
-
- /**
- * Set the expression used to compute the left hand side to the given expression.
- *
- * @return the expression used to compute the left hand side
- */
- Expression get leftHandSide => _leftHandSide;
-
- int get precedence => 1;
-
- /**
- * Return the element associated with the operator based on the propagated type of the
- * left-hand-side, or `null` if the AST structure has not been resolved, if the operator is
- * not a compound operator, or if the operator could not be resolved. One example of the latter
- * case is an operator that is not defined for the type of the left-hand operand.
- *
- * @return the element associated with the operator
- */
- MethodElement get propagatedElement => _propagatedElement;
-
- /**
- * Return the expression used to compute the right hand side.
- *
- * @return the expression used to compute the right hand side
- */
- Expression get rightHandSide => _rightHandSide;
-
- /**
- * Return the element associated with the operator based on the static type of the left-hand-side,
- * or `null` if the AST structure has not been resolved, if the operator is not a compound
- * operator, or if the operator could not be resolved. One example of the latter case is an
- * operator that is not defined for the type of the left-hand operand.
- *
- * @return the element associated with the operator
- */
- MethodElement get staticElement => _staticElement;
-
- /**
- * Return the expression used to compute the left hand side.
- *
- * @param expression the expression used to compute the left hand side
- */
- void set leftHandSide(Expression expression) {
- _leftHandSide = becomeParentOf(expression);
- }
-
- /**
- * Set the element associated with the operator based on the propagated type of the left-hand-side
- * to the given element.
- *
- * @param element the element to be associated with the operator
- */
- void set propagatedElement(MethodElement element) {
- _propagatedElement = element;
- }
-
- /**
- * Set the expression used to compute the left hand side to the given expression.
- *
- * @param expression the expression used to compute the left hand side
- */
- void set rightHandSide(Expression expression) {
- _rightHandSide = becomeParentOf(expression);
- }
-
- /**
- * Set the element associated with the operator based on the static type of the left-hand-side to
- * the given element.
- *
- * @param element the static element to be associated with the operator
- */
- void set staticElement(MethodElement element) {
- _staticElement = element;
- }
-
- void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_leftHandSide, visitor);
- safelyVisitChild(_rightHandSide, visitor);
- }
-
- /**
- * If the AST structure has been resolved, and the function being invoked is known based on
- * propagated type information, then return the parameter element representing the parameter to
- * which the value of the right operand will be bound. Otherwise, return `null`.
- *
- * This method is only intended to be used by [Expression#getPropagatedParameterElement].
- *
- * @return the parameter element representing the parameter to which the value of the right
- * operand will be bound
- */
- ParameterElement get propagatedParameterElementForRightHandSide {
- if (_propagatedElement == null) {
- return null;
- }
- List<ParameterElement> parameters = _propagatedElement.parameters;
- if (parameters.length < 1) {
- return null;
- }
- return parameters[0];
- }
-
- /**
- * If the AST structure has been resolved, and the function being invoked is known based on static
- * type information, then return the parameter element representing the parameter to which the
- * value of the right operand will be bound. Otherwise, return `null`.
- *
- * This method is only intended to be used by [Expression#getStaticParameterElement].
- *
- * @return the parameter element representing the parameter to which the value of the right
- * operand will be bound
- */
- ParameterElement get staticParameterElementForRightHandSide {
- if (_staticElement == null) {
- return null;
- }
- List<ParameterElement> parameters = _staticElement.parameters;
- if (parameters.length < 1) {
- return null;
- }
- return parameters[0];
- }
-}
-
-/**
* Instances of the class `BinaryExpression` represent a binary (infix) expression.
*
* <pre>
* binaryExpression ::=
* [Expression] [Token] [Expression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class BinaryExpression extends Expression {
/**
@@ -1489,7 +1463,7 @@
this._rightOperand = becomeParentOf(rightOperand);
}
- accept(ASTVisitor visitor) => visitor.visitBinaryExpression(this);
+ accept(AstVisitor visitor) => visitor.visitBinaryExpression(this);
Token get beginToken => _leftOperand.beginToken;
@@ -1585,7 +1559,7 @@
_staticElement = element;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_leftOperand, visitor);
safelyVisitChild(_rightOperand, visitor);
}
@@ -1640,8 +1614,6 @@
* block ::=
* '{' statement* '}'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class Block extends Statement {
/**
@@ -1671,7 +1643,7 @@
this._statements.addAll(statements);
}
- accept(ASTVisitor visitor) => visitor.visitBlock(this);
+ accept(AstVisitor visitor) => visitor.visitBlock(this);
Token get beginToken => leftBracket;
@@ -1684,7 +1656,7 @@
*/
NodeList<Statement> get statements => _statements;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_statements.accept(visitor);
}
}
@@ -1697,8 +1669,6 @@
* blockFunctionBody ::=
* [Block]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class BlockFunctionBody extends FunctionBody {
/**
@@ -1715,7 +1685,7 @@
this._block = becomeParentOf(block);
}
- accept(ASTVisitor visitor) => visitor.visitBlockFunctionBody(this);
+ accept(AstVisitor visitor) => visitor.visitBlockFunctionBody(this);
Token get beginToken => _block.beginToken;
@@ -1737,7 +1707,7 @@
this._block = becomeParentOf(block);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_block, visitor);
}
}
@@ -1749,8 +1719,6 @@
* booleanLiteral ::=
* 'false' | 'true'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class BooleanLiteral extends Literal {
/**
@@ -1771,7 +1739,7 @@
*/
BooleanLiteral(this.literal, this.value);
- accept(ASTVisitor visitor) => visitor.visitBooleanLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitBooleanLiteral(this);
Token get beginToken => literal;
@@ -1779,7 +1747,7 @@
bool get isSynthetic => literal.isSynthetic;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -1790,8 +1758,6 @@
* breakStatement ::=
* 'break' [SimpleIdentifier]? ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class BreakStatement extends Statement {
/**
@@ -1820,7 +1786,7 @@
this._label = becomeParentOf(label);
}
- accept(ASTVisitor visitor) => visitor.visitBreakStatement(this);
+ accept(AstVisitor visitor) => visitor.visitBreakStatement(this);
Token get beginToken => keyword;
@@ -1842,7 +1808,7 @@
_label = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_label, visitor);
}
}
@@ -1864,8 +1830,6 @@
* '[ ' expression '] '
* | identifier
* </pre>
- *
- * @coverage dart.engine.ast
*/
class CascadeExpression extends Expression {
/**
@@ -1890,7 +1854,7 @@
this._cascadeSections.addAll(cascadeSections);
}
- accept(ASTVisitor visitor) => visitor.visitCascadeExpression(this);
+ accept(AstVisitor visitor) => visitor.visitCascadeExpression(this);
Token get beginToken => _target.beginToken;
@@ -1921,7 +1885,7 @@
this._target = becomeParentOf(target);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_target, visitor);
_cascadeSections.accept(visitor);
}
@@ -1938,10 +1902,8 @@
* catchPart ::=
* 'catch' '(' [SimpleIdentifier] (',' [SimpleIdentifier])? ')'
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class CatchClause extends ASTNode {
+class CatchClause extends AstNode {
/**
* The token representing the 'on' keyword, or `null` if there is no 'on' keyword.
*/
@@ -2012,7 +1974,7 @@
this._body = becomeParentOf(body);
}
- accept(ASTVisitor visitor) => visitor.visitCatchClause(this);
+ accept(AstVisitor visitor) => visitor.visitCatchClause(this);
Token get beginToken {
if (onKeyword != null) {
@@ -2106,7 +2068,7 @@
_stackTraceParameter = becomeParentOf(parameter);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(exceptionType, visitor);
safelyVisitChild(_exceptionParameter, visitor);
safelyVisitChild(_stackTraceParameter, visitor);
@@ -2124,8 +2086,6 @@
* [ImplementsClause]?
* '{' [ClassMember]* '}'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ClassDeclaration extends CompilationUnitMember {
/**
@@ -2211,7 +2171,7 @@
this._members.addAll(members);
}
- accept(ASTVisitor visitor) => visitor.visitClassDeclaration(this);
+ accept(AstVisitor visitor) => visitor.visitClassDeclaration(this);
/**
* Return the constructor declared in the class with the given name.
@@ -2353,7 +2313,7 @@
this._withClause = becomeParentOf(withClause);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_name, visitor);
safelyVisitChild(typeParameters, visitor);
@@ -2375,8 +2335,6 @@
/**
* The abstract class `ClassMember` defines the behavior common to nodes that declare a name
* within the scope of a class.
- *
- * @coverage dart.engine.ast
*/
abstract class ClassMember extends Declaration {
/**
@@ -2398,8 +2356,6 @@
* mixinApplication ::=
* [TypeName] [WithClause] [ImplementsClause]? ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ClassTypeAlias extends TypeAlias {
/**
@@ -2462,7 +2418,7 @@
this._implementsClause = becomeParentOf(implementsClause);
}
- accept(ASTVisitor visitor) => visitor.visitClassTypeAlias(this);
+ accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this);
ClassElement get element => _name != null ? (_name.staticElement as ClassElement) : null;
@@ -2547,7 +2503,7 @@
this._withClause = becomeParentOf(withClause);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_name, visitor);
safelyVisitChild(_typeParameters, visitor);
@@ -2566,10 +2522,8 @@
* [HideCombinator]
* | [ShowCombinator]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class Combinator extends ASTNode {
+abstract class Combinator extends AstNode {
/**
* The keyword specifying what kind of processing is to be done on the imported names.
*/
@@ -2605,10 +2559,8 @@
* '/ **' (CHARACTER | [CommentReference])* '*/'
* | ('///' (CHARACTER - EOL)* EOL)+
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class Comment extends ASTNode {
+class Comment extends AstNode {
/**
* Create a block comment.
*
@@ -2671,7 +2623,7 @@
this._references.addAll(references);
}
- accept(ASTVisitor visitor) => visitor.visitComment(this);
+ accept(AstVisitor visitor) => visitor.visitComment(this);
Token get beginToken => tokens[0];
@@ -2705,7 +2657,7 @@
*/
bool get isEndOfLine => identical(_type, CommentType.END_OF_LINE);
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_references.accept(visitor);
}
}
@@ -2743,10 +2695,8 @@
* commentReference ::=
* '[' 'new'? [Identifier] ']'
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class CommentReference extends ASTNode {
+class CommentReference extends AstNode {
/**
* The token representing the 'new' keyword, or `null` if there was no 'new' keyword.
*/
@@ -2767,7 +2717,7 @@
this._identifier = becomeParentOf(identifier);
}
- accept(ASTVisitor visitor) => visitor.visitCommentReference(this);
+ accept(AstVisitor visitor) => visitor.visitCommentReference(this);
Token get beginToken => _identifier.beginToken;
@@ -2789,7 +2739,7 @@
identifier = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_identifier, visitor);
}
}
@@ -2817,10 +2767,8 @@
* declarations ::=
* [CompilationUnitMember]*
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class CompilationUnit extends ASTNode {
+class CompilationUnit extends AstNode {
/**
* The first token in the token stream that was parsed to form this compilation unit.
*/
@@ -2876,7 +2824,7 @@
this._declarations.addAll(declarations);
}
- accept(ASTVisitor visitor) => visitor.visitCompilationUnit(this);
+ accept(AstVisitor visitor) => visitor.visitCompilationUnit(this);
/**
* Return the declarations contained in this compilation unit.
@@ -2919,13 +2867,13 @@
this._scriptTag = becomeParentOf(scriptTag);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_scriptTag, visitor);
if (directivesAreBeforeDeclarations()) {
_directives.accept(visitor);
_declarations.accept(visitor);
} else {
- for (ASTNode child in sortedDirectivesAndDeclarations) {
+ for (AstNode child in sortedDirectivesAndDeclarations) {
child.accept(visitor);
}
}
@@ -2952,12 +2900,12 @@
* @return the directives and declarations in this compilation unit in the order in which they
* appeared in the original source
*/
- List<ASTNode> get sortedDirectivesAndDeclarations {
- List<ASTNode> childList = new List<ASTNode>();
+ List<AstNode> get sortedDirectivesAndDeclarations {
+ List<AstNode> childList = new List<AstNode>();
childList.addAll(_directives);
childList.addAll(_declarations);
- List<ASTNode> children = new List.from(childList);
- children.sort(ASTNode.LEXICAL_ORDER);
+ List<AstNode> children = new List.from(childList);
+ children.sort(AstNode.LEXICAL_ORDER);
return children;
}
}
@@ -2975,8 +2923,6 @@
* | [VariableDeclaration]
* | [VariableDeclaration]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class CompilationUnitMember extends Declaration {
/**
@@ -2995,8 +2941,6 @@
* conditionalExpression ::=
* [Expression] '?' [Expression] ':' [Expression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ConditionalExpression extends Expression {
/**
@@ -3041,7 +2985,7 @@
this._elseExpression = becomeParentOf(elseExpression);
}
- accept(ASTVisitor visitor) => visitor.visitConditionalExpression(this);
+ accept(AstVisitor visitor) => visitor.visitConditionalExpression(this);
Token get beginToken => _condition.beginToken;
@@ -3100,7 +3044,7 @@
_thenExpression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_condition, visitor);
safelyVisitChild(_thenExpression, visitor);
safelyVisitChild(_elseExpression, visitor);
@@ -3129,8 +3073,6 @@
* initializerList ::=
* ':' [ConstructorInitializer] (',' [ConstructorInitializer])*
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ConstructorDeclaration extends ClassMember {
/**
@@ -3228,7 +3170,7 @@
this._body = becomeParentOf(body);
}
- accept(ASTVisitor visitor) => visitor.visitConstructorDeclaration(this);
+ accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this);
/**
* Return the body of the constructor, or `null` if the constructor does not have a body.
@@ -3332,7 +3274,7 @@
_returnType = becomeParentOf(typeName);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_returnType, visitor);
safelyVisitChild(_name, visitor);
@@ -3377,8 +3319,6 @@
* fieldInitializer ::=
* ('this' '.')? [SimpleIdentifier] '=' [Expression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ConstructorFieldInitializer extends ConstructorInitializer {
/**
@@ -3422,7 +3362,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitConstructorFieldInitializer(this);
+ accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this);
Token get beginToken {
if (keyword != null) {
@@ -3466,7 +3406,7 @@
_fieldName = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_fieldName, visitor);
safelyVisitChild(_expression, visitor);
}
@@ -3481,10 +3421,8 @@
* [SuperConstructorInvocation]
* | [ConstructorFieldInitializer]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class ConstructorInitializer extends ASTNode {
+abstract class ConstructorInitializer extends AstNode {
}
/**
@@ -3494,10 +3432,8 @@
* constructorName:
* type ('.' identifier)?
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class ConstructorName extends ASTNode {
+class ConstructorName extends AstNode {
/**
* The name of the type defining the constructor.
*/
@@ -3534,7 +3470,7 @@
this._name = becomeParentOf(name);
}
- accept(ASTVisitor visitor) => visitor.visitConstructorName(this);
+ accept(AstVisitor visitor) => visitor.visitConstructorName(this);
Token get beginToken => _type.beginToken;
@@ -3597,7 +3533,7 @@
this._type = becomeParentOf(type);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_type, visitor);
safelyVisitChild(_name, visitor);
}
@@ -3610,8 +3546,6 @@
* continueStatement ::=
* 'continue' [SimpleIdentifier]? ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ContinueStatement extends Statement {
/**
@@ -3640,7 +3574,7 @@
this._label = becomeParentOf(label);
}
- accept(ASTVisitor visitor) => visitor.visitContinueStatement(this);
+ accept(AstVisitor visitor) => visitor.visitContinueStatement(this);
Token get beginToken => keyword;
@@ -3662,7 +3596,7 @@
_label = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_label, visitor);
}
}
@@ -3670,8 +3604,6 @@
/**
* The abstract class `Declaration` defines the behavior common to nodes that represent the
* declaration of a name. Each declared name is visible within a name scope.
- *
- * @coverage dart.engine.ast
*/
abstract class Declaration extends AnnotatedNode {
/**
@@ -3699,8 +3631,6 @@
* declaredIdentifier ::=
* ([Annotation] finalConstVarOrType [SimpleIdentifier]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class DeclaredIdentifier extends Declaration {
/**
@@ -3734,7 +3664,7 @@
this._identifier = becomeParentOf(identifier);
}
- accept(ASTVisitor visitor) => visitor.visitDeclaredIdentifier(this);
+ accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this);
LocalVariableElement get element {
SimpleIdentifier identifier = this.identifier;
@@ -3786,7 +3716,7 @@
_type = becomeParentOf(typeName);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_type, visitor);
safelyVisitChild(_identifier, visitor);
@@ -3814,8 +3744,6 @@
* defaultNamedParameter ::=
* [NormalFormalParameter] (':' [Expression])?
* </pre>
- *
- * @coverage dart.engine.ast
*/
class DefaultFormalParameter extends FormalParameter {
/**
@@ -3853,7 +3781,7 @@
this._defaultValue = becomeParentOf(defaultValue);
}
- accept(ASTVisitor visitor) => visitor.visitDefaultFormalParameter(this);
+ accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this);
Token get beginToken => _parameter.beginToken;
@@ -3903,7 +3831,7 @@
_parameter = becomeParentOf(formalParameter);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_parameter, visitor);
safelyVisitChild(_defaultValue, visitor);
}
@@ -3921,8 +3849,6 @@
* | [PartDirective]
* | [PartOfDirective]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class Directive extends AnnotatedNode {
/**
@@ -3973,8 +3899,6 @@
* doStatement ::=
* 'do' [Statement] 'while' '(' [Expression] ')' ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class DoStatement extends Statement {
/**
@@ -4030,7 +3954,7 @@
this._rightParenthesis = rightParenthesis;
}
- accept(ASTVisitor visitor) => visitor.visitDoStatement(this);
+ accept(AstVisitor visitor) => visitor.visitDoStatement(this);
Token get beginToken => doKeyword;
@@ -4100,7 +4024,7 @@
_rightParenthesis = parenthesis;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_body, visitor);
safelyVisitChild(_condition, visitor);
}
@@ -4117,8 +4041,6 @@
* exponent ::=
* ('e' | 'E') ('+' | '-')? decimalDigit+
* </pre>
- *
- * @coverage dart.engine.ast
*/
class DoubleLiteral extends Literal {
/**
@@ -4139,13 +4061,13 @@
*/
DoubleLiteral(this.literal, this.value);
- accept(ASTVisitor visitor) => visitor.visitDoubleLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this);
Token get beginToken => literal;
Token get endToken => literal;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -4157,8 +4079,6 @@
* emptyFunctionBody ::=
* ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class EmptyFunctionBody extends FunctionBody {
/**
@@ -4173,13 +4093,13 @@
*/
EmptyFunctionBody(this.semicolon);
- accept(ASTVisitor visitor) => visitor.visitEmptyFunctionBody(this);
+ accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this);
Token get beginToken => semicolon;
Token get endToken => semicolon;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -4190,8 +4110,6 @@
* emptyStatement ::=
* ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class EmptyStatement extends Statement {
/**
@@ -4206,23 +4124,21 @@
*/
EmptyStatement(this.semicolon);
- accept(ASTVisitor visitor) => visitor.visitEmptyStatement(this);
+ accept(AstVisitor visitor) => visitor.visitEmptyStatement(this);
Token get beginToken => semicolon;
Token get endToken => semicolon;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
/**
* Ephemeral identifiers are created as needed to mimic the presence of an empty identifier.
- *
- * @coverage dart.engine.ast
*/
class EphemeralIdentifier extends SimpleIdentifier {
- EphemeralIdentifier(ASTNode parent, int location) : super(new StringToken(TokenType.IDENTIFIER, "", location)) {
+ EphemeralIdentifier(AstNode parent, int location) : super(new StringToken(TokenType.IDENTIFIER, "", location)) {
parent.becomeParentOf(this);
}
}
@@ -4234,8 +4150,6 @@
* exportDirective ::=
* [Annotation] 'export' [StringLiteral] [Combinator]* ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ExportDirective extends NamespaceDirective {
/**
@@ -4250,7 +4164,7 @@
*/
ExportDirective(Comment comment, List<Annotation> metadata, Token keyword, StringLiteral libraryUri, List<Combinator> combinators, Token semicolon) : super(comment, metadata, keyword, libraryUri, combinators, semicolon);
- accept(ASTVisitor visitor) => visitor.visitExportDirective(this);
+ accept(AstVisitor visitor) => visitor.visitExportDirective(this);
LibraryElement get uriElement {
Element element = this.element;
@@ -4260,7 +4174,7 @@
return null;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
combinators.accept(visitor);
}
@@ -4276,10 +4190,8 @@
* | [ConditionalExpression] cascadeSection*
* | [ThrowExpression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class Expression extends ASTNode {
+abstract class Expression extends AstNode {
/**
* An empty array of expressions.
*/
@@ -4353,7 +4265,7 @@
* will be bound
*/
ParameterElement get propagatedParameterElement {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
if (parent is ArgumentList) {
return parent.getPropagatedParameterElementFor(this);
} else if (parent is IndexExpression) {
@@ -4390,7 +4302,7 @@
* will be bound
*/
ParameterElement get staticParameterElement {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
if (parent is ArgumentList) {
return parent.getStaticParameterElementFor(this);
} else if (parent is IndexExpression) {
@@ -4433,8 +4345,6 @@
* expressionFunctionBody ::=
* '=>' [Expression] ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ExpressionFunctionBody extends FunctionBody {
/**
@@ -4464,7 +4374,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitExpressionFunctionBody(this);
+ accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this);
Token get beginToken => functionDefinition;
@@ -4491,7 +4401,7 @@
this._expression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
}
@@ -4503,8 +4413,6 @@
* expressionStatement ::=
* [Expression]? ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ExpressionStatement extends Statement {
/**
@@ -4528,7 +4436,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitExpressionStatement(this);
+ accept(AstVisitor visitor) => visitor.visitExpressionStatement(this);
Token get beginToken => _expression.beginToken;
@@ -4557,7 +4465,7 @@
this._expression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
}
@@ -4570,10 +4478,8 @@
* extendsClause ::=
* 'extends' [TypeName]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class ExtendsClause extends ASTNode {
+class ExtendsClause extends AstNode {
/**
* The token representing the 'extends' keyword.
*/
@@ -4594,7 +4500,7 @@
this._superclass = becomeParentOf(superclass);
}
- accept(ASTVisitor visitor) => visitor.visitExtendsClause(this);
+ accept(AstVisitor visitor) => visitor.visitExtendsClause(this);
Token get beginToken => keyword;
@@ -4616,7 +4522,7 @@
_superclass = becomeParentOf(name);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_superclass, visitor);
}
}
@@ -4629,8 +4535,6 @@
* fieldDeclaration ::=
* 'static'? [VariableDeclarationList] ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class FieldDeclaration extends ClassMember {
/**
@@ -4661,7 +4565,7 @@
this._fieldList = becomeParentOf(fieldList);
}
- accept(ASTVisitor visitor) => visitor.visitFieldDeclaration(this);
+ accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this);
Element get element => null;
@@ -4690,7 +4594,7 @@
fieldList = becomeParentOf(fieldList);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_fieldList, visitor);
}
@@ -4710,8 +4614,6 @@
* fieldFormalParameter ::=
* ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])? 'this' '.' [SimpleIdentifier] [FormalParameterList]?
* </pre>
- *
- * @coverage dart.engine.ast
*/
class FieldFormalParameter extends NormalFormalParameter {
/**
@@ -4760,7 +4662,7 @@
this._parameters = becomeParentOf(parameters);
}
- accept(ASTVisitor visitor) => visitor.visitFieldFormalParameter(this);
+ accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this);
Token get beginToken {
if (keyword != null) {
@@ -4812,7 +4714,7 @@
_type = becomeParentOf(typeName);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_type, visitor);
safelyVisitChild(identifier, visitor);
@@ -4828,8 +4730,6 @@
* 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block]
* | 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ForEachStatement extends Statement {
/**
@@ -4905,7 +4805,7 @@
this._body = becomeParentOf(body);
}
- accept(ASTVisitor visitor) => visitor.visitForEachStatement(this);
+ accept(AstVisitor visitor) => visitor.visitForEachStatement(this);
Token get beginToken => forKeyword;
@@ -4976,7 +4876,7 @@
_loopVariable = becomeParentOf(variable);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_loopVariable, visitor);
safelyVisitChild(_identifier, visitor);
safelyVisitChild(_iterator, visitor);
@@ -4998,8 +4898,6 @@
* [DefaultFormalParameter]
* | [Expression]?
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ForStatement extends Statement {
/**
@@ -5080,7 +4978,7 @@
this._body = becomeParentOf(body);
}
- accept(ASTVisitor visitor) => visitor.visitForStatement(this);
+ accept(AstVisitor visitor) => visitor.visitForStatement(this);
Token get beginToken => forKeyword;
@@ -5158,7 +5056,7 @@
variableList = becomeParentOf(variableList);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_variableList, visitor);
safelyVisitChild(_initialization, visitor);
safelyVisitChild(_condition, visitor);
@@ -5177,10 +5075,8 @@
* | [DefaultFormalParameter]
* | [DefaultFormalParameter]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class FormalParameter extends ASTNode {
+abstract class FormalParameter extends AstNode {
/**
* Return the element representing this parameter, or `null` if this parameter has not been
* resolved.
@@ -5254,10 +5150,8 @@
* namedFormalParameters ::=
* '{' [DefaultFormalParameter] (',' [DefaultFormalParameter])* '}'
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class FormalParameterList extends ASTNode {
+class FormalParameterList extends AstNode {
/**
* The left parenthesis.
*/
@@ -5303,7 +5197,7 @@
this._rightParenthesis = rightParenthesis;
}
- accept(ASTVisitor visitor) => visitor.visitFormalParameterList(this);
+ accept(AstVisitor visitor) => visitor.visitFormalParameterList(this);
Token get beginToken => _leftParenthesis;
@@ -5401,7 +5295,7 @@
_rightParenthesis = parenthesis;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_parameters.accept(visitor);
}
}
@@ -5416,10 +5310,8 @@
* | [EmptyFunctionBody]
* | [ExpressionFunctionBody]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class FunctionBody extends ASTNode {
+abstract class FunctionBody extends AstNode {
}
/**
@@ -5433,8 +5325,6 @@
* functionSignature ::=
* [Type]? ('get' | 'set')? [SimpleIdentifier] [FormalParameterList]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class FunctionDeclaration extends CompilationUnitMember {
/**
@@ -5481,7 +5371,7 @@
this._functionExpression = becomeParentOf(functionExpression);
}
- accept(ASTVisitor visitor) => visitor.visitFunctionDeclaration(this);
+ accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this);
ExecutableElement get element => _name != null ? (_name.staticElement as ExecutableElement) : null;
@@ -5549,7 +5439,7 @@
_returnType = becomeParentOf(name);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_returnType, visitor);
safelyVisitChild(_name, visitor);
@@ -5574,8 +5464,6 @@
/**
* Instances of the class `FunctionDeclarationStatement` wrap a [FunctionDeclaration
] as a statement.
- *
- * @coverage dart.engine.ast
*/
class FunctionDeclarationStatement extends Statement {
/**
@@ -5592,7 +5480,7 @@
this._functionDeclaration = becomeParentOf(functionDeclaration);
}
- accept(ASTVisitor visitor) => visitor.visitFunctionDeclarationStatement(this);
+ accept(AstVisitor visitor) => visitor.visitFunctionDeclarationStatement(this);
Token get beginToken => _functionDeclaration.beginToken;
@@ -5614,7 +5502,7 @@
this._functionDeclaration = becomeParentOf(functionDeclaration);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_functionDeclaration, visitor);
}
}
@@ -5626,8 +5514,6 @@
* functionExpression ::=
* [FormalParameterList] [FunctionBody]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class FunctionExpression extends Expression {
/**
@@ -5657,7 +5543,7 @@
this._body = becomeParentOf(body);
}
- accept(ASTVisitor visitor) => visitor.visitFunctionExpression(this);
+ accept(AstVisitor visitor) => visitor.visitFunctionExpression(this);
Token get beginToken {
if (_parameters != null) {
@@ -5715,7 +5601,7 @@
this._parameters = becomeParentOf(parameters);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_parameters, visitor);
safelyVisitChild(_body, visitor);
}
@@ -5732,8 +5618,6 @@
* functionExpressionInvoction ::=
* [Expression] [ArgumentList]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class FunctionExpressionInvocation extends Expression {
/**
@@ -5769,7 +5653,7 @@
this._argumentList = becomeParentOf(argumentList);
}
- accept(ASTVisitor visitor) => visitor.visitFunctionExpressionInvocation(this);
+ accept(AstVisitor visitor) => visitor.visitFunctionExpressionInvocation(this);
/**
* Return the list of arguments to the method.
@@ -5845,7 +5729,7 @@
_propagatedElement = element;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_function, visitor);
safelyVisitChild(_argumentList, visitor);
}
@@ -5861,8 +5745,6 @@
* functionPrefix ::=
* [TypeName]? [SimpleIdentifier]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class FunctionTypeAlias extends TypeAlias {
/**
@@ -5906,7 +5788,7 @@
this._parameters = becomeParentOf(parameters);
}
- accept(ASTVisitor visitor) => visitor.visitFunctionTypeAlias(this);
+ accept(AstVisitor visitor) => visitor.visitFunctionTypeAlias(this);
FunctionTypeAliasElement get element => _name != null ? (_name.staticElement as FunctionTypeAliasElement) : null;
@@ -5976,7 +5858,7 @@
this._typeParameters = becomeParentOf(typeParameters);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_returnType, visitor);
safelyVisitChild(_name, visitor);
@@ -5993,8 +5875,6 @@
* functionSignature ::=
* [TypeName]? [SimpleIdentifier] [FormalParameterList]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class FunctionTypedFormalParameter extends NormalFormalParameter {
/**
@@ -6022,7 +5902,7 @@
this._parameters = becomeParentOf(parameters);
}
- accept(ASTVisitor visitor) => visitor.visitFunctionTypedFormalParameter(this);
+ accept(AstVisitor visitor) => visitor.visitFunctionTypedFormalParameter(this);
Token get beginToken {
if (_returnType != null) {
@@ -6070,7 +5950,7 @@
this._returnType = becomeParentOf(returnType);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_returnType, visitor);
safelyVisitChild(identifier, visitor);
@@ -6086,8 +5966,6 @@
* hideCombinator ::=
* 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])*
* </pre>
- *
- * @coverage dart.engine.ast
*/
class HideCombinator extends Combinator {
/**
@@ -6106,7 +5984,7 @@
this._hiddenNames.addAll(hiddenNames);
}
- accept(ASTVisitor visitor) => visitor.visitHideCombinator(this);
+ accept(AstVisitor visitor) => visitor.visitHideCombinator(this);
Token get endToken => _hiddenNames.endToken;
@@ -6117,7 +5995,7 @@
*/
NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_hiddenNames.accept(visitor);
}
}
@@ -6131,8 +6009,6 @@
* [SimpleIdentifier]
* | [PrefixedIdentifier]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class Identifier extends Expression {
/**
@@ -6191,8 +6067,6 @@
* ifStatement ::=
* 'if' '(' [Expression] ')' [Statement] ('else' [Statement])?
* </pre>
- *
- * @coverage dart.engine.ast
*/
class IfStatement extends Statement {
/**
@@ -6248,7 +6122,7 @@
this._elseStatement = becomeParentOf(elseStatement);
}
- accept(ASTVisitor visitor) => visitor.visitIfStatement(this);
+ accept(AstVisitor visitor) => visitor.visitIfStatement(this);
Token get beginToken => ifKeyword;
@@ -6311,7 +6185,7 @@
_thenStatement = becomeParentOf(statement);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_condition, visitor);
safelyVisitChild(_thenStatement, visitor);
safelyVisitChild(_elseStatement, visitor);
@@ -6326,10 +6200,8 @@
* implementsClause ::=
* 'implements' [TypeName] (',' [TypeName])*
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class ImplementsClause extends ASTNode {
+class ImplementsClause extends AstNode {
/**
* The token representing the 'implements' keyword.
*/
@@ -6351,7 +6223,7 @@
this._interfaces.addAll(interfaces);
}
- accept(ASTVisitor visitor) => visitor.visitImplementsClause(this);
+ accept(AstVisitor visitor) => visitor.visitImplementsClause(this);
Token get beginToken => keyword;
@@ -6364,7 +6236,7 @@
*/
NodeList<TypeName> get interfaces => _interfaces;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_interfaces.accept(visitor);
}
}
@@ -6376,8 +6248,6 @@
* importDirective ::=
* [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ImportDirective extends NamespaceDirective {
static Comparator<ImportDirective> COMPARATOR = (ImportDirective import1, ImportDirective import2) {
@@ -6498,7 +6368,7 @@
this._prefix = becomeParentOf(prefix);
}
- accept(ASTVisitor visitor) => visitor.visitImportDirective(this);
+ accept(AstVisitor visitor) => visitor.visitImportDirective(this);
ImportElement get element => super.element as ImportElement;
@@ -6527,7 +6397,7 @@
this._prefix = becomeParentOf(prefix);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_prefix, visitor);
combinators.accept(visitor);
@@ -6541,8 +6411,6 @@
* indexExpression ::=
* [Expression] '[' [Expression] ']'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class IndexExpression extends Expression {
/**
@@ -6622,7 +6490,7 @@
this._rightBracket = rightBracket;
}
- accept(ASTVisitor visitor) => visitor.visitIndexExpression(this);
+ accept(AstVisitor visitor) => visitor.visitIndexExpression(this);
Token get beginToken {
if (_target != null) {
@@ -6686,7 +6554,7 @@
*/
Expression get realTarget {
if (isCascaded) {
- ASTNode ancestor = parent;
+ AstNode ancestor = parent;
while (ancestor is! CascadeExpression) {
if (ancestor == null) {
return _target;
@@ -6734,7 +6602,7 @@
* @return `true` if this expression is in a context where the operator '[]' will be invoked
*/
bool inGetterContext() {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
if (parent is AssignmentExpression) {
AssignmentExpression assignment = parent;
if (identical(assignment.leftHandSide, this) && identical(assignment.operator.type, TokenType.EQ)) {
@@ -6755,7 +6623,7 @@
* invoked
*/
bool inSetterContext() {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
if (parent is PrefixExpression) {
return parent.operator.type.isIncrementOperator;
} else if (parent is PostfixExpression) {
@@ -6833,7 +6701,7 @@
_target = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_target, visitor);
safelyVisitChild(_index, visitor);
}
@@ -6889,8 +6757,6 @@
* newExpression ::=
* ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class InstanceCreationExpression extends Expression {
/**
@@ -6926,7 +6792,7 @@
this._argumentList = becomeParentOf(argumentList);
}
- accept(ASTVisitor visitor) => visitor.visitInstanceCreationExpression(this);
+ accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this);
/**
* Return the list of arguments to the constructor.
@@ -6957,7 +6823,7 @@
this._argumentList = becomeParentOf(argumentList);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(constructorName, visitor);
safelyVisitChild(_argumentList, visitor);
}
@@ -6978,8 +6844,6 @@
* '0x' hexidecimalDigit+
* | '0X' hexidecimalDigit+
* </pre>
- *
- * @coverage dart.engine.ast
*/
class IntegerLiteral extends Literal {
/**
@@ -7000,13 +6864,13 @@
*/
IntegerLiteral(this.literal, this.value);
- accept(ASTVisitor visitor) => visitor.visitIntegerLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this);
Token get beginToken => literal;
Token get endToken => literal;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -7019,10 +6883,8 @@
* [InterpolationExpression]
* | [InterpolationString]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class InterpolationElement extends ASTNode {
+abstract class InterpolationElement extends AstNode {
}
/**
@@ -7034,8 +6896,6 @@
* '$' [SimpleIdentifier]
* | '$' '{' [Expression] '}'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class InterpolationExpression extends InterpolationElement {
/**
@@ -7065,7 +6925,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitInterpolationExpression(this);
+ accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this);
Token get beginToken => leftBracket;
@@ -7093,7 +6953,7 @@
this._expression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
}
@@ -7106,8 +6966,6 @@
* interpolationString ::=
* characters
* </pre>
- *
- * @coverage dart.engine.ast
*/
class InterpolationString extends InterpolationElement {
/**
@@ -7131,7 +6989,7 @@
this._value = value;
}
- accept(ASTVisitor visitor) => visitor.visitInterpolationString(this);
+ accept(AstVisitor visitor) => visitor.visitInterpolationString(this);
Token get beginToken => _contents;
@@ -7169,7 +7027,7 @@
_value = string;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -7180,8 +7038,6 @@
* isExpression ::=
* [Expression] 'is' '!'? [TypeName]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class IsExpression extends Expression {
/**
@@ -7217,7 +7073,7 @@
this._type = becomeParentOf(type);
}
- accept(ASTVisitor visitor) => visitor.visitIsExpression(this);
+ accept(AstVisitor visitor) => visitor.visitIsExpression(this);
Token get beginToken => _expression.beginToken;
@@ -7258,7 +7114,7 @@
this._type = becomeParentOf(name);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
safelyVisitChild(_type, visitor);
}
@@ -7271,10 +7127,8 @@
* label ::=
* [SimpleIdentifier] ':'
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class Label extends ASTNode {
+class Label extends AstNode {
/**
* The label being associated with the statement.
*/
@@ -7295,7 +7149,7 @@
this._label = becomeParentOf(label);
}
- accept(ASTVisitor visitor) => visitor.visitLabel(this);
+ accept(AstVisitor visitor) => visitor.visitLabel(this);
Token get beginToken => _label.beginToken;
@@ -7317,7 +7171,7 @@
this._label = becomeParentOf(label);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_label, visitor);
}
}
@@ -7330,8 +7184,6 @@
* labeledStatement ::=
* [Label]+ [Statement]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class LabeledStatement extends Statement {
/**
@@ -7356,7 +7208,7 @@
this._statement = becomeParentOf(statement);
}
- accept(ASTVisitor visitor) => visitor.visitLabeledStatement(this);
+ accept(AstVisitor visitor) => visitor.visitLabeledStatement(this);
Token get beginToken {
if (!_labels.isEmpty) {
@@ -7390,7 +7242,7 @@
this._statement = becomeParentOf(statement);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_labels.accept(visitor);
safelyVisitChild(_statement, visitor);
}
@@ -7403,8 +7255,6 @@
* libraryDirective ::=
* [Annotation] 'library' [Identifier] ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class LibraryDirective extends Directive {
/**
@@ -7435,7 +7285,7 @@
this._name = becomeParentOf(name);
}
- accept(ASTVisitor visitor) => visitor.visitLibraryDirective(this);
+ accept(AstVisitor visitor) => visitor.visitLibraryDirective(this);
Token get endToken => semicolon;
@@ -7457,7 +7307,7 @@
this._name = becomeParentOf(name);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_name, visitor);
}
@@ -7472,8 +7322,6 @@
* libraryIdentifier ::=
* [SimpleIdentifier] ('.' [SimpleIdentifier])*
* </pre>
- *
- * @coverage dart.engine.ast
*/
class LibraryIdentifier extends Identifier {
/**
@@ -7491,7 +7339,7 @@
this._components.addAll(components);
}
- accept(ASTVisitor visitor) => visitor.visitLibraryIdentifier(this);
+ accept(AstVisitor visitor) => visitor.visitLibraryIdentifier(this);
Token get beginToken => _components.beginToken;
@@ -7526,7 +7374,7 @@
Element get staticElement => null;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_components.accept(visitor);
}
}
@@ -7538,8 +7386,6 @@
* listLiteral ::=
* 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ListLiteral extends TypedLiteral {
/**
@@ -7574,7 +7420,7 @@
this._rightBracket = rightBracket;
}
- accept(ASTVisitor visitor) => visitor.visitListLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitListLiteral(this);
Token get beginToken {
Token token = constKeyword;
@@ -7629,7 +7475,7 @@
_rightBracket = bracket;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
_elements.accept(visitor);
}
@@ -7649,8 +7495,6 @@
* | [NullLiteral]
* | [StringLiteral]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class Literal extends Expression {
int get precedence => 16;
@@ -7663,8 +7507,6 @@
* mapLiteral ::=
* 'const'? ('<' [TypeName] (',' [TypeName])* '>')? '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class MapLiteral extends TypedLiteral {
/**
@@ -7699,7 +7541,7 @@
this._rightBracket = rightBracket;
}
- accept(ASTVisitor visitor) => visitor.visitMapLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitMapLiteral(this);
Token get beginToken {
Token token = constKeyword;
@@ -7754,7 +7596,7 @@
_rightBracket = bracket;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
_entries.accept(visitor);
}
@@ -7768,10 +7610,8 @@
* mapLiteralEntry ::=
* [Expression] ':' [Expression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class MapLiteralEntry extends ASTNode {
+class MapLiteralEntry extends AstNode {
/**
* The expression computing the key with which the value will be associated.
*/
@@ -7799,7 +7639,7 @@
this._value = becomeParentOf(value);
}
- accept(ASTVisitor visitor) => visitor.visitMapLiteralEntry(this);
+ accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this);
Token get beginToken => _key.beginToken;
@@ -7839,7 +7679,7 @@
_value = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_key, visitor);
safelyVisitChild(_value, visitor);
}
@@ -7860,8 +7700,6 @@
* [SimpleIdentifier]
* | 'operator' [SimpleIdentifier]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class MethodDeclaration extends ClassMember {
/**
@@ -7929,7 +7767,7 @@
this._body = becomeParentOf(body);
}
- accept(ASTVisitor visitor) => visitor.visitMethodDeclaration(this);
+ accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this);
/**
* Return the body of the method.
@@ -8043,7 +7881,7 @@
_returnType = becomeParentOf(typeName);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_returnType, visitor);
safelyVisitChild(_name, visitor);
@@ -8076,8 +7914,6 @@
* methodInvoction ::=
* ([Expression] '.')? [SimpleIdentifier] [ArgumentList]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class MethodInvocation extends Expression {
/**
@@ -8116,7 +7952,7 @@
this._argumentList = becomeParentOf(argumentList);
}
- accept(ASTVisitor visitor) => visitor.visitMethodInvocation(this);
+ accept(AstVisitor visitor) => visitor.visitMethodInvocation(this);
/**
* Return the list of arguments to the method.
@@ -8156,7 +7992,7 @@
*/
Expression get realTarget {
if (isCascaded) {
- ASTNode ancestor = parent;
+ AstNode ancestor = parent;
while (ancestor is! CascadeExpression) {
if (ancestor == null) {
return _target;
@@ -8214,7 +8050,7 @@
_target = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_target, visitor);
safelyVisitChild(_methodName, visitor);
safelyVisitChild(_argumentList, visitor);
@@ -8229,8 +8065,6 @@
* namedExpression ::=
* [Label] [Expression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class NamedExpression extends Expression {
/**
@@ -8254,7 +8088,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitNamedExpression(this);
+ accept(AstVisitor visitor) => visitor.visitNamedExpression(this);
Token get beginToken => _name.beginToken;
@@ -8309,7 +8143,7 @@
_name = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_name, visitor);
safelyVisitChild(_expression, visitor);
}
@@ -8324,8 +8158,6 @@
* [ExportDirective]
* | [ImportDirective]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class NamespaceDirective extends UriBasedDirective {
/**
@@ -8380,10 +8212,8 @@
* nativeClause ::=
* 'native' [StringLiteral]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class NativeClause extends ASTNode {
+class NativeClause extends AstNode {
/**
* The token representing the 'native' keyword.
*/
@@ -8402,13 +8232,13 @@
*/
NativeClause(this.keyword, this.name);
- accept(ASTVisitor visitor) => visitor.visitNativeClause(this);
+ accept(AstVisitor visitor) => visitor.visitNativeClause(this);
Token get beginToken => keyword;
Token get endToken => name.endToken;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(name, visitor);
}
}
@@ -8421,8 +8251,6 @@
* nativeFunctionBody ::=
* 'native' [SimpleStringLiteral] ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class NativeFunctionBody extends FunctionBody {
/**
@@ -8452,7 +8280,7 @@
this._stringLiteral = becomeParentOf(stringLiteral);
}
- accept(ASTVisitor visitor) => visitor.visitNativeFunctionBody(this);
+ accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this);
Token get beginToken => nativeToken;
@@ -8465,7 +8293,7 @@
*/
StringLiteral get stringLiteral => _stringLiteral;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_stringLiteral, visitor);
}
}
@@ -8480,8 +8308,6 @@
* | [FieldFormalParameter]
* | [SimpleFormalParameter]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class NormalFormalParameter extends FormalParameter {
/**
@@ -8525,7 +8351,7 @@
SimpleIdentifier get identifier => _identifier;
ParameterKind get kind {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
if (parent is DefaultFormalParameter) {
return parent.kind;
}
@@ -8557,7 +8383,7 @@
this._identifier = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
//
// Note that subclasses are responsible for visiting the identifier because they often need to
// visit other nodes before visiting the identifier.
@@ -8566,7 +8392,7 @@
safelyVisitChild(_comment, visitor);
_metadata.accept(visitor);
} else {
- for (ASTNode child in sortedCommentAndAnnotations) {
+ for (AstNode child in sortedCommentAndAnnotations) {
child.accept(visitor);
}
}
@@ -8592,12 +8418,12 @@
* @return the comment and annotations associated with this parameter in the order in which they
* appeared in the original source
*/
- List<ASTNode> get sortedCommentAndAnnotations {
- List<ASTNode> childList = new List<ASTNode>();
+ List<AstNode> get sortedCommentAndAnnotations {
+ List<AstNode> childList = new List<AstNode>();
childList.add(_comment);
childList.addAll(_metadata);
- List<ASTNode> children = new List.from(childList);
- children.sort(ASTNode.LEXICAL_ORDER);
+ List<AstNode> children = new List.from(childList);
+ children.sort(AstNode.LEXICAL_ORDER);
return children;
}
}
@@ -8609,8 +8435,6 @@
* nullLiteral ::=
* 'null'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class NullLiteral extends Literal {
/**
@@ -8627,13 +8451,13 @@
this.literal = token;
}
- accept(ASTVisitor visitor) => visitor.visitNullLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitNullLiteral(this);
Token get beginToken => literal;
Token get endToken => literal;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -8644,8 +8468,6 @@
* parenthesizedExpression ::=
* '(' [Expression] ')'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ParenthesizedExpression extends Expression {
/**
@@ -8676,7 +8498,7 @@
this._rightParenthesis = rightParenthesis;
}
- accept(ASTVisitor visitor) => visitor.visitParenthesizedExpression(this);
+ accept(AstVisitor visitor) => visitor.visitParenthesizedExpression(this);
Token get beginToken => _leftParenthesis;
@@ -8732,7 +8554,7 @@
_rightParenthesis = parenthesis;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
}
@@ -8744,8 +8566,6 @@
* partDirective ::=
* [Annotation] 'part' [StringLiteral] ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class PartDirective extends UriBasedDirective {
/**
@@ -8769,7 +8589,7 @@
*/
PartDirective(Comment comment, List<Annotation> metadata, this.partToken, StringLiteral partUri, this.semicolon) : super(comment, metadata, partUri);
- accept(ASTVisitor visitor) => visitor.visitPartDirective(this);
+ accept(AstVisitor visitor) => visitor.visitPartDirective(this);
Token get endToken => semicolon;
@@ -8787,8 +8607,6 @@
* partOfDirective ::=
* [Annotation] 'part' 'of' [Identifier] ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class PartOfDirective extends Directive {
/**
@@ -8825,7 +8643,7 @@
this._libraryName = becomeParentOf(libraryName);
}
- accept(ASTVisitor visitor) => visitor.visitPartOfDirective(this);
+ accept(AstVisitor visitor) => visitor.visitPartOfDirective(this);
Token get endToken => semicolon;
@@ -8847,7 +8665,7 @@
this._libraryName = becomeParentOf(libraryName);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_libraryName, visitor);
}
@@ -8862,8 +8680,6 @@
* postfixExpression ::=
* [Expression] [Token]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class PostfixExpression extends Expression {
/**
@@ -8900,7 +8716,7 @@
this._operand = becomeParentOf(operand);
}
- accept(ASTVisitor visitor) => visitor.visitPostfixExpression(this);
+ accept(AstVisitor visitor) => visitor.visitPostfixExpression(this);
Token get beginToken => _operand.beginToken;
@@ -8980,7 +8796,7 @@
_staticElement = element;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_operand, visitor);
}
@@ -9034,8 +8850,6 @@
* prefixExpression ::=
* [Token] [Expression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class PrefixExpression extends Expression {
/**
@@ -9072,7 +8886,7 @@
this._operand = becomeParentOf(operand);
}
- accept(ASTVisitor visitor) => visitor.visitPrefixExpression(this);
+ accept(AstVisitor visitor) => visitor.visitPrefixExpression(this);
Token get beginToken => operator;
@@ -9152,7 +8966,7 @@
_staticElement = element;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_operand, visitor);
}
@@ -9208,8 +9022,6 @@
* prefixedIdentifier ::=
* [SimpleIdentifier] '.' [SimpleIdentifier]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class PrefixedIdentifier extends Identifier {
/**
@@ -9239,7 +9051,7 @@
this._identifier = becomeParentOf(identifier);
}
- accept(ASTVisitor visitor) => visitor.visitPrefixedIdentifier(this);
+ accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this);
Token get beginToken => _prefix.beginToken;
@@ -9303,7 +9115,7 @@
_prefix = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_prefix, visitor);
safelyVisitChild(_identifier, visitor);
}
@@ -9320,8 +9132,6 @@
* propertyAccess ::=
* [Expression] '.' [SimpleIdentifier]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class PropertyAccess extends Expression {
/**
@@ -9351,7 +9161,7 @@
this._propertyName = becomeParentOf(propertyName);
}
- accept(ASTVisitor visitor) => visitor.visitPropertyAccess(this);
+ accept(AstVisitor visitor) => visitor.visitPropertyAccess(this);
Token get beginToken {
if (_target != null) {
@@ -9382,7 +9192,7 @@
*/
Expression get realTarget {
if (isCascaded) {
- ASTNode ancestor = parent;
+ AstNode ancestor = parent;
while (ancestor is! CascadeExpression) {
if (ancestor == null) {
return _target;
@@ -9433,7 +9243,7 @@
_target = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_target, visitor);
safelyVisitChild(_propertyName, visitor);
}
@@ -9447,8 +9257,6 @@
* redirectingConstructorInvocation ::=
* 'this' ('.' identifier)? arguments
* </pre>
- *
- * @coverage dart.engine.ast
*/
class RedirectingConstructorInvocation extends ConstructorInitializer {
/**
@@ -9493,7 +9301,7 @@
this._argumentList = becomeParentOf(argumentList);
}
- accept(ASTVisitor visitor) => visitor.visitRedirectingConstructorInvocation(this);
+ accept(AstVisitor visitor) => visitor.visitRedirectingConstructorInvocation(this);
/**
* Return the list of arguments to the constructor.
@@ -9532,7 +9340,7 @@
_constructorName = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_constructorName, visitor);
safelyVisitChild(_argumentList, visitor);
}
@@ -9545,8 +9353,6 @@
* rethrowExpression ::=
* 'rethrow'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class RethrowExpression extends Expression {
/**
@@ -9561,7 +9367,7 @@
*/
RethrowExpression(this.keyword);
- accept(ASTVisitor visitor) => visitor.visitRethrowExpression(this);
+ accept(AstVisitor visitor) => visitor.visitRethrowExpression(this);
Token get beginToken => keyword;
@@ -9569,7 +9375,7 @@
int get precedence => 0;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -9580,8 +9386,6 @@
* returnStatement ::=
* 'return' [Expression]? ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ReturnStatement extends Statement {
/**
@@ -9611,7 +9415,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitReturnStatement(this);
+ accept(AstVisitor visitor) => visitor.visitReturnStatement(this);
Token get beginToken => keyword;
@@ -9634,7 +9438,7 @@
this._expression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
}
@@ -9647,10 +9451,8 @@
* scriptTag ::=
* '#!' (~NEWLINE)* NEWLINE
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class ScriptTag extends ASTNode {
+class ScriptTag extends AstNode {
/**
* The token representing this script tag.
*/
@@ -9663,13 +9465,13 @@
*/
ScriptTag(this.scriptTag);
- accept(ASTVisitor visitor) => visitor.visitScriptTag(this);
+ accept(AstVisitor visitor) => visitor.visitScriptTag(this);
Token get beginToken => scriptTag;
Token get endToken => scriptTag;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -9681,8 +9483,6 @@
* showCombinator ::=
* 'show' [SimpleIdentifier] (',' [SimpleIdentifier])*
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ShowCombinator extends Combinator {
/**
@@ -9701,7 +9501,7 @@
this._shownNames.addAll(shownNames);
}
- accept(ASTVisitor visitor) => visitor.visitShowCombinator(this);
+ accept(AstVisitor visitor) => visitor.visitShowCombinator(this);
Token get endToken => _shownNames.endToken;
@@ -9712,7 +9512,7 @@
*/
NodeList<SimpleIdentifier> get shownNames => _shownNames;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_shownNames.accept(visitor);
}
}
@@ -9724,8 +9524,6 @@
* simpleFormalParameter ::=
* ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SimpleFormalParameter extends NormalFormalParameter {
/**
@@ -9753,7 +9551,7 @@
this._type = becomeParentOf(type);
}
- accept(ASTVisitor visitor) => visitor.visitSimpleFormalParameter(this);
+ accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this);
Token get beginToken {
if (keyword != null) {
@@ -9787,7 +9585,7 @@
_type = becomeParentOf(typeName);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_type, visitor);
safelyVisitChild(identifier, visitor);
@@ -9805,8 +9603,6 @@
*
* internalCharacter ::= '_' | '$' | letter | digit
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SimpleIdentifier extends Identifier {
/**
@@ -9841,7 +9637,7 @@
*/
SimpleIdentifier(this.token);
- accept(ASTVisitor visitor) => visitor.visitSimpleIdentifier(this);
+ accept(AstVisitor visitor) => visitor.visitSimpleIdentifier(this);
Token get beginToken => token;
@@ -9868,7 +9664,7 @@
* @return `true` if this identifier is the name being declared in a declaration
*/
bool inDeclarationContext() {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
if (parent is CatchClause) {
CatchClause clause = parent;
return identical(this, clause.exceptionParameter) || identical(this, clause.stackTraceParameter);
@@ -9908,8 +9704,8 @@
* @return `true` if this expression is in a context where a getter will be invoked
*/
bool inGetterContext() {
- ASTNode parent = this.parent;
- ASTNode target = this;
+ AstNode parent = this.parent;
+ AstNode target = this;
// skip prefix
if (parent is PrefixedIdentifier) {
PrefixedIdentifier prefixed = parent as PrefixedIdentifier;
@@ -9950,8 +9746,8 @@
* @return `true` if this expression is in a context where a setter will be invoked
*/
bool inSetterContext() {
- ASTNode parent = this.parent;
- ASTNode target = this;
+ AstNode parent = this.parent;
+ AstNode target = this;
// skip prefix
if (parent is PrefixedIdentifier) {
PrefixedIdentifier prefixed = parent as PrefixedIdentifier;
@@ -9989,7 +9785,7 @@
* @param element the element to be associated with this identifier
*/
void set propagatedElement(Element element) {
- _propagatedElement = validateElement2(element);
+ _propagatedElement = validateElement(element);
}
/**
@@ -9999,21 +9795,23 @@
* @param element the element to be associated with this identifier
*/
void set staticElement(Element element) {
- _staticElement = validateElement2(element);
+ _staticElement = validateElement(element);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
/**
- * Return the given element if it is an appropriate element based on the parent of this
- * identifier, or `null` if it is not appropriate.
+ * Return the given element if it is valid, or report the problem and return `null` if it is
+ * not appropriate.
*
+ * @param parent the parent of the element, used for reporting when there is a problem
+ * @param isValid `true` if the element is appropriate
* @param element the element to be associated with this identifier
* @return the element to be associated with this identifier
*/
- Element validateElement(ASTNode parent, Type expectedClass, Element element) {
- if (!isInstanceOf(element, expectedClass)) {
+ Element returnOrReportElement(AstNode parent, bool isValid, Element element) {
+ if (!isValid) {
AnalysisEngine.instance.logger.logInformation3("Internal error: attempting to set the name of a ${parent.runtimeType.toString()} to a ${element.runtimeType.toString()}", new JavaException());
return null;
}
@@ -10027,29 +9825,29 @@
* @param element the element to be associated with this identifier
* @return the element to be associated with this identifier
*/
- Element validateElement2(Element element) {
+ Element validateElement(Element element) {
if (element == null) {
return null;
}
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
if (parent is ClassDeclaration && identical(parent.name, this)) {
- return validateElement(parent, ClassElement, element);
+ return returnOrReportElement(parent, element is ClassElement, element);
} else if (parent is ClassTypeAlias && identical(parent.name, this)) {
- return validateElement(parent, ClassElement, element);
+ return returnOrReportElement(parent, element is ClassElement, element);
} else if (parent is DeclaredIdentifier && identical(parent.identifier, this)) {
- return validateElement(parent, LocalVariableElement, element);
+ return returnOrReportElement(parent, element is LocalVariableElement, element);
} else if (parent is FormalParameter && identical(parent.identifier, this)) {
- return validateElement(parent, ParameterElement, element);
+ return returnOrReportElement(parent, element is ParameterElement, element);
} else if (parent is FunctionDeclaration && identical(parent.name, this)) {
- return validateElement(parent, ExecutableElement, element);
+ return returnOrReportElement(parent, element is ExecutableElement, element);
} else if (parent is FunctionTypeAlias && identical(parent.name, this)) {
- return validateElement(parent, FunctionTypeAliasElement, element);
+ return returnOrReportElement(parent, element is FunctionTypeAliasElement, element);
} else if (parent is MethodDeclaration && identical(parent.name, this)) {
- return validateElement(parent, ExecutableElement, element);
+ return returnOrReportElement(parent, element is ExecutableElement, element);
} else if (parent is TypeParameter && identical(parent.name, this)) {
- return validateElement(parent, TypeParameterElement, element);
+ return returnOrReportElement(parent, element is TypeParameterElement, element);
} else if (parent is VariableDeclaration && identical(parent.name, this)) {
- return validateElement(parent, VariableElement, element);
+ return returnOrReportElement(parent, element is VariableElement, element);
}
return element;
}
@@ -10079,8 +9877,6 @@
* "'" characters "'"
* '"' characters '"'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SimpleStringLiteral extends StringLiteral {
/**
@@ -10094,6 +9890,11 @@
String _value;
/**
+ * The toolkit specific element associated with this literal, or `null`.
+ */
+ Element _toolkitElement;
+
+ /**
* Initialize a newly created simple string literal.
*
* @param literal the token representing the literal
@@ -10103,13 +9904,20 @@
this._value = StringUtilities.intern(value);
}
- accept(ASTVisitor visitor) => visitor.visitSimpleStringLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitSimpleStringLiteral(this);
Token get beginToken => literal;
Token get endToken => literal;
/**
+ * Return the toolkit specific, non-Dart, element associated with this literal, or `null`.
+ *
+ * @return the element associated with this literal
+ */
+ Element get toolkitElement => _toolkitElement;
+
+ /**
* Return the value of the literal.
*
* @return the value of the literal
@@ -10157,6 +9965,15 @@
bool get isSynthetic => literal.isSynthetic;
/**
+ * Set the toolkit specific, non-Dart, element associated with this literal.
+ *
+ * @param element the toolkit specific element to be associated with this literal
+ */
+ void set toolkitElement(Element element) {
+ _toolkitElement = element;
+ }
+
+ /**
* Set the value of the literal to the given string.
*
* @param string the value of the literal
@@ -10165,7 +9982,7 @@
_value = StringUtilities.intern(_value);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
void appendStringValue(JavaStringBuilder builder) {
@@ -10194,10 +10011,8 @@
* | [ExpressionStatement]
* | [FunctionDeclarationStatement]
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class Statement extends ASTNode {
+abstract class Statement extends AstNode {
}
/**
@@ -10208,8 +10023,6 @@
* ''' [InterpolationElement]* '''
* | '"' [InterpolationElement]* '"'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class StringInterpolation extends StringLiteral {
/**
@@ -10227,7 +10040,7 @@
this._elements.addAll(elements);
}
- accept(ASTVisitor visitor) => visitor.visitStringInterpolation(this);
+ accept(AstVisitor visitor) => visitor.visitStringInterpolation(this);
Token get beginToken => _elements.beginToken;
@@ -10240,7 +10053,7 @@
Token get endToken => _elements.endToken;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_elements.accept(visitor);
}
@@ -10258,8 +10071,6 @@
* | [AdjacentStrings]
* | [StringInterpolation]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class StringLiteral extends Literal {
/**
@@ -10296,8 +10107,6 @@
* superInvocation ::=
* 'super' ('.' [SimpleIdentifier])? [ArgumentList]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SuperConstructorInvocation extends ConstructorInitializer {
/**
@@ -10342,7 +10151,7 @@
this._argumentList = becomeParentOf(argumentList);
}
- accept(ASTVisitor visitor) => visitor.visitSuperConstructorInvocation(this);
+ accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this);
/**
* Return the list of arguments to the constructor.
@@ -10381,7 +10190,7 @@
_constructorName = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_constructorName, visitor);
safelyVisitChild(_argumentList, visitor);
}
@@ -10394,8 +10203,6 @@
* superExpression ::=
* 'super'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SuperExpression extends Expression {
/**
@@ -10410,7 +10217,7 @@
*/
SuperExpression(this.keyword);
- accept(ASTVisitor visitor) => visitor.visitSuperExpression(this);
+ accept(AstVisitor visitor) => visitor.visitSuperExpression(this);
Token get beginToken => keyword;
@@ -10418,7 +10225,7 @@
int get precedence => 16;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -10429,8 +10236,6 @@
* switchCase ::=
* [SimpleIdentifier]* 'case' [Expression] ':' [Statement]*
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SwitchCase extends SwitchMember {
/**
@@ -10451,7 +10256,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitSwitchCase(this);
+ accept(AstVisitor visitor) => visitor.visitSwitchCase(this);
/**
* Return the expression controlling whether the statements will be executed.
@@ -10469,7 +10274,7 @@
this._expression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
labels.accept(visitor);
safelyVisitChild(_expression, visitor);
statements.accept(visitor);
@@ -10483,8 +10288,6 @@
* switchDefault ::=
* [SimpleIdentifier]* 'default' ':' [Statement]*
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SwitchDefault extends SwitchMember {
/**
@@ -10497,9 +10300,9 @@
*/
SwitchDefault(List<Label> labels, Token keyword, Token colon, List<Statement> statements) : super(labels, keyword, colon, statements);
- accept(ASTVisitor visitor) => visitor.visitSwitchDefault(this);
+ accept(AstVisitor visitor) => visitor.visitSwitchDefault(this);
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
labels.accept(visitor);
statements.accept(visitor);
}
@@ -10514,10 +10317,8 @@
* switchCase
* | switchDefault
* </pre>
- *
- * @coverage dart.engine.ast
*/
-abstract class SwitchMember extends ASTNode {
+abstract class SwitchMember extends AstNode {
/**
* The labels associated with the switch member.
*/
@@ -10589,8 +10390,6 @@
* switchStatement ::=
* 'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SwitchStatement extends Statement {
/**
@@ -10645,7 +10444,7 @@
this._members.addAll(members);
}
- accept(ASTVisitor visitor) => visitor.visitSwitchStatement(this);
+ accept(AstVisitor visitor) => visitor.visitSwitchStatement(this);
Token get beginToken => keyword;
@@ -10675,7 +10474,7 @@
this._expression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
_members.accept(visitor);
}
@@ -10688,8 +10487,6 @@
* symbolLiteral ::=
* '#' (operator | (identifier ('.' identifier)*))
* </pre>
- *
- * @coverage dart.engine.ast
*/
class SymbolLiteral extends Literal {
/**
@@ -10710,13 +10507,13 @@
*/
SymbolLiteral(this.poundSign, this.components);
- accept(ASTVisitor visitor) => visitor.visitSymbolLiteral(this);
+ accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this);
Token get beginToken => poundSign;
Token get endToken => components[components.length - 1];
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -10727,8 +10524,6 @@
* thisExpression ::=
* 'this'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ThisExpression extends Expression {
/**
@@ -10743,7 +10538,7 @@
*/
ThisExpression(this.keyword);
- accept(ASTVisitor visitor) => visitor.visitThisExpression(this);
+ accept(AstVisitor visitor) => visitor.visitThisExpression(this);
Token get beginToken => keyword;
@@ -10751,7 +10546,7 @@
int get precedence => 16;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -10762,8 +10557,6 @@
* throwExpression ::=
* 'throw' [Expression]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class ThrowExpression extends Expression {
/**
@@ -10786,7 +10579,7 @@
this._expression = becomeParentOf(expression);
}
- accept(ASTVisitor visitor) => visitor.visitThrowExpression(this);
+ accept(AstVisitor visitor) => visitor.visitThrowExpression(this);
Token get beginToken => keyword;
@@ -10815,7 +10608,7 @@
this._expression = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
}
@@ -10829,8 +10622,6 @@
* ('final' | 'const') type? staticFinalDeclarationList ';'
* | variableDeclaration ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class TopLevelVariableDeclaration extends CompilationUnitMember {
/**
@@ -10855,7 +10646,7 @@
this._variableList = becomeParentOf(variableList);
}
- accept(ASTVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this);
+ accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this);
Element get element => null;
@@ -10877,7 +10668,7 @@
variableList = becomeParentOf(variableList);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_variableList, visitor);
}
@@ -10895,8 +10686,6 @@
* finallyClause ::=
* 'finally' [Block]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class TryStatement extends Statement {
/**
@@ -10942,7 +10731,7 @@
this._finallyBlock = becomeParentOf(finallyBlock);
}
- accept(ASTVisitor visitor) => visitor.visitTryStatement(this);
+ accept(AstVisitor visitor) => visitor.visitTryStatement(this);
Token get beginToken => tryKeyword;
@@ -10997,7 +10786,7 @@
_finallyBlock = becomeParentOf(block);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_body, visitor);
_catchClauses.accept(visitor);
safelyVisitChild(_finallyBlock, visitor);
@@ -11015,8 +10804,6 @@
* classTypeAlias
* | functionTypeAlias
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class TypeAlias extends CompilationUnitMember {
/**
@@ -11051,10 +10838,8 @@
* typeArguments ::=
* '<' typeName (',' typeName)* '>'
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class TypeArgumentList extends ASTNode {
+class TypeArgumentList extends AstNode {
/**
* The left bracket.
*/
@@ -11082,7 +10867,7 @@
this._arguments.addAll(arguments);
}
- accept(ASTVisitor visitor) => visitor.visitTypeArgumentList(this);
+ accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this);
/**
* Return the type arguments associated with the type.
@@ -11095,7 +10880,7 @@
Token get endToken => rightBracket;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_arguments.accept(visitor);
}
}
@@ -11108,10 +10893,8 @@
* typeName ::=
* [Identifier] typeArguments?
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class TypeName extends ASTNode {
+class TypeName extends AstNode {
/**
* The name of the type.
*/
@@ -11139,7 +10922,7 @@
this._typeArguments = becomeParentOf(typeArguments);
}
- accept(ASTVisitor visitor) => visitor.visitTypeName(this);
+ accept(AstVisitor visitor) => visitor.visitTypeName(this);
Token get beginToken => _name.beginToken;
@@ -11185,7 +10968,7 @@
this._typeArguments = becomeParentOf(typeArguments);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_name, visitor);
safelyVisitChild(_typeArguments, visitor);
}
@@ -11198,8 +10981,6 @@
* typeParameter ::=
* [SimpleIdentifier] ('extends' [TypeName])?
* </pre>
- *
- * @coverage dart.engine.ast
*/
class TypeParameter extends Declaration {
/**
@@ -11233,7 +11014,7 @@
this._bound = becomeParentOf(bound);
}
- accept(ASTVisitor visitor) => visitor.visitTypeParameter(this);
+ accept(AstVisitor visitor) => visitor.visitTypeParameter(this);
/**
* Return the name of the upper bound for legal arguments, or `null` if there was no
@@ -11277,7 +11058,7 @@
_name = becomeParentOf(identifier);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_name, visitor);
safelyVisitChild(_bound, visitor);
@@ -11293,10 +11074,8 @@
* typeParameterList ::=
* '<' [TypeParameter] (',' [TypeParameter])* '>'
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class TypeParameterList extends ASTNode {
+class TypeParameterList extends AstNode {
/**
* The left angle bracket.
*/
@@ -11324,7 +11103,7 @@
this._typeParameters.addAll(typeParameters);
}
- accept(ASTVisitor visitor) => visitor.visitTypeParameterList(this);
+ accept(AstVisitor visitor) => visitor.visitTypeParameterList(this);
Token get beginToken => leftBracket;
@@ -11337,7 +11116,7 @@
*/
NodeList<TypeParameter> get typeParameters => _typeParameters;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_typeParameters.accept(visitor);
}
}
@@ -11351,8 +11130,6 @@
* [ListLiteral]
* | [MapLiteral]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class TypedLiteral extends Literal {
/**
@@ -11377,7 +11154,7 @@
this.typeArguments = becomeParentOf(typeArguments);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(typeArguments, visitor);
}
}
@@ -11392,8 +11169,6 @@
* | [ImportDirective]
* | [PartDirective]
* </pre>
- *
- * @coverage dart.engine.ast
*/
abstract class UriBasedDirective extends Directive {
/**
@@ -11437,7 +11212,7 @@
this._uri = becomeParentOf(uri);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_uri, visitor);
}
@@ -11452,8 +11227,6 @@
* variableDeclaration ::=
* [SimpleIdentifier] ('=' [Expression])?
* </pre>
- *
- * @coverage dart.engine.ast
*/
class VariableDeclaration extends Declaration {
/**
@@ -11487,7 +11260,7 @@
this._initializer = becomeParentOf(initializer);
}
- accept(ASTVisitor visitor) => visitor.visitVariableDeclaration(this);
+ accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this);
/**
* This overridden implementation of getDocumentationComment() looks in the grandparent node for
@@ -11497,7 +11270,7 @@
Comment comment = super.documentationComment;
if (comment == null) {
if (parent != null && parent.parent != null) {
- ASTNode node = parent.parent;
+ AstNode node = parent.parent;
if (node is AnnotatedNode) {
return node.documentationComment;
}
@@ -11536,7 +11309,7 @@
* @return `true` if this variable was declared with the 'const' modifier
*/
bool get isConst {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
return parent is VariableDeclarationList && parent.isConst;
}
@@ -11548,7 +11321,7 @@
* @return `true` if this variable was declared with the 'final' modifier
*/
bool get isFinal {
- ASTNode parent = this.parent;
+ AstNode parent = this.parent;
return parent is VariableDeclarationList && parent.isFinal;
}
@@ -11570,7 +11343,7 @@
this._name = becomeParentOf(name);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_name, visitor);
safelyVisitChild(_initializer, visitor);
@@ -11593,8 +11366,6 @@
* | 'var'
* | [TypeName]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class VariableDeclarationList extends AnnotatedNode {
/**
@@ -11628,7 +11399,7 @@
this._variables.addAll(variables);
}
- accept(ASTVisitor visitor) => visitor.visitVariableDeclarationList(this);
+ accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this);
Token get endToken => _variables.endToken;
@@ -11671,7 +11442,7 @@
_type = becomeParentOf(typeName);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_type, visitor);
_variables.accept(visitor);
}
@@ -11694,8 +11465,6 @@
* variableDeclarationStatement ::=
* [VariableDeclarationList] ';'
* </pre>
- *
- * @coverage dart.engine.ast
*/
class VariableDeclarationStatement extends Statement {
/**
@@ -11718,7 +11487,7 @@
this._variableList = becomeParentOf(variableList);
}
- accept(ASTVisitor visitor) => visitor.visitVariableDeclarationStatement(this);
+ accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this);
Token get beginToken => _variableList.beginToken;
@@ -11740,7 +11509,7 @@
this._variableList = becomeParentOf(variableList);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_variableList, visitor);
}
}
@@ -11752,8 +11521,6 @@
* whileStatement ::=
* 'while' '(' [Expression] ')' [Statement]
* </pre>
- *
- * @coverage dart.engine.ast
*/
class WhileStatement extends Statement {
/**
@@ -11795,7 +11562,7 @@
this._body = becomeParentOf(body);
}
- accept(ASTVisitor visitor) => visitor.visitWhileStatement(this);
+ accept(AstVisitor visitor) => visitor.visitWhileStatement(this);
Token get beginToken => keyword;
@@ -11834,7 +11601,7 @@
_condition = becomeParentOf(expression);
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
safelyVisitChild(_condition, visitor);
safelyVisitChild(_body, visitor);
}
@@ -11847,10 +11614,8 @@
* withClause ::=
* 'with' [TypeName] (',' [TypeName])*
* </pre>
- *
- * @coverage dart.engine.ast
*/
-class WithClause extends ASTNode {
+class WithClause extends AstNode {
/**
* The token representing the 'with' keyword.
*/
@@ -11873,7 +11638,7 @@
this._mixinTypes.addAll(mixinTypes);
}
- accept(ASTVisitor visitor) => visitor.visitWithClause(this);
+ accept(AstVisitor visitor) => visitor.visitWithClause(this);
Token get beginToken => _withKeyword;
@@ -11902,16 +11667,16 @@
this._withKeyword = withKeyword;
}
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
_mixinTypes.accept(visitor);
}
}
/**
* Instances of the class `BreadthFirstVisitor` implement an AST visitor that will recursively
- * visit all of the nodes in an AST structure, similar to [GeneralizingASTVisitor]. This
+ * visit all of the nodes in an AST structure, similar to [GeneralizingAstVisitor]. This
* visitor uses a breadth-first ordering rather than the depth-first ordering of
- * [GeneralizingASTVisitor].
+ * [GeneralizingAstVisitor].
*
* Subclasses that override a visit method must either invoke the overridden visit method or
* explicitly invoke the more general visit method. Failure to do so will cause the visit methods
@@ -11921,51 +11686,49 @@
* In addition, subclasses should <b>not</b> explicitly visit the children of a node, but should
* ensure that the method [visitNode] is used to visit the children (either directly
* or indirectly). Failure to do will break the order in which nodes are visited.
- *
- * @coverage dart.engine.ast
*/
-class BreadthFirstVisitor<R> extends GeneralizingASTVisitor<R> {
+class BreadthFirstVisitor<R> extends GeneralizingAstVisitor<R> {
/**
* A queue holding the nodes that have not yet been visited in the order in which they ought to be
* visited.
*/
- Queue<ASTNode> _queue = new Queue<ASTNode>();
+ Queue<AstNode> _queue = new Queue<AstNode>();
/**
* A visitor, used to visit the children of the current node, that will add the nodes it visits to
* the [queue].
*/
- GeneralizingASTVisitor<Object> _childVisitor;
+ GeneralizingAstVisitor<Object> _childVisitor;
/**
* Visit all nodes in the tree starting at the given `root` node, in breadth-first order.
*
* @param root the root of the AST structure to be visited
*/
- void visitAllNodes(ASTNode root) {
+ void visitAllNodes(AstNode root) {
_queue.add(root);
while (!_queue.isEmpty) {
- ASTNode next = _queue.removeFirst();
+ AstNode next = _queue.removeFirst();
next.accept(this);
}
}
- R visitNode(ASTNode node) {
+ R visitNode(AstNode node) {
node.visitChildren(_childVisitor);
return null;
}
BreadthFirstVisitor() {
- this._childVisitor = new GeneralizingASTVisitor_BreadthFirstVisitor(this);
+ this._childVisitor = new GeneralizingAstVisitor_BreadthFirstVisitor(this);
}
}
-class GeneralizingASTVisitor_BreadthFirstVisitor extends GeneralizingASTVisitor<Object> {
+class GeneralizingAstVisitor_BreadthFirstVisitor extends GeneralizingAstVisitor<Object> {
final BreadthFirstVisitor BreadthFirstVisitor_this;
- GeneralizingASTVisitor_BreadthFirstVisitor(this.BreadthFirstVisitor_this) : super();
+ GeneralizingAstVisitor_BreadthFirstVisitor(this.BreadthFirstVisitor_this) : super();
- Object visitNode(ASTNode node) {
+ Object visitNode(AstNode node) {
BreadthFirstVisitor_this._queue.add(node);
return null;
}
@@ -11975,7 +11738,6 @@
* Instances of the class `ConstantEvaluator` evaluate constant expressions to produce their
* compile-time value. According to the Dart Language Specification: <blockquote> A constant
* expression is one of the following:
- *
* * A literal number.
* * A literal boolean.
* * A literal string where any interpolated expression is a compile-time constant that evaluates
@@ -12001,7 +11763,6 @@
* `e1 * e2`, `e1 / e2`, `e1 ~/ e2`, `e1 > e2`, `e1 < e2`,
* `e1 >= e2`, `e1 <= e2` or `e1 % e2`, where `e`, `e1` and `e2`
* are constant expressions that evaluate to a numeric value or to `null`.
- *
* </blockquote> The values returned by instances of this class are therefore `null` and
* instances of the classes `Boolean`, `BigInteger`, `Double`, `String`, and
* `DartObject`.
@@ -12009,10 +11770,8 @@
* In addition, this class defines several values that can be returned to indicate various
* conditions encountered during evaluation. These are documented with the static field that define
* those values.
- *
- * @coverage dart.engine.ast
*/
-class ConstantEvaluator extends GeneralizingASTVisitor<Object> {
+class ConstantEvaluator extends GeneralizingAstVisitor<Object> {
/**
* The value returned for expressions (or non-expression nodes) that are not compile-time constant
* expressions.
@@ -12176,6 +11935,7 @@
} else if (leftOperand is double && rightOperand is double) {
return leftOperand ~/ rightOperand;
}
+ } else {
}
break;
}
@@ -12226,7 +11986,7 @@
Object visitMethodInvocation(MethodInvocation node) => visitNode(node);
- Object visitNode(ASTNode node) => NOT_A_CONSTANT;
+ Object visitNode(AstNode node) => NOT_A_CONSTANT;
Object visitNullLiteral(NullLiteral node) => null;
@@ -12258,6 +12018,7 @@
} else if (operand is double) {
return -operand;
}
+ } else {
}
break;
}
@@ -12313,30 +12074,28 @@
/**
* Instances of the class `ElementLocator` locate the [Element]
- * associated with a given [ASTNode].
- *
- * @coverage dart.engine.ast
+ * associated with a given [AstNode].
*/
class ElementLocator {
/**
- * Locate the [Element] associated with the given [ASTNode].
+ * Locate the [Element] associated with the given [AstNode].
*
* @param node the node (not `null`)
* @return the associated element, or `null` if none is found
*/
- static Element locate(ASTNode node) {
+ static Element locate(AstNode node) {
ElementLocator_ElementMapper mapper = new ElementLocator_ElementMapper();
return node.accept(mapper);
}
/**
- * Locate the [Element] associated with the given [ASTNode] and offset.
+ * Locate the [Element] associated with the given [AstNode] and offset.
*
* @param node the node (not `null`)
* @param offset the offset relative to source
* @return the associated element, or `null` if none is found
*/
- static Element locate2(ASTNode node, int offset) {
+ static Element locate2(AstNode node, int offset) {
// try to get Element from node
{
Element nodeElement = locate(node);
@@ -12359,7 +12118,7 @@
/**
* Visitor that maps nodes to elements.
*/
-class ElementLocator_ElementMapper extends GeneralizingASTVisitor<Element> {
+class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> {
Element visitAssignmentExpression(AssignmentExpression node) => node.bestElement;
Element visitBinaryExpression(BinaryExpression node) => node.bestElement;
@@ -12373,10 +12132,10 @@
Element visitFunctionDeclaration(FunctionDeclaration node) => node.element;
Element visitIdentifier(Identifier node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
// Type name in InstanceCreationExpression
{
- ASTNode typeNameCandidate = parent;
+ AstNode typeNameCandidate = parent;
// new prefix.node[.constructorName]()
if (typeNameCandidate is PrefixedIdentifier) {
PrefixedIdentifier prefixedIdentifier = typeNameCandidate as PrefixedIdentifier;
@@ -12409,7 +12168,7 @@
}
}
if (parent is LibraryIdentifier) {
- ASTNode grandParent = parent.parent;
+ AstNode grandParent = parent.parent;
if (grandParent is PartOfDirective) {
Element element = grandParent.element;
if (element is LibraryElement) {
@@ -12443,7 +12202,7 @@
Element visitPrefixExpression(PrefixExpression node) => node.bestElement;
Element visitStringLiteral(StringLiteral node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is UriBasedDirective) {
return parent.uriElement;
}
@@ -12454,9 +12213,9 @@
}
/**
- * Instances of the class `GeneralizingASTVisitor` implement an AST visitor that will
+ * Instances of the class `GeneralizingAstVisitor` implement an AST visitor that will
* recursively visit all of the nodes in an AST structure (like instances of the class
- * [RecursiveASTVisitor]). In addition, when a node of a specific type is visited not only
+ * [RecursiveAstVisitor]). In addition, when a node of a specific type is visited not only
* will the visit method for that specific type of node be invoked, but additional methods for the
* superclasses of that node will also be invoked. For example, using an instance of this class to
* visit a [Block] will cause the method [visitBlock] to be invoked but will
@@ -12468,10 +12227,8 @@
* explicitly invoke the more general visit method. Failure to do so will cause the visit methods
* for superclasses of the node to not be invoked and will cause the children of the visited node to
* not be visited.
- *
- * @coverage dart.engine.ast
*/
-class GeneralizingASTVisitor<R> implements ASTVisitor<R> {
+class GeneralizingAstVisitor<R> implements AstVisitor<R> {
R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node);
R visitAnnotatedNode(AnnotatedNode node) => visitNode(node);
@@ -12634,7 +12391,7 @@
R visitNativeFunctionBody(NativeFunctionBody node) => visitFunctionBody(node);
- R visitNode(ASTNode node) {
+ R visitNode(AstNode node) {
node.visitChildren(this);
return null;
}
@@ -12727,14 +12484,12 @@
}
/**
- * Instances of the class `NodeLocator` locate the [ASTNode] associated with a
+ * Instances of the class `NodeLocator` locate the [AstNode] associated with a
* source range, given the AST structure built from the source. More specifically, they will return
- * the [ASTNode] with the shortest length whose source range completely encompasses
+ * the [AstNode] with the shortest length whose source range completely encompasses
* the specified range.
- *
- * @coverage dart.engine.ast
*/
-class NodeLocator extends UnifyingASTVisitor<Object> {
+class NodeLocator extends UnifyingAstVisitor<Object> {
/**
* The start offset of the range used to identify the node.
*/
@@ -12749,10 +12504,10 @@
* The element that was found that corresponds to the given source range, or `null` if there
* is no such element.
*/
- ASTNode _foundNode;
+ AstNode _foundNode;
/**
- * Initialize a newly created locator to locate one or more [ASTNode] by locating
+ * Initialize a newly created locator to locate one or more [AstNode] by locating
* the node within an AST structure that corresponds to the given offset in the source.
*
* @param offset the offset used to identify the node
@@ -12760,7 +12515,7 @@
NodeLocator.con1(int offset) : this.con2(offset, offset);
/**
- * Initialize a newly created locator to locate one or more [ASTNode] by locating
+ * Initialize a newly created locator to locate one or more [AstNode] by locating
* the node within an AST structure that corresponds to the given range of characters in the
* source.
*
@@ -12778,7 +12533,7 @@
*
* @return the node that was found
*/
- ASTNode get foundNode => _foundNode;
+ AstNode get foundNode => _foundNode;
/**
* Search within the given AST node for an identifier representing a [DartElement] in the specified source range. Return the element that was found, or `null` if
@@ -12787,7 +12542,7 @@
* @param node the AST node within which to search
* @return the element that was found
*/
- ASTNode searchWithin(ASTNode node) {
+ AstNode searchWithin(AstNode node) {
if (node == null) {
return null;
}
@@ -12801,7 +12556,7 @@
return _foundNode;
}
- Object visitNode(ASTNode node) {
+ Object visitNode(AstNode node) {
int start = node.offset;
int end = start + node.length;
if (end < _startOffset) {
@@ -12835,17 +12590,15 @@
}
/**
- * Instances of the class `RecursiveASTVisitor` implement an AST visitor that will recursively
+ * Instances of the class `RecursiveAstVisitor` implement an AST visitor that will recursively
* visit all of the nodes in an AST structure. For example, using an instance of this class to visit
* a [Block] will also cause all of the statements in the block to be visited.
*
* Subclasses that override a visit method must either invoke the overridden visit method or must
* explicitly ask the visited node to visit its children. Failure to do so will cause the children
* of the visited node to not be visited.
- *
- * @coverage dart.engine.ast
*/
-class RecursiveASTVisitor<R> implements ASTVisitor<R> {
+class RecursiveAstVisitor<R> implements AstVisitor<R> {
R visitAdjacentStrings(AdjacentStrings node) {
node.visitChildren(this);
return null;
@@ -13363,14 +13116,12 @@
}
/**
- * Instances of the class `SimpleASTVisitor` implement an AST visitor that will do nothing
+ * Instances of the class `SimpleAstVisitor` implement an AST visitor that will do nothing
* when visiting an AST node. It is intended to be a superclass for classes that use the visitor
* pattern primarily as a dispatch mechanism (and hence don't need to recursively visit a whole
* structure) and that only need to visit a small number of node types.
- *
- * @coverage dart.engine.ast
*/
-class SimpleASTVisitor<R> implements ASTVisitor<R> {
+class SimpleAstVisitor<R> implements AstVisitor<R> {
R visitAdjacentStrings(AdjacentStrings node) => null;
R visitAnnotation(Annotation node) => null;
@@ -13581,10 +13332,8 @@
/**
* Instances of the class `ToSourceVisitor` write a source representation of a visited AST
* node (and all of it's children) to a writer.
- *
- * @coverage dart.engine.ast
*/
-class ToSourceVisitor implements ASTVisitor<Object> {
+class ToSourceVisitor implements AstVisitor<Object> {
/**
* The writer to which the source is to be written.
*/
@@ -13601,72 +13350,72 @@
}
Object visitAdjacentStrings(AdjacentStrings node) {
- visitList2(node.strings, " ");
+ visitNodeListWithSeparator(node.strings, " ");
return null;
}
Object visitAnnotation(Annotation node) {
_writer.print('@');
- visit(node.name);
- visit3(".", node.constructorName);
- visit(node.arguments);
+ visitNode(node.name);
+ visitNodeWithPrefix(".", node.constructorName);
+ visitNode(node.arguments);
return null;
}
Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
_writer.print('?');
- visit(node.identifier);
+ visitNode(node.identifier);
return null;
}
Object visitArgumentList(ArgumentList node) {
_writer.print('(');
- visitList2(node.arguments, ", ");
+ visitNodeListWithSeparator(node.arguments, ", ");
_writer.print(')');
return null;
}
Object visitAsExpression(AsExpression node) {
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(" as ");
- visit(node.type);
+ visitNode(node.type);
return null;
}
Object visitAssertStatement(AssertStatement node) {
_writer.print("assert (");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(");");
return null;
}
Object visitAssignmentExpression(AssignmentExpression node) {
- visit(node.leftHandSide);
+ visitNode(node.leftHandSide);
_writer.print(' ');
_writer.print(node.operator.lexeme);
_writer.print(' ');
- visit(node.rightHandSide);
+ visitNode(node.rightHandSide);
return null;
}
Object visitBinaryExpression(BinaryExpression node) {
- visit(node.leftOperand);
+ visitNode(node.leftOperand);
_writer.print(' ');
_writer.print(node.operator.lexeme);
_writer.print(' ');
- visit(node.rightOperand);
+ visitNode(node.rightOperand);
return null;
}
Object visitBlock(Block node) {
_writer.print('{');
- visitList2(node.statements, " ");
+ visitNodeListWithSeparator(node.statements, " ");
_writer.print('}');
return null;
}
Object visitBlockFunctionBody(BlockFunctionBody node) {
- visit(node.block);
+ visitNode(node.block);
return null;
}
@@ -13677,44 +13426,44 @@
Object visitBreakStatement(BreakStatement node) {
_writer.print("break");
- visit3(" ", node.label);
+ visitNodeWithPrefix(" ", node.label);
_writer.print(";");
return null;
}
Object visitCascadeExpression(CascadeExpression node) {
- visit(node.target);
- visitList(node.cascadeSections);
+ visitNode(node.target);
+ visitNodeList(node.cascadeSections);
return null;
}
Object visitCatchClause(CatchClause node) {
- visit3("on ", node.exceptionType);
+ visitNodeWithPrefix("on ", node.exceptionType);
if (node.catchKeyword != null) {
if (node.exceptionType != null) {
_writer.print(' ');
}
_writer.print("catch (");
- visit(node.exceptionParameter);
- visit3(", ", node.stackTraceParameter);
+ visitNode(node.exceptionParameter);
+ visitNodeWithPrefix(", ", node.stackTraceParameter);
_writer.print(") ");
} else {
_writer.print(" ");
}
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitClassDeclaration(ClassDeclaration node) {
- visit5(node.abstractKeyword, " ");
+ visitTokenWithSuffix(node.abstractKeyword, " ");
_writer.print("class ");
- visit(node.name);
- visit(node.typeParameters);
- visit3(" ", node.extendsClause);
- visit3(" ", node.withClause);
- visit3(" ", node.implementsClause);
+ visitNode(node.name);
+ visitNode(node.typeParameters);
+ visitNodeWithPrefix(" ", node.extendsClause);
+ visitNodeWithPrefix(" ", node.withClause);
+ visitNodeWithPrefix(" ", node.implementsClause);
_writer.print(" {");
- visitList2(node.members, " ");
+ visitNodeListWithSeparator(node.members, " ");
_writer.print("}");
return null;
}
@@ -13724,12 +13473,12 @@
_writer.print("abstract ");
}
_writer.print("class ");
- visit(node.name);
- visit(node.typeParameters);
+ visitNode(node.name);
+ visitNode(node.typeParameters);
_writer.print(" = ");
- visit(node.superclass);
- visit3(" ", node.withClause);
- visit3(" ", node.implementsClause);
+ visitNode(node.superclass);
+ visitNodeWithPrefix(" ", node.withClause);
+ visitNodeWithPrefix(" ", node.implementsClause);
_writer.print(";");
return null;
}
@@ -13741,79 +13490,79 @@
Object visitCompilationUnit(CompilationUnit node) {
ScriptTag scriptTag = node.scriptTag;
NodeList<Directive> directives = node.directives;
- visit(scriptTag);
+ visitNode(scriptTag);
String prefix = scriptTag == null ? "" : " ";
- visitList4(prefix, directives, " ");
+ visitNodeListWithSeparatorAndPrefix(prefix, directives, " ");
prefix = scriptTag == null && directives.isEmpty ? "" : " ";
- visitList4(prefix, node.declarations, " ");
+ visitNodeListWithSeparatorAndPrefix(prefix, node.declarations, " ");
return null;
}
Object visitConditionalExpression(ConditionalExpression node) {
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(" ? ");
- visit(node.thenExpression);
+ visitNode(node.thenExpression);
_writer.print(" : ");
- visit(node.elseExpression);
+ visitNode(node.elseExpression);
return null;
}
Object visitConstructorDeclaration(ConstructorDeclaration node) {
- visit5(node.externalKeyword, " ");
- visit5(node.constKeyword, " ");
- visit5(node.factoryKeyword, " ");
- visit(node.returnType);
- visit3(".", node.name);
- visit(node.parameters);
- visitList4(" : ", node.initializers, ", ");
- visit3(" = ", node.redirectedConstructor);
- visit4(" ", node.body);
+ visitTokenWithSuffix(node.externalKeyword, " ");
+ visitTokenWithSuffix(node.constKeyword, " ");
+ visitTokenWithSuffix(node.factoryKeyword, " ");
+ visitNode(node.returnType);
+ visitNodeWithPrefix(".", node.name);
+ visitNode(node.parameters);
+ visitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", ");
+ visitNodeWithPrefix(" = ", node.redirectedConstructor);
+ visitFunctionWithPrefix(" ", node.body);
return null;
}
Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
- visit5(node.keyword, ".");
- visit(node.fieldName);
+ visitTokenWithSuffix(node.keyword, ".");
+ visitNode(node.fieldName);
_writer.print(" = ");
- visit(node.expression);
+ visitNode(node.expression);
return null;
}
Object visitConstructorName(ConstructorName node) {
- visit(node.type);
- visit3(".", node.name);
+ visitNode(node.type);
+ visitNodeWithPrefix(".", node.name);
return null;
}
Object visitContinueStatement(ContinueStatement node) {
_writer.print("continue");
- visit3(" ", node.label);
+ visitNodeWithPrefix(" ", node.label);
_writer.print(";");
return null;
}
Object visitDeclaredIdentifier(DeclaredIdentifier node) {
- visit5(node.keyword, " ");
- visit2(node.type, " ");
- visit(node.identifier);
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
+ visitNode(node.identifier);
return null;
}
Object visitDefaultFormalParameter(DefaultFormalParameter node) {
- visit(node.parameter);
+ visitNode(node.parameter);
if (node.separator != null) {
_writer.print(" ");
_writer.print(node.separator.lexeme);
- visit3(" ", node.defaultValue);
+ visitNodeWithPrefix(" ", node.defaultValue);
}
return null;
}
Object visitDoStatement(DoStatement node) {
_writer.print("do ");
- visit(node.body);
+ visitNode(node.body);
_writer.print(" while (");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(");");
return null;
}
@@ -13835,15 +13584,15 @@
Object visitExportDirective(ExportDirective node) {
_writer.print("export ");
- visit(node.uri);
- visitList4(" ", node.combinators, " ");
+ visitNode(node.uri);
+ visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
_writer.print(';');
return null;
}
Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
_writer.print("=> ");
- visit(node.expression);
+ visitNode(node.expression);
if (node.semicolon != null) {
_writer.print(';');
}
@@ -13851,30 +13600,30 @@
}
Object visitExpressionStatement(ExpressionStatement node) {
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(';');
return null;
}
Object visitExtendsClause(ExtendsClause node) {
_writer.print("extends ");
- visit(node.superclass);
+ visitNode(node.superclass);
return null;
}
Object visitFieldDeclaration(FieldDeclaration node) {
- visit5(node.staticKeyword, " ");
- visit(node.fields);
+ visitTokenWithSuffix(node.staticKeyword, " ");
+ visitNode(node.fields);
_writer.print(";");
return null;
}
Object visitFieldFormalParameter(FieldFormalParameter node) {
- visit5(node.keyword, " ");
- visit2(node.type, " ");
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
_writer.print("this.");
- visit(node.identifier);
- visit(node.parameters);
+ visitNode(node.identifier);
+ visitNode(node.parameters);
return null;
}
@@ -13882,14 +13631,14 @@
DeclaredIdentifier loopVariable = node.loopVariable;
_writer.print("for (");
if (loopVariable == null) {
- visit(node.identifier);
+ visitNode(node.identifier);
} else {
- visit(loopVariable);
+ visitNode(loopVariable);
}
_writer.print(" in ");
- visit(node.iterator);
+ visitNode(node.iterator);
_writer.print(") ");
- visit(node.body);
+ visitNode(node.body);
return null;
}
@@ -13925,89 +13674,89 @@
Expression initialization = node.initialization;
_writer.print("for (");
if (initialization != null) {
- visit(initialization);
+ visitNode(initialization);
} else {
- visit(node.variables);
+ visitNode(node.variables);
}
_writer.print(";");
- visit3(" ", node.condition);
+ visitNodeWithPrefix(" ", node.condition);
_writer.print(";");
- visitList4(" ", node.updaters, ", ");
+ visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", ");
_writer.print(") ");
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitFunctionDeclaration(FunctionDeclaration node) {
- visit2(node.returnType, " ");
- visit5(node.propertyKeyword, " ");
- visit(node.name);
- visit(node.functionExpression);
+ visitNodeWithSuffix(node.returnType, " ");
+ visitTokenWithSuffix(node.propertyKeyword, " ");
+ visitNode(node.name);
+ visitNode(node.functionExpression);
return null;
}
Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
- visit(node.functionDeclaration);
+ visitNode(node.functionDeclaration);
_writer.print(';');
return null;
}
Object visitFunctionExpression(FunctionExpression node) {
- visit(node.parameters);
+ visitNode(node.parameters);
_writer.print(' ');
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
- visit(node.function);
- visit(node.argumentList);
+ visitNode(node.function);
+ visitNode(node.argumentList);
return null;
}
Object visitFunctionTypeAlias(FunctionTypeAlias node) {
_writer.print("typedef ");
- visit2(node.returnType, " ");
- visit(node.name);
- visit(node.typeParameters);
- visit(node.parameters);
+ visitNodeWithSuffix(node.returnType, " ");
+ visitNode(node.name);
+ visitNode(node.typeParameters);
+ visitNode(node.parameters);
_writer.print(";");
return null;
}
Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
- visit2(node.returnType, " ");
- visit(node.identifier);
- visit(node.parameters);
+ visitNodeWithSuffix(node.returnType, " ");
+ visitNode(node.identifier);
+ visitNode(node.parameters);
return null;
}
Object visitHideCombinator(HideCombinator node) {
_writer.print("hide ");
- visitList2(node.hiddenNames, ", ");
+ visitNodeListWithSeparator(node.hiddenNames, ", ");
return null;
}
Object visitIfStatement(IfStatement node) {
_writer.print("if (");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(") ");
- visit(node.thenStatement);
- visit3(" else ", node.elseStatement);
+ visitNode(node.thenStatement);
+ visitNodeWithPrefix(" else ", node.elseStatement);
return null;
}
Object visitImplementsClause(ImplementsClause node) {
_writer.print("implements ");
- visitList2(node.interfaces, ", ");
+ visitNodeListWithSeparator(node.interfaces, ", ");
return null;
}
Object visitImportDirective(ImportDirective node) {
_writer.print("import ");
- visit(node.uri);
- visit3(" as ", node.prefix);
- visitList4(" ", node.combinators, " ");
+ visitNode(node.uri);
+ visitNodeWithPrefix(" as ", node.prefix);
+ visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
_writer.print(';');
return null;
}
@@ -14016,18 +13765,18 @@
if (node.isCascaded) {
_writer.print("..");
} else {
- visit(node.target);
+ visitNode(node.target);
}
_writer.print('[');
- visit(node.index);
+ visitNode(node.index);
_writer.print(']');
return null;
}
Object visitInstanceCreationExpression(InstanceCreationExpression node) {
- visit5(node.keyword, " ");
- visit(node.constructorName);
- visit(node.argumentList);
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNode(node.constructorName);
+ visitNode(node.argumentList);
return null;
}
@@ -14039,11 +13788,11 @@
Object visitInterpolationExpression(InterpolationExpression node) {
if (node.rightBracket != null) {
_writer.print("\${");
- visit(node.expression);
+ visitNode(node.expression);
_writer.print("}");
} else {
_writer.print("\$");
- visit(node.expression);
+ visitNode(node.expression);
}
return null;
}
@@ -14054,31 +13803,31 @@
}
Object visitIsExpression(IsExpression node) {
- visit(node.expression);
+ visitNode(node.expression);
if (node.notOperator == null) {
_writer.print(" is ");
} else {
_writer.print(" is! ");
}
- visit(node.type);
+ visitNode(node.type);
return null;
}
Object visitLabel(Label node) {
- visit(node.label);
+ visitNode(node.label);
_writer.print(":");
return null;
}
Object visitLabeledStatement(LabeledStatement node) {
- visitList3(node.labels, " ", " ");
- visit(node.statement);
+ visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
+ visitNode(node.statement);
return null;
}
Object visitLibraryDirective(LibraryDirective node) {
_writer.print("library ");
- visit(node.name);
+ visitNode(node.name);
_writer.print(';');
return null;
}
@@ -14093,9 +13842,9 @@
_writer.print(node.constKeyword.lexeme);
_writer.print(' ');
}
- visit2(node.typeArguments, " ");
+ visitNodeWithSuffix(node.typeArguments, " ");
_writer.print("[");
- visitList2(node.elements, ", ");
+ visitNodeListWithSeparator(node.elements, ", ");
_writer.print("]");
return null;
}
@@ -14105,31 +13854,31 @@
_writer.print(node.constKeyword.lexeme);
_writer.print(' ');
}
- visit2(node.typeArguments, " ");
+ visitNodeWithSuffix(node.typeArguments, " ");
_writer.print("{");
- visitList2(node.entries, ", ");
+ visitNodeListWithSeparator(node.entries, ", ");
_writer.print("}");
return null;
}
Object visitMapLiteralEntry(MapLiteralEntry node) {
- visit(node.key);
+ visitNode(node.key);
_writer.print(" : ");
- visit(node.value);
+ visitNode(node.value);
return null;
}
Object visitMethodDeclaration(MethodDeclaration node) {
- visit5(node.externalKeyword, " ");
- visit5(node.modifierKeyword, " ");
- visit2(node.returnType, " ");
- visit5(node.propertyKeyword, " ");
- visit5(node.operatorKeyword, " ");
- visit(node.name);
+ visitTokenWithSuffix(node.externalKeyword, " ");
+ visitTokenWithSuffix(node.modifierKeyword, " ");
+ visitNodeWithSuffix(node.returnType, " ");
+ visitTokenWithSuffix(node.propertyKeyword, " ");
+ visitTokenWithSuffix(node.operatorKeyword, " ");
+ visitNode(node.name);
if (!node.isGetter) {
- visit(node.parameters);
+ visitNode(node.parameters);
}
- visit4(" ", node.body);
+ visitFunctionWithPrefix(" ", node.body);
return null;
}
@@ -14137,28 +13886,28 @@
if (node.isCascaded) {
_writer.print("..");
} else {
- visit2(node.target, ".");
+ visitNodeWithSuffix(node.target, ".");
}
- visit(node.methodName);
- visit(node.argumentList);
+ visitNode(node.methodName);
+ visitNode(node.argumentList);
return null;
}
Object visitNamedExpression(NamedExpression node) {
- visit(node.name);
- visit3(" ", node.expression);
+ visitNode(node.name);
+ visitNodeWithPrefix(" ", node.expression);
return null;
}
Object visitNativeClause(NativeClause node) {
_writer.print("native ");
- visit(node.name);
+ visitNode(node.name);
return null;
}
Object visitNativeFunctionBody(NativeFunctionBody node) {
_writer.print("native ");
- visit(node.stringLiteral);
+ visitNode(node.stringLiteral);
_writer.print(';');
return null;
}
@@ -14170,41 +13919,41 @@
Object visitParenthesizedExpression(ParenthesizedExpression node) {
_writer.print('(');
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(')');
return null;
}
Object visitPartDirective(PartDirective node) {
_writer.print("part ");
- visit(node.uri);
+ visitNode(node.uri);
_writer.print(';');
return null;
}
Object visitPartOfDirective(PartOfDirective node) {
_writer.print("part of ");
- visit(node.libraryName);
+ visitNode(node.libraryName);
_writer.print(';');
return null;
}
Object visitPostfixExpression(PostfixExpression node) {
- visit(node.operand);
+ visitNode(node.operand);
_writer.print(node.operator.lexeme);
return null;
}
Object visitPrefixedIdentifier(PrefixedIdentifier node) {
- visit(node.prefix);
+ visitNode(node.prefix);
_writer.print('.');
- visit(node.identifier);
+ visitNode(node.identifier);
return null;
}
Object visitPrefixExpression(PrefixExpression node) {
_writer.print(node.operator.lexeme);
- visit(node.operand);
+ visitNode(node.operand);
return null;
}
@@ -14212,17 +13961,17 @@
if (node.isCascaded) {
_writer.print("..");
} else {
- visit(node.target);
+ visitNode(node.target);
_writer.print('.');
}
- visit(node.propertyName);
+ visitNode(node.propertyName);
return null;
}
Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
_writer.print("this");
- visit3(".", node.constructorName);
- visit(node.argumentList);
+ visitNodeWithPrefix(".", node.constructorName);
+ visitNode(node.argumentList);
return null;
}
@@ -14250,14 +13999,14 @@
Object visitShowCombinator(ShowCombinator node) {
_writer.print("show ");
- visitList2(node.shownNames, ", ");
+ visitNodeListWithSeparator(node.shownNames, ", ");
return null;
}
Object visitSimpleFormalParameter(SimpleFormalParameter node) {
- visit5(node.keyword, " ");
- visit2(node.type, " ");
- visit(node.identifier);
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
+ visitNode(node.identifier);
return null;
}
@@ -14272,14 +14021,14 @@
}
Object visitStringInterpolation(StringInterpolation node) {
- visitList(node.elements);
+ visitNodeList(node.elements);
return null;
}
Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
_writer.print("super");
- visit3(".", node.constructorName);
- visit(node.argumentList);
+ visitNodeWithPrefix(".", node.constructorName);
+ visitNode(node.argumentList);
return null;
}
@@ -14289,26 +14038,26 @@
}
Object visitSwitchCase(SwitchCase node) {
- visitList3(node.labels, " ", " ");
+ visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
_writer.print("case ");
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(": ");
- visitList2(node.statements, " ");
+ visitNodeListWithSeparator(node.statements, " ");
return null;
}
Object visitSwitchDefault(SwitchDefault node) {
- visitList3(node.labels, " ", " ");
+ visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
_writer.print("default: ");
- visitList2(node.statements, " ");
+ visitNodeListWithSeparator(node.statements, " ");
return null;
}
Object visitSwitchStatement(SwitchStatement node) {
_writer.print("switch (");
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(") {");
- visitList2(node.members, " ");
+ visitNodeListWithSeparator(node.members, " ");
_writer.print("}");
return null;
}
@@ -14332,142 +14081,103 @@
Object visitThrowExpression(ThrowExpression node) {
_writer.print("throw ");
- visit(node.expression);
+ visitNode(node.expression);
return null;
}
Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
- visit2(node.variables, ";");
+ visitNodeWithSuffix(node.variables, ";");
return null;
}
Object visitTryStatement(TryStatement node) {
_writer.print("try ");
- visit(node.body);
- visitList4(" ", node.catchClauses, " ");
- visit3(" finally ", node.finallyBlock);
+ visitNode(node.body);
+ visitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " ");
+ visitNodeWithPrefix(" finally ", node.finallyBlock);
return null;
}
Object visitTypeArgumentList(TypeArgumentList node) {
_writer.print('<');
- visitList2(node.arguments, ", ");
+ visitNodeListWithSeparator(node.arguments, ", ");
_writer.print('>');
return null;
}
Object visitTypeName(TypeName node) {
- visit(node.name);
- visit(node.typeArguments);
+ visitNode(node.name);
+ visitNode(node.typeArguments);
return null;
}
Object visitTypeParameter(TypeParameter node) {
- visit(node.name);
- visit3(" extends ", node.bound);
+ visitNode(node.name);
+ visitNodeWithPrefix(" extends ", node.bound);
return null;
}
Object visitTypeParameterList(TypeParameterList node) {
_writer.print('<');
- visitList2(node.typeParameters, ", ");
+ visitNodeListWithSeparator(node.typeParameters, ", ");
_writer.print('>');
return null;
}
Object visitVariableDeclaration(VariableDeclaration node) {
- visit(node.name);
- visit3(" = ", node.initializer);
+ visitNode(node.name);
+ visitNodeWithPrefix(" = ", node.initializer);
return null;
}
Object visitVariableDeclarationList(VariableDeclarationList node) {
- visit5(node.keyword, " ");
- visit2(node.type, " ");
- visitList2(node.variables, ", ");
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
+ visitNodeListWithSeparator(node.variables, ", ");
return null;
}
Object visitVariableDeclarationStatement(VariableDeclarationStatement node) {
- visit(node.variables);
+ visitNode(node.variables);
_writer.print(";");
return null;
}
Object visitWhileStatement(WhileStatement node) {
_writer.print("while (");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(") ");
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitWithClause(WithClause node) {
_writer.print("with ");
- visitList2(node.mixinTypes, ", ");
+ visitNodeListWithSeparator(node.mixinTypes, ", ");
return null;
}
/**
- * Safely visit the given node.
- *
- * @param node the node to be visited
- */
- void visit(ASTNode node) {
- if (node != null) {
- node.accept(this);
- }
- }
-
- /**
- * Safely visit the given node, printing the suffix after the node if it is non-`null`.
- *
- * @param suffix the suffix to be printed if there is a node to visit
- * @param node the node to be visited
- */
- void visit2(ASTNode node, String suffix) {
- if (node != null) {
- node.accept(this);
- _writer.print(suffix);
- }
- }
-
- /**
- * Safely visit the given node, printing the prefix before the node if it is non-`null`.
- *
- * @param prefix the prefix to be printed if there is a node to visit
- * @param node the node to be visited
- */
- void visit3(String prefix, ASTNode node) {
- if (node != null) {
- _writer.print(prefix);
- node.accept(this);
- }
- }
-
- /**
* Visit the given function body, printing the prefix before if given body is not empty.
*
* @param prefix the prefix to be printed if there is a node to visit
* @param body the function body to be visited
*/
- void visit4(String prefix, FunctionBody body) {
+ void visitFunctionWithPrefix(String prefix, FunctionBody body) {
if (body is! EmptyFunctionBody) {
_writer.print(prefix);
}
- visit(body);
+ visitNode(body);
}
/**
- * Safely visit the given node, printing the suffix after the node if it is non-`null`.
+ * Safely visit the given node.
*
- * @param suffix the suffix to be printed if there is a node to visit
* @param node the node to be visited
*/
- void visit5(Token token, String suffix) {
- if (token != null) {
- _writer.print(token.lexeme);
- _writer.print(suffix);
+ void visitNode(AstNode node) {
+ if (node != null) {
+ node.accept(this);
}
}
@@ -14477,8 +14187,8 @@
* @param nodes the nodes to be printed
* @param separator the separator to be printed between adjacent nodes
*/
- void visitList(NodeList<ASTNode> nodes) {
- visitList2(nodes, "");
+ void visitNodeList(NodeList<AstNode> nodes) {
+ visitNodeListWithSeparator(nodes, "");
}
/**
@@ -14487,7 +14197,7 @@
* @param nodes the nodes to be printed
* @param separator the separator to be printed between adjacent nodes
*/
- void visitList2(NodeList<ASTNode> nodes, String separator) {
+ void visitNodeListWithSeparator(NodeList<AstNode> nodes, String separator) {
if (nodes != null) {
int size = nodes.length;
for (int i = 0; i < size; i++) {
@@ -14502,11 +14212,33 @@
/**
* Print a list of nodes, separated by the given separator.
*
+ * @param prefix the prefix to be printed if the list is not empty
+ * @param nodes the nodes to be printed
+ * @param separator the separator to be printed between adjacent nodes
+ */
+ void visitNodeListWithSeparatorAndPrefix(String prefix, NodeList<AstNode> nodes, String separator) {
+ if (nodes != null) {
+ int size = nodes.length;
+ if (size > 0) {
+ _writer.print(prefix);
+ for (int i = 0; i < size; i++) {
+ if (i > 0) {
+ _writer.print(separator);
+ }
+ nodes[i].accept(this);
+ }
+ }
+ }
+ }
+
+ /**
+ * Print a list of nodes, separated by the given separator.
+ *
* @param nodes the nodes to be printed
* @param separator the separator to be printed between adjacent nodes
* @param suffix the suffix to be printed if the list is not empty
*/
- void visitList3(NodeList<ASTNode> nodes, String separator, String suffix) {
+ void visitNodeListWithSeparatorAndSuffix(NodeList<AstNode> nodes, String separator, String suffix) {
if (nodes != null) {
int size = nodes.length;
if (size > 0) {
@@ -14522,41 +14254,56 @@
}
/**
- * Print a list of nodes, separated by the given separator.
+ * Safely visit the given node, printing the prefix before the node if it is non-`null`.
*
- * @param prefix the prefix to be printed if the list is not empty
- * @param nodes the nodes to be printed
- * @param separator the separator to be printed between adjacent nodes
+ * @param prefix the prefix to be printed if there is a node to visit
+ * @param node the node to be visited
*/
- void visitList4(String prefix, NodeList<ASTNode> nodes, String separator) {
- if (nodes != null) {
- int size = nodes.length;
- if (size > 0) {
- _writer.print(prefix);
- for (int i = 0; i < size; i++) {
- if (i > 0) {
- _writer.print(separator);
- }
- nodes[i].accept(this);
- }
- }
+ void visitNodeWithPrefix(String prefix, AstNode node) {
+ if (node != null) {
+ _writer.print(prefix);
+ node.accept(this);
+ }
+ }
+
+ /**
+ * Safely visit the given node, printing the suffix after the node if it is non-`null`.
+ *
+ * @param suffix the suffix to be printed if there is a node to visit
+ * @param node the node to be visited
+ */
+ void visitNodeWithSuffix(AstNode node, String suffix) {
+ if (node != null) {
+ node.accept(this);
+ _writer.print(suffix);
+ }
+ }
+
+ /**
+ * Safely visit the given node, printing the suffix after the node if it is non-`null`.
+ *
+ * @param suffix the suffix to be printed if there is a node to visit
+ * @param node the node to be visited
+ */
+ void visitTokenWithSuffix(Token token, String suffix) {
+ if (token != null) {
+ _writer.print(token.lexeme);
+ _writer.print(suffix);
}
}
}
/**
- * Instances of the class `UnifyingASTVisitor` implement an AST visitor that will recursively
+ * Instances of the class `UnifyingAstVisitor` implement an AST visitor that will recursively
* visit all of the nodes in an AST structure (like instances of the class
- * [RecursiveASTVisitor]). In addition, every node will also be visited by using a single
+ * [RecursiveAstVisitor]). In addition, every node will also be visited by using a single
* unified [visitNode] method.
*
* Subclasses that override a visit method must either invoke the overridden visit method or
* explicitly invoke the more general [visitNode] method. Failure to do so will
* cause the children of the visited node to not be visited.
- *
- * @coverage dart.engine.ast
*/
-class UnifyingASTVisitor<R> implements ASTVisitor<R> {
+class UnifyingAstVisitor<R> implements AstVisitor<R> {
R visitAdjacentStrings(AdjacentStrings node) => visitNode(node);
R visitAnnotation(Annotation node) => visitNode(node);
@@ -14691,7 +14438,7 @@
R visitNativeFunctionBody(NativeFunctionBody node) => visitNode(node);
- R visitNode(ASTNode node) {
+ R visitNode(AstNode node) {
node.visitChildren(this);
return null;
}
@@ -14770,79 +14517,79 @@
}
/**
- * Instances of the class `ASTCloner` implement an object that will clone any AST structure
+ * Instances of the class `AstCloner` implement an object that will clone any AST structure
* that it visits. The cloner will only clone the structure, it will not preserve any resolution
* results or properties associated with the nodes.
*/
-class ASTCloner implements ASTVisitor<ASTNode> {
- AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStrings(clone3(node.strings));
+class AstCloner implements AstVisitor<AstNode> {
+ AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStrings(cloneNodeList(node.strings));
- Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, clone2(node.name), node.period, clone2(node.constructorName), clone2(node.arguments));
+ Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, cloneNode(node.name), node.period, cloneNode(node.constructorName), cloneNode(node.arguments));
- ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node) => new ArgumentDefinitionTest(node.question, clone2(node.identifier));
+ ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node) => new ArgumentDefinitionTest(node.question, cloneNode(node.identifier));
- ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.leftParenthesis, clone3(node.arguments), node.rightParenthesis);
+ ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.leftParenthesis, cloneNodeList(node.arguments), node.rightParenthesis);
- AsExpression visitAsExpression(AsExpression node) => new AsExpression(clone2(node.expression), node.asOperator, clone2(node.type));
+ AsExpression visitAsExpression(AsExpression node) => new AsExpression(cloneNode(node.expression), node.asOperator, cloneNode(node.type));
- ASTNode visitAssertStatement(AssertStatement node) => new AssertStatement(node.keyword, node.leftParenthesis, clone2(node.condition), node.rightParenthesis, node.semicolon);
+ AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(node.keyword, node.leftParenthesis, cloneNode(node.condition), node.rightParenthesis, node.semicolon);
- AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => new AssignmentExpression(clone2(node.leftHandSide), node.operator, clone2(node.rightHandSide));
+ AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => new AssignmentExpression(cloneNode(node.leftHandSide), node.operator, cloneNode(node.rightHandSide));
- BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExpression(clone2(node.leftOperand), node.operator, clone2(node.rightOperand));
+ BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExpression(cloneNode(node.leftOperand), node.operator, cloneNode(node.rightOperand));
- Block visitBlock(Block node) => new Block(node.leftBracket, clone3(node.statements), node.rightBracket);
+ Block visitBlock(Block node) => new Block(node.leftBracket, cloneNodeList(node.statements), node.rightBracket);
- BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockFunctionBody(clone2(node.block));
+ BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockFunctionBody(cloneNode(node.block));
BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => new BooleanLiteral(node.literal, node.value);
- BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(node.keyword, clone2(node.label), node.semicolon);
+ BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(node.keyword, cloneNode(node.label), node.semicolon);
- CascadeExpression visitCascadeExpression(CascadeExpression node) => new CascadeExpression(clone2(node.target), clone3(node.cascadeSections));
+ CascadeExpression visitCascadeExpression(CascadeExpression node) => new CascadeExpression(cloneNode(node.target), cloneNodeList(node.cascadeSections));
- CatchClause visitCatchClause(CatchClause node) => new CatchClause(node.onKeyword, clone2(node.exceptionType), node.catchKeyword, node.leftParenthesis, clone2(node.exceptionParameter), node.comma, clone2(node.stackTraceParameter), node.rightParenthesis, clone2(node.body));
+ CatchClause visitCatchClause(CatchClause node) => new CatchClause(node.onKeyword, cloneNode(node.exceptionType), node.catchKeyword, node.leftParenthesis, cloneNode(node.exceptionParameter), node.comma, cloneNode(node.stackTraceParameter), node.rightParenthesis, cloneNode(node.body));
ClassDeclaration visitClassDeclaration(ClassDeclaration node) {
- ClassDeclaration copy = new ClassDeclaration(clone2(node.documentationComment), clone3(node.metadata), node.abstractKeyword, node.classKeyword, clone2(node.name), clone2(node.typeParameters), clone2(node.extendsClause), clone2(node.withClause), clone2(node.implementsClause), node.leftBracket, clone3(node.members), node.rightBracket);
- copy.nativeClause = clone2(node.nativeClause);
+ ClassDeclaration copy = new ClassDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.abstractKeyword, node.classKeyword, cloneNode(node.name), cloneNode(node.typeParameters), cloneNode(node.extendsClause), cloneNode(node.withClause), cloneNode(node.implementsClause), node.leftBracket, cloneNodeList(node.members), node.rightBracket);
+ copy.nativeClause = cloneNode(node.nativeClause);
return copy;
}
- ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.name), clone2(node.typeParameters), node.equals, node.abstractKeyword, clone2(node.superclass), clone2(node.withClause), clone2(node.implementsClause), node.semicolon);
+ ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword, cloneNode(node.name), cloneNode(node.typeParameters), node.equals, node.abstractKeyword, cloneNode(node.superclass), cloneNode(node.withClause), cloneNode(node.implementsClause), node.semicolon);
Comment visitComment(Comment node) {
if (node.isDocumentation) {
- return Comment.createDocumentationComment2(node.tokens, clone3(node.references));
+ return Comment.createDocumentationComment2(node.tokens, cloneNodeList(node.references));
} else if (node.isBlock) {
return Comment.createBlockComment(node.tokens);
}
return Comment.createEndOfLineComment(node.tokens);
}
- CommentReference visitCommentReference(CommentReference node) => new CommentReference(node.newKeyword, clone2(node.identifier));
+ CommentReference visitCommentReference(CommentReference node) => new CommentReference(node.newKeyword, cloneNode(node.identifier));
CompilationUnit visitCompilationUnit(CompilationUnit node) {
- CompilationUnit clone = new CompilationUnit(node.beginToken, clone2(node.scriptTag), clone3(node.directives), clone3(node.declarations), node.endToken);
+ CompilationUnit clone = new CompilationUnit(node.beginToken, cloneNode(node.scriptTag), cloneNodeList(node.directives), cloneNodeList(node.declarations), node.endToken);
clone.lineInfo = node.lineInfo;
return clone;
}
- ConditionalExpression visitConditionalExpression(ConditionalExpression node) => new ConditionalExpression(clone2(node.condition), node.question, clone2(node.thenExpression), node.colon, clone2(node.elseExpression));
+ ConditionalExpression visitConditionalExpression(ConditionalExpression node) => new ConditionalExpression(cloneNode(node.condition), node.question, cloneNode(node.thenExpression), node.colon, cloneNode(node.elseExpression));
- ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node) => new ConstructorDeclaration(clone2(node.documentationComment), clone3(node.metadata), node.externalKeyword, node.constKeyword, node.factoryKeyword, clone2(node.returnType), node.period, clone2(node.name), clone2(node.parameters), node.separator, clone3(node.initializers), clone2(node.redirectedConstructor), clone2(node.body));
+ ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node) => new ConstructorDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.externalKeyword, node.constKeyword, node.factoryKeyword, cloneNode(node.returnType), node.period, cloneNode(node.name), cloneNode(node.parameters), node.separator, cloneNodeList(node.initializers), cloneNode(node.redirectedConstructor), cloneNode(node.body));
- ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldInitializer node) => new ConstructorFieldInitializer(node.keyword, node.period, clone2(node.fieldName), node.equals, clone2(node.expression));
+ ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldInitializer node) => new ConstructorFieldInitializer(node.keyword, node.period, cloneNode(node.fieldName), node.equals, cloneNode(node.expression));
- ConstructorName visitConstructorName(ConstructorName node) => new ConstructorName(clone2(node.type), node.period, clone2(node.name));
+ ConstructorName visitConstructorName(ConstructorName node) => new ConstructorName(cloneNode(node.type), node.period, cloneNode(node.name));
- ContinueStatement visitContinueStatement(ContinueStatement node) => new ContinueStatement(node.keyword, clone2(node.label), node.semicolon);
+ ContinueStatement visitContinueStatement(ContinueStatement node) => new ContinueStatement(node.keyword, cloneNode(node.label), node.semicolon);
- DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new DeclaredIdentifier(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.type), clone2(node.identifier));
+ DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new DeclaredIdentifier(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword, cloneNode(node.type), cloneNode(node.identifier));
- DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node) => new DefaultFormalParameter(clone2(node.parameter), node.kind, node.separator, clone2(node.defaultValue));
+ DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node) => new DefaultFormalParameter(cloneNode(node.parameter), node.kind, node.separator, cloneNode(node.defaultValue));
- DoStatement visitDoStatement(DoStatement node) => new DoStatement(node.doKeyword, clone2(node.body), node.whileKeyword, node.leftParenthesis, clone2(node.condition), node.rightParenthesis, node.semicolon);
+ DoStatement visitDoStatement(DoStatement node) => new DoStatement(node.doKeyword, cloneNode(node.body), node.whileKeyword, node.leftParenthesis, cloneNode(node.condition), node.rightParenthesis, node.semicolon);
DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => new DoubleLiteral(node.literal, node.value);
@@ -14850,187 +14597,187 @@
EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(node.semicolon);
- ExportDirective visitExportDirective(ExportDirective node) => new ExportDirective(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.uri), clone3(node.combinators), node.semicolon);
+ ExportDirective visitExportDirective(ExportDirective node) => new ExportDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword, cloneNode(node.uri), cloneNodeList(node.combinators), node.semicolon);
- ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node) => new ExpressionFunctionBody(node.functionDefinition, clone2(node.expression), node.semicolon);
+ ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node) => new ExpressionFunctionBody(node.functionDefinition, cloneNode(node.expression), node.semicolon);
- ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new ExpressionStatement(clone2(node.expression), node.semicolon);
+ ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new ExpressionStatement(cloneNode(node.expression), node.semicolon);
- ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(node.keyword, clone2(node.superclass));
+ ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(node.keyword, cloneNode(node.superclass));
- FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDeclaration(clone2(node.documentationComment), clone3(node.metadata), node.staticKeyword, clone2(node.fields), node.semicolon);
+ FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.staticKeyword, cloneNode(node.fields), node.semicolon);
- FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => new FieldFormalParameter(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.type), node.thisToken, node.period, clone2(node.identifier), clone2(node.parameters));
+ FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => new FieldFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword, cloneNode(node.type), node.thisToken, node.period, cloneNode(node.identifier), cloneNode(node.parameters));
ForEachStatement visitForEachStatement(ForEachStatement node) {
DeclaredIdentifier loopVariable = node.loopVariable;
if (loopVariable == null) {
- return new ForEachStatement.con2(node.forKeyword, node.leftParenthesis, clone2(node.identifier), node.inKeyword, clone2(node.iterator), node.rightParenthesis, clone2(node.body));
+ return new ForEachStatement.con2(node.forKeyword, node.leftParenthesis, cloneNode(node.identifier), node.inKeyword, cloneNode(node.iterator), node.rightParenthesis, cloneNode(node.body));
}
- return new ForEachStatement.con1(node.forKeyword, node.leftParenthesis, clone2(loopVariable), node.inKeyword, clone2(node.iterator), node.rightParenthesis, clone2(node.body));
+ return new ForEachStatement.con1(node.forKeyword, node.leftParenthesis, cloneNode(loopVariable), node.inKeyword, cloneNode(node.iterator), node.rightParenthesis, cloneNode(node.body));
}
- FormalParameterList visitFormalParameterList(FormalParameterList node) => new FormalParameterList(node.leftParenthesis, clone3(node.parameters), node.leftDelimiter, node.rightDelimiter, node.rightParenthesis);
+ FormalParameterList visitFormalParameterList(FormalParameterList node) => new FormalParameterList(node.leftParenthesis, cloneNodeList(node.parameters), node.leftDelimiter, node.rightDelimiter, node.rightParenthesis);
- ForStatement visitForStatement(ForStatement node) => new ForStatement(node.forKeyword, node.leftParenthesis, clone2(node.variables), clone2(node.initialization), node.leftSeparator, clone2(node.condition), node.rightSeparator, clone3(node.updaters), node.rightParenthesis, clone2(node.body));
+ ForStatement visitForStatement(ForStatement node) => new ForStatement(node.forKeyword, node.leftParenthesis, cloneNode(node.variables), cloneNode(node.initialization), node.leftSeparator, cloneNode(node.condition), node.rightSeparator, cloneNodeList(node.updaters), node.rightParenthesis, cloneNode(node.body));
- FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new FunctionDeclaration(clone2(node.documentationComment), clone3(node.metadata), node.externalKeyword, clone2(node.returnType), node.propertyKeyword, clone2(node.name), clone2(node.functionExpression));
+ FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new FunctionDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.externalKeyword, cloneNode(node.returnType), node.propertyKeyword, cloneNode(node.name), cloneNode(node.functionExpression));
- FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => new FunctionDeclarationStatement(clone2(node.functionDeclaration));
+ FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => new FunctionDeclarationStatement(cloneNode(node.functionDeclaration));
- FunctionExpression visitFunctionExpression(FunctionExpression node) => new FunctionExpression(clone2(node.parameters), clone2(node.body));
+ FunctionExpression visitFunctionExpression(FunctionExpression node) => new FunctionExpression(cloneNode(node.parameters), cloneNode(node.body));
- FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => new FunctionExpressionInvocation(clone2(node.function), clone2(node.argumentList));
+ FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => new FunctionExpressionInvocation(cloneNode(node.function), cloneNode(node.argumentList));
- FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new FunctionTypeAlias(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.returnType), clone2(node.name), clone2(node.typeParameters), clone2(node.parameters), node.semicolon);
+ FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new FunctionTypeAlias(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword, cloneNode(node.returnType), cloneNode(node.name), cloneNode(node.typeParameters), cloneNode(node.parameters), node.semicolon);
- FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter(clone2(node.documentationComment), clone3(node.metadata), clone2(node.returnType), clone2(node.identifier), clone2(node.parameters));
+ FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.returnType), cloneNode(node.identifier), cloneNode(node.parameters));
- HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(node.keyword, clone3(node.hiddenNames));
+ HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(node.keyword, cloneNodeList(node.hiddenNames));
- IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeyword, node.leftParenthesis, clone2(node.condition), node.rightParenthesis, clone2(node.thenStatement), node.elseKeyword, clone2(node.elseStatement));
+ IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeyword, node.leftParenthesis, cloneNode(node.condition), node.rightParenthesis, cloneNode(node.thenStatement), node.elseKeyword, cloneNode(node.elseStatement));
- ImplementsClause visitImplementsClause(ImplementsClause node) => new ImplementsClause(node.keyword, clone3(node.interfaces));
+ ImplementsClause visitImplementsClause(ImplementsClause node) => new ImplementsClause(node.keyword, cloneNodeList(node.interfaces));
- ImportDirective visitImportDirective(ImportDirective node) => new ImportDirective(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.uri), node.asToken, clone2(node.prefix), clone3(node.combinators), node.semicolon);
+ ImportDirective visitImportDirective(ImportDirective node) => new ImportDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword, cloneNode(node.uri), node.asToken, cloneNode(node.prefix), cloneNodeList(node.combinators), node.semicolon);
IndexExpression visitIndexExpression(IndexExpression node) {
Token period = node.period;
if (period == null) {
- return new IndexExpression.forTarget(clone2(node.target), node.leftBracket, clone2(node.index), node.rightBracket);
+ return new IndexExpression.forTarget(cloneNode(node.target), node.leftBracket, cloneNode(node.index), node.rightBracket);
} else {
- return new IndexExpression.forCascade(period, node.leftBracket, clone2(node.index), node.rightBracket);
+ return new IndexExpression.forCascade(period, node.leftBracket, cloneNode(node.index), node.rightBracket);
}
}
- InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExpression node) => new InstanceCreationExpression(node.keyword, clone2(node.constructorName), clone2(node.argumentList));
+ InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExpression node) => new InstanceCreationExpression(node.keyword, cloneNode(node.constructorName), cloneNode(node.argumentList));
IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => new IntegerLiteral(node.literal, node.value);
- InterpolationExpression visitInterpolationExpression(InterpolationExpression node) => new InterpolationExpression(node.leftBracket, clone2(node.expression), node.rightBracket);
+ InterpolationExpression visitInterpolationExpression(InterpolationExpression node) => new InterpolationExpression(node.leftBracket, cloneNode(node.expression), node.rightBracket);
InterpolationString visitInterpolationString(InterpolationString node) => new InterpolationString(node.contents, node.value);
- IsExpression visitIsExpression(IsExpression node) => new IsExpression(clone2(node.expression), node.isOperator, node.notOperator, clone2(node.type));
+ IsExpression visitIsExpression(IsExpression node) => new IsExpression(cloneNode(node.expression), node.isOperator, node.notOperator, cloneNode(node.type));
- Label visitLabel(Label node) => new Label(clone2(node.label), node.colon);
+ Label visitLabel(Label node) => new Label(cloneNode(node.label), node.colon);
- LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledStatement(clone3(node.labels), clone2(node.statement));
+ LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledStatement(cloneNodeList(node.labels), cloneNode(node.statement));
- LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDirective(clone2(node.documentationComment), clone3(node.metadata), node.libraryToken, clone2(node.name), node.semicolon);
+ LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.libraryToken, cloneNode(node.name), node.semicolon);
- LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new LibraryIdentifier(clone3(node.components));
+ LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new LibraryIdentifier(cloneNodeList(node.components));
- ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(node.constKeyword, clone2(node.typeArguments), node.leftBracket, clone3(node.elements), node.rightBracket);
+ ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(node.constKeyword, cloneNode(node.typeArguments), node.leftBracket, cloneNodeList(node.elements), node.rightBracket);
- MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(node.constKeyword, clone2(node.typeArguments), node.leftBracket, clone3(node.entries), node.rightBracket);
+ MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(node.constKeyword, cloneNode(node.typeArguments), node.leftBracket, cloneNodeList(node.entries), node.rightBracket);
- MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEntry(clone2(node.key), node.separator, clone2(node.value));
+ MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEntry(cloneNode(node.key), node.separator, cloneNode(node.value));
- MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new MethodDeclaration(clone2(node.documentationComment), clone3(node.metadata), node.externalKeyword, node.modifierKeyword, clone2(node.returnType), node.propertyKeyword, node.operatorKeyword, clone2(node.name), clone2(node.parameters), clone2(node.body));
+ MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new MethodDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.externalKeyword, node.modifierKeyword, cloneNode(node.returnType), node.propertyKeyword, node.operatorKeyword, cloneNode(node.name), cloneNode(node.parameters), cloneNode(node.body));
- MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInvocation(clone2(node.target), node.period, clone2(node.methodName), clone2(node.argumentList));
+ MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInvocation(cloneNode(node.target), node.period, cloneNode(node.methodName), cloneNode(node.argumentList));
- NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpression(clone2(node.name), clone2(node.expression));
+ NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpression(cloneNode(node.name), cloneNode(node.expression));
- ASTNode visitNativeClause(NativeClause node) => new NativeClause(node.keyword, clone2(node.name));
+ AstNode visitNativeClause(NativeClause node) => new NativeClause(node.keyword, cloneNode(node.name));
- NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new NativeFunctionBody(node.nativeToken, clone2(node.stringLiteral), node.semicolon);
+ NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new NativeFunctionBody(node.nativeToken, cloneNode(node.stringLiteral), node.semicolon);
NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral(node.literal);
- ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression node) => new ParenthesizedExpression(node.leftParenthesis, clone2(node.expression), node.rightParenthesis);
+ ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression node) => new ParenthesizedExpression(node.leftParenthesis, cloneNode(node.expression), node.rightParenthesis);
- PartDirective visitPartDirective(PartDirective node) => new PartDirective(clone2(node.documentationComment), clone3(node.metadata), node.partToken, clone2(node.uri), node.semicolon);
+ PartDirective visitPartDirective(PartDirective node) => new PartDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.partToken, cloneNode(node.uri), node.semicolon);
- PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirective(clone2(node.documentationComment), clone3(node.metadata), node.partToken, node.ofToken, clone2(node.libraryName), node.semicolon);
+ PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.partToken, node.ofToken, cloneNode(node.libraryName), node.semicolon);
- PostfixExpression visitPostfixExpression(PostfixExpression node) => new PostfixExpression(clone2(node.operand), node.operator);
+ PostfixExpression visitPostfixExpression(PostfixExpression node) => new PostfixExpression(cloneNode(node.operand), node.operator);
- PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new PrefixedIdentifier(clone2(node.prefix), node.period, clone2(node.identifier));
+ PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new PrefixedIdentifier(cloneNode(node.prefix), node.period, cloneNode(node.identifier));
- PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExpression(node.operator, clone2(node.operand));
+ PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExpression(node.operator, cloneNode(node.operand));
- PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(clone2(node.target), node.operator, clone2(node.propertyName));
+ PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(cloneNode(node.target), node.operator, cloneNode(node.propertyName));
- RedirectingConstructorInvocation visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) => new RedirectingConstructorInvocation(node.keyword, node.period, clone2(node.constructorName), clone2(node.argumentList));
+ RedirectingConstructorInvocation visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) => new RedirectingConstructorInvocation(node.keyword, node.period, cloneNode(node.constructorName), cloneNode(node.argumentList));
RethrowExpression visitRethrowExpression(RethrowExpression node) => new RethrowExpression(node.keyword);
- ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatement(node.keyword, clone2(node.expression), node.semicolon);
+ ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatement(node.keyword, cloneNode(node.expression), node.semicolon);
ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(node.scriptTag);
- ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(node.keyword, clone3(node.shownNames));
+ ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(node.keyword, cloneNodeList(node.shownNames));
- SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) => new SimpleFormalParameter(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.type), clone2(node.identifier));
+ SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) => new SimpleFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), node.keyword, cloneNode(node.type), cloneNode(node.identifier));
SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => new SimpleIdentifier(node.token);
SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => new SimpleStringLiteral(node.literal, node.value);
- StringInterpolation visitStringInterpolation(StringInterpolation node) => new StringInterpolation(clone3(node.elements));
+ StringInterpolation visitStringInterpolation(StringInterpolation node) => new StringInterpolation(cloneNodeList(node.elements));
- SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInvocation node) => new SuperConstructorInvocation(node.keyword, node.period, clone2(node.constructorName), clone2(node.argumentList));
+ SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInvocation node) => new SuperConstructorInvocation(node.keyword, node.period, cloneNode(node.constructorName), cloneNode(node.argumentList));
SuperExpression visitSuperExpression(SuperExpression node) => new SuperExpression(node.keyword);
- SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(clone3(node.labels), node.keyword, clone2(node.expression), node.colon, clone3(node.statements));
+ SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(cloneNodeList(node.labels), node.keyword, cloneNode(node.expression), node.colon, cloneNodeList(node.statements));
- SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(clone3(node.labels), node.keyword, node.colon, clone3(node.statements));
+ SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(cloneNodeList(node.labels), node.keyword, node.colon, cloneNodeList(node.statements));
- SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatement(node.keyword, node.leftParenthesis, clone2(node.expression), node.rightParenthesis, node.leftBracket, clone3(node.members), node.rightBracket);
+ SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatement(node.keyword, node.leftParenthesis, cloneNode(node.expression), node.rightParenthesis, node.leftBracket, cloneNodeList(node.members), node.rightBracket);
- ASTNode visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.poundSign, node.components);
+ AstNode visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.poundSign, node.components);
ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression(node.keyword);
- ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpression(node.keyword, clone2(node.expression));
+ ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpression(node.keyword, cloneNode(node.expression));
- TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration(clone2(node.documentationComment), clone3(node.metadata), clone2(node.variables), node.semicolon);
+ TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.variables), node.semicolon);
- TryStatement visitTryStatement(TryStatement node) => new TryStatement(node.tryKeyword, clone2(node.body), clone3(node.catchClauses), node.finallyKeyword, clone2(node.finallyBlock));
+ TryStatement visitTryStatement(TryStatement node) => new TryStatement(node.tryKeyword, cloneNode(node.body), cloneNodeList(node.catchClauses), node.finallyKeyword, cloneNode(node.finallyBlock));
- TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgumentList(node.leftBracket, clone3(node.arguments), node.rightBracket);
+ TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgumentList(node.leftBracket, cloneNodeList(node.arguments), node.rightBracket);
- TypeName visitTypeName(TypeName node) => new TypeName(clone2(node.name), clone2(node.typeArguments));
+ TypeName visitTypeName(TypeName node) => new TypeName(cloneNode(node.name), cloneNode(node.typeArguments));
- TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(clone2(node.documentationComment), clone3(node.metadata), clone2(node.name), node.keyword, clone2(node.bound));
+ TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.name), node.keyword, cloneNode(node.bound));
- TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypeParameterList(node.leftBracket, clone3(node.typeParameters), node.rightBracket);
+ TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypeParameterList(node.leftBracket, cloneNodeList(node.typeParameters), node.rightBracket);
- VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new VariableDeclaration(null, clone3(node.metadata), clone2(node.name), node.equals, clone2(node.initializer));
+ VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new VariableDeclaration(null, cloneNodeList(node.metadata), cloneNode(node.name), node.equals, cloneNode(node.initializer));
- VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList node) => new VariableDeclarationList(null, clone3(node.metadata), node.keyword, clone2(node.type), clone3(node.variables));
+ VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList node) => new VariableDeclarationList(null, cloneNodeList(node.metadata), node.keyword, cloneNode(node.type), cloneNodeList(node.variables));
- VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclarationStatement node) => new VariableDeclarationStatement(clone2(node.variables), node.semicolon);
+ VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclarationStatement node) => new VariableDeclarationStatement(cloneNode(node.variables), node.semicolon);
- WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(node.keyword, node.leftParenthesis, clone2(node.condition), node.rightParenthesis, clone2(node.body));
+ WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(node.keyword, node.leftParenthesis, cloneNode(node.condition), node.rightParenthesis, cloneNode(node.body));
- WithClause visitWithClause(WithClause node) => new WithClause(node.withKeyword, clone3(node.mixinTypes));
+ WithClause visitWithClause(WithClause node) => new WithClause(node.withKeyword, cloneNodeList(node.mixinTypes));
- ASTNode clone2(ASTNode node) {
+ AstNode cloneNode(AstNode node) {
if (node == null) {
return null;
}
- return node.accept(this) as ASTNode;
+ return node.accept(this) as AstNode;
}
- List clone3(NodeList nodes) {
+ List cloneNodeList(NodeList nodes) {
int count = nodes.length;
List clonedNodes = new List();
for (int i = 0; i < count; i++) {
- clonedNodes.add((nodes[i]).accept(this) as ASTNode);
+ clonedNodes.add((nodes[i]).accept(this) as AstNode);
}
return clonedNodes;
}
}
/**
- * Instances of the class `ASTComparator` compare the structure of two ASTNodes to see whether
+ * Instances of the class `AstComparator` compare the structure of two ASTNodes to see whether
* they are equal.
*/
-class ASTComparator implements ASTVisitor<bool> {
+class AstComparator implements AstVisitor<bool> {
/**
* Return `true` if the two AST nodes are equal.
*
@@ -15039,529 +14786,556 @@
* @return `true` if the two AST nodes are equal
*/
static bool equals4(CompilationUnit first, CompilationUnit second) {
- ASTComparator comparator = new ASTComparator();
- return comparator.isEqual(first, second);
+ AstComparator comparator = new AstComparator();
+ return comparator.isEqualNodes(first, second);
}
/**
* The AST node with which the node being visited is to be compared. This is only valid at the
- * beginning of each visit method (until [isEqual] is invoked).
+ * beginning of each visit method (until [isEqualNodes] is invoked).
*/
- ASTNode _other;
+ AstNode _other;
bool visitAdjacentStrings(AdjacentStrings node) {
AdjacentStrings other = this._other as AdjacentStrings;
- return isEqual5(node.strings, other.strings);
+ return isEqualNodeLists(node.strings, other.strings);
}
bool visitAnnotation(Annotation node) {
Annotation other = this._other as Annotation;
- return isEqual6(node.atSign, other.atSign) && isEqual(node.name, other.name) && isEqual6(node.period, other.period) && isEqual(node.constructorName, other.constructorName) && isEqual(node.arguments, other.arguments);
+ return isEqualTokens(node.atSign, other.atSign) && isEqualNodes(node.name, other.name) && isEqualTokens(node.period, other.period) && isEqualNodes(node.constructorName, other.constructorName) && isEqualNodes(node.arguments, other.arguments);
}
bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
ArgumentDefinitionTest other = this._other as ArgumentDefinitionTest;
- return isEqual6(node.question, other.question) && isEqual(node.identifier, other.identifier);
+ return isEqualTokens(node.question, other.question) && isEqualNodes(node.identifier, other.identifier);
}
bool visitArgumentList(ArgumentList node) {
ArgumentList other = this._other as ArgumentList;
- return isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual5(node.arguments, other.arguments) && isEqual6(node.rightParenthesis, other.rightParenthesis);
+ return isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodeLists(node.arguments, other.arguments) && isEqualTokens(node.rightParenthesis, other.rightParenthesis);
}
bool visitAsExpression(AsExpression node) {
AsExpression other = this._other as AsExpression;
- return isEqual(node.expression, other.expression) && isEqual6(node.asOperator, other.asOperator) && isEqual(node.type, other.type);
+ return isEqualNodes(node.expression, other.expression) && isEqualTokens(node.asOperator, other.asOperator) && isEqualNodes(node.type, other.type);
}
bool visitAssertStatement(AssertStatement node) {
AssertStatement other = this._other as AssertStatement;
- return isEqual6(node.keyword, other.keyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.condition, other.condition) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.condition, other.condition) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitAssignmentExpression(AssignmentExpression node) {
AssignmentExpression other = this._other as AssignmentExpression;
- return isEqual(node.leftHandSide, other.leftHandSide) && isEqual6(node.operator, other.operator) && isEqual(node.rightHandSide, other.rightHandSide);
+ return isEqualNodes(node.leftHandSide, other.leftHandSide) && isEqualTokens(node.operator, other.operator) && isEqualNodes(node.rightHandSide, other.rightHandSide);
}
bool visitBinaryExpression(BinaryExpression node) {
BinaryExpression other = this._other as BinaryExpression;
- return isEqual(node.leftOperand, other.leftOperand) && isEqual6(node.operator, other.operator) && isEqual(node.rightOperand, other.rightOperand);
+ return isEqualNodes(node.leftOperand, other.leftOperand) && isEqualTokens(node.operator, other.operator) && isEqualNodes(node.rightOperand, other.rightOperand);
}
bool visitBlock(Block node) {
Block other = this._other as Block;
- return isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.statements, other.statements) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.statements, other.statements) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitBlockFunctionBody(BlockFunctionBody node) {
BlockFunctionBody other = this._other as BlockFunctionBody;
- return isEqual(node.block, other.block);
+ return isEqualNodes(node.block, other.block);
}
bool visitBooleanLiteral(BooleanLiteral node) {
BooleanLiteral other = this._other as BooleanLiteral;
- return isEqual6(node.literal, other.literal) && identical(node.value, other.value);
+ return isEqualTokens(node.literal, other.literal) && identical(node.value, other.value);
}
bool visitBreakStatement(BreakStatement node) {
BreakStatement other = this._other as BreakStatement;
- return isEqual6(node.keyword, other.keyword) && isEqual(node.label, other.label) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.label, other.label) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitCascadeExpression(CascadeExpression node) {
CascadeExpression other = this._other as CascadeExpression;
- return isEqual(node.target, other.target) && isEqual5(node.cascadeSections, other.cascadeSections);
+ return isEqualNodes(node.target, other.target) && isEqualNodeLists(node.cascadeSections, other.cascadeSections);
}
bool visitCatchClause(CatchClause node) {
CatchClause other = this._other as CatchClause;
- return isEqual6(node.onKeyword, other.onKeyword) && isEqual(node.exceptionType, other.exceptionType) && isEqual6(node.catchKeyword, other.catchKeyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.exceptionParameter, other.exceptionParameter) && isEqual6(node.comma, other.comma) && isEqual(node.stackTraceParameter, other.stackTraceParameter) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.body, other.body);
+ return isEqualTokens(node.onKeyword, other.onKeyword) && isEqualNodes(node.exceptionType, other.exceptionType) && isEqualTokens(node.catchKeyword, other.catchKeyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.exceptionParameter, other.exceptionParameter) && isEqualTokens(node.comma, other.comma) && isEqualNodes(node.stackTraceParameter, other.stackTraceParameter) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualNodes(node.body, other.body);
}
bool visitClassDeclaration(ClassDeclaration node) {
ClassDeclaration other = this._other as ClassDeclaration;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.abstractKeyword, other.abstractKeyword) && isEqual6(node.classKeyword, other.classKeyword) && isEqual(node.name, other.name) && isEqual(node.typeParameters, other.typeParameters) && isEqual(node.extendsClause, other.extendsClause) && isEqual(node.withClause, other.withClause) && isEqual(node.implementsClause, other.implementsClause) && isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.members, other.members) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.abstractKeyword, other.abstractKeyword) && isEqualTokens(node.classKeyword, other.classKeyword) && isEqualNodes(node.name, other.name) && isEqualNodes(node.typeParameters, other.typeParameters) && isEqualNodes(node.extendsClause, other.extendsClause) && isEqualNodes(node.withClause, other.withClause) && isEqualNodes(node.implementsClause, other.implementsClause) && isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.members, other.members) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitClassTypeAlias(ClassTypeAlias node) {
ClassTypeAlias other = this._other as ClassTypeAlias;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.name, other.name) && isEqual(node.typeParameters, other.typeParameters) && isEqual6(node.equals, other.equals) && isEqual6(node.abstractKeyword, other.abstractKeyword) && isEqual(node.superclass, other.superclass) && isEqual(node.withClause, other.withClause) && isEqual(node.implementsClause, other.implementsClause) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.name, other.name) && isEqualNodes(node.typeParameters, other.typeParameters) && isEqualTokens(node.equals, other.equals) && isEqualTokens(node.abstractKeyword, other.abstractKeyword) && isEqualNodes(node.superclass, other.superclass) && isEqualNodes(node.withClause, other.withClause) && isEqualNodes(node.implementsClause, other.implementsClause) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitComment(Comment node) {
Comment other = this._other as Comment;
- return isEqual5(node.references, other.references);
+ return isEqualNodeLists(node.references, other.references);
}
bool visitCommentReference(CommentReference node) {
CommentReference other = this._other as CommentReference;
- return isEqual6(node.newKeyword, other.newKeyword) && isEqual(node.identifier, other.identifier);
+ return isEqualTokens(node.newKeyword, other.newKeyword) && isEqualNodes(node.identifier, other.identifier);
}
bool visitCompilationUnit(CompilationUnit node) {
CompilationUnit other = this._other as CompilationUnit;
- return isEqual6(node.beginToken, other.beginToken) && isEqual(node.scriptTag, other.scriptTag) && isEqual5(node.directives, other.directives) && isEqual5(node.declarations, other.declarations) && isEqual6(node.endToken, other.endToken);
+ return isEqualTokens(node.beginToken, other.beginToken) && isEqualNodes(node.scriptTag, other.scriptTag) && isEqualNodeLists(node.directives, other.directives) && isEqualNodeLists(node.declarations, other.declarations) && isEqualTokens(node.endToken, other.endToken);
}
bool visitConditionalExpression(ConditionalExpression node) {
ConditionalExpression other = this._other as ConditionalExpression;
- return isEqual(node.condition, other.condition) && isEqual6(node.question, other.question) && isEqual(node.thenExpression, other.thenExpression) && isEqual6(node.colon, other.colon) && isEqual(node.elseExpression, other.elseExpression);
+ return isEqualNodes(node.condition, other.condition) && isEqualTokens(node.question, other.question) && isEqualNodes(node.thenExpression, other.thenExpression) && isEqualTokens(node.colon, other.colon) && isEqualNodes(node.elseExpression, other.elseExpression);
}
bool visitConstructorDeclaration(ConstructorDeclaration node) {
ConstructorDeclaration other = this._other as ConstructorDeclaration;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.externalKeyword, other.externalKeyword) && isEqual6(node.constKeyword, other.constKeyword) && isEqual6(node.factoryKeyword, other.factoryKeyword) && isEqual(node.returnType, other.returnType) && isEqual6(node.period, other.period) && isEqual(node.name, other.name) && isEqual(node.parameters, other.parameters) && isEqual6(node.separator, other.separator) && isEqual5(node.initializers, other.initializers) && isEqual(node.redirectedConstructor, other.redirectedConstructor) && isEqual(node.body, other.body);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.externalKeyword, other.externalKeyword) && isEqualTokens(node.constKeyword, other.constKeyword) && isEqualTokens(node.factoryKeyword, other.factoryKeyword) && isEqualNodes(node.returnType, other.returnType) && isEqualTokens(node.period, other.period) && isEqualNodes(node.name, other.name) && isEqualNodes(node.parameters, other.parameters) && isEqualTokens(node.separator, other.separator) && isEqualNodeLists(node.initializers, other.initializers) && isEqualNodes(node.redirectedConstructor, other.redirectedConstructor) && isEqualNodes(node.body, other.body);
}
bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
ConstructorFieldInitializer other = this._other as ConstructorFieldInitializer;
- return isEqual6(node.keyword, other.keyword) && isEqual6(node.period, other.period) && isEqual(node.fieldName, other.fieldName) && isEqual6(node.equals, other.equals) && isEqual(node.expression, other.expression);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.period, other.period) && isEqualNodes(node.fieldName, other.fieldName) && isEqualTokens(node.equals, other.equals) && isEqualNodes(node.expression, other.expression);
}
bool visitConstructorName(ConstructorName node) {
ConstructorName other = this._other as ConstructorName;
- return isEqual(node.type, other.type) && isEqual6(node.period, other.period) && isEqual(node.name, other.name);
+ return isEqualNodes(node.type, other.type) && isEqualTokens(node.period, other.period) && isEqualNodes(node.name, other.name);
}
bool visitContinueStatement(ContinueStatement node) {
ContinueStatement other = this._other as ContinueStatement;
- return isEqual6(node.keyword, other.keyword) && isEqual(node.label, other.label) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.label, other.label) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitDeclaredIdentifier(DeclaredIdentifier node) {
DeclaredIdentifier other = this._other as DeclaredIdentifier;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.type, other.type) && isEqual(node.identifier, other.identifier);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.type, other.type) && isEqualNodes(node.identifier, other.identifier);
}
bool visitDefaultFormalParameter(DefaultFormalParameter node) {
DefaultFormalParameter other = this._other as DefaultFormalParameter;
- return isEqual(node.parameter, other.parameter) && identical(node.kind, other.kind) && isEqual6(node.separator, other.separator) && isEqual(node.defaultValue, other.defaultValue);
+ return isEqualNodes(node.parameter, other.parameter) && identical(node.kind, other.kind) && isEqualTokens(node.separator, other.separator) && isEqualNodes(node.defaultValue, other.defaultValue);
}
bool visitDoStatement(DoStatement node) {
DoStatement other = this._other as DoStatement;
- return isEqual6(node.doKeyword, other.doKeyword) && isEqual(node.body, other.body) && isEqual6(node.whileKeyword, other.whileKeyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.condition, other.condition) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.doKeyword, other.doKeyword) && isEqualNodes(node.body, other.body) && isEqualTokens(node.whileKeyword, other.whileKeyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.condition, other.condition) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitDoubleLiteral(DoubleLiteral node) {
DoubleLiteral other = this._other as DoubleLiteral;
- return isEqual6(node.literal, other.literal) && node.value == other.value;
+ return isEqualTokens(node.literal, other.literal) && node.value == other.value;
}
bool visitEmptyFunctionBody(EmptyFunctionBody node) {
EmptyFunctionBody other = this._other as EmptyFunctionBody;
- return isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.semicolon, other.semicolon);
}
bool visitEmptyStatement(EmptyStatement node) {
EmptyStatement other = this._other as EmptyStatement;
- return isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.semicolon, other.semicolon);
}
bool visitExportDirective(ExportDirective node) {
ExportDirective other = this._other as ExportDirective;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.uri, other.uri) && isEqual5(node.combinators, other.combinators) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.uri, other.uri) && isEqualNodeLists(node.combinators, other.combinators) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitExpressionFunctionBody(ExpressionFunctionBody node) {
ExpressionFunctionBody other = this._other as ExpressionFunctionBody;
- return isEqual6(node.functionDefinition, other.functionDefinition) && isEqual(node.expression, other.expression) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.functionDefinition, other.functionDefinition) && isEqualNodes(node.expression, other.expression) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitExpressionStatement(ExpressionStatement node) {
ExpressionStatement other = this._other as ExpressionStatement;
- return isEqual(node.expression, other.expression) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.expression, other.expression) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitExtendsClause(ExtendsClause node) {
ExtendsClause other = this._other as ExtendsClause;
- return isEqual6(node.keyword, other.keyword) && isEqual(node.superclass, other.superclass);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.superclass, other.superclass);
}
bool visitFieldDeclaration(FieldDeclaration node) {
FieldDeclaration other = this._other as FieldDeclaration;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.staticKeyword, other.staticKeyword) && isEqual(node.fields, other.fields) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.staticKeyword, other.staticKeyword) && isEqualNodes(node.fields, other.fields) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitFieldFormalParameter(FieldFormalParameter node) {
FieldFormalParameter other = this._other as FieldFormalParameter;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.type, other.type) && isEqual6(node.thisToken, other.thisToken) && isEqual6(node.period, other.period) && isEqual(node.identifier, other.identifier);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.type, other.type) && isEqualTokens(node.thisToken, other.thisToken) && isEqualTokens(node.period, other.period) && isEqualNodes(node.identifier, other.identifier);
}
bool visitForEachStatement(ForEachStatement node) {
ForEachStatement other = this._other as ForEachStatement;
- return isEqual6(node.forKeyword, other.forKeyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.loopVariable, other.loopVariable) && isEqual6(node.inKeyword, other.inKeyword) && isEqual(node.iterator, other.iterator) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.body, other.body);
+ return isEqualTokens(node.forKeyword, other.forKeyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.loopVariable, other.loopVariable) && isEqualTokens(node.inKeyword, other.inKeyword) && isEqualNodes(node.iterator, other.iterator) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualNodes(node.body, other.body);
}
bool visitFormalParameterList(FormalParameterList node) {
FormalParameterList other = this._other as FormalParameterList;
- return isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual5(node.parameters, other.parameters) && isEqual6(node.leftDelimiter, other.leftDelimiter) && isEqual6(node.rightDelimiter, other.rightDelimiter) && isEqual6(node.rightParenthesis, other.rightParenthesis);
+ return isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodeLists(node.parameters, other.parameters) && isEqualTokens(node.leftDelimiter, other.leftDelimiter) && isEqualTokens(node.rightDelimiter, other.rightDelimiter) && isEqualTokens(node.rightParenthesis, other.rightParenthesis);
}
bool visitForStatement(ForStatement node) {
ForStatement other = this._other as ForStatement;
- return isEqual6(node.forKeyword, other.forKeyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.variables, other.variables) && isEqual(node.initialization, other.initialization) && isEqual6(node.leftSeparator, other.leftSeparator) && isEqual(node.condition, other.condition) && isEqual6(node.rightSeparator, other.rightSeparator) && isEqual5(node.updaters, other.updaters) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.body, other.body);
+ return isEqualTokens(node.forKeyword, other.forKeyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.variables, other.variables) && isEqualNodes(node.initialization, other.initialization) && isEqualTokens(node.leftSeparator, other.leftSeparator) && isEqualNodes(node.condition, other.condition) && isEqualTokens(node.rightSeparator, other.rightSeparator) && isEqualNodeLists(node.updaters, other.updaters) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualNodes(node.body, other.body);
}
bool visitFunctionDeclaration(FunctionDeclaration node) {
FunctionDeclaration other = this._other as FunctionDeclaration;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.externalKeyword, other.externalKeyword) && isEqual(node.returnType, other.returnType) && isEqual6(node.propertyKeyword, other.propertyKeyword) && isEqual(node.name, other.name) && isEqual(node.functionExpression, other.functionExpression);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.externalKeyword, other.externalKeyword) && isEqualNodes(node.returnType, other.returnType) && isEqualTokens(node.propertyKeyword, other.propertyKeyword) && isEqualNodes(node.name, other.name) && isEqualNodes(node.functionExpression, other.functionExpression);
}
bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
FunctionDeclarationStatement other = this._other as FunctionDeclarationStatement;
- return isEqual(node.functionDeclaration, other.functionDeclaration);
+ return isEqualNodes(node.functionDeclaration, other.functionDeclaration);
}
bool visitFunctionExpression(FunctionExpression node) {
FunctionExpression other = this._other as FunctionExpression;
- return isEqual(node.parameters, other.parameters) && isEqual(node.body, other.body);
+ return isEqualNodes(node.parameters, other.parameters) && isEqualNodes(node.body, other.body);
}
bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
FunctionExpressionInvocation other = this._other as FunctionExpressionInvocation;
- return isEqual(node.function, other.function) && isEqual(node.argumentList, other.argumentList);
+ return isEqualNodes(node.function, other.function) && isEqualNodes(node.argumentList, other.argumentList);
}
bool visitFunctionTypeAlias(FunctionTypeAlias node) {
FunctionTypeAlias other = this._other as FunctionTypeAlias;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.returnType, other.returnType) && isEqual(node.name, other.name) && isEqual(node.typeParameters, other.typeParameters) && isEqual(node.parameters, other.parameters) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.returnType, other.returnType) && isEqualNodes(node.name, other.name) && isEqualNodes(node.typeParameters, other.typeParameters) && isEqualNodes(node.parameters, other.parameters) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
FunctionTypedFormalParameter other = this._other as FunctionTypedFormalParameter;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual(node.returnType, other.returnType) && isEqual(node.identifier, other.identifier) && isEqual(node.parameters, other.parameters);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.returnType, other.returnType) && isEqualNodes(node.identifier, other.identifier) && isEqualNodes(node.parameters, other.parameters);
}
bool visitHideCombinator(HideCombinator node) {
HideCombinator other = this._other as HideCombinator;
- return isEqual6(node.keyword, other.keyword) && isEqual5(node.hiddenNames, other.hiddenNames);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodeLists(node.hiddenNames, other.hiddenNames);
}
bool visitIfStatement(IfStatement node) {
IfStatement other = this._other as IfStatement;
- return isEqual6(node.ifKeyword, other.ifKeyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.condition, other.condition) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.thenStatement, other.thenStatement) && isEqual6(node.elseKeyword, other.elseKeyword) && isEqual(node.elseStatement, other.elseStatement);
+ return isEqualTokens(node.ifKeyword, other.ifKeyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.condition, other.condition) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualNodes(node.thenStatement, other.thenStatement) && isEqualTokens(node.elseKeyword, other.elseKeyword) && isEqualNodes(node.elseStatement, other.elseStatement);
}
bool visitImplementsClause(ImplementsClause node) {
ImplementsClause other = this._other as ImplementsClause;
- return isEqual6(node.keyword, other.keyword) && isEqual5(node.interfaces, other.interfaces);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodeLists(node.interfaces, other.interfaces);
}
bool visitImportDirective(ImportDirective node) {
ImportDirective other = this._other as ImportDirective;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.uri, other.uri) && isEqual6(node.asToken, other.asToken) && isEqual(node.prefix, other.prefix) && isEqual5(node.combinators, other.combinators) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.uri, other.uri) && isEqualTokens(node.asToken, other.asToken) && isEqualNodes(node.prefix, other.prefix) && isEqualNodeLists(node.combinators, other.combinators) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitIndexExpression(IndexExpression node) {
IndexExpression other = this._other as IndexExpression;
- return isEqual(node.target, other.target) && isEqual6(node.leftBracket, other.leftBracket) && isEqual(node.index, other.index) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualNodes(node.target, other.target) && isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodes(node.index, other.index) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitInstanceCreationExpression(InstanceCreationExpression node) {
InstanceCreationExpression other = this._other as InstanceCreationExpression;
- return isEqual6(node.keyword, other.keyword) && isEqual(node.constructorName, other.constructorName) && isEqual(node.argumentList, other.argumentList);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.constructorName, other.constructorName) && isEqualNodes(node.argumentList, other.argumentList);
}
bool visitIntegerLiteral(IntegerLiteral node) {
IntegerLiteral other = this._other as IntegerLiteral;
- return isEqual6(node.literal, other.literal) && (node.value == other.value);
+ return isEqualTokens(node.literal, other.literal) && (node.value == other.value);
}
bool visitInterpolationExpression(InterpolationExpression node) {
InterpolationExpression other = this._other as InterpolationExpression;
- return isEqual6(node.leftBracket, other.leftBracket) && isEqual(node.expression, other.expression) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodes(node.expression, other.expression) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitInterpolationString(InterpolationString node) {
InterpolationString other = this._other as InterpolationString;
- return isEqual6(node.contents, other.contents) && node.value == other.value;
+ return isEqualTokens(node.contents, other.contents) && node.value == other.value;
}
bool visitIsExpression(IsExpression node) {
IsExpression other = this._other as IsExpression;
- return isEqual(node.expression, other.expression) && isEqual6(node.isOperator, other.isOperator) && isEqual6(node.notOperator, other.notOperator) && isEqual(node.type, other.type);
+ return isEqualNodes(node.expression, other.expression) && isEqualTokens(node.isOperator, other.isOperator) && isEqualTokens(node.notOperator, other.notOperator) && isEqualNodes(node.type, other.type);
}
bool visitLabel(Label node) {
Label other = this._other as Label;
- return isEqual(node.label, other.label) && isEqual6(node.colon, other.colon);
+ return isEqualNodes(node.label, other.label) && isEqualTokens(node.colon, other.colon);
}
bool visitLabeledStatement(LabeledStatement node) {
LabeledStatement other = this._other as LabeledStatement;
- return isEqual5(node.labels, other.labels) && isEqual(node.statement, other.statement);
+ return isEqualNodeLists(node.labels, other.labels) && isEqualNodes(node.statement, other.statement);
}
bool visitLibraryDirective(LibraryDirective node) {
LibraryDirective other = this._other as LibraryDirective;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.libraryToken, other.libraryToken) && isEqual(node.name, other.name) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.libraryToken, other.libraryToken) && isEqualNodes(node.name, other.name) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitLibraryIdentifier(LibraryIdentifier node) {
LibraryIdentifier other = this._other as LibraryIdentifier;
- return isEqual5(node.components, other.components);
+ return isEqualNodeLists(node.components, other.components);
}
bool visitListLiteral(ListLiteral node) {
ListLiteral other = this._other as ListLiteral;
- return isEqual6(node.constKeyword, other.constKeyword) && isEqual(node.typeArguments, other.typeArguments) && isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.elements, other.elements) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualTokens(node.constKeyword, other.constKeyword) && isEqualNodes(node.typeArguments, other.typeArguments) && isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.elements, other.elements) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitMapLiteral(MapLiteral node) {
MapLiteral other = this._other as MapLiteral;
- return isEqual6(node.constKeyword, other.constKeyword) && isEqual(node.typeArguments, other.typeArguments) && isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.entries, other.entries) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualTokens(node.constKeyword, other.constKeyword) && isEqualNodes(node.typeArguments, other.typeArguments) && isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.entries, other.entries) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitMapLiteralEntry(MapLiteralEntry node) {
MapLiteralEntry other = this._other as MapLiteralEntry;
- return isEqual(node.key, other.key) && isEqual6(node.separator, other.separator) && isEqual(node.value, other.value);
+ return isEqualNodes(node.key, other.key) && isEqualTokens(node.separator, other.separator) && isEqualNodes(node.value, other.value);
}
bool visitMethodDeclaration(MethodDeclaration node) {
MethodDeclaration other = this._other as MethodDeclaration;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.externalKeyword, other.externalKeyword) && isEqual6(node.modifierKeyword, other.modifierKeyword) && isEqual(node.returnType, other.returnType) && isEqual6(node.propertyKeyword, other.propertyKeyword) && isEqual6(node.propertyKeyword, other.propertyKeyword) && isEqual(node.name, other.name) && isEqual(node.parameters, other.parameters) && isEqual(node.body, other.body);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.externalKeyword, other.externalKeyword) && isEqualTokens(node.modifierKeyword, other.modifierKeyword) && isEqualNodes(node.returnType, other.returnType) && isEqualTokens(node.propertyKeyword, other.propertyKeyword) && isEqualTokens(node.propertyKeyword, other.propertyKeyword) && isEqualNodes(node.name, other.name) && isEqualNodes(node.parameters, other.parameters) && isEqualNodes(node.body, other.body);
}
bool visitMethodInvocation(MethodInvocation node) {
MethodInvocation other = this._other as MethodInvocation;
- return isEqual(node.target, other.target) && isEqual6(node.period, other.period) && isEqual(node.methodName, other.methodName) && isEqual(node.argumentList, other.argumentList);
+ return isEqualNodes(node.target, other.target) && isEqualTokens(node.period, other.period) && isEqualNodes(node.methodName, other.methodName) && isEqualNodes(node.argumentList, other.argumentList);
}
bool visitNamedExpression(NamedExpression node) {
NamedExpression other = this._other as NamedExpression;
- return isEqual(node.name, other.name) && isEqual(node.expression, other.expression);
+ return isEqualNodes(node.name, other.name) && isEqualNodes(node.expression, other.expression);
}
bool visitNativeClause(NativeClause node) {
NativeClause other = this._other as NativeClause;
- return isEqual6(node.keyword, other.keyword) && isEqual(node.name, other.name);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.name, other.name);
}
bool visitNativeFunctionBody(NativeFunctionBody node) {
NativeFunctionBody other = this._other as NativeFunctionBody;
- return isEqual6(node.nativeToken, other.nativeToken) && isEqual(node.stringLiteral, other.stringLiteral) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.nativeToken, other.nativeToken) && isEqualNodes(node.stringLiteral, other.stringLiteral) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitNullLiteral(NullLiteral node) {
NullLiteral other = this._other as NullLiteral;
- return isEqual6(node.literal, other.literal);
+ return isEqualTokens(node.literal, other.literal);
}
bool visitParenthesizedExpression(ParenthesizedExpression node) {
ParenthesizedExpression other = this._other as ParenthesizedExpression;
- return isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.expression, other.expression) && isEqual6(node.rightParenthesis, other.rightParenthesis);
+ return isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.expression, other.expression) && isEqualTokens(node.rightParenthesis, other.rightParenthesis);
}
bool visitPartDirective(PartDirective node) {
PartDirective other = this._other as PartDirective;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.partToken, other.partToken) && isEqual(node.uri, other.uri) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.partToken, other.partToken) && isEqualNodes(node.uri, other.uri) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitPartOfDirective(PartOfDirective node) {
PartOfDirective other = this._other as PartOfDirective;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.partToken, other.partToken) && isEqual6(node.ofToken, other.ofToken) && isEqual(node.libraryName, other.libraryName) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.partToken, other.partToken) && isEqualTokens(node.ofToken, other.ofToken) && isEqualNodes(node.libraryName, other.libraryName) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitPostfixExpression(PostfixExpression node) {
PostfixExpression other = this._other as PostfixExpression;
- return isEqual(node.operand, other.operand) && isEqual6(node.operator, other.operator);
+ return isEqualNodes(node.operand, other.operand) && isEqualTokens(node.operator, other.operator);
}
bool visitPrefixedIdentifier(PrefixedIdentifier node) {
PrefixedIdentifier other = this._other as PrefixedIdentifier;
- return isEqual(node.prefix, other.prefix) && isEqual6(node.period, other.period) && isEqual(node.identifier, other.identifier);
+ return isEqualNodes(node.prefix, other.prefix) && isEqualTokens(node.period, other.period) && isEqualNodes(node.identifier, other.identifier);
}
bool visitPrefixExpression(PrefixExpression node) {
PrefixExpression other = this._other as PrefixExpression;
- return isEqual6(node.operator, other.operator) && isEqual(node.operand, other.operand);
+ return isEqualTokens(node.operator, other.operator) && isEqualNodes(node.operand, other.operand);
}
bool visitPropertyAccess(PropertyAccess node) {
PropertyAccess other = this._other as PropertyAccess;
- return isEqual(node.target, other.target) && isEqual6(node.operator, other.operator) && isEqual(node.propertyName, other.propertyName);
+ return isEqualNodes(node.target, other.target) && isEqualTokens(node.operator, other.operator) && isEqualNodes(node.propertyName, other.propertyName);
}
bool visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
RedirectingConstructorInvocation other = this._other as RedirectingConstructorInvocation;
- return isEqual6(node.keyword, other.keyword) && isEqual6(node.period, other.period) && isEqual(node.constructorName, other.constructorName) && isEqual(node.argumentList, other.argumentList);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.period, other.period) && isEqualNodes(node.constructorName, other.constructorName) && isEqualNodes(node.argumentList, other.argumentList);
}
bool visitRethrowExpression(RethrowExpression node) {
RethrowExpression other = this._other as RethrowExpression;
- return isEqual6(node.keyword, other.keyword);
+ return isEqualTokens(node.keyword, other.keyword);
}
bool visitReturnStatement(ReturnStatement node) {
ReturnStatement other = this._other as ReturnStatement;
- return isEqual6(node.keyword, other.keyword) && isEqual(node.expression, other.expression) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.expression, other.expression) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitScriptTag(ScriptTag node) {
ScriptTag other = this._other as ScriptTag;
- return isEqual6(node.scriptTag, other.scriptTag);
+ return isEqualTokens(node.scriptTag, other.scriptTag);
}
bool visitShowCombinator(ShowCombinator node) {
ShowCombinator other = this._other as ShowCombinator;
- return isEqual6(node.keyword, other.keyword) && isEqual5(node.shownNames, other.shownNames);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodeLists(node.shownNames, other.shownNames);
}
bool visitSimpleFormalParameter(SimpleFormalParameter node) {
SimpleFormalParameter other = this._other as SimpleFormalParameter;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.type, other.type) && isEqual(node.identifier, other.identifier);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.type, other.type) && isEqualNodes(node.identifier, other.identifier);
}
bool visitSimpleIdentifier(SimpleIdentifier node) {
SimpleIdentifier other = this._other as SimpleIdentifier;
- return isEqual6(node.token, other.token);
+ return isEqualTokens(node.token, other.token);
}
bool visitSimpleStringLiteral(SimpleStringLiteral node) {
SimpleStringLiteral other = this._other as SimpleStringLiteral;
- return isEqual6(node.literal, other.literal) && (node.value == other.value);
+ return isEqualTokens(node.literal, other.literal) && (node.value == other.value);
}
bool visitStringInterpolation(StringInterpolation node) {
StringInterpolation other = this._other as StringInterpolation;
- return isEqual5(node.elements, other.elements);
+ return isEqualNodeLists(node.elements, other.elements);
}
bool visitSuperConstructorInvocation(SuperConstructorInvocation node) {
SuperConstructorInvocation other = this._other as SuperConstructorInvocation;
- return isEqual6(node.keyword, other.keyword) && isEqual6(node.period, other.period) && isEqual(node.constructorName, other.constructorName) && isEqual(node.argumentList, other.argumentList);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.period, other.period) && isEqualNodes(node.constructorName, other.constructorName) && isEqualNodes(node.argumentList, other.argumentList);
}
bool visitSuperExpression(SuperExpression node) {
SuperExpression other = this._other as SuperExpression;
- return isEqual6(node.keyword, other.keyword);
+ return isEqualTokens(node.keyword, other.keyword);
}
bool visitSwitchCase(SwitchCase node) {
SwitchCase other = this._other as SwitchCase;
- return isEqual5(node.labels, other.labels) && isEqual6(node.keyword, other.keyword) && isEqual(node.expression, other.expression) && isEqual6(node.colon, other.colon) && isEqual5(node.statements, other.statements);
+ return isEqualNodeLists(node.labels, other.labels) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.expression, other.expression) && isEqualTokens(node.colon, other.colon) && isEqualNodeLists(node.statements, other.statements);
}
bool visitSwitchDefault(SwitchDefault node) {
SwitchDefault other = this._other as SwitchDefault;
- return isEqual5(node.labels, other.labels) && isEqual6(node.keyword, other.keyword) && isEqual6(node.colon, other.colon) && isEqual5(node.statements, other.statements);
+ return isEqualNodeLists(node.labels, other.labels) && isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.colon, other.colon) && isEqualNodeLists(node.statements, other.statements);
}
bool visitSwitchStatement(SwitchStatement node) {
SwitchStatement other = this._other as SwitchStatement;
- return isEqual6(node.keyword, other.keyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.expression, other.expression) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.members, other.members) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.expression, other.expression) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.members, other.members) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitSymbolLiteral(SymbolLiteral node) {
SymbolLiteral other = this._other as SymbolLiteral;
- return isEqual6(node.poundSign, other.poundSign) && isEqual7(node.components, other.components);
+ return isEqualTokens(node.poundSign, other.poundSign) && isEqualTokenLists(node.components, other.components);
}
bool visitThisExpression(ThisExpression node) {
ThisExpression other = this._other as ThisExpression;
- return isEqual6(node.keyword, other.keyword);
+ return isEqualTokens(node.keyword, other.keyword);
}
bool visitThrowExpression(ThrowExpression node) {
ThrowExpression other = this._other as ThrowExpression;
- return isEqual6(node.keyword, other.keyword) && isEqual(node.expression, other.expression);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.expression, other.expression);
}
bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
TopLevelVariableDeclaration other = this._other as TopLevelVariableDeclaration;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual(node.variables, other.variables) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.variables, other.variables) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitTryStatement(TryStatement node) {
TryStatement other = this._other as TryStatement;
- return isEqual6(node.tryKeyword, other.tryKeyword) && isEqual(node.body, other.body) && isEqual5(node.catchClauses, other.catchClauses) && isEqual6(node.finallyKeyword, other.finallyKeyword) && isEqual(node.finallyBlock, other.finallyBlock);
+ return isEqualTokens(node.tryKeyword, other.tryKeyword) && isEqualNodes(node.body, other.body) && isEqualNodeLists(node.catchClauses, other.catchClauses) && isEqualTokens(node.finallyKeyword, other.finallyKeyword) && isEqualNodes(node.finallyBlock, other.finallyBlock);
}
bool visitTypeArgumentList(TypeArgumentList node) {
TypeArgumentList other = this._other as TypeArgumentList;
- return isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.arguments, other.arguments) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.arguments, other.arguments) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitTypeName(TypeName node) {
TypeName other = this._other as TypeName;
- return isEqual(node.name, other.name) && isEqual(node.typeArguments, other.typeArguments);
+ return isEqualNodes(node.name, other.name) && isEqualNodes(node.typeArguments, other.typeArguments);
}
bool visitTypeParameter(TypeParameter node) {
TypeParameter other = this._other as TypeParameter;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual(node.name, other.name) && isEqual6(node.keyword, other.keyword) && isEqual(node.bound, other.bound);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.name, other.name) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.bound, other.bound);
}
bool visitTypeParameterList(TypeParameterList node) {
TypeParameterList other = this._other as TypeParameterList;
- return isEqual6(node.leftBracket, other.leftBracket) && isEqual5(node.typeParameters, other.typeParameters) && isEqual6(node.rightBracket, other.rightBracket);
+ return isEqualTokens(node.leftBracket, other.leftBracket) && isEqualNodeLists(node.typeParameters, other.typeParameters) && isEqualTokens(node.rightBracket, other.rightBracket);
}
bool visitVariableDeclaration(VariableDeclaration node) {
VariableDeclaration other = this._other as VariableDeclaration;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual(node.name, other.name) && isEqual6(node.equals, other.equals) && isEqual(node.initializer, other.initializer);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualNodes(node.name, other.name) && isEqualTokens(node.equals, other.equals) && isEqualNodes(node.initializer, other.initializer);
}
bool visitVariableDeclarationList(VariableDeclarationList node) {
VariableDeclarationList other = this._other as VariableDeclarationList;
- return isEqual(node.documentationComment, other.documentationComment) && isEqual5(node.metadata, other.metadata) && isEqual6(node.keyword, other.keyword) && isEqual(node.type, other.type) && isEqual5(node.variables, other.variables);
+ return isEqualNodes(node.documentationComment, other.documentationComment) && isEqualNodeLists(node.metadata, other.metadata) && isEqualTokens(node.keyword, other.keyword) && isEqualNodes(node.type, other.type) && isEqualNodeLists(node.variables, other.variables);
}
bool visitVariableDeclarationStatement(VariableDeclarationStatement node) {
VariableDeclarationStatement other = this._other as VariableDeclarationStatement;
- return isEqual(node.variables, other.variables) && isEqual6(node.semicolon, other.semicolon);
+ return isEqualNodes(node.variables, other.variables) && isEqualTokens(node.semicolon, other.semicolon);
}
bool visitWhileStatement(WhileStatement node) {
WhileStatement other = this._other as WhileStatement;
- return isEqual6(node.keyword, other.keyword) && isEqual6(node.leftParenthesis, other.leftParenthesis) && isEqual(node.condition, other.condition) && isEqual6(node.rightParenthesis, other.rightParenthesis) && isEqual(node.body, other.body);
+ return isEqualTokens(node.keyword, other.keyword) && isEqualTokens(node.leftParenthesis, other.leftParenthesis) && isEqualNodes(node.condition, other.condition) && isEqualTokens(node.rightParenthesis, other.rightParenthesis) && isEqualNodes(node.body, other.body);
}
bool visitWithClause(WithClause node) {
WithClause other = this._other as WithClause;
- return isEqual6(node.withKeyword, other.withKeyword) && isEqual5(node.mixinTypes, other.mixinTypes);
+ return isEqualTokens(node.withKeyword, other.withKeyword) && isEqualNodeLists(node.mixinTypes, other.mixinTypes);
+ }
+
+ /**
+ * Return `true` if the given lists of AST nodes have the same size and corresponding
+ * elements are equal.
+ *
+ * @param first the first node being compared
+ * @param second the second node being compared
+ * @return `true` if the given AST nodes have the same size and corresponding elements are
+ * equal
+ */
+ bool isEqualNodeLists(NodeList first, NodeList second) {
+ if (first == null) {
+ return second == null;
+ } else if (second == null) {
+ return false;
+ }
+ int size = first.length;
+ if (second.length != size) {
+ return false;
+ }
+ for (int i = 0; i < size; i++) {
+ if (!isEqualNodes(first[i], second[i])) {
+ return false;
+ }
+ }
+ return true;
}
/**
@@ -15571,7 +15345,7 @@
* @param second the second node being compared
* @return `true` if the given AST nodes have the same structure
*/
- bool isEqual(ASTNode first, ASTNode second) {
+ bool isEqualNodes(AstNode first, AstNode second) {
if (first == null) {
return second == null;
} else if (second == null) {
@@ -15584,26 +15358,21 @@
}
/**
- * Return `true` if the given lists of AST nodes have the same size and corresponding
+ * Return `true` if the given arrays of tokens have the same length and corresponding
* elements are equal.
*
* @param first the first node being compared
* @param second the second node being compared
- * @return `true` if the given AST nodes have the same size and corresponding elements are
- * equal
+ * @return `true` if the given arrays of tokens have the same length and corresponding
+ * elements are equal
*/
- bool isEqual5(NodeList first, NodeList second) {
- if (first == null) {
- return second == null;
- } else if (second == null) {
+ bool isEqualTokenLists(List<Token> first, List<Token> second) {
+ int length = first.length;
+ if (second.length != length) {
return false;
}
- int size = first.length;
- if (second.length != size) {
- return false;
- }
- for (int i = 0; i < size; i++) {
- if (!isEqual(first[i], second[i])) {
+ for (int i = 0; i < length; i++) {
+ if (isEqualTokens(first[i], second[i])) {
return false;
}
}
@@ -15617,7 +15386,7 @@
* @param second the second node being compared
* @return `true` if the given tokens have the same structure
*/
- bool isEqual6(Token first, Token second) {
+ bool isEqualTokens(Token first, Token second) {
if (first == null) {
return second == null;
} else if (second == null) {
@@ -15625,46 +15394,24 @@
}
return first.offset == second.offset && first.length == second.length && first.lexeme == second.lexeme;
}
-
- /**
- * Return `true` if the given arrays of tokens have the same length and corresponding
- * elements are equal.
- *
- * @param first the first node being compared
- * @param second the second node being compared
- * @return `true` if the given arrays of tokens have the same length and corresponding
- * elements are equal
- */
- bool isEqual7(List<Token> first, List<Token> second) {
- int length = first.length;
- if (second.length != length) {
- return false;
- }
- for (int i = 0; i < length; i++) {
- if (isEqual6(first[i], second[i])) {
- return false;
- }
- }
- return true;
- }
}
/**
- * Instances of the class `IncrementalASTCloner` implement an object that will clone any AST
+ * Instances of the class `IncrementalAstCloner` implement an object that will clone any AST
* structure that it visits. The cloner will clone the structure, replacing the specified ASTNode
* with a new ASTNode, mapping the old token stream to a new token stream, and preserving resolution
* results.
*/
-class IncrementalASTCloner implements ASTVisitor<ASTNode> {
+class IncrementalAstCloner implements AstVisitor<AstNode> {
/**
* The node to be replaced during the cloning process.
*/
- ASTNode _oldNode;
+ AstNode _oldNode;
/**
* The replacement node used during the cloning process.
*/
- ASTNode _newNode;
+ AstNode _newNode;
/**
* A mapping of old tokens to new tokens used during the cloning process.
@@ -15679,40 +15426,40 @@
* @param newNode the replacement node
* @param tokenMap a mapping of old tokens to new tokens (not `null`)
*/
- IncrementalASTCloner(ASTNode oldNode, ASTNode newNode, TokenMap tokenMap) {
+ IncrementalAstCloner(AstNode oldNode, AstNode newNode, TokenMap tokenMap) {
this._oldNode = oldNode;
this._newNode = newNode;
this._tokenMap = tokenMap;
}
- AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStrings(clone5(node.strings));
+ AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStrings(cloneNodeList(node.strings));
Annotation visitAnnotation(Annotation node) {
- Annotation copy = new Annotation(map(node.atSign), clone4(node.name), map(node.period), clone4(node.constructorName), clone4(node.arguments));
+ Annotation copy = new Annotation(mapToken(node.atSign), cloneNode(node.name), mapToken(node.period), cloneNode(node.constructorName), cloneNode(node.arguments));
copy.element = node.element;
return copy;
}
ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
- ArgumentDefinitionTest copy = new ArgumentDefinitionTest(map(node.question), clone4(node.identifier));
+ ArgumentDefinitionTest copy = new ArgumentDefinitionTest(mapToken(node.question), cloneNode(node.identifier));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(map(node.leftParenthesis), clone5(node.arguments), map(node.rightParenthesis));
+ ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(mapToken(node.leftParenthesis), cloneNodeList(node.arguments), mapToken(node.rightParenthesis));
AsExpression visitAsExpression(AsExpression node) {
- AsExpression copy = new AsExpression(clone4(node.expression), map(node.asOperator), clone4(node.type));
+ AsExpression copy = new AsExpression(cloneNode(node.expression), mapToken(node.asOperator), cloneNode(node.type));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- ASTNode visitAssertStatement(AssertStatement node) => new AssertStatement(map(node.keyword), map(node.leftParenthesis), clone4(node.condition), map(node.rightParenthesis), map(node.semicolon));
+ AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(mapToken(node.keyword), mapToken(node.leftParenthesis), cloneNode(node.condition), mapToken(node.rightParenthesis), mapToken(node.semicolon));
AssignmentExpression visitAssignmentExpression(AssignmentExpression node) {
- AssignmentExpression copy = new AssignmentExpression(clone4(node.leftHandSide), map(node.operator), clone4(node.rightHandSide));
+ AssignmentExpression copy = new AssignmentExpression(cloneNode(node.leftHandSide), mapToken(node.operator), cloneNode(node.rightHandSide));
copy.propagatedElement = node.propagatedElement;
copy.propagatedType = node.propagatedType;
copy.staticElement = node.staticElement;
@@ -15721,7 +15468,7 @@
}
BinaryExpression visitBinaryExpression(BinaryExpression node) {
- BinaryExpression copy = new BinaryExpression(clone4(node.leftOperand), map(node.operator), clone4(node.rightOperand));
+ BinaryExpression copy = new BinaryExpression(cloneNode(node.leftOperand), mapToken(node.operator), cloneNode(node.rightOperand));
copy.propagatedElement = node.propagatedElement;
copy.propagatedType = node.propagatedType;
copy.staticElement = node.staticElement;
@@ -15729,128 +15476,128 @@
return copy;
}
- Block visitBlock(Block node) => new Block(map(node.leftBracket), clone5(node.statements), map(node.rightBracket));
+ Block visitBlock(Block node) => new Block(mapToken(node.leftBracket), cloneNodeList(node.statements), mapToken(node.rightBracket));
- BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockFunctionBody(clone4(node.block));
+ BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockFunctionBody(cloneNode(node.block));
BooleanLiteral visitBooleanLiteral(BooleanLiteral node) {
- BooleanLiteral copy = new BooleanLiteral(map(node.literal), node.value);
+ BooleanLiteral copy = new BooleanLiteral(mapToken(node.literal), node.value);
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(map(node.keyword), clone4(node.label), map(node.semicolon));
+ BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(mapToken(node.keyword), cloneNode(node.label), mapToken(node.semicolon));
CascadeExpression visitCascadeExpression(CascadeExpression node) {
- CascadeExpression copy = new CascadeExpression(clone4(node.target), clone5(node.cascadeSections));
+ CascadeExpression copy = new CascadeExpression(cloneNode(node.target), cloneNodeList(node.cascadeSections));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- CatchClause visitCatchClause(CatchClause node) => new CatchClause(map(node.onKeyword), clone4(node.exceptionType), map(node.catchKeyword), map(node.leftParenthesis), clone4(node.exceptionParameter), map(node.comma), clone4(node.stackTraceParameter), map(node.rightParenthesis), clone4(node.body));
+ CatchClause visitCatchClause(CatchClause node) => new CatchClause(mapToken(node.onKeyword), cloneNode(node.exceptionType), mapToken(node.catchKeyword), mapToken(node.leftParenthesis), cloneNode(node.exceptionParameter), mapToken(node.comma), cloneNode(node.stackTraceParameter), mapToken(node.rightParenthesis), cloneNode(node.body));
ClassDeclaration visitClassDeclaration(ClassDeclaration node) {
- ClassDeclaration copy = new ClassDeclaration(clone4(node.documentationComment), clone5(node.metadata), map(node.abstractKeyword), map(node.classKeyword), clone4(node.name), clone4(node.typeParameters), clone4(node.extendsClause), clone4(node.withClause), clone4(node.implementsClause), map(node.leftBracket), clone5(node.members), map(node.rightBracket));
- copy.nativeClause = clone4(node.nativeClause);
+ ClassDeclaration copy = new ClassDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.abstractKeyword), mapToken(node.classKeyword), cloneNode(node.name), cloneNode(node.typeParameters), cloneNode(node.extendsClause), cloneNode(node.withClause), cloneNode(node.implementsClause), mapToken(node.leftBracket), cloneNodeList(node.members), mapToken(node.rightBracket));
+ copy.nativeClause = cloneNode(node.nativeClause);
return copy;
}
- ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.name), clone4(node.typeParameters), map(node.equals), map(node.abstractKeyword), clone4(node.superclass), clone4(node.withClause), clone4(node.implementsClause), map(node.semicolon));
+ ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.name), cloneNode(node.typeParameters), mapToken(node.equals), mapToken(node.abstractKeyword), cloneNode(node.superclass), cloneNode(node.withClause), cloneNode(node.implementsClause), mapToken(node.semicolon));
Comment visitComment(Comment node) {
if (node.isDocumentation) {
- return Comment.createDocumentationComment2(map2(node.tokens), clone5(node.references));
+ return Comment.createDocumentationComment2(mapTokens(node.tokens), cloneNodeList(node.references));
} else if (node.isBlock) {
- return Comment.createBlockComment(map2(node.tokens));
+ return Comment.createBlockComment(mapTokens(node.tokens));
}
- return Comment.createEndOfLineComment(map2(node.tokens));
+ return Comment.createEndOfLineComment(mapTokens(node.tokens));
}
- CommentReference visitCommentReference(CommentReference node) => new CommentReference(map(node.newKeyword), clone4(node.identifier));
+ CommentReference visitCommentReference(CommentReference node) => new CommentReference(mapToken(node.newKeyword), cloneNode(node.identifier));
CompilationUnit visitCompilationUnit(CompilationUnit node) {
- CompilationUnit copy = new CompilationUnit(map(node.beginToken), clone4(node.scriptTag), clone5(node.directives), clone5(node.declarations), map(node.endToken));
+ CompilationUnit copy = new CompilationUnit(mapToken(node.beginToken), cloneNode(node.scriptTag), cloneNodeList(node.directives), cloneNodeList(node.declarations), mapToken(node.endToken));
copy.lineInfo = node.lineInfo;
copy.element = node.element;
return copy;
}
ConditionalExpression visitConditionalExpression(ConditionalExpression node) {
- ConditionalExpression copy = new ConditionalExpression(clone4(node.condition), map(node.question), clone4(node.thenExpression), map(node.colon), clone4(node.elseExpression));
+ ConditionalExpression copy = new ConditionalExpression(cloneNode(node.condition), mapToken(node.question), cloneNode(node.thenExpression), mapToken(node.colon), cloneNode(node.elseExpression));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node) {
- ConstructorDeclaration copy = new ConstructorDeclaration(clone4(node.documentationComment), clone5(node.metadata), map(node.externalKeyword), map(node.constKeyword), map(node.factoryKeyword), clone4(node.returnType), map(node.period), clone4(node.name), clone4(node.parameters), map(node.separator), clone5(node.initializers), clone4(node.redirectedConstructor), clone4(node.body));
+ ConstructorDeclaration copy = new ConstructorDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.externalKeyword), mapToken(node.constKeyword), mapToken(node.factoryKeyword), cloneNode(node.returnType), mapToken(node.period), cloneNode(node.name), cloneNode(node.parameters), mapToken(node.separator), cloneNodeList(node.initializers), cloneNode(node.redirectedConstructor), cloneNode(node.body));
copy.element = node.element;
return copy;
}
- ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldInitializer node) => new ConstructorFieldInitializer(map(node.keyword), map(node.period), clone4(node.fieldName), map(node.equals), clone4(node.expression));
+ ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldInitializer node) => new ConstructorFieldInitializer(mapToken(node.keyword), mapToken(node.period), cloneNode(node.fieldName), mapToken(node.equals), cloneNode(node.expression));
ConstructorName visitConstructorName(ConstructorName node) {
- ConstructorName copy = new ConstructorName(clone4(node.type), map(node.period), clone4(node.name));
+ ConstructorName copy = new ConstructorName(cloneNode(node.type), mapToken(node.period), cloneNode(node.name));
copy.staticElement = node.staticElement;
return copy;
}
- ContinueStatement visitContinueStatement(ContinueStatement node) => new ContinueStatement(map(node.keyword), clone4(node.label), map(node.semicolon));
+ ContinueStatement visitContinueStatement(ContinueStatement node) => new ContinueStatement(mapToken(node.keyword), cloneNode(node.label), mapToken(node.semicolon));
- DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new DeclaredIdentifier(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.type), clone4(node.identifier));
+ DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new DeclaredIdentifier(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.type), cloneNode(node.identifier));
- DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node) => new DefaultFormalParameter(clone4(node.parameter), node.kind, map(node.separator), clone4(node.defaultValue));
+ DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node) => new DefaultFormalParameter(cloneNode(node.parameter), node.kind, mapToken(node.separator), cloneNode(node.defaultValue));
- DoStatement visitDoStatement(DoStatement node) => new DoStatement(map(node.doKeyword), clone4(node.body), map(node.whileKeyword), map(node.leftParenthesis), clone4(node.condition), map(node.rightParenthesis), map(node.semicolon));
+ DoStatement visitDoStatement(DoStatement node) => new DoStatement(mapToken(node.doKeyword), cloneNode(node.body), mapToken(node.whileKeyword), mapToken(node.leftParenthesis), cloneNode(node.condition), mapToken(node.rightParenthesis), mapToken(node.semicolon));
DoubleLiteral visitDoubleLiteral(DoubleLiteral node) {
- DoubleLiteral copy = new DoubleLiteral(map(node.literal), node.value);
+ DoubleLiteral copy = new DoubleLiteral(mapToken(node.literal), node.value);
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyFunctionBody(map(node.semicolon));
+ EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyFunctionBody(mapToken(node.semicolon));
- EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(map(node.semicolon));
+ EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(mapToken(node.semicolon));
ExportDirective visitExportDirective(ExportDirective node) {
- ExportDirective copy = new ExportDirective(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.uri), clone5(node.combinators), map(node.semicolon));
+ ExportDirective copy = new ExportDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.uri), cloneNodeList(node.combinators), mapToken(node.semicolon));
copy.element = node.element;
return copy;
}
- ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node) => new ExpressionFunctionBody(map(node.functionDefinition), clone4(node.expression), map(node.semicolon));
+ ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node) => new ExpressionFunctionBody(mapToken(node.functionDefinition), cloneNode(node.expression), mapToken(node.semicolon));
- ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new ExpressionStatement(clone4(node.expression), map(node.semicolon));
+ ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new ExpressionStatement(cloneNode(node.expression), mapToken(node.semicolon));
- ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(map(node.keyword), clone4(node.superclass));
+ ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(mapToken(node.keyword), cloneNode(node.superclass));
- FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDeclaration(clone4(node.documentationComment), clone5(node.metadata), map(node.staticKeyword), clone4(node.fields), map(node.semicolon));
+ FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.staticKeyword), cloneNode(node.fields), mapToken(node.semicolon));
- FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => new FieldFormalParameter(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.type), map(node.thisToken), map(node.period), clone4(node.identifier), clone4(node.parameters));
+ FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => new FieldFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.type), mapToken(node.thisToken), mapToken(node.period), cloneNode(node.identifier), cloneNode(node.parameters));
ForEachStatement visitForEachStatement(ForEachStatement node) {
DeclaredIdentifier loopVariable = node.loopVariable;
if (loopVariable == null) {
- return new ForEachStatement.con2(map(node.forKeyword), map(node.leftParenthesis), clone4(node.identifier), map(node.inKeyword), clone4(node.iterator), map(node.rightParenthesis), clone4(node.body));
+ return new ForEachStatement.con2(mapToken(node.forKeyword), mapToken(node.leftParenthesis), cloneNode(node.identifier), mapToken(node.inKeyword), cloneNode(node.iterator), mapToken(node.rightParenthesis), cloneNode(node.body));
}
- return new ForEachStatement.con1(map(node.forKeyword), map(node.leftParenthesis), clone4(loopVariable), map(node.inKeyword), clone4(node.iterator), map(node.rightParenthesis), clone4(node.body));
+ return new ForEachStatement.con1(mapToken(node.forKeyword), mapToken(node.leftParenthesis), cloneNode(loopVariable), mapToken(node.inKeyword), cloneNode(node.iterator), mapToken(node.rightParenthesis), cloneNode(node.body));
}
- FormalParameterList visitFormalParameterList(FormalParameterList node) => new FormalParameterList(map(node.leftParenthesis), clone5(node.parameters), map(node.leftDelimiter), map(node.rightDelimiter), map(node.rightParenthesis));
+ FormalParameterList visitFormalParameterList(FormalParameterList node) => new FormalParameterList(mapToken(node.leftParenthesis), cloneNodeList(node.parameters), mapToken(node.leftDelimiter), mapToken(node.rightDelimiter), mapToken(node.rightParenthesis));
- ForStatement visitForStatement(ForStatement node) => new ForStatement(map(node.forKeyword), map(node.leftParenthesis), clone4(node.variables), clone4(node.initialization), map(node.leftSeparator), clone4(node.condition), map(node.rightSeparator), clone5(node.updaters), map(node.rightParenthesis), clone4(node.body));
+ ForStatement visitForStatement(ForStatement node) => new ForStatement(mapToken(node.forKeyword), mapToken(node.leftParenthesis), cloneNode(node.variables), cloneNode(node.initialization), mapToken(node.leftSeparator), cloneNode(node.condition), mapToken(node.rightSeparator), cloneNodeList(node.updaters), mapToken(node.rightParenthesis), cloneNode(node.body));
- FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new FunctionDeclaration(clone4(node.documentationComment), clone5(node.metadata), map(node.externalKeyword), clone4(node.returnType), map(node.propertyKeyword), clone4(node.name), clone4(node.functionExpression));
+ FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new FunctionDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.externalKeyword), cloneNode(node.returnType), mapToken(node.propertyKeyword), cloneNode(node.name), cloneNode(node.functionExpression));
- FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => new FunctionDeclarationStatement(clone4(node.functionDeclaration));
+ FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => new FunctionDeclarationStatement(cloneNode(node.functionDeclaration));
FunctionExpression visitFunctionExpression(FunctionExpression node) {
- FunctionExpression copy = new FunctionExpression(clone4(node.parameters), clone4(node.body));
+ FunctionExpression copy = new FunctionExpression(cloneNode(node.parameters), cloneNode(node.body));
copy.element = node.element;
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
@@ -15858,7 +15605,7 @@
}
FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
- FunctionExpressionInvocation copy = new FunctionExpressionInvocation(clone4(node.function), clone4(node.argumentList));
+ FunctionExpressionInvocation copy = new FunctionExpressionInvocation(cloneNode(node.function), cloneNode(node.argumentList));
copy.propagatedElement = node.propagatedElement;
copy.propagatedType = node.propagatedType;
copy.staticElement = node.staticElement;
@@ -15866,25 +15613,25 @@
return copy;
}
- FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new FunctionTypeAlias(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.returnType), clone4(node.name), clone4(node.typeParameters), clone4(node.parameters), map(node.semicolon));
+ FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new FunctionTypeAlias(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.returnType), cloneNode(node.name), cloneNode(node.typeParameters), cloneNode(node.parameters), mapToken(node.semicolon));
- FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter(clone4(node.documentationComment), clone5(node.metadata), clone4(node.returnType), clone4(node.identifier), clone4(node.parameters));
+ FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.returnType), cloneNode(node.identifier), cloneNode(node.parameters));
- HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(map(node.keyword), clone5(node.hiddenNames));
+ HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(mapToken(node.keyword), cloneNodeList(node.hiddenNames));
- IfStatement visitIfStatement(IfStatement node) => new IfStatement(map(node.ifKeyword), map(node.leftParenthesis), clone4(node.condition), map(node.rightParenthesis), clone4(node.thenStatement), map(node.elseKeyword), clone4(node.elseStatement));
+ IfStatement visitIfStatement(IfStatement node) => new IfStatement(mapToken(node.ifKeyword), mapToken(node.leftParenthesis), cloneNode(node.condition), mapToken(node.rightParenthesis), cloneNode(node.thenStatement), mapToken(node.elseKeyword), cloneNode(node.elseStatement));
- ImplementsClause visitImplementsClause(ImplementsClause node) => new ImplementsClause(map(node.keyword), clone5(node.interfaces));
+ ImplementsClause visitImplementsClause(ImplementsClause node) => new ImplementsClause(mapToken(node.keyword), cloneNodeList(node.interfaces));
- ImportDirective visitImportDirective(ImportDirective node) => new ImportDirective(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.uri), map(node.asToken), clone4(node.prefix), clone5(node.combinators), map(node.semicolon));
+ ImportDirective visitImportDirective(ImportDirective node) => new ImportDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.uri), mapToken(node.asToken), cloneNode(node.prefix), cloneNodeList(node.combinators), mapToken(node.semicolon));
IndexExpression visitIndexExpression(IndexExpression node) {
- Token period = map(node.period);
+ Token period = mapToken(node.period);
IndexExpression copy;
if (period == null) {
- copy = new IndexExpression.forTarget(clone4(node.target), map(node.leftBracket), clone4(node.index), map(node.rightBracket));
+ copy = new IndexExpression.forTarget(cloneNode(node.target), mapToken(node.leftBracket), cloneNode(node.index), mapToken(node.rightBracket));
} else {
- copy = new IndexExpression.forCascade(period, map(node.leftBracket), clone4(node.index), map(node.rightBracket));
+ copy = new IndexExpression.forCascade(period, mapToken(node.leftBracket), cloneNode(node.index), mapToken(node.rightBracket));
}
copy.auxiliaryElements = node.auxiliaryElements;
copy.propagatedElement = node.propagatedElement;
@@ -15895,7 +15642,7 @@
}
InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExpression node) {
- InstanceCreationExpression copy = new InstanceCreationExpression(map(node.keyword), clone4(node.constructorName), clone4(node.argumentList));
+ InstanceCreationExpression copy = new InstanceCreationExpression(mapToken(node.keyword), cloneNode(node.constructorName), cloneNode(node.argumentList));
copy.propagatedType = node.propagatedType;
copy.staticElement = node.staticElement;
copy.staticType = node.staticType;
@@ -15903,100 +15650,100 @@
}
IntegerLiteral visitIntegerLiteral(IntegerLiteral node) {
- IntegerLiteral copy = new IntegerLiteral(map(node.literal), node.value);
+ IntegerLiteral copy = new IntegerLiteral(mapToken(node.literal), node.value);
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- InterpolationExpression visitInterpolationExpression(InterpolationExpression node) => new InterpolationExpression(map(node.leftBracket), clone4(node.expression), map(node.rightBracket));
+ InterpolationExpression visitInterpolationExpression(InterpolationExpression node) => new InterpolationExpression(mapToken(node.leftBracket), cloneNode(node.expression), mapToken(node.rightBracket));
- InterpolationString visitInterpolationString(InterpolationString node) => new InterpolationString(map(node.contents), node.value);
+ InterpolationString visitInterpolationString(InterpolationString node) => new InterpolationString(mapToken(node.contents), node.value);
IsExpression visitIsExpression(IsExpression node) {
- IsExpression copy = new IsExpression(clone4(node.expression), map(node.isOperator), map(node.notOperator), clone4(node.type));
+ IsExpression copy = new IsExpression(cloneNode(node.expression), mapToken(node.isOperator), mapToken(node.notOperator), cloneNode(node.type));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- Label visitLabel(Label node) => new Label(clone4(node.label), map(node.colon));
+ Label visitLabel(Label node) => new Label(cloneNode(node.label), mapToken(node.colon));
- LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledStatement(clone5(node.labels), clone4(node.statement));
+ LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledStatement(cloneNodeList(node.labels), cloneNode(node.statement));
- LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDirective(clone4(node.documentationComment), clone5(node.metadata), map(node.libraryToken), clone4(node.name), map(node.semicolon));
+ LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.libraryToken), cloneNode(node.name), mapToken(node.semicolon));
LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) {
- LibraryIdentifier copy = new LibraryIdentifier(clone5(node.components));
+ LibraryIdentifier copy = new LibraryIdentifier(cloneNodeList(node.components));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
ListLiteral visitListLiteral(ListLiteral node) {
- ListLiteral copy = new ListLiteral(map(node.constKeyword), clone4(node.typeArguments), map(node.leftBracket), clone5(node.elements), map(node.rightBracket));
+ ListLiteral copy = new ListLiteral(mapToken(node.constKeyword), cloneNode(node.typeArguments), mapToken(node.leftBracket), cloneNodeList(node.elements), mapToken(node.rightBracket));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
MapLiteral visitMapLiteral(MapLiteral node) {
- MapLiteral copy = new MapLiteral(map(node.constKeyword), clone4(node.typeArguments), map(node.leftBracket), clone5(node.entries), map(node.rightBracket));
+ MapLiteral copy = new MapLiteral(mapToken(node.constKeyword), cloneNode(node.typeArguments), mapToken(node.leftBracket), cloneNodeList(node.entries), mapToken(node.rightBracket));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEntry(clone4(node.key), map(node.separator), clone4(node.value));
+ MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEntry(cloneNode(node.key), mapToken(node.separator), cloneNode(node.value));
- MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new MethodDeclaration(clone4(node.documentationComment), clone5(node.metadata), map(node.externalKeyword), map(node.modifierKeyword), clone4(node.returnType), map(node.propertyKeyword), map(node.operatorKeyword), clone4(node.name), clone4(node.parameters), clone4(node.body));
+ MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new MethodDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.externalKeyword), mapToken(node.modifierKeyword), cloneNode(node.returnType), mapToken(node.propertyKeyword), mapToken(node.operatorKeyword), cloneNode(node.name), cloneNode(node.parameters), cloneNode(node.body));
MethodInvocation visitMethodInvocation(MethodInvocation node) {
- MethodInvocation copy = new MethodInvocation(clone4(node.target), map(node.period), clone4(node.methodName), clone4(node.argumentList));
+ MethodInvocation copy = new MethodInvocation(cloneNode(node.target), mapToken(node.period), cloneNode(node.methodName), cloneNode(node.argumentList));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
NamedExpression visitNamedExpression(NamedExpression node) {
- NamedExpression copy = new NamedExpression(clone4(node.name), clone4(node.expression));
+ NamedExpression copy = new NamedExpression(cloneNode(node.name), cloneNode(node.expression));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- ASTNode visitNativeClause(NativeClause node) => new NativeClause(map(node.keyword), clone4(node.name));
+ AstNode visitNativeClause(NativeClause node) => new NativeClause(mapToken(node.keyword), cloneNode(node.name));
- NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new NativeFunctionBody(map(node.nativeToken), clone4(node.stringLiteral), map(node.semicolon));
+ NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new NativeFunctionBody(mapToken(node.nativeToken), cloneNode(node.stringLiteral), mapToken(node.semicolon));
NullLiteral visitNullLiteral(NullLiteral node) {
- NullLiteral copy = new NullLiteral(map(node.literal));
+ NullLiteral copy = new NullLiteral(mapToken(node.literal));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression node) {
- ParenthesizedExpression copy = new ParenthesizedExpression(map(node.leftParenthesis), clone4(node.expression), map(node.rightParenthesis));
+ ParenthesizedExpression copy = new ParenthesizedExpression(mapToken(node.leftParenthesis), cloneNode(node.expression), mapToken(node.rightParenthesis));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
PartDirective visitPartDirective(PartDirective node) {
- PartDirective copy = new PartDirective(clone4(node.documentationComment), clone5(node.metadata), map(node.partToken), clone4(node.uri), map(node.semicolon));
+ PartDirective copy = new PartDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.partToken), cloneNode(node.uri), mapToken(node.semicolon));
copy.element = node.element;
return copy;
}
PartOfDirective visitPartOfDirective(PartOfDirective node) {
- PartOfDirective copy = new PartOfDirective(clone4(node.documentationComment), clone5(node.metadata), map(node.partToken), map(node.ofToken), clone4(node.libraryName), map(node.semicolon));
+ PartOfDirective copy = new PartOfDirective(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.partToken), mapToken(node.ofToken), cloneNode(node.libraryName), mapToken(node.semicolon));
copy.element = node.element;
return copy;
}
PostfixExpression visitPostfixExpression(PostfixExpression node) {
- PostfixExpression copy = new PostfixExpression(clone4(node.operand), map(node.operator));
+ PostfixExpression copy = new PostfixExpression(cloneNode(node.operand), mapToken(node.operator));
copy.propagatedElement = node.propagatedElement;
copy.propagatedType = node.propagatedType;
copy.staticElement = node.staticElement;
@@ -16005,14 +15752,14 @@
}
PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) {
- PrefixedIdentifier copy = new PrefixedIdentifier(clone4(node.prefix), map(node.period), clone4(node.identifier));
+ PrefixedIdentifier copy = new PrefixedIdentifier(cloneNode(node.prefix), mapToken(node.period), cloneNode(node.identifier));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
PrefixExpression visitPrefixExpression(PrefixExpression node) {
- PrefixExpression copy = new PrefixExpression(map(node.operator), clone4(node.operand));
+ PrefixExpression copy = new PrefixExpression(mapToken(node.operator), cloneNode(node.operand));
copy.propagatedElement = node.propagatedElement;
copy.propagatedType = node.propagatedType;
copy.staticElement = node.staticElement;
@@ -16021,35 +15768,35 @@
}
PropertyAccess visitPropertyAccess(PropertyAccess node) {
- PropertyAccess copy = new PropertyAccess(clone4(node.target), map(node.operator), clone4(node.propertyName));
+ PropertyAccess copy = new PropertyAccess(cloneNode(node.target), mapToken(node.operator), cloneNode(node.propertyName));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
RedirectingConstructorInvocation visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
- RedirectingConstructorInvocation copy = new RedirectingConstructorInvocation(map(node.keyword), map(node.period), clone4(node.constructorName), clone4(node.argumentList));
+ RedirectingConstructorInvocation copy = new RedirectingConstructorInvocation(mapToken(node.keyword), mapToken(node.period), cloneNode(node.constructorName), cloneNode(node.argumentList));
copy.staticElement = node.staticElement;
return copy;
}
RethrowExpression visitRethrowExpression(RethrowExpression node) {
- RethrowExpression copy = new RethrowExpression(map(node.keyword));
+ RethrowExpression copy = new RethrowExpression(mapToken(node.keyword));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatement(map(node.keyword), clone4(node.expression), map(node.semicolon));
+ ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatement(mapToken(node.keyword), cloneNode(node.expression), mapToken(node.semicolon));
- ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(map(node.scriptTag));
+ ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(mapToken(node.scriptTag));
- ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(map(node.keyword), clone5(node.shownNames));
+ ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(mapToken(node.keyword), cloneNodeList(node.shownNames));
- SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) => new SimpleFormalParameter(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.type), clone4(node.identifier));
+ SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) => new SimpleFormalParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.type), cloneNode(node.identifier));
SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) {
- Token mappedToken = map(node.token);
+ Token mappedToken = mapToken(node.token);
if (mappedToken == null) {
// This only happens for SimpleIdentifiers created by the parser as part of scanning
// documentation comments (the tokens for those identifiers are not in the original token
@@ -16067,114 +15814,114 @@
}
SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) {
- SimpleStringLiteral copy = new SimpleStringLiteral(map(node.literal), node.value);
+ SimpleStringLiteral copy = new SimpleStringLiteral(mapToken(node.literal), node.value);
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
StringInterpolation visitStringInterpolation(StringInterpolation node) {
- StringInterpolation copy = new StringInterpolation(clone5(node.elements));
+ StringInterpolation copy = new StringInterpolation(cloneNodeList(node.elements));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInvocation node) {
- SuperConstructorInvocation copy = new SuperConstructorInvocation(map(node.keyword), map(node.period), clone4(node.constructorName), clone4(node.argumentList));
+ SuperConstructorInvocation copy = new SuperConstructorInvocation(mapToken(node.keyword), mapToken(node.period), cloneNode(node.constructorName), cloneNode(node.argumentList));
copy.staticElement = node.staticElement;
return copy;
}
SuperExpression visitSuperExpression(SuperExpression node) {
- SuperExpression copy = new SuperExpression(map(node.keyword));
+ SuperExpression copy = new SuperExpression(mapToken(node.keyword));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(clone5(node.labels), map(node.keyword), clone4(node.expression), map(node.colon), clone5(node.statements));
+ SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(cloneNodeList(node.labels), mapToken(node.keyword), cloneNode(node.expression), mapToken(node.colon), cloneNodeList(node.statements));
- SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(clone5(node.labels), map(node.keyword), map(node.colon), clone5(node.statements));
+ SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(cloneNodeList(node.labels), mapToken(node.keyword), mapToken(node.colon), cloneNodeList(node.statements));
- SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatement(map(node.keyword), map(node.leftParenthesis), clone4(node.expression), map(node.rightParenthesis), map(node.leftBracket), clone5(node.members), map(node.rightBracket));
+ SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatement(mapToken(node.keyword), mapToken(node.leftParenthesis), cloneNode(node.expression), mapToken(node.rightParenthesis), mapToken(node.leftBracket), cloneNodeList(node.members), mapToken(node.rightBracket));
- ASTNode visitSymbolLiteral(SymbolLiteral node) {
- SymbolLiteral copy = new SymbolLiteral(map(node.poundSign), map2(node.components));
+ AstNode visitSymbolLiteral(SymbolLiteral node) {
+ SymbolLiteral copy = new SymbolLiteral(mapToken(node.poundSign), mapTokens(node.components));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
ThisExpression visitThisExpression(ThisExpression node) {
- ThisExpression copy = new ThisExpression(map(node.keyword));
+ ThisExpression copy = new ThisExpression(mapToken(node.keyword));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
ThrowExpression visitThrowExpression(ThrowExpression node) {
- ThrowExpression copy = new ThrowExpression(map(node.keyword), clone4(node.expression));
+ ThrowExpression copy = new ThrowExpression(mapToken(node.keyword), cloneNode(node.expression));
copy.propagatedType = node.propagatedType;
copy.staticType = node.staticType;
return copy;
}
- TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration(clone4(node.documentationComment), clone5(node.metadata), clone4(node.variables), map(node.semicolon));
+ TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration(cloneNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.variables), mapToken(node.semicolon));
- TryStatement visitTryStatement(TryStatement node) => new TryStatement(map(node.tryKeyword), clone4(node.body), clone5(node.catchClauses), map(node.finallyKeyword), clone4(node.finallyBlock));
+ TryStatement visitTryStatement(TryStatement node) => new TryStatement(mapToken(node.tryKeyword), cloneNode(node.body), cloneNodeList(node.catchClauses), mapToken(node.finallyKeyword), cloneNode(node.finallyBlock));
- TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgumentList(map(node.leftBracket), clone5(node.arguments), map(node.rightBracket));
+ TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgumentList(mapToken(node.leftBracket), cloneNodeList(node.arguments), mapToken(node.rightBracket));
TypeName visitTypeName(TypeName node) {
- TypeName copy = new TypeName(clone4(node.name), clone4(node.typeArguments));
+ TypeName copy = new TypeName(cloneNode(node.name), cloneNode(node.typeArguments));
copy.type = node.type;
return copy;
}
- TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(clone4(node.documentationComment), clone5(node.metadata), clone4(node.name), map(node.keyword), clone4(node.bound));
+ TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(cloneNode(node.documentationComment), cloneNodeList(node.metadata), cloneNode(node.name), mapToken(node.keyword), cloneNode(node.bound));
- TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypeParameterList(map(node.leftBracket), clone5(node.typeParameters), map(node.rightBracket));
+ TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypeParameterList(mapToken(node.leftBracket), cloneNodeList(node.typeParameters), mapToken(node.rightBracket));
- VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new VariableDeclaration(null, clone5(node.metadata), clone4(node.name), map(node.equals), clone4(node.initializer));
+ VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new VariableDeclaration(null, cloneNodeList(node.metadata), cloneNode(node.name), mapToken(node.equals), cloneNode(node.initializer));
- VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList node) => new VariableDeclarationList(null, clone5(node.metadata), map(node.keyword), clone4(node.type), clone5(node.variables));
+ VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList node) => new VariableDeclarationList(null, cloneNodeList(node.metadata), mapToken(node.keyword), cloneNode(node.type), cloneNodeList(node.variables));
- VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclarationStatement node) => new VariableDeclarationStatement(clone4(node.variables), map(node.semicolon));
+ VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclarationStatement node) => new VariableDeclarationStatement(cloneNode(node.variables), mapToken(node.semicolon));
- WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(map(node.keyword), map(node.leftParenthesis), clone4(node.condition), map(node.rightParenthesis), clone4(node.body));
+ WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(mapToken(node.keyword), mapToken(node.leftParenthesis), cloneNode(node.condition), mapToken(node.rightParenthesis), cloneNode(node.body));
- WithClause visitWithClause(WithClause node) => new WithClause(map(node.withKeyword), clone5(node.mixinTypes));
+ WithClause visitWithClause(WithClause node) => new WithClause(mapToken(node.withKeyword), cloneNodeList(node.mixinTypes));
- ASTNode clone4(ASTNode node) {
+ AstNode cloneNode(AstNode node) {
if (node == null) {
return null;
}
if (identical(node, _oldNode)) {
return _newNode;
}
- return node.accept(this) as ASTNode;
+ return node.accept(this) as AstNode;
}
- List clone5(NodeList nodes) {
+ List cloneNodeList(NodeList nodes) {
List clonedNodes = new List();
- for (ASTNode node in nodes) {
- clonedNodes.add(clone4(node));
+ for (AstNode node in nodes) {
+ clonedNodes.add(cloneNode(node));
}
return clonedNodes;
}
- Token map(Token oldToken) {
+ Token mapToken(Token oldToken) {
if (oldToken == null) {
return null;
}
return _tokenMap.get(oldToken);
}
- List<Token> map2(List<Token> oldTokens) {
+ List<Token> mapTokens(List<Token> oldTokens) {
List<Token> newTokens = new List<Token>(oldTokens.length);
for (int index = 0; index < newTokens.length; index++) {
- newTokens[index] = map(oldTokens[index]);
+ newTokens[index] = mapToken(oldTokens[index]);
}
return newTokens;
}
@@ -16187,13 +15934,11 @@
*
* Completion test code coverage is 95%. The two basic blocks that are not executed cannot be
* executed. They are included for future reference.
- *
- * @coverage com.google.dart.engine.services.completion
*/
-class ScopedNameFinder extends GeneralizingASTVisitor<Object> {
+class ScopedNameFinder extends GeneralizingAstVisitor<Object> {
Declaration _declarationNode;
- ASTNode _immediateChild;
+ AstNode _immediateChild;
Map<String, SimpleIdentifier> _locals = new Map<String, SimpleIdentifier>();
@@ -16279,9 +16024,9 @@
return null;
}
- Object visitNode(ASTNode node) {
+ Object visitNode(AstNode node) {
_immediateChild = node;
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent != null) {
parent.accept(this);
}
@@ -16342,7 +16087,7 @@
}
}
- bool isInRange(ASTNode node) {
+ bool isInRange(AstNode node) {
if (_position < 0) {
// if source position is not set then all nodes are in range
return true;
@@ -16353,7 +16098,7 @@
/**
* Instances of the class {@code NodeList} represent a list of AST nodes that have a common parent.
*/
-class NodeList<E extends ASTNode> extends Object with ListMixin<E> {
+class NodeList<E extends AstNode> extends Object with ListMixin<E> {
/**
* Create an empty list with the given owner. This is a convenience method that allows the
* compiler to determine the correct value of the type argument [E] without needing to
@@ -16362,12 +16107,12 @@
* @param owner the node that is the parent of each of the elements in the list
* @return the list that was created
*/
- static NodeList create(ASTNode owner) => new NodeList(owner);
+ static NodeList create(AstNode owner) => new NodeList(owner);
/**
* The node that is the parent of each of the elements in the list.
*/
- ASTNode owner;
+ AstNode owner;
/**
* The elements contained in the list.
@@ -16386,7 +16131,7 @@
*
* @param visitor the visitor to be used to visit the elements of this list
*/
- accept(ASTVisitor visitor) {
+ accept(AstVisitor visitor) {
var length = _elements.length;
for (var i = 0; i < length; i++) {
_elements[i].accept(visitor);
@@ -16454,7 +16199,7 @@
E removedNode = _elements[index] as E;
int length = _elements.length;
if (length == 1) {
- _elements = ASTNode.EMPTY_ARRAY;
+ _elements = AstNode.EMPTY_ARRAY;
return removedNode;
}
_elements.removeAt(index);
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 5b23784..680f057 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -22,7 +22,6 @@
* Instances of the class `ConstantEvaluator` evaluate constant expressions to produce their
* compile-time value. According to the Dart Language Specification: <blockquote> A constant
* expression is one of the following:
- *
* * A literal number.
* * A literal boolean.
* * A literal string where any interpolated expression is a compile-time constant that evaluates
@@ -60,7 +59,6 @@
* * An expression of the form <i>e<sub>1</sub> ? e<sub>2</sub> : e<sub>3</sub></i> where
* <i>e<sub>1</sub></i>, <i>e<sub>2</sub></i> and <i>e<sub>3</sub></i> are constant expressions, and
* <i>e<sub>1</sub></i> evaluates to a boolean value.
- *
* </blockquote>
*/
class ConstantEvaluator {
@@ -92,7 +90,7 @@
}
List<AnalysisError> errors = new List<AnalysisError>();
for (ErrorResult_ErrorData data in (result as ErrorResult).errorData) {
- ASTNode node = data.node;
+ AstNode node = data.node;
errors.add(new AnalysisError.con2(_source, node.offset, node.length, data.errorCode, []));
}
return EvaluationResult.forErrors(new List.from(errors));
@@ -247,7 +245,7 @@
* the compilation units being resolved and build a table mapping constant variable elements to the
* declarations of those variables.
*/
-class ConstantFinder extends RecursiveASTVisitor<Object> {
+class ConstantFinder extends RecursiveAstVisitor<Object> {
/**
* A table mapping constant variable elements to the declarations of those variables.
*/
@@ -371,8 +369,8 @@
if (result is ErrorResult) {
List<AnalysisError> errors = new List<AnalysisError>();
for (ErrorResult_ErrorData data in result.errorData) {
- ASTNode node = data.node;
- Source source = variable.getAncestor(CompilationUnitElement).source;
+ AstNode node = data.node;
+ Source source = variable.getAncestor((element) => element is CompilationUnitElement).source;
errors.add(new AnalysisError.con2(source, node.offset, node.length, data.errorCode, []));
}
}
@@ -394,7 +392,6 @@
* Instances of the class `ConstantVisitor` evaluate constant expressions to produce their
* compile-time value. According to the Dart Language Specification: <blockquote> A constant
* expression is one of the following:
- *
* * A literal number.
* * A literal boolean.
* * A literal string where any interpolated expression is a compile-time constant that evaluates
@@ -432,10 +429,9 @@
* * An expression of the form <i>e<sub>1</sub> ? e<sub>2</sub> : e<sub>3</sub></i> where
* <i>e<sub>1</sub></i>, <i>e<sub>2</sub></i> and <i>e<sub>3</sub></i> are constant expressions, and
* <i>e<sub>1</sub></i> evaluates to a boolean value.
- *
* </blockquote>
*/
-class ConstantVisitor extends UnifyingASTVisitor<EvaluationResultImpl> {
+class ConstantVisitor extends UnifyingAstVisitor<EvaluationResultImpl> {
/**
* The type provider used to access the known types.
*/
@@ -517,14 +513,15 @@
return leftResult.divide(_typeProvider, node, rightResult);
} else if (operatorType == TokenType.TILDE_SLASH) {
return leftResult.integerDivide(_typeProvider, node, rightResult);
+ } else {
+ // TODO(brianwilkerson) Figure out which error to report.
+ return error(node, null);
}
break;
}
- // TODO(brianwilkerson) Figure out which error to report.
- return error(node, null);
}
- EvaluationResultImpl visitBooleanLiteral(BooleanLiteral node) => valid2(_typeProvider.boolType, BoolState.from(node.value));
+ EvaluationResultImpl visitBooleanLiteral(BooleanLiteral node) => valid(_typeProvider.boolType, BoolState.from(node.value));
EvaluationResultImpl visitConditionalExpression(ConditionalExpression node) {
Expression condition = node.condition;
@@ -552,10 +549,10 @@
}
InterfaceType thenType = (thenResult as ValidResult).value.type;
InterfaceType elseType = (elseResult as ValidResult).value.type;
- return valid(thenType.getLeastUpperBound(elseType) as InterfaceType);
+ return validWithUnknownValue(thenType.getLeastUpperBound(elseType) as InterfaceType);
}
- EvaluationResultImpl visitDoubleLiteral(DoubleLiteral node) => valid2(_typeProvider.doubleType, new DoubleState(node.value));
+ EvaluationResultImpl visitDoubleLiteral(DoubleLiteral node) => valid(_typeProvider.doubleType, new DoubleState(node.value));
EvaluationResultImpl visitInstanceCreationExpression(InstanceCreationExpression node) {
if (!node.isConst) {
@@ -585,7 +582,7 @@
if (className == "Symbol" && argumentCount == 1) {
String argumentValue = argumentValues[0].stringValue;
if (argumentValue != null) {
- return valid2(definingClass, new SymbolState(argumentValue));
+ return valid(definingClass, new SymbolState(argumentValue));
}
}
}
@@ -609,13 +606,13 @@
// TODO(brianwilkerson) This doesn't handle fields initialized in an initializer. We should be
// able to handle fields initialized by the superclass' constructor fairly easily, but other
// initializers will be harder.
- return valid2(definingClass, new GenericState(fieldMap));
+ return valid(definingClass, new GenericState(fieldMap));
}
// TODO(brianwilkerson) Figure out which error to report.
return error(node, null);
}
- EvaluationResultImpl visitIntegerLiteral(IntegerLiteral node) => valid2(_typeProvider.intType, new IntState(node.value));
+ EvaluationResultImpl visitIntegerLiteral(IntegerLiteral node) => valid(_typeProvider.intType, new IntState(node.value));
EvaluationResultImpl visitInterpolationExpression(InterpolationExpression node) {
EvaluationResultImpl result = node.expression.accept(this);
@@ -625,7 +622,7 @@
return result.performToString(_typeProvider, node);
}
- EvaluationResultImpl visitInterpolationString(InterpolationString node) => valid2(_typeProvider.stringType, new StringState(node.value));
+ EvaluationResultImpl visitInterpolationString(InterpolationString node) => valid(_typeProvider.stringType, new StringState(node.value));
EvaluationResultImpl visitListLiteral(ListLiteral node) {
if (node.constKeyword == null) {
@@ -643,7 +640,7 @@
if (result != null) {
return result;
}
- return valid2(_typeProvider.listType, new ListState(new List.from(elements)));
+ return valid(_typeProvider.listType, new ListState(new List.from(elements)));
}
EvaluationResultImpl visitMapLiteral(MapLiteral node) {
@@ -664,7 +661,7 @@
if (result != null) {
return result;
}
- return valid2(_typeProvider.mapType, new MapState(map));
+ return valid(_typeProvider.mapType, new MapState(map));
}
EvaluationResultImpl visitMethodInvocation(MethodInvocation node) {
@@ -692,7 +689,7 @@
EvaluationResultImpl visitNamedExpression(NamedExpression node) => node.expression.accept(this);
- EvaluationResultImpl visitNode(ASTNode node) => error(node, null);
+ EvaluationResultImpl visitNode(AstNode node) => error(node, null);
EvaluationResultImpl visitNullLiteral(NullLiteral node) => new ValidResult(null2);
@@ -724,18 +721,19 @@
return operand.bitNot(_typeProvider, node);
} else if (node.operator.type == TokenType.MINUS) {
return operand.negated(_typeProvider, node);
+ } else {
+ // TODO(brianwilkerson) Figure out which error to report.
+ return error(node, null);
}
break;
}
- // TODO(brianwilkerson) Figure out which error to report.
- return error(node, null);
}
EvaluationResultImpl visitPropertyAccess(PropertyAccess node) => getConstantValue(node, node.propertyName.staticElement);
EvaluationResultImpl visitSimpleIdentifier(SimpleIdentifier node) => getConstantValue(node, node.staticElement);
- EvaluationResultImpl visitSimpleStringLiteral(SimpleStringLiteral node) => valid2(_typeProvider.stringType, new StringState(node.value));
+ EvaluationResultImpl visitSimpleStringLiteral(SimpleStringLiteral node) => valid(_typeProvider.stringType, new StringState(node.value));
EvaluationResultImpl visitStringInterpolation(StringInterpolation node) {
EvaluationResultImpl result = null;
@@ -758,7 +756,7 @@
}
builder.append(components[i].lexeme);
}
- return valid2(_typeProvider.symbolType, new SymbolState(builder.toString()));
+ return valid(_typeProvider.symbolType, new SymbolState(builder.toString()));
}
/**
@@ -768,7 +766,7 @@
* @param code the error code indicating the nature of the error
* @return a result object representing an error associated with the given node
*/
- ErrorResult error(ASTNode node, ErrorCode code) => new ErrorResult.con1(node, code == null ? CompileTimeErrorCode.INVALID_CONSTANT : code);
+ ErrorResult error(AstNode node, ErrorCode code) => new ErrorResult.con1(node, code == null ? CompileTimeErrorCode.INVALID_CONSTANT : code);
/**
* Return the constant value of the static constant represented by the given element.
@@ -777,7 +775,7 @@
* @param element the element whose value is to be returned
* @return the constant value of the static constant
*/
- EvaluationResultImpl getConstantValue(ASTNode node, Element element) {
+ EvaluationResultImpl getConstantValue(AstNode node, Element element) {
if (element is PropertyAccessorElement) {
element = (element as PropertyAccessorElement).variable;
}
@@ -790,10 +788,10 @@
} else if (element is ExecutableElement) {
ExecutableElement function = element;
if (function.isStatic) {
- return valid2(_typeProvider.functionType, new FunctionState(function));
+ return valid(_typeProvider.functionType, new FunctionState(function));
}
} else if (element is ClassElement || element is FunctionTypeAliasElement) {
- return valid2(_typeProvider.typeType, new TypeState(element));
+ return valid(_typeProvider.typeType, new TypeState(element));
}
// TODO(brianwilkerson) Figure out which error to report.
return error(node, null);
@@ -831,24 +829,24 @@
return leftResult;
}
- ValidResult valid(InterfaceType type) {
+ ValidResult valid(InterfaceType type, InstanceState state) => new ValidResult(new DartObjectImpl(type, state));
+
+ ValidResult validWithUnknownValue(InterfaceType type) {
if (type.element.library.isDartCore) {
String typeName = type.name;
if (typeName == "bool") {
- return valid2(type, BoolState.UNKNOWN_VALUE);
+ return valid(type, BoolState.UNKNOWN_VALUE);
} else if (typeName == "double") {
- return valid2(type, DoubleState.UNKNOWN_VALUE);
+ return valid(type, DoubleState.UNKNOWN_VALUE);
} else if (typeName == "int") {
- return valid2(type, IntState.UNKNOWN_VALUE);
+ return valid(type, IntState.UNKNOWN_VALUE);
} else if (typeName == "String") {
- return valid2(type, StringState.UNKNOWN_VALUE);
+ return valid(type, StringState.UNKNOWN_VALUE);
}
}
- return valid2(type, GenericState.UNKNOWN_VALUE);
+ return valid(type, GenericState.UNKNOWN_VALUE);
}
- ValidResult valid2(InterfaceType type, InstanceState state) => new ValidResult(new DartObjectImpl(type, state));
-
/**
* Return the value of the given expression, or a representation of 'null' if the expression
* cannot be evaluated.
@@ -1046,7 +1044,7 @@
* @param node the node against which the error should be reported
* @param errorCode the error code for the error to be generated
*/
- ErrorResult.con1(ASTNode node, ErrorCode errorCode) {
+ ErrorResult.con1(AstNode node, ErrorCode errorCode) {
_errors.add(new ErrorResult_ErrorData(node, errorCode));
}
@@ -1064,7 +1062,7 @@
EvaluationResultImpl add(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.addToError(node, this);
- EvaluationResultImpl applyBooleanConversion(TypeProvider typeProvider, ASTNode node) => this;
+ EvaluationResultImpl applyBooleanConversion(TypeProvider typeProvider, AstNode node) => this;
EvaluationResultImpl bitAnd(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.bitAndError(node, this);
@@ -1108,7 +1106,7 @@
EvaluationResultImpl notEqual(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.notEqualError(node, this);
- EvaluationResultImpl performToString(TypeProvider typeProvider, ASTNode node) => this;
+ EvaluationResultImpl performToString(TypeProvider typeProvider, AstNode node) => this;
EvaluationResultImpl remainder(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.remainderError(node, this);
@@ -1201,7 +1199,7 @@
/**
* The node against which the error should be reported.
*/
- final ASTNode node;
+ final AstNode node;
/**
* The error code for the error to be generated.
@@ -1232,7 +1230,7 @@
* @param node the node against which errors should be reported
* @return the result of applying boolean conversion to the given value
*/
- EvaluationResultImpl applyBooleanConversion(TypeProvider typeProvider, ASTNode node);
+ EvaluationResultImpl applyBooleanConversion(TypeProvider typeProvider, AstNode node);
EvaluationResultImpl bitAnd(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand);
@@ -1272,7 +1270,7 @@
EvaluationResultImpl notEqual(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand);
- EvaluationResultImpl performToString(TypeProvider typeProvider, ASTNode node);
+ EvaluationResultImpl performToString(TypeProvider typeProvider, AstNode node);
EvaluationResultImpl remainder(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand);
@@ -1367,7 +1365,7 @@
* Instances of the class `ReferenceFinder` add reference information for a given variable to
* the bi-directional mapping used to order the evaluation of constants.
*/
-class ReferenceFinder extends RecursiveASTVisitor<Object> {
+class ReferenceFinder extends RecursiveAstVisitor<Object> {
/**
* The element representing the variable whose initializer will be visited.
*/
@@ -1432,7 +1430,7 @@
* @param node the node against which errors should be reported
* @return the result of applying boolean conversion to the given value
*/
- EvaluationResultImpl applyBooleanConversion(TypeProvider typeProvider, ASTNode node) {
+ EvaluationResultImpl applyBooleanConversion(TypeProvider typeProvider, AstNode node) {
try {
return valueOf(value.convertToBool(typeProvider));
} on EvaluationException catch (exception) {
@@ -1544,7 +1542,7 @@
EvaluationResultImpl notEqual(TypeProvider typeProvider, BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.notEqualValid(typeProvider, node, this);
- EvaluationResultImpl performToString(TypeProvider typeProvider, ASTNode node) {
+ EvaluationResultImpl performToString(TypeProvider typeProvider, AstNode node) {
try {
return valueOf(value.performToString(typeProvider));
} on EvaluationException catch (exception) {
@@ -1774,7 +1772,7 @@
* @param code the error code indicating the nature of the error
* @return a result object representing an error associated with the given node
*/
- ErrorResult error(ASTNode node, ErrorCode code) => new ErrorResult.con1(node, code);
+ ErrorResult error(AstNode node, ErrorCode code) => new ErrorResult.con1(node, code);
/**
* Return a result object representing the given value.
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 597ceeb..8c2beda 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -15,15 +15,13 @@
import 'scanner.dart' show Keyword;
import 'ast.dart';
import 'sdk.dart' show DartSdk;
-import 'html.dart' show XmlTagNode;
+import 'html.dart' show XmlAttributeNode, XmlTagNode;
import 'engine.dart' show AnalysisContext;
import 'constant.dart' show EvaluationResultImpl;
import 'utilities_dart.dart';
/**
* The interface `ClassElement` defines the behavior of elements that represent a class.
- *
- * @coverage dart.engine.element
*/
abstract class ClassElement implements Element {
/**
@@ -157,9 +155,11 @@
InterfaceType get supertype;
/**
- * Return an array containing all of the toolkit specific objects attached to this class.
+ * Return an array containing all of the toolkit specific objects associated with this class. The
+ * array will be empty if the class does not have any toolkit specific objects or if the
+ * compilation unit containing the class has not yet had toolkit references resolved.
*
- * @return the toolkit objects attached to this class
+ * @return the toolkit objects associated with this class
*/
List<ToolkitObjectElement> get toolkitObjects;
@@ -212,6 +212,14 @@
bool get isAbstract;
/**
+ * Return `true` if this class [isProxy], or if it inherits the proxy annotation
+ * from a supertype.
+ *
+ * @return `true` if this class defines or inherits a proxy
+ */
+ bool get isOrInheritsProxy;
+
+ /**
* Return `true` if this element has an annotation of the form '@proxy'.
*
* @return `true` if this element defines a proxy
@@ -243,13 +251,11 @@
* behavior of this method is defined by the Dart Language Specification in section 12.15.1:
* <blockquote>The result of looking up getter (respectively setter) <i>m</i> in class <i>C</i>
* with respect to library <i>L</i> is:
- *
* * If <i>C</i> declares an instance getter (respectively setter) named <i>m</i> that is
* accessible to <i>L</i>, then that getter (respectively setter) is the result of the lookup.
* Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the result
* of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect to <i>L</i>.
* Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param getterName the name of the getter being looked up
@@ -265,12 +271,10 @@
* behavior of this method is defined by the Dart Language Specification in section 12.15.1:
* <blockquote> The result of looking up method <i>m</i> in class <i>C</i> with respect to library
* <i>L</i> is:
- *
* * If <i>C</i> declares an instance method named <i>m</i> that is accessible to <i>L</i>, then
* that method is the result of the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then
* the result of the lookup is the result of looking up method <i>m</i> in <i>S</i> with respect
* to <i>L</i>. Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param methodName the name of the method being looked up
@@ -286,13 +290,11 @@
* behavior of this method is defined by the Dart Language Specification in section 12.16:
* <blockquote> The result of looking up getter (respectively setter) <i>m</i> in class <i>C</i>
* with respect to library <i>L</i> is:
- *
* * If <i>C</i> declares an instance getter (respectively setter) named <i>m</i> that is
* accessible to <i>L</i>, then that getter (respectively setter) is the result of the lookup.
* Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the result
* of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect to <i>L</i>.
* Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param setterName the name of the setter being looked up
@@ -327,8 +329,6 @@
/**
* The interface `CompilationUnitElement` defines the behavior of elements representing a
* compilation unit.
- *
- * @coverage dart.engine.element
*/
abstract class CompilationUnitElement implements Element, UriReferencedElement {
/**
@@ -340,6 +340,15 @@
List<PropertyAccessorElement> get accessors;
/**
+ * Return an array containing all of the Angular views defined in this compilation unit. The array
+ * will be empty if the element does not have any Angular views or if the compilation unit has not
+ * yet had toolkit references resolved.
+ *
+ * @return the Angular views defined in this compilation unit.
+ */
+ List<AngularViewElement> get angularViews;
+
+ /**
* Return the library in which this compilation unit is defined.
*
* @return the library in which this compilation unit is defined
@@ -397,8 +406,6 @@
/**
* The interface `ConstructorElement` defines the behavior of elements representing a
* constructor or a factory method defined within a type.
- *
- * @coverage dart.engine.element
*/
abstract class ConstructorElement implements ClassMemberElement, ExecutableElement {
/**
@@ -413,7 +420,9 @@
ConstructorDeclaration get node;
/**
- * Return the constructor to which this constructor is redirecting.
+ * Return the constructor to which this constructor is redirecting, or `null` if this constructor
+ * does not redirect to another constructor or if the library containing this constructor has
+ * not yet been resolved.
*
* @return the constructor to which this constructor is redirecting
*/
@@ -451,18 +460,14 @@
* are created for the convenience of various kinds of analysis but that do not have any
* corresponding declaration within the source code. Such elements are marked as being
* <i>synthetic</i>. Examples of synthetic elements include
- *
* * default constructors in classes that do not define any explicit constructors,
* * getters and setters that are induced by explicit field declarations,
* * fields that are induced by explicit declarations of getters and setters, and
* * functions representing the initialization expression for a variable.
*
- *
* Second, there are elements in the element model that do not have a name. These correspond to
* unnamed functions and exist in order to more accurately represent the semantic structure of the
* program.
- *
- * @coverage dart.engine.element
*/
abstract class Element {
/**
@@ -503,7 +508,7 @@
* @param elementClass the class of the element to be returned
* @return the element that encloses this element
*/
- Element getAncestor(Type elementClass);
+ Element getAncestor(Predicate<Element> predicate);
/**
* Return the analysis context in which this element is defined.
@@ -556,7 +561,9 @@
ElementLocation get location;
/**
- * Return an array containing all of the metadata associated with this element.
+ * Return an array containing all of the metadata associated with this element. The array will be
+ * empty if the element does not have any metadata or if the library containing this element has
+ * not yet been resolved.
*
* @return the metadata associated with this element
*/
@@ -579,15 +586,15 @@
int get nameOffset;
/**
- * Return the resolved [ASTNode] node that declares this [Element].
+ * Return the resolved [AstNode] node that declares this [Element].
*
* This method is expensive, because resolved AST might be evicted from cache, so parsing and
* resolving will be performed.
*
- * @return the resolved [ASTNode], maybe `null` if [Element] is synthetic or
+ * @return the resolved [AstNode], maybe `null` if [Element] is synthetic or
* isn't contained in a compilation unit, such as a [LibraryElement].
*/
- ASTNode get node;
+ AstNode get node;
/**
* Return the source that contains this element, or `null` if this element is not contained
@@ -627,6 +634,13 @@
bool get isDeprecated;
/**
+ * Return `true` if this element has an annotation of the form '@override'.
+ *
+ * @return `true` if this element is overridden
+ */
+ bool get isOverride;
+
+ /**
* Return `true` if this element is private. Private elements are visible only within the
* library in which they are declared.
*
@@ -663,8 +677,6 @@
/**
* The interface `ElementAnnotation` defines the behavior of objects representing a single
* annotation associated with an element.
- *
- * @coverage dart.engine.element
*/
abstract class ElementAnnotation {
/**
@@ -703,8 +715,6 @@
/**
* The enumeration `ElementKind` defines the various kinds of elements in the element model.
- *
- * @coverage dart.engine.element
*/
class ElementKind extends Enum<ElementKind> {
static final ElementKind ANGULAR_FILTER = new ElementKind('ANGULAR_FILTER', 0, "Angular filter");
@@ -717,57 +727,61 @@
static final ElementKind ANGULAR_PROPERTY = new ElementKind('ANGULAR_PROPERTY', 4, "Angular property");
- static final ElementKind ANGULAR_SELECTOR = new ElementKind('ANGULAR_SELECTOR', 5, "Angular selector");
+ static final ElementKind ANGULAR_SCOPE_PROPERTY = new ElementKind('ANGULAR_SCOPE_PROPERTY', 5, "Angular scope property");
- static final ElementKind CLASS = new ElementKind('CLASS', 6, "class");
+ static final ElementKind ANGULAR_SELECTOR = new ElementKind('ANGULAR_SELECTOR', 6, "Angular selector");
- static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT', 7, "compilation unit");
+ static final ElementKind ANGULAR_VIEW = new ElementKind('ANGULAR_VIEW', 7, "Angular view");
- static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 8, "constructor");
+ static final ElementKind CLASS = new ElementKind('CLASS', 8, "class");
- static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 9, "<dynamic>");
+ static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT', 9, "compilation unit");
- static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML_SCRIPT', 10, "embedded html script");
+ static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 10, "constructor");
- static final ElementKind ERROR = new ElementKind('ERROR', 11, "<error>");
+ static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 11, "<dynamic>");
- static final ElementKind EXPORT = new ElementKind('EXPORT', 12, "export directive");
+ static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML_SCRIPT', 12, "embedded html script");
- static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML_SCRIPT', 13, "external html script");
+ static final ElementKind ERROR = new ElementKind('ERROR', 13, "<error>");
- static final ElementKind FIELD = new ElementKind('FIELD', 14, "field");
+ static final ElementKind EXPORT = new ElementKind('EXPORT', 14, "export directive");
- static final ElementKind FUNCTION = new ElementKind('FUNCTION', 15, "function");
+ static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML_SCRIPT', 15, "external html script");
- static final ElementKind GETTER = new ElementKind('GETTER', 16, "getter");
+ static final ElementKind FIELD = new ElementKind('FIELD', 16, "field");
- static final ElementKind HTML = new ElementKind('HTML', 17, "html");
+ static final ElementKind FUNCTION = new ElementKind('FUNCTION', 17, "function");
- static final ElementKind IMPORT = new ElementKind('IMPORT', 18, "import directive");
+ static final ElementKind GETTER = new ElementKind('GETTER', 18, "getter");
- static final ElementKind LABEL = new ElementKind('LABEL', 19, "label");
+ static final ElementKind HTML = new ElementKind('HTML', 19, "html");
- static final ElementKind LIBRARY = new ElementKind('LIBRARY', 20, "library");
+ static final ElementKind IMPORT = new ElementKind('IMPORT', 20, "import directive");
- static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 21, "local variable");
+ static final ElementKind LABEL = new ElementKind('LABEL', 21, "label");
- static final ElementKind METHOD = new ElementKind('METHOD', 22, "method");
+ static final ElementKind LIBRARY = new ElementKind('LIBRARY', 22, "library");
- static final ElementKind NAME = new ElementKind('NAME', 23, "<name>");
+ static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 23, "local variable");
- static final ElementKind PARAMETER = new ElementKind('PARAMETER', 24, "parameter");
+ static final ElementKind METHOD = new ElementKind('METHOD', 24, "method");
- static final ElementKind PREFIX = new ElementKind('PREFIX', 25, "import prefix");
+ static final ElementKind NAME = new ElementKind('NAME', 25, "<name>");
- static final ElementKind SETTER = new ElementKind('SETTER', 26, "setter");
+ static final ElementKind PARAMETER = new ElementKind('PARAMETER', 26, "parameter");
- static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIABLE', 27, "top level variable");
+ static final ElementKind PREFIX = new ElementKind('PREFIX', 27, "import prefix");
- static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ALIAS', 28, "function type alias");
+ static final ElementKind SETTER = new ElementKind('SETTER', 28, "setter");
- static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 29, "type parameter");
+ static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIABLE', 29, "top level variable");
- static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 30, "<universe>");
+ static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ALIAS', 30, "function type alias");
+
+ static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 31, "type parameter");
+
+ static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 32, "<universe>");
static final List<ElementKind> values = [
ANGULAR_FILTER,
@@ -775,7 +789,9 @@
ANGULAR_CONTROLLER,
ANGULAR_DIRECTIVE,
ANGULAR_PROPERTY,
+ ANGULAR_SCOPE_PROPERTY,
ANGULAR_SELECTOR,
+ ANGULAR_VIEW,
CLASS,
COMPILATION_UNIT,
CONSTRUCTOR,
@@ -832,8 +848,6 @@
/**
* The interface `ElementLocation` defines the behavior of objects that represent the location
* of an element within the element model.
- *
- * @coverage dart.engine.element
*/
abstract class ElementLocation {
/**
@@ -848,8 +862,6 @@
/**
* The interface `ElementVisitor` defines the behavior of objects that can be used to visit an
* element structure.
- *
- * @coverage dart.engine.element
*/
abstract class ElementVisitor<R> {
R visitAngularComponentElement(AngularComponentElement element);
@@ -862,8 +874,12 @@
R visitAngularPropertyElement(AngularPropertyElement element);
+ R visitAngularScopePropertyElement(AngularScopePropertyElement element);
+
R visitAngularSelectorElement(AngularSelectorElement element);
+ R visitAngularViewElement(AngularViewElement element);
+
R visitClassElement(ClassElement element);
R visitCompilationUnitElement(CompilationUnitElement element);
@@ -912,8 +928,6 @@
/**
* The interface `EmbeddedHtmlScriptElement` defines the behavior of elements representing a
* script tag in an HTML file having content that defines a Dart library.
- *
- * @coverage dart.engine.element
*/
abstract class EmbeddedHtmlScriptElement implements HtmlScriptElement {
/**
@@ -927,8 +941,6 @@
/**
* The interface `ExecutableElement` defines the behavior of elements representing an
* executable object, including functions, methods, constructors, getters, and setters.
- *
- * @coverage dart.engine.element
*/
abstract class ExecutableElement implements Element {
/**
@@ -994,8 +1006,6 @@
/**
* The interface `ExportElement` defines the behavior of objects representing information
* about a single export directive within a library.
- *
- * @coverage dart.engine.element
*/
abstract class ExportElement implements Element, UriReferencedElement {
/**
@@ -1023,8 +1033,6 @@
* The interface `ExternalHtmlScriptElement` defines the behavior of elements representing a
* script tag in an HTML file having a `source` attribute that references a Dart library
* source file.
- *
- * @coverage dart.engine.element
*/
abstract class ExternalHtmlScriptElement implements HtmlScriptElement {
/**
@@ -1039,8 +1047,6 @@
/**
* The interface `FieldElement` defines the behavior of elements representing a field defined
* within a type.
- *
- * @coverage dart.engine.element
*/
abstract class FieldElement implements ClassMemberElement, PropertyInducingElement {
}
@@ -1061,8 +1067,6 @@
/**
* The interface `FunctionElement` defines the behavior of elements representing a function.
- *
- * @coverage dart.engine.element
*/
abstract class FunctionElement implements ExecutableElement, LocalElement {
/**
@@ -1080,8 +1084,6 @@
/**
* The interface `FunctionTypeAliasElement` defines the behavior of elements representing a
* function type alias (`typedef`).
- *
- * @coverage dart.engine.element
*/
abstract class FunctionTypeAliasElement implements Element {
/**
@@ -1134,8 +1136,6 @@
/**
* The interface `HideElementCombinator` defines the behavior of combinators that cause some
* of the names in a namespace to be hidden when being imported.
- *
- * @coverage dart.engine.element
*/
abstract class HideElementCombinator implements NamespaceCombinator {
/**
@@ -1149,8 +1149,6 @@
/**
* The interface `HtmlElement` defines the behavior of elements representing an HTML file.
- *
- * @coverage dart.engine.element
*/
abstract class HtmlElement implements Element {
/**
@@ -1175,7 +1173,6 @@
*
* @see EmbeddedHtmlScriptElement
* @see ExternalHtmlScriptElement
- * @coverage dart.engine.element
*/
abstract class HtmlScriptElement implements Element {
}
@@ -1183,8 +1180,6 @@
/**
* The interface `ImportElement` defines the behavior of objects representing information
* about a single import directive within a library.
- *
- * @coverage dart.engine.element
*/
abstract class ImportElement implements Element, UriReferencedElement {
/**
@@ -1236,8 +1231,6 @@
/**
* The interface `LabelElement` defines the behavior of elements representing a label
* associated with a statement.
- *
- * @coverage dart.engine.element
*/
abstract class LabelElement implements Element {
/**
@@ -1250,8 +1243,6 @@
/**
* The interface `LibraryElement` defines the behavior of elements representing a library.
- *
- * @coverage dart.engine.element
*/
abstract class LibraryElement implements Element {
/**
@@ -1348,7 +1339,8 @@
bool hasExtUri();
/**
- * Return `true` if this library is created for Angular analysis.
+ * Return `true` if this library is created for Angular analysis. If this library has not
+ * yet had toolkit references resolved, then `false` will be returned.
*
* @return `true` if this library is created for Angular analysis
*/
@@ -1388,15 +1380,12 @@
/**
* The interface `LocalElement` defines the behavior of elements that can be (but are not
* required to be) defined within a method or function (an [ExecutableElement]).
- *
- * @coverage dart.engine.element
*/
abstract class LocalElement implements Element {
/**
* Return a source range that covers the approximate portion of the source in which the name of
* this element is visible, or `null` if there is no single range of characters within which
* the element name is visible.
- *
* * For a local variable, this includes everything from the end of the variable's initializer
* to the end of the block that encloses the variable declaration.
* * For a parameter, this includes the body of the method or function that declares the
@@ -1406,7 +1395,6 @@
* * For top-level functions, `null` will be returned because they are potentially visible
* in multiple sources.
*
- *
* @return the range of characters in which the name of this element is visible
*/
SourceRange get visibleRange;
@@ -1415,8 +1403,6 @@
/**
* The interface `LocalVariableElement` defines the behavior common to elements that represent
* a local variable.
- *
- * @coverage dart.engine.element
*/
abstract class LocalVariableElement implements LocalElement, VariableElement {
/**
@@ -1430,8 +1416,6 @@
/**
* The interface `MethodElement` defines the behavior of elements that represent a method
* defined within a type.
- *
- * @coverage dart.engine.element
*/
abstract class MethodElement implements ClassMemberElement, ExecutableElement {
/**
@@ -1459,8 +1443,6 @@
* is not allowed by the language, so objects implementing this interface always represent an error.
* As a result, most of the normal operations on elements do not make sense and will return useless
* results.
- *
- * @coverage dart.engine.element
*/
abstract class MultiplyDefinedElement implements Element {
/**
@@ -1480,10 +1462,23 @@
}
/**
+ * The interface [MultiplyInheritedExecutableElement] defines all of the behavior of an
+ * [ExecutableElement], with the additional information of an array of
+ * [ExecutableElement]s from which this element was composed.
+ */
+abstract class MultiplyInheritedExecutableElement implements ExecutableElement {
+ /**
+ * Return an array containing all of the executable elements defined within this executable
+ * element.
+ *
+ * @return the elements defined within this executable element
+ */
+ List<ExecutableElement> get inheritedElements;
+}
+
+/**
* The interface `NamespaceCombinator` defines the behavior common to objects that control how
* namespaces are combined.
- *
- * @coverage dart.engine.element
*/
abstract class NamespaceCombinator {
/**
@@ -1495,8 +1490,6 @@
/**
* The interface `ParameterElement` defines the behavior of elements representing a parameter
* defined within an executable element.
- *
- * @coverage dart.engine.element
*/
abstract class ParameterElement implements LocalElement, VariableElement {
/**
@@ -1533,8 +1526,6 @@
/**
* The interface `PrefixElement` defines the behavior common to elements that represent a
* prefix used to import one or more libraries into another library.
- *
- * @coverage dart.engine.element
*/
abstract class PrefixElement implements Element {
/**
@@ -1557,7 +1548,6 @@
* getter or a setter. Note that explicitly defined property accessors implicitly define a synthetic
* field. Symmetrically, synthetic accessors are implicitly created for explicitly defined fields.
* The following rules apply:
- *
* * Every explicit field is represented by a non-synthetic [FieldElement].
* * Every explicit field induces a getter and possibly a setter, both of which are represented by
* synthetic [PropertyAccessorElement]s.
@@ -1565,9 +1555,6 @@
* [PropertyAccessorElement].
* * Every explicit getter or setter (or pair thereof if they have the same name) induces a field
* that is represented by a synthetic [FieldElement].
- *
- *
- * @coverage dart.engine.element
*/
abstract class PropertyAccessorElement implements ExecutableElement {
/**
@@ -1625,7 +1612,6 @@
* variables implicitly define a synthetic getter and that non-`final` explicitly defined
* variables implicitly define a synthetic setter. Symmetrically, synthetic fields are implicitly
* created for explicitly defined getters and setters. The following rules apply:
- *
* * Every explicit variable is represented by a non-synthetic [PropertyInducingElement].
* * Every explicit variable induces a getter and possibly a setter, both of which are represented
* by synthetic [PropertyAccessorElement]s.
@@ -1633,9 +1619,6 @@
* [PropertyAccessorElement].
* * Every explicit getter or setter (or pair thereof if they have the same name) induces a
* variable that is represented by a synthetic [PropertyInducingElement].
- *
- *
- * @coverage dart.engine.element
*/
abstract class PropertyInducingElement implements VariableElement {
/**
@@ -1669,8 +1652,6 @@
/**
* The interface `ShowElementCombinator` defines the behavior of combinators that cause some
* of the names in a namespace to be visible (and the rest hidden) when being imported.
- *
- * @coverage dart.engine.element
*/
abstract class ShowElementCombinator implements NamespaceCombinator {
/**
@@ -1700,8 +1681,6 @@
* The interface `ToolkitObjectElement` defines the behavior of elements that represent a
* toolkit specific object, such as Angular controller or component. These elements are not based on
* the Dart syntax, but on some semantic agreement, such as a special annotation.
- *
- * @coverage dart.engine.element
*/
abstract class ToolkitObjectElement implements Element {
/**
@@ -1713,8 +1692,6 @@
/**
* The interface `TopLevelVariableElement` defines the behavior of elements representing a
* top-level variable.
- *
- * @coverage dart.engine.element
*/
abstract class TopLevelVariableElement implements PropertyInducingElement {
}
@@ -1722,8 +1699,6 @@
/**
* The interface `TypeParameterElement` defines the behavior of elements representing a type
* parameter.
- *
- * @coverage dart.engine.element
*/
abstract class TypeParameterElement implements Element {
/**
@@ -1747,8 +1722,6 @@
* names that are undefined. This situation is not allowed by the language, so objects implementing
* this interface always represent an error. As a result, most of the normal operations on elements
* do not make sense and will return useless results.
- *
- * @coverage dart.engine.element
*/
abstract class UndefinedElement implements Element {
}
@@ -1756,8 +1729,6 @@
/**
* The interface `UriReferencedElement` defines the behavior of objects included into a
* library using some URI.
- *
- * @coverage dart.engine.element
*/
abstract class UriReferencedElement implements Element {
/**
@@ -1772,8 +1743,6 @@
/**
* The interface `VariableElement` defines the behavior common to elements that represent a
* variable.
- *
- * @coverage dart.engine.element
*/
abstract class VariableElement implements Element {
/**
@@ -1824,16 +1793,20 @@
/**
* The interface `AngularControllerElement` defines the Angular component described by
* <code>NgComponent</code> annotation.
- *
- * @coverage dart.engine.element
*/
-abstract class AngularComponentElement implements AngularHasSelectorElement {
+abstract class AngularComponentElement implements AngularHasSelectorElement, AngularHasTemplateElement {
/**
* Return an array containing all of the properties declared by this component.
*/
List<AngularPropertyElement> get properties;
/**
+ * Return an array containing all of the scope properties set in the implementation of this
+ * component.
+ */
+ List<AngularScopePropertyElement> get scopeProperties;
+
+ /**
* Returns the CSS file URI.
*/
String get styleUri;
@@ -1844,7 +1817,86 @@
* @return the offset of the style URI
*/
int get styleUriOffset;
+}
+/**
+ * The interface `AngularControllerElement` defines the Angular controller described by
+ * <code>NgController</code> annotation.
+ */
+abstract class AngularControllerElement implements AngularHasSelectorElement {
+}
+
+/**
+ * The interface `AngularDirectiveElement` defines the Angular controller described by
+ * <code>NgDirective</code> annotation.
+ */
+abstract class AngularDirectiveElement implements AngularHasSelectorElement {
+ /**
+ * Return an array containing all of the properties declared by this directive.
+ */
+ List<AngularPropertyElement> get properties;
+
+ /**
+ * Checks if this directive is implemented by the class with given name.
+ */
+ bool isClass(String name);
+}
+
+/**
+ * The interface `AngularElement` defines the behavior of objects representing information
+ * about an Angular specific element.
+ */
+abstract class AngularElement implements ToolkitObjectElement {
+ /**
+ * An empty array of angular elements.
+ */
+ static final List<AngularElement> EMPTY_ARRAY = new List<AngularElement>(0);
+
+ /**
+ * Returns the [AngularApplication] this element is used in.
+ *
+ * @return the [AngularApplication] this element is used in
+ */
+ AngularApplication get application;
+}
+
+/**
+ * The interface `AngularFilterElement` defines the Angular filter described by
+ * <code>NgFilter</code> annotation.
+ */
+abstract class AngularFilterElement implements AngularElement {
+}
+
+/**
+ * [AngularSelectorElement] based on presence of attribute.
+ */
+abstract class AngularHasAttributeSelectorElement implements AngularSelectorElement {
+}
+
+/**
+ * [AngularSelectorElement] based on presence of a class.
+ */
+abstract class AngularHasClassSelectorElement implements AngularSelectorElement {
+}
+
+/**
+ * The interface `AngularElement` defines the behavior of objects representing information
+ * about an Angular element which is applied conditionally using some [AngularSelectorElement].
+ */
+abstract class AngularHasSelectorElement implements AngularElement {
+ /**
+ * Returns the selector specified for this element.
+ *
+ * @return the [AngularSelectorElement] specified for this element
+ */
+ AngularSelectorElement get selector;
+}
+
+/**
+ * The interface `AngularHasTemplateElement` defines common behavior for
+ * [AngularElement] that have template URI / [Source].
+ */
+abstract class AngularHasTemplateElement implements AngularElement {
/**
* Returns the HTML template [Source], `null` if not resolved.
*/
@@ -1864,74 +1916,8 @@
}
/**
- * The interface `AngularControllerElement` defines the Angular controller described by
- * <code>NgController</code> annotation.
- *
- * @coverage dart.engine.element
- */
-abstract class AngularControllerElement implements AngularHasSelectorElement {
-}
-
-/**
- * The interface `AngularDirectiveElement` defines the Angular controller described by
- * <code>NgDirective</code> annotation.
- *
- * @coverage dart.engine.element
- */
-abstract class AngularDirectiveElement implements AngularHasSelectorElement {
- /**
- * Return an array containing all of the properties declared by this directive.
- */
- List<AngularPropertyElement> get properties;
-
- /**
- * Checks if this directive is implemented by the class with given name.
- */
- bool isClass(String name);
-}
-
-/**
- * The interface `AngularElement` defines the behavior of objects representing information
- * about an Angular specific element.
- *
- * @coverage dart.engine.element
- */
-abstract class AngularElement implements ToolkitObjectElement {
- /**
- * An empty array of angular elements.
- */
- static final List<AngularElement> EMPTY_ARRAY = new List<AngularElement>(0);
-}
-
-/**
- * The interface `AngularFilterElement` defines the Angular filter described by
- * <code>NgFilter</code> annotation.
- *
- * @coverage dart.engine.element
- */
-abstract class AngularFilterElement implements AngularElement {
-}
-
-/**
- * The interface `AngularElement` defines the behavior of objects representing information
- * about an Angular element which is applied conditionally using some [AngularSelectorElement].
- *
- * @coverage dart.engine.element
- */
-abstract class AngularHasSelectorElement implements AngularElement {
- /**
- * Returns the selector specified for this element.
- *
- * @return the [AngularSelectorElement] specified for this element
- */
- AngularSelectorElement get selector;
-}
-
-/**
* The interface `AngularPropertyElement` defines a single property in
* [AngularComponentElement].
- *
- * @coverage dart.engine.element
*/
abstract class AngularPropertyElement implements AngularElement {
/**
@@ -1947,7 +1933,8 @@
FieldElement get field;
/**
- * Return the offset of the field name of this property in the property map.
+ * Return the offset of the field name of this property in the property map, or `-1` if
+ * property was created using annotation on [FieldElement].
*
* @return the offset of the field name of this property
*/
@@ -1963,8 +1950,6 @@
/**
* The enumeration `AngularPropertyKind` defines the different kinds of property bindings.
- *
- * @coverage dart.engine.element
*/
class AngularPropertyKind extends Enum<AngularPropertyKind> {
/**
@@ -2022,6 +2007,24 @@
}
/**
+ * The interface `AngularScopeVariableElement` defines the Angular <code>Scope</code>
+ * property. They are created for every <code>scope['property'] = value;</code> code snippet.
+ */
+abstract class AngularScopePropertyElement implements AngularElement {
+ /**
+ * An empty array of scope property elements.
+ */
+ static final List<AngularScopePropertyElement> EMPTY_ARRAY = [];
+
+ /**
+ * Returns the type of this property, not `null`, maybe <code>dynamic</code>.
+ *
+ * @return the type of this property.
+ */
+ Type2 get type;
+}
+
+/**
* [AngularSelectorElement] is used to decide when Angular object should be applied.
*
* This class is an [Element] to support renaming component tag names, which are identifiers
@@ -2038,6 +2041,23 @@
}
/**
+ * [AngularSelectorElement] based on tag name.
+ */
+abstract class AngularTagSelectorElement implements AngularSelectorElement {
+}
+
+/**
+ * The interface `AngularViewElement` defines the Angular view defined using invocation like
+ * <code>view('views/create.html')</code>.
+ */
+abstract class AngularViewElement implements AngularHasTemplateElement {
+ /**
+ * An empty array of view elements.
+ */
+ static final List<AngularViewElement> EMPTY_ARRAY = new List<AngularViewElement>(0);
+}
+
+/**
* Instances of the class `GeneralizingElementVisitor` implement an element visitor that will
* recursively visit all of the elements in an element model (like instances of the class
* [RecursiveElementVisitor]). In addition, when an element of a specific type is visited not
@@ -2091,8 +2111,6 @@
* explicitly invoke the more general visit method. Failure to do so will cause the visit methods
* for superclasses of the element to not be invoked and will cause the children of the visited node
* to not be visited.
- *
- * @coverage dart.engine.element
*/
class GeneralizingElementVisitor<R> implements ElementVisitor<R> {
R visitAngularComponentElement(AngularComponentElement element) => visitAngularHasSelectorElement(element);
@@ -2109,8 +2127,12 @@
R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularElement(element);
+ R visitAngularScopePropertyElement(AngularScopePropertyElement element) => visitAngularElement(element);
+
R visitAngularSelectorElement(AngularSelectorElement element) => visitAngularElement(element);
+ R visitAngularViewElement(AngularViewElement element) => visitAngularElement(element);
+
R visitClassElement(ClassElement element) => visitElement(element);
R visitCompilationUnitElement(CompilationUnitElement element) => visitElement(element);
@@ -2191,8 +2213,6 @@
* Subclasses that override a visit method must either invoke the overridden visit method or must
* explicitly ask the visited element to visit its children. Failure to do so will cause the
* children of the visited element to not be visited.
- *
- * @coverage dart.engine.element
*/
class RecursiveElementVisitor<R> implements ElementVisitor<R> {
R visitAngularComponentElement(AngularComponentElement element) {
@@ -2220,11 +2240,21 @@
return null;
}
+ R visitAngularScopePropertyElement(AngularScopePropertyElement element) {
+ element.visitChildren(this);
+ return null;
+ }
+
R visitAngularSelectorElement(AngularSelectorElement element) {
element.visitChildren(this);
return null;
}
+ R visitAngularViewElement(AngularViewElement element) {
+ element.visitChildren(this);
+ return null;
+ }
+
R visitClassElement(ClassElement element) {
element.visitChildren(this);
return null;
@@ -2341,8 +2371,6 @@
* nothing when visiting an element. It is intended to be a superclass for classes that use the
* visitor pattern primarily as a dispatch mechanism (and hence don't need to recursively visit a
* whole structure) and that only need to visit a small number of element types.
- *
- * @coverage dart.engine.element
*/
class SimpleElementVisitor<R> implements ElementVisitor<R> {
R visitAngularComponentElement(AngularComponentElement element) => null;
@@ -2355,8 +2383,12 @@
R visitAngularPropertyElement(AngularPropertyElement element) => null;
+ R visitAngularScopePropertyElement(AngularScopePropertyElement element) => null;
+
R visitAngularSelectorElement(AngularSelectorElement element) => null;
+ R visitAngularViewElement(AngularViewElement element) => null;
+
R visitClassElement(ClassElement element) => null;
R visitCompilationUnitElement(CompilationUnitElement element) => null;
@@ -2433,8 +2465,6 @@
/**
* Instances of the class `ClassElementImpl` implement a `ClassElement`.
- *
- * @coverage dart.engine.element
*/
class ClassElementImpl extends ElementImpl implements ClassElement {
/**
@@ -2489,7 +2519,7 @@
List<TypeParameterElement> _typeParameters = TypeParameterElementImpl.EMPTY_ARRAY;
/**
- * An empty array of type elements.
+ * An empty array of class elements.
*/
static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0);
@@ -2588,7 +2618,7 @@
return null;
}
- ClassDeclaration get node => getNode2(ClassDeclaration);
+ ClassDeclaration get node => getNode2((node) => node is ClassDeclaration);
PropertyAccessorElement getSetter(String setterName) {
// TODO (jwren) revisit- should we append '=' here or require clients to include it?
@@ -2654,6 +2684,8 @@
bool get isAbstract => hasModifier(Modifier.ABSTRACT);
+ bool get isOrInheritsProxy => safeIsOrInheritsProxy(this, new Set<ClassElement>());
+
bool get isProxy {
for (ElementAnnotation annotation in metadata) {
if (annotation.isProxy) {
@@ -2914,13 +2946,36 @@
}
}
}
+
+ bool safeIsOrInheritsProxy(ClassElement classElt, Set<ClassElement> visitedClassElts) {
+ if (visitedClassElts.contains(classElt)) {
+ return false;
+ }
+ visitedClassElts.add(classElt);
+ if (classElt.isProxy) {
+ return true;
+ } else if (classElt.supertype != null && safeIsOrInheritsProxy(classElt.supertype.element, visitedClassElts)) {
+ return true;
+ }
+ List<InterfaceType> supertypes = classElt.interfaces;
+ for (int i = 0; i < supertypes.length; i++) {
+ if (safeIsOrInheritsProxy(supertypes[i].element, visitedClassElts)) {
+ return true;
+ }
+ }
+ supertypes = classElt.mixins;
+ for (int i = 0; i < supertypes.length; i++) {
+ if (safeIsOrInheritsProxy(supertypes[i].element, visitedClassElts)) {
+ return true;
+ }
+ }
+ return false;
+ }
}
/**
* Instances of the class `CompilationUnitElementImpl` implement a
* [CompilationUnitElement].
- *
- * @coverage dart.engine.element
*/
class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitElement {
/**
@@ -2971,6 +3026,11 @@
String uri;
/**
+ * An array containing all of the Angular views contained in this compilation unit.
+ */
+ List<AngularViewElement> _angularViews = AngularViewElement.EMPTY_ARRAY;
+
+ /**
* Initialize a newly created compilation unit element to have the given name.
*
* @param name the name of this element
@@ -2983,6 +3043,8 @@
List<PropertyAccessorElement> get accessors => _accessors;
+ List<AngularViewElement> get angularViews => _angularViews;
+
ElementImpl getChild(String identifier) {
//
// The casts in this method are safe because the set methods would have thrown a CCE if any of
@@ -3055,6 +3117,18 @@
}
/**
+ * Set the Angular views defined in this compilation unit.
+ *
+ * @param angularViews the Angular views defined in this compilation unit
+ */
+ void set angularViews(List<AngularViewElement> angularViews) {
+ for (AngularViewElement view in angularViews) {
+ (view as AngularViewElementImpl).enclosingElement = this;
+ }
+ this._angularViews = angularViews;
+ }
+
+ /**
* Set the top-level functions contained in this compilation unit to the given functions.
*
* @param functions the top-level functions contained in this compilation unit
@@ -3109,6 +3183,7 @@
safelyVisitChildren(_typeAliases, visitor);
safelyVisitChildren(_types, visitor);
safelyVisitChildren(_variables, visitor);
+ safelyVisitChildren(_angularViews, visitor);
}
void appendTo(JavaStringBuilder builder) {
@@ -3173,8 +3248,6 @@
/**
* Instances of the class `ConstLocalVariableElementImpl` implement a
* `LocalVariableElement` for a local 'const' variable that has an initializer.
- *
- * @coverage dart.engine.element
*/
class ConstLocalVariableElementImpl extends LocalVariableElementImpl {
/**
@@ -3222,8 +3295,6 @@
/**
* Instances of the class `ConstructorElementImpl` implement a `ConstructorElement`.
- *
- * @coverage dart.engine.element
*/
class ConstructorElementImpl extends ExecutableElementImpl implements ConstructorElement {
/**
@@ -3241,7 +3312,16 @@
*
* @param name the name of this element
*/
- ConstructorElementImpl(Identifier name) : super.con1(name);
+ ConstructorElementImpl.con1(Identifier name) : super.con1(name);
+
+ /**
+ * Initialize a newly created constructor element to have the given name.
+ *
+ * @param name the name of this element
+ * @param nameOffset the offset of the name of this element in the file that contains the
+ * declaration of this element
+ */
+ ConstructorElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOffset);
accept(ElementVisitor visitor) => visitor.visitConstructorElement(this);
@@ -3249,7 +3329,7 @@
ElementKind get kind => ElementKind.CONSTRUCTOR;
- ConstructorDeclaration get node => getNode2(ConstructorDeclaration);
+ ConstructorDeclaration get node => getNode2((node) => node is ConstructorDeclaration);
bool get isConst => hasModifier(Modifier.CONST);
@@ -3305,8 +3385,6 @@
/**
* Instances of the class `DefaultFieldFormalParameterElementImpl` implement a
* `FieldFormalParameterElementImpl` for parameters that have an initializer.
- *
- * @coverage dart.engine.element
*/
class DefaultFieldFormalParameterElementImpl extends FieldFormalParameterElementImpl {
/**
@@ -3331,8 +3409,6 @@
/**
* Instances of the class `DefaultParameterElementImpl` implement a `ParameterElement`
* for parameters that have an initializer.
- *
- * @coverage dart.engine.element
*/
class DefaultParameterElementImpl extends ParameterElementImpl {
/**
@@ -3357,8 +3433,6 @@
/**
* Instances of the class `DynamicElementImpl` represent the synthetic element representing
* the declaration of the type `dynamic`.
- *
- * @coverage dart.engine.element
*/
class DynamicElementImpl extends ElementImpl {
/**
@@ -3389,8 +3463,6 @@
/**
* Instances of the class `ElementAnnotationImpl` implement an [ElementAnnotation].
- *
- * @coverage dart.engine.element
*/
class ElementAnnotationImpl implements ElementAnnotation {
/**
@@ -3479,8 +3551,6 @@
/**
* The abstract class `ElementImpl` implements the behavior common to objects that implement
* an [Element].
- *
- * @coverage dart.engine.element
*/
abstract class ElementImpl implements Element {
/**
@@ -3551,9 +3621,9 @@
return object.runtimeType == runtimeType && (object as Element).location == location;
}
- Element getAncestor(Type elementClass) {
+ Element getAncestor(Predicate<Element> predicate) {
Element ancestor = _enclosingElement;
- while (ancestor != null && !isInstanceOf(ancestor, elementClass)) {
+ while (ancestor != null && !predicate(ancestor)) {
ancestor = ancestor.enclosingElement;
}
return ancestor;
@@ -3579,13 +3649,13 @@
Element get enclosingElement => _enclosingElement;
- LibraryElement get library => getAncestor(LibraryElement);
+ LibraryElement get library => getAncestor((element) => element is LibraryElement);
ElementLocation get location => new ElementLocationImpl.con1(this);
String get name => _name;
- ASTNode get node => getNode2(ASTNode);
+ AstNode get node => getNode2((node) => node is AstNode);
Source get source {
if (_enclosingElement == null) {
@@ -3621,6 +3691,15 @@
return false;
}
+ bool get isOverride {
+ for (ElementAnnotation annotation in metadata) {
+ if (annotation.isOverride) {
+ return true;
+ }
+ }
+ return false;
+ }
+
bool get isPrivate {
String name = displayName;
if (name == null) {
@@ -3684,19 +3763,19 @@
String get identifier => name;
/**
- * Return the resolved [ASTNode] of the given type enclosing [getNameOffset].
+ * Return the resolved [AstNode] of the given type enclosing [getNameOffset].
*/
- ASTNode getNode2(Type clazz) {
+ AstNode getNode2(Predicate<AstNode> predicate) {
CompilationUnit unit = this.unit;
if (unit == null) {
return null;
}
int offset = nameOffset;
- ASTNode node = new NodeLocator.con1(offset).searchWithin(unit);
+ AstNode node = new NodeLocator.con1(offset).searchWithin(unit);
if (node == null) {
return null;
}
- return node.getAncestor(clazz);
+ return node.getAncestor(predicate);
}
/**
@@ -3756,8 +3835,6 @@
/**
* Instances of the class `ElementLocationImpl` implement an [ElementLocation].
- *
- * @coverage dart.engine.element
*/
class ElementLocationImpl implements ElementLocation {
/**
@@ -4004,8 +4081,6 @@
/**
* Instances of the class `EmbeddedHtmlScriptElementImpl` implement an
* [EmbeddedHtmlScriptElement].
- *
- * @coverage dart.engine.element
*/
class EmbeddedHtmlScriptElementImpl extends HtmlScriptElementImpl implements EmbeddedHtmlScriptElement {
/**
@@ -4044,8 +4119,6 @@
/**
* The abstract class `ExecutableElementImpl` implements the behavior common to
* `ExecutableElement`s.
- *
- * @coverage dart.engine.element
*/
abstract class ExecutableElementImpl extends ElementImpl implements ExecutableElement {
/**
@@ -4232,8 +4305,6 @@
/**
* Instances of the class `ExportElementImpl` implement an [ExportElement].
- *
- * @coverage dart.engine.element
*/
class ExportElementImpl extends ElementImpl implements ExportElement {
/**
@@ -4272,8 +4343,6 @@
/**
* Instances of the class `ExternalHtmlScriptElementImpl` implement an
* [ExternalHtmlScriptElement].
- *
- * @coverage dart.engine.element
*/
class ExternalHtmlScriptElementImpl extends HtmlScriptElementImpl implements ExternalHtmlScriptElement {
/**
@@ -4295,8 +4364,6 @@
/**
* Instances of the class `FieldElementImpl` implement a `FieldElement`.
- *
- * @coverage dart.engine.element
*/
class FieldElementImpl extends PropertyInducingElementImpl implements FieldElement {
/**
@@ -4340,8 +4407,6 @@
* Instances of the class `FieldFormalParameterElementImpl` extend
* [ParameterElementImpl] to provide the additional information of the [FieldElement]
* associated with the parameter.
- *
- * @coverage dart.engine.element
*/
class FieldFormalParameterElementImpl extends ParameterElementImpl implements FieldFormalParameterElement {
/**
@@ -4363,8 +4428,6 @@
/**
* Instances of the class `FunctionElementImpl` implement a `FunctionElement`.
- *
- * @coverage dart.engine.element
*/
class FunctionElementImpl extends ExecutableElementImpl implements FunctionElement {
/**
@@ -4403,7 +4466,7 @@
ElementKind get kind => ElementKind.FUNCTION;
- FunctionDeclaration get node => getNode2(FunctionDeclaration);
+ FunctionDeclaration get node => getNode2((node) => node is FunctionDeclaration);
SourceRange get visibleRange {
if (_visibleRangeLength < 0) {
@@ -4441,8 +4504,6 @@
/**
* Instances of the class `FunctionTypeAliasElementImpl` implement a
* `FunctionTypeAliasElement`.
- *
- * @coverage dart.engine.element
*/
class FunctionTypeAliasElementImpl extends ElementImpl implements FunctionTypeAliasElement {
/**
@@ -4497,7 +4558,7 @@
ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
- FunctionTypeAlias get node => getNode2(FunctionTypeAlias);
+ FunctionTypeAlias get node => getNode2((node) => node is FunctionTypeAlias);
List<ParameterElement> get parameters => _parameters;
@@ -4590,8 +4651,6 @@
/**
* Instances of the class `HideElementCombinatorImpl` implement a
* [HideElementCombinator].
- *
- * @coverage dart.engine.element
*/
class HideElementCombinatorImpl implements HideElementCombinator {
/**
@@ -4616,8 +4675,6 @@
/**
* Instances of the class `HtmlElementImpl` implement an [HtmlElement].
- *
- * @coverage dart.engine.element
*/
class HtmlElementImpl extends ElementImpl implements HtmlElement {
/**
@@ -4703,8 +4760,6 @@
/**
* Instances of the class `HtmlScriptElementImpl` implement an [HtmlScriptElement].
- *
- * @coverage dart.engine.element
*/
abstract class HtmlScriptElementImpl extends ElementImpl implements HtmlScriptElement {
/**
@@ -4722,8 +4777,6 @@
/**
* Instances of the class `ImportElementImpl` implement an [ImportElement].
- *
- * @coverage dart.engine.element
*/
class ImportElementImpl extends ElementImpl implements ImportElement {
/**
@@ -4786,8 +4839,6 @@
/**
* Instances of the class `LabelElementImpl` implement a `LabelElement`.
- *
- * @coverage dart.engine.element
*/
class LabelElementImpl extends ElementImpl implements LabelElement {
/**
@@ -4843,8 +4894,6 @@
/**
* Instances of the class `LibraryElementImpl` implement a `LibraryElement`.
- *
- * @coverage dart.engine.element
*/
class LibraryElementImpl extends ElementImpl implements LibraryElement {
/**
@@ -4862,13 +4911,14 @@
static bool isUpToDate(LibraryElement library, int timeStamp, Set<LibraryElement> visitedLibraries) {
if (!visitedLibraries.contains(library)) {
visitedLibraries.add(library);
+ AnalysisContext context = library.context;
// Check the defining compilation unit.
- if (timeStamp < library.definingCompilationUnit.source.modificationStamp) {
+ if (timeStamp < context.getModificationStamp(library.definingCompilationUnit.source)) {
return false;
}
// Check the parted compilation units.
for (CompilationUnitElement element in library.parts) {
- if (timeStamp < element.source.modificationStamp) {
+ if (timeStamp < context.getModificationStamp(element.source)) {
return false;
}
}
@@ -5189,19 +5239,17 @@
/**
* Instances of the class `LocalVariableElementImpl` implement a `LocalVariableElement`.
- *
- * @coverage dart.engine.element
*/
class LocalVariableElementImpl extends VariableElementImpl implements LocalVariableElement {
/**
* Is `true` if this variable is potentially mutated somewhere in its scope.
*/
- bool _isPotentiallyMutatedInScope2 = false;
+ bool _potentiallyMutatedInScope = false;
/**
* Is `true` if this variable is potentially mutated somewhere in closure.
*/
- bool _isPotentiallyMutatedInClosure2 = false;
+ bool _potentiallyMutatedInClosure = false;
/**
* The offset to the beginning of the visible range for this element.
@@ -5231,7 +5279,7 @@
ElementKind get kind => ElementKind.LOCAL_VARIABLE;
List<ToolkitObjectElement> get toolkitObjects {
- CompilationUnitElementImpl unit = getAncestor(CompilationUnitElementImpl);
+ CompilationUnitElementImpl unit = getAncestor((element) => element is CompilationUnitElementImpl);
if (unit == null) {
return ToolkitObjectElement.EMPTY_ARRAY;
}
@@ -5245,22 +5293,22 @@
return new SourceRange(_visibleRangeOffset, _visibleRangeLength);
}
- bool get isPotentiallyMutatedInClosure => _isPotentiallyMutatedInClosure2;
+ bool get isPotentiallyMutatedInClosure => _potentiallyMutatedInClosure;
- bool get isPotentiallyMutatedInScope => _isPotentiallyMutatedInScope2;
+ bool get isPotentiallyMutatedInScope => _potentiallyMutatedInScope;
/**
* Specifies that this variable is potentially mutated somewhere in closure.
*/
void markPotentiallyMutatedInClosure() {
- _isPotentiallyMutatedInClosure2 = true;
+ _potentiallyMutatedInClosure = true;
}
/**
* Specifies that this variable is potentially mutated somewhere in its scope.
*/
void markPotentiallyMutatedInScope() {
- _isPotentiallyMutatedInScope2 = true;
+ _potentiallyMutatedInScope = true;
}
/**
@@ -5269,7 +5317,7 @@
* @param toolkitObjects the toolkit objects attached to this variable
*/
void set toolkitObjects(List<ToolkitObjectElement> toolkitObjects) {
- CompilationUnitElementImpl unit = getAncestor(CompilationUnitElementImpl);
+ CompilationUnitElementImpl unit = getAncestor((element) => element is CompilationUnitElementImpl);
if (unit == null) {
return;
}
@@ -5300,8 +5348,6 @@
/**
* Instances of the class `MethodElementImpl` implement a `MethodElement`.
- *
- * @coverage dart.engine.element
*/
class MethodElementImpl extends ExecutableElementImpl implements MethodElement {
/**
@@ -5341,7 +5387,7 @@
return super.name;
}
- MethodDeclaration get node => getNode2(MethodDeclaration);
+ MethodDeclaration get node => getNode2((node) => node is MethodDeclaration);
bool get isAbstract => hasModifier(Modifier.ABSTRACT);
@@ -5385,8 +5431,6 @@
/**
* The enumeration `Modifier` defines constants for all of the modifiers defined by the Dart
* language and for a few additional flags that are useful.
- *
- * @coverage dart.engine.element
*/
class Modifier extends Enum<Modifier> {
/**
@@ -5463,8 +5507,6 @@
/**
* Instances of the class `MultiplyDefinedElementImpl` represent a collection of elements that
* have the same name within the same scope.
- *
- * @coverage dart.engine.element
*/
class MultiplyDefinedElementImpl implements MultiplyDefinedElement {
/**
@@ -5547,7 +5589,7 @@
String computeDocumentationComment() => null;
- Element getAncestor(Type elementClass) => null;
+ Element getAncestor(Predicate<Element> predicate) => null;
String get displayName => _name;
@@ -5565,7 +5607,7 @@
int get nameOffset => -1;
- ASTNode get node => null;
+ AstNode get node => null;
Source get source => null;
@@ -5584,6 +5626,8 @@
bool get isDeprecated => false;
+ bool get isOverride => false;
+
bool get isPrivate {
String name = displayName;
if (name == null) {
@@ -5615,20 +5659,62 @@
}
/**
+ * The interface [MultiplyInheritedMethodElementImpl] defines all of the behavior of an
+ * [MethodElementImpl], with the additional information of an array of
+ * [ExecutableElement]s from which this element was composed.
+ */
+class MultiplyInheritedMethodElementImpl extends MethodElementImpl implements MultiplyInheritedExecutableElement {
+ /**
+ * An array the array of executable elements that were used to compose this element.
+ */
+ List<ExecutableElement> _elements = MethodElementImpl.EMPTY_ARRAY;
+
+ MultiplyInheritedMethodElementImpl(Identifier name) : super.con1(name) {
+ synthetic = true;
+ }
+
+ List<ExecutableElement> get inheritedElements => _elements;
+
+ void set inheritedElements(List<ExecutableElement> elements) {
+ this._elements = elements;
+ }
+}
+
+/**
+ * The interface [MultiplyInheritedPropertyAccessorElementImpl] defines all of the behavior of
+ * an [PropertyAccessorElementImpl], with the additional information of an array of
+ * [ExecutableElement]s from which this element was composed.
+ */
+class MultiplyInheritedPropertyAccessorElementImpl extends PropertyAccessorElementImpl implements MultiplyInheritedExecutableElement {
+ /**
+ * An array the array of executable elements that were used to compose this element.
+ */
+ List<ExecutableElement> _elements = PropertyAccessorElementImpl.EMPTY_ARRAY;
+
+ MultiplyInheritedPropertyAccessorElementImpl(Identifier name) : super.con1(name) {
+ synthetic = true;
+ }
+
+ List<ExecutableElement> get inheritedElements => _elements;
+
+ void set inheritedElements(List<ExecutableElement> elements) {
+ this._elements = elements;
+ }
+}
+
+/**
* Instances of the class `ParameterElementImpl` implement a `ParameterElement`.
- *
- * @coverage dart.engine.element
*/
class ParameterElementImpl extends VariableElementImpl implements ParameterElement {
/**
* Is `true` if this variable is potentially mutated somewhere in its scope.
*/
- bool _isPotentiallyMutatedInScope3 = false;
+ bool _potentiallyMutatedInScope = false;
/**
* Is `true` if this variable is potentially mutated somewhere in closure.
*/
- bool _isPotentiallyMutatedInClosure3 = false;
+ bool _potentiallyMutatedInClosure = false;
/**
* An array containing all of the parameters defined by this parameter element. There will only be
@@ -5706,22 +5792,22 @@
bool get isInitializingFormal => false;
- bool get isPotentiallyMutatedInClosure => _isPotentiallyMutatedInClosure3;
+ bool get isPotentiallyMutatedInClosure => _potentiallyMutatedInClosure;
- bool get isPotentiallyMutatedInScope => _isPotentiallyMutatedInScope3;
+ bool get isPotentiallyMutatedInScope => _potentiallyMutatedInScope;
/**
* Specifies that this variable is potentially mutated somewhere in closure.
*/
void markPotentiallyMutatedInClosure() {
- _isPotentiallyMutatedInClosure3 = true;
+ _potentiallyMutatedInClosure = true;
}
/**
* Specifies that this variable is potentially mutated somewhere in its scope.
*/
void markPotentiallyMutatedInScope() {
- _isPotentiallyMutatedInScope3 = true;
+ _potentiallyMutatedInScope = true;
}
/**
@@ -5777,6 +5863,7 @@
} else if (parameterKind == ParameterKind.POSITIONAL) {
left = "[";
right = "]";
+ } else if (parameterKind == ParameterKind.REQUIRED) {
}
break;
}
@@ -5799,8 +5886,6 @@
/**
* Instances of the class `PrefixElementImpl` implement a `PrefixElement`.
- *
- * @coverage dart.engine.element
*/
class PrefixElementImpl extends ElementImpl implements PrefixElement {
/**
@@ -5851,8 +5936,6 @@
/**
* Instances of the class `PropertyAccessorElementImpl` implement a
* `PropertyAccessorElement`.
- *
- * @coverage dart.engine.element
*/
class PropertyAccessorElementImpl extends ExecutableElementImpl implements PropertyAccessorElement {
/**
@@ -5915,15 +5998,15 @@
return super.name;
}
- ASTNode get node {
+ AstNode get node {
if (isSynthetic) {
return null;
}
if (enclosingElement is ClassElement) {
- return getNode2(MethodDeclaration);
+ return getNode2((node) => node is MethodDeclaration);
}
if (enclosingElement is CompilationUnitElement) {
- return getNode2(FunctionDeclaration);
+ return getNode2((node) => node is FunctionDeclaration);
}
return null;
}
@@ -5984,8 +6067,6 @@
/**
* Instances of the class `PropertyInducingElementImpl` implement a
* `PropertyInducingElement`.
- *
- * @coverage dart.engine.element
*/
abstract class PropertyInducingElementImpl extends VariableElementImpl implements PropertyInducingElement {
/**
@@ -6024,8 +6105,6 @@
/**
* Instances of the class `ShowElementCombinatorImpl` implement a
* [ShowElementCombinator].
- *
- * @coverage dart.engine.element
*/
class ShowElementCombinatorImpl implements ShowElementCombinator {
/**
@@ -6060,8 +6139,6 @@
/**
* Instances of the class `ToolkitObjectElementImpl` implement a `ToolkitObjectElement`.
- *
- * @coverage dart.engine.element
*/
abstract class ToolkitObjectElementImpl extends ElementImpl implements ToolkitObjectElement {
/**
@@ -6077,8 +6154,6 @@
/**
* Instances of the class `TopLevelVariableElementImpl` implement a
* `TopLevelVariableElement`.
- *
- * @coverage dart.engine.element
*/
class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements TopLevelVariableElement {
/**
@@ -6109,8 +6184,6 @@
/**
* Instances of the class `TypeParameterElementImpl` implement a [TypeParameterElement].
- *
- * @coverage dart.engine.element
*/
class TypeParameterElementImpl extends ElementImpl implements TypeParameterElement {
/**
@@ -6151,8 +6224,6 @@
/**
* Instances of the class `VariableElementImpl` implement a `VariableElement`.
- *
- * @coverage dart.engine.element
*/
abstract class VariableElementImpl extends ElementImpl implements VariableElement {
/**
@@ -6189,8 +6260,8 @@
/**
* Return the result of evaluating this variable's initializer as a compile-time constant
- * expression, or `null` if this variable is not a 'const' variable or does not have an
- * initializer.
+ * expression, or `null` if this variable is not a 'const' variable, if it does not have an
+ * initializer, or if the compilation unit containing the variable has not been resolved.
*
* @return the result of evaluating this variable's initializer
*/
@@ -6198,15 +6269,16 @@
FunctionElement get initializer => _initializer;
- VariableDeclaration get node => getNode2(VariableDeclaration);
+ VariableDeclaration get node => getNode2((node) => node is VariableDeclaration);
bool get isConst => hasModifier(Modifier.CONST);
bool get isFinal => hasModifier(Modifier.FINAL);
/**
- * Return `true` if this variable is potentially mutated somewhere in closure. This
- * information is only available for local variables (including parameters).
+ * Return `true` if this variable is potentially mutated somewhere in a closure. This
+ * information is only available for local variables (including parameters) and only after the
+ * compilation unit containing the variable has been resolved.
*
* @return `true` if this variable is potentially mutated somewhere in closure
*/
@@ -6214,7 +6286,8 @@
/**
* Return `true` if this variable is potentially mutated somewhere in its scope. This
- * information is only available for local variables (including parameters).
+ * information is only available for local variables (including parameters) and only after the
+ * compilation unit containing the variable has been resolved.
*
* @return `true` if this variable is potentially mutated somewhere in its scope
*/
@@ -6273,9 +6346,29 @@
}
/**
+ * Information about Angular application.
+ */
+class AngularApplication {
+ final Source entryPoint;
+
+ Set<Source> _librarySources;
+
+ final List<AngularElement> elements;
+
+ final List<Source> elementSources;
+
+ AngularApplication(this.entryPoint, Set<Source> librarySources, this.elements, this.elementSources) {
+ this._librarySources = librarySources;
+ }
+
+ /**
+ * Checks if this application depends on the library with the given [Source].
+ */
+ bool dependsOn(Source librarySource) => _librarySources.contains(librarySource);
+}
+
+/**
* Implementation of `AngularComponentElement`.
- *
- * @coverage dart.engine.element
*/
class AngularComponentElementImpl extends AngularHasSelectorElementImpl implements AngularComponentElement {
/**
@@ -6289,6 +6382,11 @@
List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY;
/**
+ * The array containing all of the scope properties set by this component.
+ */
+ List<AngularScopePropertyElement> _scopeProperties = AngularScopePropertyElement.EMPTY_ARRAY;
+
+ /**
* The the CSS file URI.
*/
String styleUri;
@@ -6330,6 +6428,8 @@
List<AngularPropertyElement> get properties => _properties;
+ List<AngularScopePropertyElement> get scopeProperties => _scopeProperties;
+
/**
* Set an array containing all of the properties declared by this component.
*
@@ -6342,8 +6442,21 @@
this._properties = properties;
}
+ /**
+ * Set an array containing all of the scope properties declared by this component.
+ *
+ * @param properties the properties to set
+ */
+ void set scopeProperties(List<AngularScopePropertyElement> properties) {
+ for (AngularScopePropertyElement property in properties) {
+ encloseElement(property as AngularScopePropertyElementImpl);
+ }
+ this._scopeProperties = properties;
+ }
+
void visitChildren(ElementVisitor visitor) {
safelyVisitChildren(_properties, visitor);
+ safelyVisitChildren(_scopeProperties, visitor);
super.visitChildren(visitor);
}
@@ -6352,8 +6465,6 @@
/**
* Implementation of `AngularControllerElement`.
- *
- * @coverage dart.engine.element
*/
class AngularControllerElementImpl extends AngularHasSelectorElementImpl implements AngularControllerElement {
/**
@@ -6372,8 +6483,6 @@
/**
* Implementation of `AngularDirectiveElement`.
- *
- * @coverage dart.engine.element
*/
class AngularDirectiveElementImpl extends AngularHasSelectorElementImpl implements AngularDirectiveElement {
/**
@@ -6430,11 +6539,14 @@
/**
* Implementation of `AngularElement`.
- *
- * @coverage dart.engine.element
*/
abstract class AngularElementImpl extends ToolkitObjectElementImpl implements AngularElement {
/**
+ * The [AngularApplication] this element is used in.
+ */
+ AngularApplication _application;
+
+ /**
* Initialize a newly created Angular element to have the given name.
*
* @param name the name of this element
@@ -6442,12 +6554,19 @@
* declaration of this element
*/
AngularElementImpl(String name, int nameOffset) : super(name, nameOffset);
+
+ AngularApplication get application => _application;
+
+ /**
+ * Set the [AngularApplication] this element is used in.
+ */
+ void set application(AngularApplication application) {
+ this._application = application;
+ }
}
/**
* Implementation of `AngularFilterElement`.
- *
- * @coverage dart.engine.element
*/
class AngularFilterElementImpl extends AngularElementImpl implements AngularFilterElement {
/**
@@ -6465,9 +6584,35 @@
}
/**
+ * Implementation of [AngularSelectorElement] based on presence of a class.
+ */
+class AngularHasClassSelectorElementImpl extends AngularSelectorElementImpl implements AngularHasClassSelectorElement {
+ AngularHasClassSelectorElementImpl(String name, int offset) : super(name, offset);
+
+ bool apply(XmlTagNode node) {
+ XmlAttributeNode attribute = node.getAttribute("class");
+ if (attribute != null) {
+ String text = attribute.text;
+ if (text != null) {
+ String name = this.name;
+ for (String className in StringUtils.split(text)) {
+ if (className == name) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ void appendTo(JavaStringBuilder builder) {
+ builder.append(".");
+ builder.append(name);
+ }
+}
+
+/**
* Implementation of `AngularSelectorElement`.
- *
- * @coverage dart.engine.element
*/
abstract class AngularHasSelectorElementImpl extends AngularElementImpl implements AngularHasSelectorElement {
/**
@@ -6504,8 +6649,6 @@
/**
* Implementation of `AngularPropertyElement`.
- *
- * @coverage dart.engine.element
*/
class AngularPropertyElementImpl extends AngularElementImpl implements AngularPropertyElement {
/**
@@ -6535,9 +6678,30 @@
}
/**
+ * Implementation of `AngularScopePropertyElement`.
+ */
+class AngularScopePropertyElementImpl extends AngularElementImpl implements AngularScopePropertyElement {
+ /**
+ * The type of the property
+ */
+ final Type2 type;
+
+ /**
+ * Initialize a newly created Angular scope property to have the given name.
+ *
+ * @param name the name of this element
+ * @param nameOffset the offset of the name of this element in the file that contains the
+ * declaration of this element
+ */
+ AngularScopePropertyElementImpl(String name, int nameOffset, this.type) : super(name, nameOffset);
+
+ accept(ElementVisitor visitor) => visitor.visitAngularScopePropertyElement(this);
+
+ ElementKind get kind => ElementKind.ANGULAR_SCOPE_PROPERTY;
+}
+
+/**
* Implementation of `AngularFilterElement`.
- *
- * @coverage dart.engine.element
*/
abstract class AngularSelectorElementImpl extends AngularElementImpl implements AngularSelectorElement {
/**
@@ -6555,9 +6719,54 @@
}
/**
+ * Implementation of [AngularSelectorElement] based on tag name.
+ */
+class AngularTagSelectorElementImpl extends AngularSelectorElementImpl implements AngularTagSelectorElement {
+ AngularTagSelectorElementImpl(String name, int offset) : super(name, offset);
+
+ bool apply(XmlTagNode node) {
+ String tagName = name;
+ return node.tag == tagName;
+ }
+
+ AngularApplication get application => (enclosingElement as AngularElementImpl).application;
+}
+
+/**
+ * Implementation of `AngularViewElement`.
+ */
+class AngularViewElementImpl extends AngularElementImpl implements AngularViewElement {
+ /**
+ * The HTML template URI.
+ */
+ final String templateUri;
+
+ /**
+ * The offset of the [templateUri] in the [getSource].
+ */
+ final int templateUriOffset;
+
+ /**
+ * The HTML template source.
+ */
+ Source templateSource;
+
+ /**
+ * Initialize a newly created Angular view.
+ */
+ AngularViewElementImpl(this.templateUri, this.templateUriOffset) : super(null, -1);
+
+ accept(ElementVisitor visitor) => visitor.visitAngularViewElement(this);
+
+ ElementKind get kind => ElementKind.ANGULAR_VIEW;
+
+ String get identifier => "AngularView@${templateUriOffset}";
+}
+
+/**
* Implementation of [AngularSelectorElement] based on presence of attribute.
*/
-class HasAttributeSelectorElementImpl extends AngularSelectorElementImpl {
+class HasAttributeSelectorElementImpl extends AngularSelectorElementImpl implements AngularHasAttributeSelectorElement {
HasAttributeSelectorElementImpl(String attributeName, int offset) : super(attributeName, offset);
bool apply(XmlTagNode node) {
@@ -6565,11 +6774,15 @@
return node.getAttribute(attributeName) != null;
}
- String get displayName => "[${super.displayName}]";
+ void appendTo(JavaStringBuilder builder) {
+ builder.append("[");
+ builder.append(name);
+ builder.append("]");
+ }
}
/**
- * Combination of [IsTagSelectorElementImpl] and [HasAttributeSelectorElementImpl].
+ * Combination of [AngularTagSelectorElementImpl] and [HasAttributeSelectorElementImpl].
*/
class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl {
final String tagName;
@@ -6582,18 +6795,6 @@
}
/**
- * Implementation of [AngularSelectorElement] based on tag name.
- */
-class IsTagSelectorElementImpl extends AngularSelectorElementImpl {
- IsTagSelectorElementImpl(String name, int offset) : super(name, offset);
-
- bool apply(XmlTagNode node) {
- String tagName = name;
- return node.tag == tagName;
- }
-}
-
-/**
* Instances of the class `ConstructorMember` represent a constructor element defined in a
* parameterized type where the values of the type parameters are known.
*/
@@ -6852,7 +7053,7 @@
String computeDocumentationComment() => _baseElement.computeDocumentationComment();
- Element getAncestor(Type elementClass) => baseElement.getAncestor(elementClass);
+ Element getAncestor(Predicate<Element> predicate) => baseElement.getAncestor(predicate);
/**
* Return the element on which the parameterized element was created.
@@ -6877,7 +7078,7 @@
int get nameOffset => _baseElement.nameOffset;
- ASTNode get node => _baseElement.node;
+ AstNode get node => _baseElement.node;
Source get source => _baseElement.source;
@@ -6887,6 +7088,8 @@
bool get isDeprecated => _baseElement.isDeprecated;
+ bool get isOverride => _baseElement.isOverride;
+
bool get isPrivate => _baseElement.isPrivate;
bool get isPublic => _baseElement.isPublic;
@@ -7084,8 +7287,8 @@
accept(ElementVisitor visitor) => visitor.visitParameterElement(this);
- Element getAncestor(Type elementClass) {
- Element element = baseElement.getAncestor(elementClass);
+ Element getAncestor(Predicate<Element> predicate) {
+ Element element = baseElement.getAncestor(predicate);
ParameterizedType definingType = this.definingType;
if (definingType is InterfaceType) {
InterfaceType definingInterfaceType = definingType;
@@ -7136,6 +7339,7 @@
} else if (baseElement.parameterKind == ParameterKind.POSITIONAL) {
left = "[";
right = "]";
+ } else if (baseElement.parameterKind == ParameterKind.REQUIRED) {
}
break;
}
@@ -7293,8 +7497,6 @@
/**
* The unique instance of the class `BottomTypeImpl` implements the type `bottom`.
- *
- * @coverage dart.engine.type
*/
class BottomTypeImpl extends TypeImpl {
/**
@@ -7333,8 +7535,6 @@
/**
* The unique instance of the class `DynamicTypeImpl` implements the type `dynamic`.
- *
- * @coverage dart.engine.type
*/
class DynamicTypeImpl extends TypeImpl {
/**
@@ -7391,8 +7591,6 @@
/**
* Instances of the class `FunctionTypeImpl` defines the behavior common to objects
* representing the type of a function, method, constructor, getter, or setter.
- *
- * @coverage dart.engine.type
*/
class FunctionTypeImpl extends TypeImpl implements FunctionType {
/**
@@ -7589,7 +7787,7 @@
if (element is FunctionTypeAliasElement) {
return element.typeParameters;
}
- ClassElement definingClass = element.getAncestor(ClassElement);
+ ClassElement definingClass = element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
return definingClass.typeParameters;
}
@@ -7948,8 +8146,6 @@
* Instances of the class `InterfaceTypeImpl` defines the behavior common to objects
* representing the type introduced by either a class or an interface, or a reference to such a
* type.
- *
- * @coverage dart.engine.type
*/
class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
/**
@@ -8676,8 +8872,6 @@
/**
* The abstract class `TypeImpl` implements the behavior common to objects representing the
* declared type of elements in the element model.
- *
- * @coverage dart.engine.type
*/
abstract class TypeImpl implements Type2 {
static bool equalArrays(List<Type2> typeArgs1, List<Type2> typeArgs2, Set<ElementPair> visitedElementPairs) {
@@ -8886,8 +9080,6 @@
/**
* Instances of the class `TypeParameterTypeImpl` defines the behavior of objects representing
* the type introduced by a type parameter.
- *
- * @coverage dart.engine.type
*/
class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
/**
@@ -9002,8 +9194,6 @@
/**
* The unique instance of the class `VoidTypeImpl` implements the type `void`.
- *
- * @coverage dart.engine.type
*/
class VoidTypeImpl extends TypeImpl implements VoidType {
/**
@@ -9050,8 +9240,6 @@
* * The types of functions with named parameters. These have the general form <i>(T<sub>1</sub>,
* …, T<sub>n</sub>, {T<sub>x1</sub> x1, …, T<sub>xk</sub> xk}) → T</i>.
* </ol>
- *
- * @coverage dart.engine.type
*/
abstract class FunctionType implements ParameterizedType {
/**
@@ -9103,46 +9291,34 @@
* A function type <i>(T<sub>1</sub>, …, T<sub>n</sub>) → T</i> is a subtype of the
* function type <i>(S<sub>1</sub>, …, S<sub>n</sub>) → S</i>, if all of the following
* conditions are met:
- *
* * Either
- *
* * <i>S</i> is void, or
* * <i>T ⇔ S</i>.
*
- *
* * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> ⇔ S<sub>i</sub></i>.
- *
* A function type <i>(T<sub>1</sub>, …, T<sub>n</sub>, [T<sub>n+1</sub>, …,
* T<sub>n+k</sub>]) → T</i> is a subtype of the function type <i>(S<sub>1</sub>, …,
* S<sub>n</sub>, [S<sub>n+1</sub>, …, S<sub>n+m</sub>]) → S</i>, if all of the
* following conditions are met:
- *
* * Either
- *
* * <i>S</i> is void, or
* * <i>T ⇔ S</i>.
*
- *
* * <i>k</i> >= <i>m</i> and for all <i>i</i>, 1 <= <i>i</i> <= <i>n+m</i>, <i>T<sub>i</sub>
* ⇔ S<sub>i</sub></i>.
- *
* A function type <i>(T<sub>1</sub>, …, T<sub>n</sub>, {T<sub>x1</sub> x1, …,
* T<sub>xk</sub> xk}) → T</i> is a subtype of the function type <i>(S<sub>1</sub>, …,
* S<sub>n</sub>, {S<sub>y1</sub> y1, …, S<sub>ym</sub> ym}) → S</i>, if all of the
* following conditions are met:
- *
* * Either
- *
* * <i>S</i> is void,
* * or <i>T ⇔ S</i>.
*
- *
* * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> ⇔ S<sub>i</sub></i>.
* * <i>k</i> >= <i>m</i> and <i>y<sub>i</sub></i> in <i>{x<sub>1</sub>, …,
* x<sub>k</sub>}</i>, 1 <= <i>i</i> <= <i>m</i>.
* * For all <i>y<sub>i</sub></i> in <i>{y<sub>1</sub>, …, y<sub>m</sub>}</i>,
* <i>y<sub>i</sub> = x<sub>j</sub> => Tj ⇔ Si</i>.
- *
* In addition, the following subtype rules apply:
*
* <i>(T<sub>1</sub>, …, T<sub>n</sub>, []) → T <: (T<sub>1</sub>, …,
@@ -9179,8 +9355,6 @@
/**
* The interface `InterfaceType` defines the behavior common to objects representing the type
* introduced by either a class or an interface, or a reference to such a type.
- *
- * @coverage dart.engine.type
*/
abstract class InterfaceType implements ParameterizedType {
/**
@@ -9277,14 +9451,12 @@
* Return `true` if this type is a direct supertype of the given type. The implicit
* interface of class <i>I</i> is a direct supertype of the implicit interface of class <i>J</i>
* iff:
- *
* * <i>I</i> is Object, and <i>J</i> has no extends clause.
* * <i>I</i> is listed in the extends clause of <i>J</i>.
* * <i>I</i> is listed in the implements clause of <i>J</i>.
* * <i>I</i> is listed in the with clause of <i>J</i>.
* * <i>J</i> is a mixin application of the mixin of <i>I</i>.
*
- *
* @param type the type being compared with this type
* @return `true` if this type is a direct supertype of the given type
*/
@@ -9294,7 +9466,6 @@
* Return `true` if this type is more specific than the given type. An interface type
* <i>T</i> is more specific than an interface type <i>S</i>, written <i>T « S</i>, if one
* of the following conditions is met:
- *
* * Reflexivity: <i>T</i> is <i>S</i>.
* * <i>T</i> is bottom.
* * <i>S</i> is dynamic.
@@ -9305,7 +9476,6 @@
* <i>T<sub>i</sub> « S<sub>i</sub></i>, <i>1 <= i <= n</i>.
* * Transitivity: <i>T « U</i> and <i>U « S</i>.
*
- *
* @param type the type being compared with this type
* @return `true` if this type is more specific than the given type
*/
@@ -9344,13 +9514,11 @@
* behavior of this method is defined by the Dart Language Specification in section 12.15.1:
* <blockquote>The result of looking up getter (respectively setter) <i>m</i> in class <i>C</i>
* with respect to library <i>L</i> is:
- *
* * If <i>C</i> declares an instance getter (respectively setter) named <i>m</i> that is
* accessible to <i>L</i>, then that getter (respectively setter) is the result of the lookup.
* Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the result
* of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect to <i>L</i>.
* Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param getterName the name of the getter being looked up
@@ -9366,13 +9534,11 @@
* fails. The behavior of this method is defined by the Dart Language Specification in section
* 12.15.1: <blockquote>The result of looking up getter (respectively setter) <i>m</i> in class
* <i>C</i> with respect to library <i>L</i> is:
- *
* * If <i>C</i> declares an instance getter (respectively setter) named <i>m</i> that is
* accessible to <i>L</i>, then that getter (respectively setter) is the result of the lookup.
* Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the result
* of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect to <i>L</i>.
* Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param getterName the name of the getter being looked up
@@ -9388,12 +9554,10 @@
* behavior of this method is defined by the Dart Language Specification in section 12.15.1:
* <blockquote> The result of looking up method <i>m</i> in class <i>C</i> with respect to library
* <i>L</i> is:
- *
* * If <i>C</i> declares an instance method named <i>m</i> that is accessible to <i>L</i>, then
* that method is the result of the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then
* the result of the lookup is the result of looking up method <i>m</i> in <i>S</i> with respect
* to <i>L</i>. Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param methodName the name of the method being looked up
@@ -9409,12 +9573,10 @@
* fails. The behavior of this method is defined by the Dart Language Specification in section
* 12.15.1: <blockquote> The result of looking up method <i>m</i> in class <i>C</i> with respect
* to library <i>L</i> is:
- *
* * If <i>C</i> declares an instance method named <i>m</i> that is accessible to <i>L</i>, then
* that method is the result of the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then
* the result of the lookup is the result of looking up method <i>m</i> in <i>S</i> with respect
* to <i>L</i>. Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param methodName the name of the method being looked up
@@ -9430,13 +9592,11 @@
* behavior of this method is defined by the Dart Language Specification in section 12.16:
* <blockquote> The result of looking up getter (respectively setter) <i>m</i> in class <i>C</i>
* with respect to library <i>L</i> is:
- *
* * If <i>C</i> declares an instance getter (respectively setter) named <i>m</i> that is
* accessible to <i>L</i>, then that getter (respectively setter) is the result of the lookup.
* Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the result
* of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect to <i>L</i>.
* Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param setterName the name of the setter being looked up
@@ -9452,13 +9612,11 @@
* fails. The behavior of this method is defined by the Dart Language Specification in section
* 12.16: <blockquote> The result of looking up getter (respectively setter) <i>m</i> in class
* <i>C</i> with respect to library <i>L</i> is:
- *
* * If <i>C</i> declares an instance getter (respectively setter) named <i>m</i> that is
* accessible to <i>L</i>, then that getter (respectively setter) is the result of the lookup.
* Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the result
* of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect to <i>L</i>.
* Otherwise, we say that the lookup has failed.
- *
* </blockquote>
*
* @param setterName the name of the setter being looked up
@@ -9483,8 +9641,6 @@
/**
* The interface `ParameterizedType` defines the behavior common to objects representing a
* type with type parameters, such as a class or function type alias.
- *
- * @coverage dart.engine.type
*/
abstract class ParameterizedType implements Type2 {
/**
@@ -9509,8 +9665,6 @@
/**
* The interface `Type` defines the behavior of objects representing the declared type of
* elements in the element model.
- *
- * @coverage dart.engine.type
*/
abstract class Type2 {
/**
@@ -9638,8 +9792,6 @@
/**
* The interface `TypeParameterType` defines the behavior of objects representing the type
* introduced by a type parameter.
- *
- * @coverage dart.engine.type
*/
abstract class TypeParameterType implements Type2 {
TypeParameterElement get element;
@@ -9648,8 +9800,6 @@
/**
* The interface `VoidType` defines the behavior of the unique object representing the type
* `void`.
- *
- * @coverage dart.engine.type
*/
abstract class VoidType implements Type2 {
VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes);
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 9997073..49d701e 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -25,8 +25,6 @@
/**
* The unique instance of the class `AnalysisEngine` serves as the entry point for the
* functionality provided by the analysis engine.
- *
- * @coverage dart.engine
*/
class AnalysisEngine {
/**
@@ -127,6 +125,13 @@
*/
abstract class AnalysisContentStatistics {
/**
+ * Return the statistics for each kind of cached data.
+ *
+ * @return the statistics for each kind of cached data
+ */
+ List<AnalysisContentStatistics_CacheRow> get cacheRows;
+
+ /**
* Return the exceptions that caused some entries to have a state of [CacheState#ERROR].
*
* @return the exceptions that caused some entries to have a state of [CacheState#ERROR]
@@ -134,11 +139,11 @@
List<AnalysisException> get exceptions;
/**
- * Return the statistics for each kind of cached data.
+ * Return an array containing all of the sources in the cache.
*
- * @return the statistics for each kind of cached data
+ * @return an array containing all of the sources in the cache
*/
- List<AnalysisContentStatistics_CacheRow> get cacheRows;
+ List<Source> get sources;
}
/**
@@ -281,6 +286,18 @@
LineInfo computeLineInfo(Source source);
/**
+ * Return `true` if the given source exists.
+ *
+ * This method should be used rather than the method [Source#exists] because contexts can
+ * have local overrides of the content of a source that the source is not aware of and a source
+ * with local content is considered to exist even if there is no file on disk.
+ *
+ * @param source the source whose modification stamp is to be returned
+ * @return `true` if the source exists
+ */
+ bool exists(Source source);
+
+ /**
* Create a new context in which analysis can be performed. Any sources in the specified container
* will be removed from this context and added to the newly created context.
*
@@ -300,6 +317,43 @@
AnalysisOptions get analysisOptions;
/**
+ * Return the element model corresponding to the compilation unit defined by the given source in
+ * the library defined by the given source, or `null` if the element model does not
+ * currently exist or if the library cannot be analyzed for some reason.
+ *
+ * @param unitSource the source of the compilation unit
+ * @param librarySource the source of the defining compilation unit of the library containing the
+ * compilation unit
+ * @return the element model corresponding to the compilation unit defined by the given source
+ */
+ CompilationUnitElement getCompilationUnitElement(Source unitSource, Source librarySource);
+
+ /**
+ * Get the contents and timestamp of the given source.
+ *
+ * This method should be used rather than the method [Source#getContents] because contexts
+ * can have local overrides of the content of a source that the source is not aware of.
+ *
+ * @param source the source whose content is to be returned
+ * @return the contents and timestamp of the source
+ * @throws Exception if the contents of the source could not be accessed
+ */
+ TimestampedData<String> getContents(Source source);
+
+ /**
+ * Get the contents of the given source and pass it to the given content receiver.
+ *
+ * This method should be used rather than the method [Source#getContentsToReceiver]
+ * because contexts can have local overrides of the content of a source that the source is not
+ * aware of.
+ *
+ * @param source the source whose content is to be returned
+ * @param receiver the content receiver to which the content of the source will be passed
+ * @throws Exception if the contents of the source could not be accessed
+ */
+ void getContentsToReceiver(Source source, Source_ContentReceiver receiver);
+
+ /**
* Return the element referenced by the given location, or `null` if the element is not
* immediately available or if there is no element with the given location. The latter condition
* can occur, for example, if the location describes an element from a different context or if the
@@ -438,6 +492,21 @@
LineInfo getLineInfo(Source source);
/**
+ * Return the modification stamp for the given source. A modification stamp is a non-negative
+ * integer with the property that if the contents of the source have not been modified since the
+ * last time the modification stamp was accessed then the same value will be returned, but if the
+ * contents of the source have been modified one or more times (even if the net change is zero)
+ * the stamps will be different.
+ *
+ * This method should be used rather than the method [Source#getModificationStamp] because
+ * contexts can have local overrides of the content of a source that the source is not aware of.
+ *
+ * @param source the source whose modification stamp is to be returned
+ * @return the modification stamp for the source
+ */
+ int getModificationStamp(Source source);
+
+ /**
* Return an array containing all of the sources known to this context and their resolution state
* is not valid or flush. So, these sources are not safe to update during refactoring, because we
* may be don't know all the references in them.
@@ -642,15 +711,6 @@
* context
*/
void set sourceFactory(SourceFactory factory);
-
- /**
- * Given a collection of sources with content that has changed, return an [Iterable]
- * identifying the sources that need to be resolved.
- *
- * @param changedSources an array of sources (not `null`, contains no `null`s)
- * @return An iterable returning the sources to be resolved
- */
- Iterable<Source> sourcesToResolve(List<Source> changedSources);
}
/**
@@ -677,8 +737,6 @@
/**
* Instances of the class `AnalysisException` represent an exception that occurred during the
* analysis of one or more sources.
- *
- * @coverage dart.engine
*/
class AnalysisException extends JavaException {
/**
@@ -715,6 +773,13 @@
*/
abstract class AnalysisOptions {
/**
+ * Return `true` if analysis is to analyze Angular.
+ *
+ * @return `true` if analysis is to analyze Angular
+ */
+ bool get analyzeAngular;
+
+ /**
* Return `true` if analysis is to parse and analyze function bodies.
*
* @return `true` if analysis is to parse and analyzer function bodies
@@ -736,6 +801,14 @@
bool get dart2jsHint;
/**
+ * Return `true` if errors, warnings and hints should be generated for sources in the SDK.
+ * The default value is `false`.
+ *
+ * @return `true` if errors, warnings and hints should be generated for the SDK
+ */
+ bool get generateSdkErrors;
+
+ /**
* Return `true` if analysis is to generate hint results (e.g. type inference based
* information and pub best practices).
*
@@ -756,13 +829,6 @@
* @return `true` if analysis is to parse comments
*/
bool get preserveComments;
-
- /**
- * Return `true` if analysis is to analyze Angular.
- *
- * @return `true` if analysis is to analyze Angular
- */
- bool get analyzeAngular;
}
/**
@@ -814,8 +880,6 @@
/**
* The interface `ChangeNotice` defines the behavior of objects that represent a change to the
* analysis results associated with a given source.
- *
- * @coverage dart.engine
*/
abstract class ChangeNotice implements AnalysisErrorInfo {
/**
@@ -845,8 +909,6 @@
/**
* Instances of the class `ChangeSet` indicate what sources have been added, changed, or
* removed.
- *
- * @coverage dart.engine
*/
class ChangeSet {
/**
@@ -970,6 +1032,34 @@
}
/**
+ * Instances of the class `ObsoleteSourceAnalysisException` represent an analysis attempt that
+ * failed because a source was deleted between the time the analysis started and the time the
+ * results of the analysis were ready to be recorded.
+ */
+class ObsoleteSourceAnalysisException extends AnalysisException {
+ /**
+ * The source that was removed while it was being analyzed.
+ */
+ Source _source;
+
+ /**
+ * Initialize a newly created exception to represent the removal of the given source.
+ *
+ * @param source the source that was removed while it was being analyzed
+ */
+ ObsoleteSourceAnalysisException(Source source) : super.con1("The source '${source.fullName}' was removed while it was being analyzed") {
+ this._source = source;
+ }
+
+ /**
+ * Return the source that was removed while it was being analyzed.
+ *
+ * @return the source that was removed
+ */
+ Source get source => _source;
+}
+
+/**
* Instances of the class `AnalysisCache` implement an LRU cache of information related to
* analysis.
*/
@@ -1163,17 +1253,6 @@
}
/**
- * Information about Angular application.
- */
-class AngularApplicationInfo {
- final Source entryPoint;
-
- final List<AngularElement> elements;
-
- AngularApplicationInfo(this.entryPoint, this.elements);
-}
-
-/**
* Instances of the class `CacheRetentionPolicy` define the behavior of objects that determine
* how important it is for data to be retained in the analysis cache.
*/
@@ -1197,9 +1276,7 @@
* exception occurred, making it pointless to attempt.
*
* Valid Transitions:
- *
* * [INVALID] if a source was modified that might cause the data to be computable
- *
*/
static final CacheState ERROR = new CacheState('ERROR', 0);
@@ -1208,10 +1285,8 @@
* usage. If the data is recomputed, results do not need to be reported.
*
* Valid Transitions:
- *
* * [IN_PROCESS] if the data is being recomputed
* * [INVALID] if a source was modified that causes the data to need to be recomputed
- *
*/
static final CacheState FLUSHED = new CacheState('FLUSHED', 1);
@@ -1219,10 +1294,8 @@
* The data might or might not be in the cache but is in the process of being recomputed.
*
* Valid Transitions:
- *
* * [ERROR] if an exception occurred while trying to compute the data
* * [VALID] if the data was successfully computed and stored in the cache
- *
*/
static final CacheState IN_PROCESS = new CacheState('IN_PROCESS', 2);
@@ -1230,9 +1303,7 @@
* The data is not in the cache and needs to be recomputed so that results can be reported.
*
* Valid Transitions:
- *
* * [IN_PROCESS] if an attempt is being made to recompute the data
- *
*/
static final CacheState INVALID = new CacheState('INVALID', 3);
@@ -1240,10 +1311,8 @@
* The data is in the cache and up-to-date.
*
* Valid Transitions:
- *
* * [FLUSHED] if the data is removed in order to manage memory usage
* * [INVALID] if a source was modified in such a way as to invalidate the previous data
- *
*/
static final CacheState VALID = new CacheState('VALID', 4);
@@ -1255,11 +1324,14 @@
/**
* The interface `DartEntry` defines the behavior of objects that maintain the information
* cached by an analysis context about an individual Dart file.
- *
- * @coverage dart.engine
*/
abstract class DartEntry implements SourceEntry {
/**
+ * The data descriptor representing the errors reported during Angular resolution.
+ */
+ static final DataDescriptor<List<AnalysisError>> ANGULAR_ERRORS = new DataDescriptor<List<AnalysisError>>("DartEntry.ANGULAR_ERRORS");
+
+ /**
* The data descriptor representing the list of libraries that contain this compilation unit.
*/
static final DataDescriptor<List<Source>> CONTAINING_LIBRARIES = new DataDescriptor<List<Source>>("DartEntry.CONTAINING_LIBRARIES");
@@ -1332,11 +1404,21 @@
static final DataDescriptor<CompilationUnit> RESOLVED_UNIT = new DataDescriptor<CompilationUnit>("DartEntry.RESOLVED_UNIT");
/**
+ * The data descriptor representing the token stream.
+ */
+ static final DataDescriptor<List<AnalysisError>> SCAN_ERRORS = new DataDescriptor<List<AnalysisError>>("DartEntry.SCAN_ERRORS");
+
+ /**
* The data descriptor representing the source kind.
*/
static final DataDescriptor<SourceKind> SOURCE_KIND = new DataDescriptor<SourceKind>("DartEntry.SOURCE_KIND");
/**
+ * The data descriptor representing the token stream.
+ */
+ static final DataDescriptor<Token> TOKEN_STREAM = new DataDescriptor<Token>("DartEntry.TOKEN_STREAM");
+
+ /**
* The data descriptor representing the errors resulting from verifying the source.
*/
static final DataDescriptor<List<AnalysisError>> VERIFICATION_ERRORS = new DataDescriptor<List<AnalysisError>>("DartEntry.VERIFICATION_ERRORS");
@@ -1407,11 +1489,30 @@
/**
* Instances of the class `DartEntryImpl` implement a [DartEntry].
- *
- * @coverage dart.engine
*/
class DartEntryImpl extends SourceEntryImpl implements DartEntry {
/**
+ * The state of the cached token stream.
+ */
+ CacheState _tokenStreamState = CacheState.INVALID;
+
+ /**
+ * The head of the token stream, or `null` if the token stream is not currently cached.
+ */
+ Token _tokenStream;
+
+ /**
+ * The state of the cached scan errors.
+ */
+ CacheState _scanErrorsState = CacheState.INVALID;
+
+ /**
+ * The errors produced while scanning the compilation unit, or `null` if the errors are not
+ * currently cached.
+ */
+ List<AnalysisError> _scanErrors = AnalysisError.NO_ERRORS;
+
+ /**
* The state of the cached source kind.
*/
CacheState _sourceKindState = CacheState.INVALID;
@@ -1444,8 +1545,8 @@
CacheState _parseErrorsState = CacheState.INVALID;
/**
- * The errors produced while scanning and parsing the compilation unit, or `null` if the
- * errors are not currently cached.
+ * The errors produced while parsing the compilation unit, or `null` if the errors are not
+ * currently cached.
*/
List<AnalysisError> _parseErrors = AnalysisError.NO_ERRORS;
@@ -1530,6 +1631,12 @@
int _bitmask = 0;
/**
+ * The error produced while performing Angular resolution, or an empty array if there are no
+ * errors if the error are not currently cached.
+ */
+ List<AnalysisError> _angularErrors = AnalysisError.NO_ERRORS;
+
+ /**
* The index of the bit in the [bitmask] indicating that this library is launchable: that
* the file has a main method.
*/
@@ -1556,6 +1663,10 @@
* Flush any AST structures being maintained by this entry.
*/
void flushAstStructures() {
+ if (identical(_tokenStreamState, CacheState.VALID)) {
+ _tokenStreamState = CacheState.FLUSHED;
+ _tokenStream = null;
+ }
if (identical(_parsedUnitState, CacheState.VALID)) {
_parsedUnitState = CacheState.FLUSHED;
_parsedUnitAccessed = false;
@@ -1566,23 +1677,16 @@
List<AnalysisError> get allErrors {
List<AnalysisError> errors = new List<AnalysisError>();
- for (AnalysisError error in _parseErrors) {
- errors.add(error);
- }
+ ListUtilities.addAll(errors, _scanErrors);
+ ListUtilities.addAll(errors, _parseErrors);
DartEntryImpl_ResolutionState state = _resolutionState;
while (state != null) {
- for (AnalysisError error in state._resolutionErrors) {
- errors.add(error);
- }
- for (AnalysisError error in state._verificationErrors) {
- errors.add(error);
- }
- for (AnalysisError error in state._hints) {
- errors.add(error);
- }
+ ListUtilities.addAll(errors, state._resolutionErrors);
+ ListUtilities.addAll(errors, state._verificationErrors);
+ ListUtilities.addAll(errors, state._hints);
state = state._nextState;
}
- ;
+ ListUtilities.addAll(errors, _angularErrors);
if (errors.length == 0) {
return AnalysisError.NO_ERRORS;
}
@@ -1635,7 +1739,7 @@
CompilationUnit get resolvableCompilationUnit {
if (identical(_parsedUnitState, CacheState.VALID)) {
if (_parsedUnitAccessed) {
- return _parsedUnit.accept(new ASTCloner()) as CompilationUnit;
+ return _parsedUnit.accept(new AstCloner()) as CompilationUnit;
}
CompilationUnit unit = _parsedUnit;
_parsedUnitState = CacheState.FLUSHED;
@@ -1646,7 +1750,7 @@
DartEntryImpl_ResolutionState state = _resolutionState;
while (state != null) {
if (identical(state._resolvedUnitState, CacheState.VALID)) {
- return state._resolvedUnit.accept(new ASTCloner()) as CompilationUnit;
+ return state._resolvedUnit.accept(new AstCloner()) as CompilationUnit;
}
state = state._nextState;
}
@@ -1673,8 +1777,12 @@
return _parsedUnitState;
} else if (identical(descriptor, DartEntry.PUBLIC_NAMESPACE)) {
return _publicNamespaceState;
+ } else if (identical(descriptor, DartEntry.SCAN_ERRORS)) {
+ return _scanErrorsState;
} else if (identical(descriptor, DartEntry.SOURCE_KIND)) {
return _sourceKindState;
+ } else if (identical(descriptor, DartEntry.TOKEN_STREAM)) {
+ return _tokenStreamState;
} else {
return super.getState(descriptor);
}
@@ -1707,7 +1815,9 @@
}
Object getValue(DataDescriptor descriptor) {
- if (identical(descriptor, DartEntry.CONTAINING_LIBRARIES)) {
+ if (identical(descriptor, DartEntry.ANGULAR_ERRORS)) {
+ return _angularErrors;
+ } else if (identical(descriptor, DartEntry.CONTAINING_LIBRARIES)) {
return new List.from(_containingLibraries);
} else if (identical(descriptor, DartEntry.ELEMENT)) {
return _element;
@@ -1728,8 +1838,12 @@
return _parsedUnit;
} else if (identical(descriptor, DartEntry.PUBLIC_NAMESPACE)) {
return _publicNamespace;
+ } else if (identical(descriptor, DartEntry.SCAN_ERRORS)) {
+ return _scanErrors;
} else if (identical(descriptor, DartEntry.SOURCE_KIND)) {
return _sourceKind;
+ } else if (identical(descriptor, DartEntry.TOKEN_STREAM)) {
+ return _tokenStream;
}
return super.getValue(descriptor);
}
@@ -1787,8 +1901,12 @@
return identical(_parsedUnitState, CacheState.INVALID);
} else if (identical(descriptor, DartEntry.PUBLIC_NAMESPACE)) {
return identical(_publicNamespaceState, CacheState.INVALID);
+ } else if (identical(descriptor, DartEntry.SCAN_ERRORS)) {
+ return identical(_scanErrorsState, CacheState.INVALID);
} else if (identical(descriptor, DartEntry.SOURCE_KIND)) {
return identical(_sourceKindState, CacheState.INVALID);
+ } else if (identical(descriptor, DartEntry.TOKEN_STREAM)) {
+ return identical(_tokenStreamState, CacheState.INVALID);
} else if (identical(descriptor, DartEntry.RESOLUTION_ERRORS) || identical(descriptor, DartEntry.RESOLVED_UNIT) || identical(descriptor, DartEntry.VERIFICATION_ERRORS) || identical(descriptor, DartEntry.HINTS)) {
DartEntryImpl_ResolutionState state = _resolutionState;
while (state != null) {
@@ -1810,6 +1928,10 @@
void invalidateAllInformation() {
super.invalidateAllInformation();
+ _scanErrors = AnalysisError.NO_ERRORS;
+ _scanErrorsState = CacheState.INVALID;
+ _tokenStream = null;
+ _tokenStreamState = CacheState.INVALID;
_sourceKind = SourceKind.UNKNOWN;
_sourceKindState = CacheState.INVALID;
_parseErrors = AnalysisError.NO_ERRORS;
@@ -1851,6 +1973,11 @@
return true;
}
+ void recordContentError() {
+ super.recordContentError();
+ recordScanError();
+ }
+
/**
* Record that an error occurred while attempting to resolve the directives in the source
* represented by this entry.
@@ -1902,7 +2029,6 @@
* as being in error.
*/
void recordParseError() {
- setState(SourceEntry.LINE_INFO, CacheState.ERROR);
_sourceKind = SourceKind.UNKNOWN;
_sourceKindState = CacheState.ERROR;
_parseErrors = AnalysisError.NO_ERRORS;
@@ -1919,9 +2045,6 @@
* the current thread.
*/
void recordParseInProcess() {
- if (getState(SourceEntry.LINE_INFO) != CacheState.VALID) {
- setState(SourceEntry.LINE_INFO, CacheState.IN_PROCESS);
- }
if (_sourceKindState != CacheState.VALID) {
_sourceKindState = CacheState.IN_PROCESS;
}
@@ -1989,6 +2112,52 @@
}
/**
+ * Record that an error occurred while attempting to scan or parse the entry represented by this
+ * entry. This will set the state of all information, including any resolution-based information,
+ * as being in error.
+ */
+ void recordScanError() {
+ setState(SourceEntry.LINE_INFO, CacheState.ERROR);
+ _scanErrors = AnalysisError.NO_ERRORS;
+ _scanErrorsState = CacheState.ERROR;
+ _tokenStream = null;
+ _tokenStreamState = CacheState.ERROR;
+ recordParseError();
+ }
+
+ /**
+ * Record that the scan-related information for the associated source is about to be computed by
+ * the current thread.
+ */
+ void recordScanInProcess() {
+ if (getState(SourceEntry.LINE_INFO) != CacheState.VALID) {
+ setState(SourceEntry.LINE_INFO, CacheState.IN_PROCESS);
+ }
+ if (_scanErrorsState != CacheState.VALID) {
+ _scanErrorsState = CacheState.IN_PROCESS;
+ }
+ if (_tokenStreamState != CacheState.VALID) {
+ _tokenStreamState = CacheState.IN_PROCESS;
+ }
+ }
+
+ /**
+ * Record that an in-process scan has stopped without recording results because the results were
+ * invalidated before they could be recorded.
+ */
+ void recordScanNotInProcess() {
+ if (identical(getState(SourceEntry.LINE_INFO), CacheState.IN_PROCESS)) {
+ setState(SourceEntry.LINE_INFO, CacheState.INVALID);
+ }
+ if (identical(_scanErrorsState, CacheState.IN_PROCESS)) {
+ _scanErrorsState = CacheState.INVALID;
+ }
+ if (identical(_tokenStreamState, CacheState.IN_PROCESS)) {
+ _tokenStreamState = CacheState.INVALID;
+ }
+ }
+
+ /**
* Remove the given library from the list of libraries that contain this part. This method should
* only be invoked on entries that represent a part.
*
@@ -2039,30 +2208,6 @@
_containingLibraries.add(librarySource);
}
- /**
- * Set the results of parsing the compilation unit at the given time to the given values.
- *
- * @param modificationStamp the earliest time at which the source was last modified before the
- * parsing was started
- * @param lineInfo the line information resulting from parsing the compilation unit
- * @param unit the AST structure resulting from parsing the compilation unit
- * @param errors the parse errors resulting from parsing the compilation unit
- */
- void setParseResults(int modificationStamp, LineInfo lineInfo, CompilationUnit unit, List<AnalysisError> errors) {
- if (getState(SourceEntry.LINE_INFO) != CacheState.VALID) {
- setValue(SourceEntry.LINE_INFO, lineInfo);
- }
- if (_parsedUnitState != CacheState.VALID) {
- _parsedUnit = unit;
- _parsedUnitAccessed = false;
- _parsedUnitState = CacheState.VALID;
- }
- if (_parseErrorsState != CacheState.VALID) {
- _parseErrors = errors == null ? AnalysisError.NO_ERRORS : errors;
- _parseErrorsState = CacheState.VALID;
- }
- }
-
void setState(DataDescriptor descriptor, CacheState state) {
if (identical(descriptor, DartEntry.ELEMENT)) {
_element = updatedValue(state, _element, null);
@@ -2095,9 +2240,15 @@
} else if (identical(descriptor, DartEntry.PUBLIC_NAMESPACE)) {
_publicNamespace = updatedValue(state, _publicNamespace, null);
_publicNamespaceState = state;
+ } else if (identical(descriptor, DartEntry.SCAN_ERRORS)) {
+ _scanErrors = updatedValue(state, _scanErrors, AnalysisError.NO_ERRORS);
+ _scanErrorsState = state;
} else if (identical(descriptor, DartEntry.SOURCE_KIND)) {
_sourceKind = updatedValue(state, _sourceKind, SourceKind.UNKNOWN);
_sourceKindState = state;
+ } else if (identical(descriptor, DartEntry.TOKEN_STREAM)) {
+ _tokenStream = updatedValue(state, _tokenStream, null);
+ _tokenStreamState = state;
} else {
super.setState(descriptor, state);
}
@@ -2132,7 +2283,9 @@
}
void setValue(DataDescriptor descriptor, Object value) {
- if (identical(descriptor, DartEntry.ELEMENT)) {
+ if (identical(descriptor, DartEntry.ANGULAR_ERRORS)) {
+ _angularErrors = value == null ? AnalysisError.NO_ERRORS : (value as List<AnalysisError>);
+ } else if (identical(descriptor, DartEntry.ELEMENT)) {
_element = value as LibraryElement;
_elementState = CacheState.VALID;
} else if (identical(descriptor, DartEntry.EXPORTED_LIBRARIES)) {
@@ -2160,9 +2313,15 @@
} else if (identical(descriptor, DartEntry.PUBLIC_NAMESPACE)) {
_publicNamespace = value as Namespace;
_publicNamespaceState = CacheState.VALID;
+ } else if (identical(descriptor, DartEntry.SCAN_ERRORS)) {
+ _scanErrors = value == null ? AnalysisError.NO_ERRORS : (value as List<AnalysisError>);
+ _scanErrorsState = CacheState.VALID;
} else if (identical(descriptor, DartEntry.SOURCE_KIND)) {
_sourceKind = value as SourceKind;
_sourceKindState = CacheState.VALID;
+ } else if (identical(descriptor, DartEntry.TOKEN_STREAM)) {
+ _tokenStream = value as Token;
+ _tokenStreamState = CacheState.VALID;
} else {
super.setValue(descriptor, value);
}
@@ -2197,6 +2356,10 @@
void copyFrom(SourceEntryImpl entry) {
super.copyFrom(entry);
DartEntryImpl other = entry as DartEntryImpl;
+ _scanErrorsState = other._scanErrorsState;
+ _scanErrors = other._scanErrors;
+ _tokenStreamState = other._tokenStreamState;
+ _tokenStream = other._tokenStream;
_sourceKindState = other._sourceKindState;
_sourceKind = other._sourceKind;
_parsedUnitState = other._parsedUnitState;
@@ -2219,13 +2382,18 @@
_clientServerState = other._clientServerState;
_launchableState = other._launchableState;
_bitmask = other._bitmask;
+ _angularErrors = other._angularErrors;
}
- bool hasErrorState() => super.hasErrorState() || identical(_sourceKindState, CacheState.ERROR) || identical(_parsedUnitState, CacheState.ERROR) || identical(_parseErrorsState, CacheState.ERROR) || identical(_importedLibrariesState, CacheState.ERROR) || identical(_exportedLibrariesState, CacheState.ERROR) || identical(_includedPartsState, CacheState.ERROR) || identical(_elementState, CacheState.ERROR) || identical(_publicNamespaceState, CacheState.ERROR) || identical(_clientServerState, CacheState.ERROR) || identical(_launchableState, CacheState.ERROR) || _resolutionState.hasErrorState();
+ bool hasErrorState() => super.hasErrorState() || identical(_scanErrorsState, CacheState.ERROR) || identical(_tokenStreamState, CacheState.ERROR) || identical(_sourceKindState, CacheState.ERROR) || identical(_parsedUnitState, CacheState.ERROR) || identical(_parseErrorsState, CacheState.ERROR) || identical(_importedLibrariesState, CacheState.ERROR) || identical(_exportedLibrariesState, CacheState.ERROR) || identical(_includedPartsState, CacheState.ERROR) || identical(_elementState, CacheState.ERROR) || identical(_publicNamespaceState, CacheState.ERROR) || identical(_clientServerState, CacheState.ERROR) || identical(_launchableState, CacheState.ERROR) || _resolutionState.hasErrorState();
void writeOn(JavaStringBuilder builder) {
builder.append("Dart: ");
super.writeOn(builder);
+ builder.append("; tokenStream = ");
+ builder.append(_tokenStreamState);
+ builder.append("; scanErrors = ");
+ builder.append(_scanErrorsState);
builder.append("; sourceKind = ");
builder.append(_sourceKindState);
builder.append("; parsedUnit = ");
@@ -2521,15 +2689,13 @@
/**
* The interface `HtmlEntry` defines the behavior of objects that maintain the information
* cached by an analysis context about an individual HTML file.
- *
- * @coverage dart.engine
*/
abstract class HtmlEntry implements SourceEntry {
/**
* The data descriptor representing the information about an Angular application this source is
* used in.
*/
- static final DataDescriptor<AngularApplicationInfo> ANGULAR_APPLICATION = new DataDescriptor<AngularApplicationInfo>("HtmlEntry.ANGULAR_APPLICATION");
+ static final DataDescriptor<AngularApplication> ANGULAR_APPLICATION = new DataDescriptor<AngularApplication>("HtmlEntry.ANGULAR_APPLICATION");
/**
* The data descriptor representing the information about an Angular component this source is used
@@ -2541,7 +2707,7 @@
* The data descriptor representing the information about an Angular application this source is
* entry point for.
*/
- static final DataDescriptor<AngularApplicationInfo> ANGULAR_ENTRY = new DataDescriptor<AngularApplicationInfo>("HtmlEntry.ANGULAR_ENTRY");
+ static final DataDescriptor<AngularApplication> ANGULAR_ENTRY = new DataDescriptor<AngularApplication>("HtmlEntry.ANGULAR_ENTRY");
/**
* The data descriptor representing the errors reported during Angular resolution.
@@ -2603,8 +2769,6 @@
/**
* Instances of the class `HtmlEntryImpl` implement an [HtmlEntry].
- *
- * @coverage dart.engine
*/
class HtmlEntryImpl extends SourceEntryImpl implements HtmlEntry {
/**
@@ -2678,17 +2842,17 @@
/**
* Information about the Angular Application this unit is used in.
*/
- AngularApplicationInfo _angularApplication;
+ AngularApplication _angularApplication;
/**
* The state of the [angularEntry].
*/
- CacheState _angularEntryState = CacheState.VALID;
+ CacheState _angularEntryState = CacheState.INVALID;
/**
* Information about the Angular Application this unit is entry point for.
*/
- AngularApplicationInfo _angularEntry = null;
+ AngularApplication _angularEntry = null;
/**
* The state of the [angularComponent].
@@ -2855,6 +3019,8 @@
* Invalidate all of the resolution information associated with the HTML file.
*/
void invalidateAllResolutionInformation() {
+ _angularEntry = null;
+ _angularEntryState = CacheState.INVALID;
_angularErrors = AnalysisError.NO_ERRORS;
_angularErrorsState = CacheState.INVALID;
_element = null;
@@ -2865,6 +3031,11 @@
_hintsState = CacheState.INVALID;
}
+ void recordContentError() {
+ super.recordContentError();
+ recordParseError();
+ }
+
/**
* Record that an error was encountered while attempting to parse the source associated with this
* entry.
@@ -2930,13 +3101,13 @@
void setValue(DataDescriptor descriptor, Object value) {
if (identical(descriptor, HtmlEntry.ANGULAR_APPLICATION)) {
- _angularApplication = value as AngularApplicationInfo;
+ _angularApplication = value as AngularApplication;
_angularApplicationState = CacheState.VALID;
} else if (identical(descriptor, HtmlEntry.ANGULAR_COMPONENT)) {
_angularComponent = value as AngularComponentElement;
_angularComponentState = CacheState.VALID;
} else if (identical(descriptor, HtmlEntry.ANGULAR_ENTRY)) {
- _angularEntry = value as AngularApplicationInfo;
+ _angularEntry = value as AngularApplication;
_angularEntryState = CacheState.VALID;
} else if (identical(descriptor, HtmlEntry.ANGULAR_ERRORS)) {
_angularErrors = value as List<AnalysisError>;
@@ -3057,11 +3228,14 @@
*
* Source entries should be treated as if they were immutable unless a writable copy of the entry
* has been obtained and has not yet been made visible to other threads.
- *
- * @coverage dart.engine
*/
abstract class SourceEntry {
/**
+ * The data descriptor representing the contents of the source.
+ */
+ static final DataDescriptor<String> CONTENT = new DataDescriptor<String>("DartEntry.CONTENT");
+
+ /**
* The data descriptor representing the line information.
*/
static final DataDescriptor<LineInfo> LINE_INFO = new DataDescriptor<LineInfo>("SourceEntry.LINE_INFO");
@@ -3118,8 +3292,6 @@
/**
* Instances of the abstract class `SourceEntryImpl` implement the behavior common to all
* [SourceEntry].
- *
- * @coverage dart.engine
*/
abstract class SourceEntryImpl implements SourceEntry {
/**
@@ -3134,6 +3306,16 @@
AnalysisException exception;
/**
+ * The state of the cached content.
+ */
+ CacheState _contentState = CacheState.INVALID;
+
+ /**
+ * The content of the source, or `null` if the content is not currently cached.
+ */
+ String _content;
+
+ /**
* The state of the cached line information.
*/
CacheState _lineInfoState = CacheState.INVALID;
@@ -3164,7 +3346,9 @@
int get modificationTime => _modificationTime;
CacheState getState(DataDescriptor descriptor) {
- if (identical(descriptor, SourceEntry.LINE_INFO)) {
+ if (identical(descriptor, SourceEntry.CONTENT)) {
+ return _contentState;
+ } else if (identical(descriptor, SourceEntry.LINE_INFO)) {
return _lineInfoState;
} else {
throw new IllegalArgumentException("Invalid descriptor: ${descriptor}");
@@ -3172,7 +3356,9 @@
}
Object getValue(DataDescriptor descriptor) {
- if (identical(descriptor, SourceEntry.LINE_INFO)) {
+ if (identical(descriptor, SourceEntry.CONTENT)) {
+ return _content;
+ } else if (identical(descriptor, SourceEntry.LINE_INFO)) {
return _lineInfo;
} else {
throw new IllegalArgumentException("Invalid descriptor: ${descriptor}");
@@ -3183,11 +3369,23 @@
* Invalidate all of the information associated with this source.
*/
void invalidateAllInformation() {
+ _content = null;
+ _contentState = CacheState.INVALID;
_lineInfo = null;
_lineInfoState = CacheState.INVALID;
}
/**
+ * Record that an error occurred while attempting to get the contents of the source represented by
+ * this entry. This will set the state of all information, including any resolution-based
+ * information, as being in error.
+ */
+ void recordContentError() {
+ _content = null;
+ _contentState = CacheState.ERROR;
+ }
+
+ /**
* Set the most recent time at which the state of the source matched the state represented by this
* entry to the given time.
*
@@ -3204,7 +3402,10 @@
* @param the new state of the data represented by the given descriptor
*/
void setState(DataDescriptor descriptor, CacheState state) {
- if (identical(descriptor, SourceEntry.LINE_INFO)) {
+ if (identical(descriptor, SourceEntry.CONTENT)) {
+ _content = updatedValue(state, _content, null);
+ _contentState = state;
+ } else if (identical(descriptor, SourceEntry.LINE_INFO)) {
_lineInfo = updatedValue(state, _lineInfo, null);
_lineInfoState = state;
} else {
@@ -3219,7 +3420,10 @@
* @param value the new value of the data represented by the given descriptor
*/
void setValue(DataDescriptor descriptor, Object value) {
- if (identical(descriptor, SourceEntry.LINE_INFO)) {
+ if (identical(descriptor, SourceEntry.CONTENT)) {
+ _content = value as String;
+ _contentState = CacheState.VALID;
+ } else if (identical(descriptor, SourceEntry.LINE_INFO)) {
_lineInfo = value as LineInfo;
_lineInfoState = CacheState.VALID;
} else {
@@ -3241,6 +3445,8 @@
void copyFrom(SourceEntryImpl entry) {
_modificationTime = entry._modificationTime;
exception = entry.exception;
+ _contentState = entry._contentState;
+ _content = entry._content;
_lineInfoState = entry._lineInfoState;
_lineInfo = entry._lineInfo;
}
@@ -3250,7 +3456,7 @@
*
* @return `true` if the state of any data value is [CacheState#ERROR]
*/
- bool hasErrorState() => identical(_lineInfoState, CacheState.ERROR);
+ bool hasErrorState() => identical(_contentState, CacheState.ERROR) || identical(_lineInfoState, CacheState.ERROR);
/**
* Given that some data is being transitioned to the given state, return the value that should be
@@ -3281,7 +3487,9 @@
*/
void writeOn(JavaStringBuilder builder) {
builder.append("time = ");
- builder.append(_modificationTime.toRadixString(16));
+ builder.append(_modificationTime);
+ builder.append("; content = ");
+ builder.append(_contentState);
builder.append("; lineInfo = ");
builder.append(_lineInfoState);
}
@@ -3293,8 +3501,14 @@
class AnalysisContentStatisticsImpl implements AnalysisContentStatistics {
Map<String, AnalysisContentStatistics_CacheRow> _dataMap = new Map<String, AnalysisContentStatistics_CacheRow>();
+ List<Source> _sources = new List<Source>();
+
Set<AnalysisException> _exceptions = new Set<AnalysisException>();
+ void addSource(Source source) {
+ _sources.add(source);
+ }
+
List<AnalysisContentStatistics_CacheRow> get cacheRows {
Iterable<AnalysisContentStatistics_CacheRow> items = _dataMap.values;
return new List.from(items);
@@ -3302,12 +3516,14 @@
List<AnalysisException> get exceptions => new List.from(_exceptions);
- void putCacheItem(DartEntry dartEntry, DataDescriptor descriptor) {
- putCacheItem3(dartEntry, descriptor, dartEntry.getState(descriptor));
+ List<Source> get sources => new List.from(_sources);
+
+ void putCacheItem(DartEntry dartEntry, Source librarySource, DataDescriptor descriptor) {
+ putCacheItem3(dartEntry, descriptor, dartEntry.getState2(descriptor, librarySource));
}
- void putCacheItem2(DartEntry dartEntry, Source librarySource, DataDescriptor descriptor) {
- putCacheItem3(dartEntry, descriptor, dartEntry.getState2(descriptor, librarySource));
+ void putCacheItem2(SourceEntry dartEntry, DataDescriptor descriptor) {
+ putCacheItem3(dartEntry, descriptor, dartEntry.getState(descriptor));
}
void putCacheItem3(SourceEntry dartEntry, DataDescriptor rowDesc, CacheState state) {
@@ -3377,8 +3593,6 @@
/**
* Instances of the class `AnalysisContextImpl` implement an [AnalysisContext].
- *
- * @coverage dart.engine
*/
class AnalysisContextImpl implements InternalAnalysisContext {
/**
@@ -3395,6 +3609,11 @@
AnalysisOptionsImpl _options = new AnalysisOptionsImpl();
/**
+ * A cache of content used to override the default content of a source.
+ */
+ ContentCache _contentCache = new ContentCache();
+
+ /**
* The source factory used to create the sources that can be analyzed in this context.
*/
SourceFactory _sourceFactory;
@@ -3424,12 +3643,10 @@
/**
* The object used to synchronize access to all of the caches. The rules related to the use of
* this lock object are
- *
* * no analysis work is done while holding the lock, and
* * no analysis results can be recorded unless we have obtained the lock and validated that the
* results are for the same version (modification time) of the source as our current cache
* content.
- *
*/
Object _cacheLock = new Object();
@@ -3450,6 +3667,11 @@
WorkManager _workManager = new WorkManager();
/**
+ * The set of [AngularApplication] in this context.
+ */
+ Set<AngularApplication> _angularApplications = new Set();
+
+ /**
* Initialize a newly created analysis context.
*/
AnalysisContextImpl() : super() {
@@ -3467,54 +3689,52 @@
if (changeSet.isEmpty) {
return;
}
- {
- _recentTasks.clear();
- //
- // First, compute the list of sources that have been removed.
- //
- List<Source> removedSources = new List<Source>.from(changeSet.removed3);
- for (SourceContainer container in changeSet.removedContainers) {
- addSourcesInContainer(removedSources, container);
+ _recentTasks.clear();
+ //
+ // First, compute the list of sources that have been removed.
+ //
+ List<Source> removedSources = new List<Source>.from(changeSet.removed3);
+ for (SourceContainer container in changeSet.removedContainers) {
+ addSourcesInContainer(removedSources, container);
+ }
+ //
+ // Then determine which cached results are no longer valid.
+ //
+ bool addedDartSource = false;
+ for (Source source in changeSet.added3) {
+ if (sourceAvailable(source)) {
+ addedDartSource = true;
}
- //
- // Then determine which cached results are no longer valid.
- //
- bool addedDartSource = false;
- for (Source source in changeSet.added3) {
- if (sourceAvailable(source)) {
- addedDartSource = true;
- }
- }
- for (Source source in changeSet.changed3) {
- sourceChanged(source);
- }
- for (Source source in removedSources) {
- sourceRemoved(source);
- }
- if (addedDartSource) {
- // TODO(brianwilkerson) This is hugely inefficient, but we need to re-analyze any libraries
- // that might have been referencing the not-yet-existing source that was just added. Longer
- // term we need to keep track of which libraries are referencing non-existing sources and
- // only re-analyze those libraries.
- logInformation("Added Dart sources, invalidating all resolution information");
- for (MapEntry<Source, SourceEntry> mapEntry in _cache.entrySet()) {
- Source source = mapEntry.getKey();
- SourceEntry sourceEntry = mapEntry.getValue();
- if (!source.isInSystemLibrary && sourceEntry is DartEntry) {
- DartEntry dartEntry = sourceEntry;
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- removeFromParts(source, dartEntry);
- dartCopy.invalidateAllResolutionInformation();
- mapEntry.setValue(dartCopy);
- SourcePriority priority = SourcePriority.UNKNOWN;
- SourceKind kind = dartCopy.kind;
- if (identical(kind, SourceKind.LIBRARY)) {
- priority = SourcePriority.LIBRARY;
- } else if (identical(kind, SourceKind.PART)) {
- priority = SourcePriority.NORMAL_PART;
- }
- _workManager.add(source, priority);
+ }
+ for (Source source in changeSet.changed3) {
+ sourceChanged(source);
+ }
+ for (Source source in removedSources) {
+ sourceRemoved(source);
+ }
+ if (addedDartSource) {
+ // TODO(brianwilkerson) This is hugely inefficient, but we need to re-analyze any libraries
+ // that might have been referencing the not-yet-existing source that was just added. Longer
+ // term we need to keep track of which libraries are referencing non-existing sources and
+ // only re-analyze those libraries.
+ logInformation("Added Dart sources, invalidating all resolution information");
+ for (MapEntry<Source, SourceEntry> mapEntry in _cache.entrySet()) {
+ Source source = mapEntry.getKey();
+ SourceEntry sourceEntry = mapEntry.getValue();
+ if (!source.isInSystemLibrary && sourceEntry is DartEntry) {
+ DartEntry dartEntry = sourceEntry;
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ removeFromParts(source, dartEntry);
+ dartCopy.invalidateAllResolutionInformation();
+ mapEntry.setValue(dartCopy);
+ SourcePriority priority = SourcePriority.UNKNOWN;
+ SourceKind kind = dartCopy.kind;
+ if (identical(kind, SourceKind.LIBRARY)) {
+ priority = SourcePriority.LIBRARY;
+ } else if (identical(kind, SourceKind.PART)) {
+ priority = SourcePriority.NORMAL_PART;
}
+ _workManager.add(source, priority);
}
}
}
@@ -3533,7 +3753,7 @@
return null;
}
NodeLocator locator = new NodeLocator.con1(element.nameOffset);
- ASTNode nameNode = locator.searchWithin(unit);
+ AstNode nameNode = locator.searchWithin(unit);
while (nameNode != null) {
if (nameNode is AnnotatedNode) {
Comment comment = (nameNode as AnnotatedNode).documentationComment;
@@ -3560,24 +3780,34 @@
SourceEntry sourceEntry = getReadableSourceEntry(source);
if (sourceEntry is DartEntry) {
List<AnalysisError> errors = new List<AnalysisError>();
- DartEntry dartEntry = sourceEntry;
- ListUtilities.addAll(errors, getDartParseData(source, dartEntry, DartEntry.PARSE_ERRORS));
- dartEntry = getReadableDartEntry(source);
- if (identical(dartEntry.getValue(DartEntry.SOURCE_KIND), SourceKind.LIBRARY)) {
- ListUtilities.addAll(errors, getDartResolutionData(source, source, dartEntry, DartEntry.RESOLUTION_ERRORS));
- ListUtilities.addAll(errors, getDartVerificationData(source, source, dartEntry, DartEntry.VERIFICATION_ERRORS));
- if (enableHints) {
- ListUtilities.addAll(errors, getDartHintData(source, source, dartEntry, DartEntry.HINTS));
- }
- } else {
- List<Source> libraries = getLibrariesContaining(source);
- for (Source librarySource in libraries) {
- ListUtilities.addAll(errors, getDartResolutionData(source, librarySource, dartEntry, DartEntry.RESOLUTION_ERRORS));
- ListUtilities.addAll(errors, getDartVerificationData(source, librarySource, dartEntry, DartEntry.VERIFICATION_ERRORS));
+ try {
+ DartEntry dartEntry = sourceEntry;
+ ListUtilities.addAll(errors, getDartScanData(source, dartEntry, DartEntry.SCAN_ERRORS));
+ dartEntry = getReadableDartEntry(source);
+ ListUtilities.addAll(errors, getDartParseData(source, dartEntry, DartEntry.PARSE_ERRORS));
+ dartEntry = getReadableDartEntry(source);
+ if (identical(dartEntry.getValue(DartEntry.SOURCE_KIND), SourceKind.LIBRARY)) {
+ ListUtilities.addAll(errors, getDartResolutionData(source, source, dartEntry, DartEntry.RESOLUTION_ERRORS));
+ dartEntry = getReadableDartEntry(source);
+ ListUtilities.addAll(errors, getDartVerificationData(source, source, dartEntry, DartEntry.VERIFICATION_ERRORS));
if (enableHints) {
- ListUtilities.addAll(errors, getDartHintData(source, librarySource, dartEntry, DartEntry.HINTS));
+ dartEntry = getReadableDartEntry(source);
+ ListUtilities.addAll(errors, getDartHintData(source, source, dartEntry, DartEntry.HINTS));
+ }
+ } else {
+ List<Source> libraries = getLibrariesContaining(source);
+ for (Source librarySource in libraries) {
+ ListUtilities.addAll(errors, getDartResolutionData(source, librarySource, dartEntry, DartEntry.RESOLUTION_ERRORS));
+ dartEntry = getReadableDartEntry(source);
+ ListUtilities.addAll(errors, getDartVerificationData(source, librarySource, dartEntry, DartEntry.VERIFICATION_ERRORS));
+ if (enableHints) {
+ dartEntry = getReadableDartEntry(source);
+ ListUtilities.addAll(errors, getDartHintData(source, librarySource, dartEntry, DartEntry.HINTS));
+ }
}
}
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute errors", exception);
}
if (errors.isEmpty) {
return AnalysisError.NO_ERRORS;
@@ -3585,7 +3815,11 @@
return new List.from(errors);
} else if (sourceEntry is HtmlEntry) {
HtmlEntry htmlEntry = sourceEntry;
- return getHtmlResolutionData2(source, htmlEntry, HtmlEntry.RESOLUTION_ERRORS);
+ try {
+ return getHtmlResolutionData2(source, htmlEntry, HtmlEntry.RESOLUTION_ERRORS);
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute errors", exception);
+ }
}
return AnalysisError.NO_ERRORS;
}
@@ -3614,10 +3848,14 @@
LineInfo computeLineInfo(Source source) {
SourceEntry sourceEntry = getReadableSourceEntry(source);
- if (sourceEntry is HtmlEntry) {
- return getHtmlParseData(source, SourceEntry.LINE_INFO, null);
- } else if (sourceEntry is DartEntry) {
- return getDartParseData2(source, SourceEntry.LINE_INFO, null);
+ try {
+ if (sourceEntry is HtmlEntry) {
+ return getHtmlParseData(source, SourceEntry.LINE_INFO, null);
+ } else if (sourceEntry is DartEntry) {
+ return getDartScanData2(source, SourceEntry.LINE_INFO, null);
+ }
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute ${SourceEntry.LINE_INFO.toString()}", exception);
}
return null;
}
@@ -3638,20 +3876,18 @@
}
ResolvableCompilationUnit computeResolvableCompilationUnit(Source source) {
- {
- DartEntry dartEntry = getReadableDartEntry(source);
- if (dartEntry == null) {
- throw new AnalysisException.con1("computeResolvableCompilationUnit for non-Dart: ${source.fullName}");
- }
- dartEntry = cacheDartParseData(source, dartEntry, DartEntry.PARSED_UNIT);
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- CompilationUnit unit = dartCopy.resolvableCompilationUnit;
- if (unit == null) {
- throw new AnalysisException.con2("Internal error: computeResolvableCompilationUnit could not parse ${source.fullName}", dartEntry.exception);
- }
- _cache.put(source, dartCopy);
- return new ResolvableCompilationUnit(dartCopy.modificationTime, unit);
+ DartEntry dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("computeResolvableCompilationUnit for non-Dart: ${source.fullName}");
}
+ dartEntry = cacheDartParseData(source, dartEntry, DartEntry.PARSED_UNIT);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ CompilationUnit unit = dartCopy.resolvableCompilationUnit;
+ if (unit == null) {
+ throw new AnalysisException.con2("Internal error: computeResolvableCompilationUnit could not parse ${source.fullName}", dartEntry.exception);
+ }
+ _cache.put(source, dartCopy);
+ return new ResolvableCompilationUnit(dartCopy.modificationTime, unit);
}
ResolvableHtmlUnit computeResolvableHtmlUnit(Source source) {
@@ -3668,18 +3904,26 @@
return new ResolvableHtmlUnit(htmlEntry.modificationTime, unit);
}
+ bool exists(Source source) {
+ if (source == null) {
+ return false;
+ }
+ if (_contentCache.getContents(source) != null) {
+ return true;
+ }
+ return source.exists();
+ }
+
AnalysisContext extractContext(SourceContainer container) => extractContextInto(container, AnalysisEngine.instance.createAnalysisContext() as InternalAnalysisContext);
InternalAnalysisContext extractContextInto(SourceContainer container, InternalAnalysisContext newContext) {
List<Source> sourcesToRemove = new List<Source>();
- {
- // Move sources in the specified directory to the new context
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- Source source = entry.getKey();
- if (container.contains(source)) {
- sourcesToRemove.add(source);
- newContext.addSourceInfo(source, entry.getValue().writableCopy);
- }
+ // Move sources in the specified directory to the new context
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ Source source = entry.getKey();
+ if (container.contains(source)) {
+ sourcesToRemove.add(source);
+ newContext.addSourceInfo(source, entry.getValue().writableCopy);
}
}
return newContext;
@@ -3687,6 +3931,41 @@
AnalysisOptions get analysisOptions => _options;
+ CompilationUnitElement getCompilationUnitElement(Source unitSource, Source librarySource) {
+ LibraryElement libraryElement = getLibraryElement(librarySource);
+ if (libraryElement != null) {
+ // try defining unit
+ CompilationUnitElement definingUnit = libraryElement.definingCompilationUnit;
+ if (definingUnit.source == unitSource) {
+ return definingUnit;
+ }
+ // try parts
+ for (CompilationUnitElement partUnit in libraryElement.parts) {
+ if (partUnit.source == unitSource) {
+ return partUnit;
+ }
+ }
+ }
+ return null;
+ }
+
+ TimestampedData<String> getContents(Source source) {
+ String contents = _contentCache.getContents(source);
+ if (contents != null) {
+ return new TimestampedData<String>(_contentCache.getModificationStamp(source), contents);
+ }
+ return source.contents;
+ }
+
+ void getContentsToReceiver(Source source, Source_ContentReceiver receiver) {
+ String contents = _contentCache.getContents(source);
+ if (contents != null) {
+ receiver.accept(contents, _contentCache.getModificationStamp(source));
+ return;
+ }
+ source.getContentsToReceiver(receiver);
+ }
+
Element getElement(ElementLocation location) {
// TODO(brianwilkerson) This should not be a "get" method.
try {
@@ -3730,29 +4009,27 @@
if (sourceKind == null) {
return Source.EMPTY_ARRAY;
}
- {
- List<Source> htmlSources = new List<Source>();
- while (true) {
- if (sourceKind == SourceKind.LIBRARY) {
- } else if (sourceKind == SourceKind.PART) {
- List<Source> librarySources = getLibrariesContaining(source);
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- SourceEntry sourceEntry = entry.getValue();
- if (identical(sourceEntry.kind, SourceKind.HTML)) {
- List<Source> referencedLibraries = (sourceEntry as HtmlEntry).getValue(HtmlEntry.REFERENCED_LIBRARIES);
- if (containsAny(referencedLibraries, librarySources)) {
- htmlSources.add(entry.getKey());
- }
+ List<Source> htmlSources = new List<Source>();
+ while (true) {
+ if (sourceKind == SourceKind.LIBRARY) {
+ } else if (sourceKind == SourceKind.PART) {
+ List<Source> librarySources = getLibrariesContaining(source);
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ SourceEntry sourceEntry = entry.getValue();
+ if (identical(sourceEntry.kind, SourceKind.HTML)) {
+ List<Source> referencedLibraries = (sourceEntry as HtmlEntry).getValue(HtmlEntry.REFERENCED_LIBRARIES);
+ if (containsAny(referencedLibraries, librarySources)) {
+ htmlSources.add(entry.getKey());
}
}
}
- break;
}
- if (htmlSources.isEmpty) {
- return Source.EMPTY_ARRAY;
- }
- return new List.from(htmlSources);
+ break;
}
+ if (htmlSources.isEmpty) {
+ return Source.EMPTY_ARRAY;
+ }
+ return new List.from(htmlSources);
}
List<Source> get htmlSources => getSources(SourceKind.HTML);
@@ -3769,15 +4046,13 @@
// TODO(brianwilkerson) This needs to filter out libraries that do not reference dart:html,
// either directly or indirectly.
List<Source> sources = new List<Source>();
- {
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- Source source = entry.getKey();
- SourceEntry sourceEntry = entry.getValue();
- if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSystemLibrary) {
- // DartEntry dartEntry = (DartEntry) sourceEntry;
- // if (dartEntry.getValue(DartEntry.IS_LAUNCHABLE) && dartEntry.getValue(DartEntry.IS_CLIENT)) {
- sources.add(source);
- }
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ Source source = entry.getKey();
+ SourceEntry sourceEntry = entry.getValue();
+ if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSystemLibrary) {
+ // DartEntry dartEntry = (DartEntry) sourceEntry;
+ // if (dartEntry.getValue(DartEntry.IS_LAUNCHABLE) && dartEntry.getValue(DartEntry.IS_CLIENT)) {
+ sources.add(source);
}
}
return new List.from(sources);
@@ -3787,15 +4062,13 @@
// TODO(brianwilkerson) This needs to filter out libraries that reference dart:html, either
// directly or indirectly.
List<Source> sources = new List<Source>();
- {
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- Source source = entry.getKey();
- SourceEntry sourceEntry = entry.getValue();
- if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSystemLibrary) {
- // DartEntry dartEntry = (DartEntry) sourceEntry;
- // if (dartEntry.getValue(DartEntry.IS_LAUNCHABLE) && !dartEntry.getValue(DartEntry.IS_CLIENT)) {
- sources.add(source);
- }
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ Source source = entry.getKey();
+ SourceEntry sourceEntry = entry.getValue();
+ if (identical(sourceEntry.kind, SourceKind.LIBRARY) && !source.isInSystemLibrary) {
+ // DartEntry dartEntry = (DartEntry) sourceEntry;
+ // if (dartEntry.getValue(DartEntry.IS_LAUNCHABLE) && !dartEntry.getValue(DartEntry.IS_CLIENT)) {
+ sources.add(source);
}
}
return new List.from(sources);
@@ -3810,24 +4083,22 @@
}
List<Source> getLibrariesDependingOn(Source librarySource) {
- {
- List<Source> dependentLibraries = new List<Source>();
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- SourceEntry sourceEntry = entry.getValue();
- if (identical(sourceEntry.kind, SourceKind.LIBRARY)) {
- if (contains((sourceEntry as DartEntry).getValue(DartEntry.EXPORTED_LIBRARIES), librarySource)) {
- dependentLibraries.add(entry.getKey());
- }
- if (contains((sourceEntry as DartEntry).getValue(DartEntry.IMPORTED_LIBRARIES), librarySource)) {
- dependentLibraries.add(entry.getKey());
- }
+ List<Source> dependentLibraries = new List<Source>();
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ SourceEntry sourceEntry = entry.getValue();
+ if (identical(sourceEntry.kind, SourceKind.LIBRARY)) {
+ if (contains((sourceEntry as DartEntry).getValue(DartEntry.EXPORTED_LIBRARIES), librarySource)) {
+ dependentLibraries.add(entry.getKey());
+ }
+ if (contains((sourceEntry as DartEntry).getValue(DartEntry.IMPORTED_LIBRARIES), librarySource)) {
+ dependentLibraries.add(entry.getKey());
}
}
- if (dependentLibraries.isEmpty) {
- return Source.EMPTY_ARRAY;
- }
- return new List.from(dependentLibraries);
}
+ if (dependentLibraries.isEmpty) {
+ return Source.EMPTY_ARRAY;
+ }
+ return new List.from(dependentLibraries);
}
LibraryElement getLibraryElement(Source source) {
@@ -3848,6 +4119,14 @@
return null;
}
+ int getModificationStamp(Source source) {
+ int stamp = _contentCache.getModificationStamp(source);
+ if (stamp != null) {
+ return stamp;
+ }
+ return source.modificationStamp;
+ }
+
Namespace getPublicNamespace(LibraryElement library) {
// TODO(brianwilkerson) Rename this to not start with 'get'. Note that this is not part of the
// API of the interface.
@@ -3863,17 +4142,15 @@
if (namespace == null) {
NamespaceBuilder builder = new NamespaceBuilder();
namespace = builder.createPublicNamespace(library);
- {
- dartEntry = getReadableDartEntry(source);
- if (dartEntry == null) {
- AnalysisEngine.instance.logger.logError2("Could not compute the public namespace for ${library.source.fullName}", new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}"));
- return null;
- }
- if (identical(dartEntry.getValue(DartEntry.ELEMENT), library)) {
- DartEntryImpl dartCopy = getReadableDartEntry(source).writableCopy;
- dartCopy.setValue(DartEntry.PUBLIC_NAMESPACE, namespace);
- _cache.put(source, dartCopy);
- }
+ dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ AnalysisEngine.instance.logger.logError2("Could not compute the public namespace for ${library.source.fullName}", new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}"));
+ return null;
+ }
+ if (identical(dartEntry.getValue(DartEntry.ELEMENT), library)) {
+ DartEntryImpl dartCopy = getReadableDartEntry(source).writableCopy;
+ dartCopy.setValue(DartEntry.PUBLIC_NAMESPACE, namespace);
+ _cache.put(source, dartCopy);
}
}
return namespace;
@@ -3894,16 +4171,14 @@
}
NamespaceBuilder builder = new NamespaceBuilder();
namespace = builder.createPublicNamespace(library);
- {
- dartEntry = getReadableDartEntry(source);
- if (dartEntry == null) {
- throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
- }
- if (identical(dartEntry.getValue(DartEntry.ELEMENT), library)) {
- DartEntryImpl dartCopy = getReadableDartEntry(source).writableCopy;
- dartCopy.setValue(DartEntry.PUBLIC_NAMESPACE, namespace);
- _cache.put(source, dartCopy);
- }
+ dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
+ }
+ if (identical(dartEntry.getValue(DartEntry.ELEMENT), library)) {
+ DartEntryImpl dartCopy = getReadableDartEntry(source).writableCopy;
+ dartCopy.setValue(DartEntry.PUBLIC_NAMESPACE, namespace);
+ _cache.put(source, dartCopy);
}
}
return namespace;
@@ -3911,13 +4186,11 @@
List<Source> get refactoringUnsafeSources {
List<Source> sources = new List<Source>();
- {
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- SourceEntry sourceEntry = entry.getValue();
- if (sourceEntry is DartEntry) {
- if (!sourceEntry.isRefactoringSafe) {
- sources.add(entry.getKey());
- }
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ SourceEntry sourceEntry = entry.getValue();
+ if (sourceEntry is DartEntry) {
+ if (!sourceEntry.isRefactoringSafe) {
+ sources.add(entry.getKey());
}
}
}
@@ -3959,55 +4232,59 @@
*/
List<Source> get sourcesNeedingProcessing {
Set<Source> sources = new Set<Source>();
- {
- bool hintsEnabled = _options.hint;
- //
- // Look for priority sources that need to be analyzed.
- //
- for (Source source in _priorityOrder) {
- getSourcesNeedingProcessing2(source, _cache.get(source), true, hintsEnabled, sources);
- }
- //
- // Look for non-priority sources that need to be analyzed.
- //
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- getSourcesNeedingProcessing2(entry.getKey(), entry.getValue(), false, hintsEnabled, sources);
- }
+ bool hintsEnabled = _options.hint;
+ //
+ // Look for priority sources that need to be analyzed.
+ //
+ for (Source source in _priorityOrder) {
+ getSourcesNeedingProcessing2(source, _cache.get(source), true, hintsEnabled, sources);
+ }
+ //
+ // Look for non-priority sources that need to be analyzed.
+ //
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ getSourcesNeedingProcessing2(entry.getKey(), entry.getValue(), false, hintsEnabled, sources);
}
return new List<Source>.from(sources);
}
AnalysisContentStatistics get statistics {
AnalysisContentStatisticsImpl statistics = new AnalysisContentStatisticsImpl();
- {
- for (MapEntry<Source, SourceEntry> mapEntry in _cache.entrySet()) {
- SourceEntry entry = mapEntry.getValue();
- if (entry is DartEntry) {
- Source source = mapEntry.getKey();
- DartEntry dartEntry = entry;
- SourceKind kind = dartEntry.getValue(DartEntry.SOURCE_KIND);
- // get library independent values
- statistics.putCacheItem(dartEntry, DartEntry.PARSE_ERRORS);
- statistics.putCacheItem(dartEntry, DartEntry.PARSED_UNIT);
- statistics.putCacheItem(dartEntry, DartEntry.SOURCE_KIND);
- statistics.putCacheItem(dartEntry, SourceEntry.LINE_INFO);
- if (identical(kind, SourceKind.LIBRARY)) {
- statistics.putCacheItem(dartEntry, DartEntry.ELEMENT);
- statistics.putCacheItem(dartEntry, DartEntry.EXPORTED_LIBRARIES);
- statistics.putCacheItem(dartEntry, DartEntry.IMPORTED_LIBRARIES);
- statistics.putCacheItem(dartEntry, DartEntry.INCLUDED_PARTS);
- statistics.putCacheItem(dartEntry, DartEntry.IS_CLIENT);
- statistics.putCacheItem(dartEntry, DartEntry.IS_LAUNCHABLE);
- }
- // get library-specific values
- List<Source> librarySources = getLibrariesContaining(source);
- for (Source librarySource in librarySources) {
- statistics.putCacheItem2(dartEntry, librarySource, DartEntry.HINTS);
- statistics.putCacheItem2(dartEntry, librarySource, DartEntry.RESOLUTION_ERRORS);
- statistics.putCacheItem2(dartEntry, librarySource, DartEntry.RESOLVED_UNIT);
- statistics.putCacheItem2(dartEntry, librarySource, DartEntry.VERIFICATION_ERRORS);
- }
+ for (MapEntry<Source, SourceEntry> mapEntry in _cache.entrySet()) {
+ statistics.addSource(mapEntry.getKey());
+ SourceEntry entry = mapEntry.getValue();
+ if (entry is DartEntry) {
+ Source source = mapEntry.getKey();
+ DartEntry dartEntry = entry;
+ SourceKind kind = dartEntry.getValue(DartEntry.SOURCE_KIND);
+ // get library independent values
+ statistics.putCacheItem2(dartEntry, SourceEntry.LINE_INFO);
+ statistics.putCacheItem2(dartEntry, DartEntry.PARSE_ERRORS);
+ statistics.putCacheItem2(dartEntry, DartEntry.PARSED_UNIT);
+ statistics.putCacheItem2(dartEntry, DartEntry.SOURCE_KIND);
+ if (identical(kind, SourceKind.LIBRARY)) {
+ statistics.putCacheItem2(dartEntry, DartEntry.ELEMENT);
+ statistics.putCacheItem2(dartEntry, DartEntry.EXPORTED_LIBRARIES);
+ statistics.putCacheItem2(dartEntry, DartEntry.IMPORTED_LIBRARIES);
+ statistics.putCacheItem2(dartEntry, DartEntry.INCLUDED_PARTS);
+ statistics.putCacheItem2(dartEntry, DartEntry.IS_CLIENT);
+ statistics.putCacheItem2(dartEntry, DartEntry.IS_LAUNCHABLE);
}
+ // get library-specific values
+ List<Source> librarySources = getLibrariesContaining(source);
+ for (Source librarySource in librarySources) {
+ statistics.putCacheItem(dartEntry, librarySource, DartEntry.HINTS);
+ statistics.putCacheItem(dartEntry, librarySource, DartEntry.RESOLUTION_ERRORS);
+ statistics.putCacheItem(dartEntry, librarySource, DartEntry.RESOLVED_UNIT);
+ statistics.putCacheItem(dartEntry, librarySource, DartEntry.VERIFICATION_ERRORS);
+ }
+ } else if (entry is HtmlEntry) {
+ HtmlEntry htmlEntry = entry;
+ statistics.putCacheItem2(htmlEntry, SourceEntry.LINE_INFO);
+ statistics.putCacheItem2(htmlEntry, HtmlEntry.PARSE_ERRORS);
+ statistics.putCacheItem2(htmlEntry, HtmlEntry.PARSED_UNIT);
+ statistics.putCacheItem2(htmlEntry, HtmlEntry.RESOLUTION_ERRORS);
+ statistics.putCacheItem2(htmlEntry, HtmlEntry.RESOLVED_UNIT);
}
}
return statistics;
@@ -4018,6 +4295,19 @@
return new TypeProviderImpl(computeLibraryElement(coreSource));
}
+ TimestampedData<CompilationUnit> internalParseCompilationUnit(Source source) {
+ DartEntry dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("internalParseCompilationUnit invoked for non-Dart file: ${source.fullName}");
+ }
+ dartEntry = cacheDartParseData(source, dartEntry, DartEntry.PARSED_UNIT);
+ CompilationUnit unit = dartEntry.anyParsedCompilationUnit;
+ if (unit == null) {
+ throw new AnalysisException.con2("internalParseCompilationUnit could not cache a parsed unit: ${source.fullName}", dartEntry.exception);
+ }
+ return new TimestampedData<CompilationUnit>(dartEntry.modificationTime, unit);
+ }
+
TimestampedData<CompilationUnit> internalResolveCompilationUnit(Source unitSource, LibraryElement libraryElement) {
DartEntry dartEntry = getReadableDartEntry(unitSource);
if (dartEntry == null) {
@@ -4028,6 +4318,15 @@
return new TimestampedData<CompilationUnit>(dartEntry.modificationTime, dartEntry.getValue2(DartEntry.RESOLVED_UNIT, librarySource));
}
+ TimestampedData<Token> internalScanTokenStream(Source source) {
+ DartEntry dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("internalScanTokenStream invoked for non-Dart file: ${source.fullName}");
+ }
+ dartEntry = cacheDartScanData(source, dartEntry, DartEntry.TOKEN_STREAM);
+ return new TimestampedData<Token>(dartEntry.modificationTime, dartEntry.getValue(DartEntry.TOKEN_STREAM));
+ }
+
bool isClientLibrary(Source librarySource) {
SourceEntry sourceEntry = getReadableSourceEntry(librarySource);
if (sourceEntry is DartEntry) {
@@ -4053,16 +4352,14 @@
if (context is! AnalysisContextImpl) {
return;
}
- {
- // TODO(brianwilkerson) This does not lock against the other context's cacheLock.
- for (MapEntry<Source, SourceEntry> entry in (context as AnalysisContextImpl)._cache.entrySet()) {
- Source newSource = entry.getKey();
- SourceEntry existingEntry = getReadableSourceEntry(newSource);
- if (existingEntry == null) {
- // TODO(brianwilkerson) Decide whether we really need to copy the info.
- _cache.put(newSource, entry.getValue().writableCopy);
- } else {
- }
+ // TODO(brianwilkerson) This does not lock against the other context's cacheLock.
+ for (MapEntry<Source, SourceEntry> entry in (context as AnalysisContextImpl)._cache.entrySet()) {
+ Source newSource = entry.getKey();
+ SourceEntry existingEntry = getReadableSourceEntry(newSource);
+ if (existingEntry == null) {
+ // TODO(brianwilkerson) Decide whether we really need to copy the info.
+ _cache.put(newSource, entry.getValue().writableCopy);
+ } else {
}
}
}
@@ -4090,6 +4387,8 @@
int performStart = JavaSystem.currentTimeMillis();
try {
task.perform(_resultRecorder);
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not perform analysis task: ${taskDescriptor}", exception);
} on AnalysisException catch (exception) {
if (exception.cause is! JavaIOException) {
AnalysisEngine.instance.logger.logError2("Internal error while performing the task: ${task}", exception);
@@ -4100,20 +4399,18 @@
}
void recordLibraryElements(Map<Source, LibraryElement> elementMap) {
- {
- Source htmlSource = _sourceFactory.forUri(DartSdk.DART_HTML);
- for (MapEntry<Source, LibraryElement> entry in getMapEntrySet(elementMap)) {
- Source librarySource = entry.getKey();
- LibraryElement library = entry.getValue();
- //
- // Cache the element in the library's info.
- //
- DartEntry dartEntry = getReadableDartEntry(librarySource);
- if (dartEntry != null) {
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- recordElementData(dartEntry, dartCopy, library, library.source, htmlSource);
- _cache.put(librarySource, dartCopy);
- }
+ Source htmlSource = _sourceFactory.forUri(DartSdk.DART_HTML);
+ for (MapEntry<Source, LibraryElement> entry in getMapEntrySet(elementMap)) {
+ Source librarySource = entry.getKey();
+ LibraryElement library = entry.getValue();
+ //
+ // Cache the element in the library's info.
+ //
+ DartEntry dartEntry = getReadableDartEntry(librarySource);
+ if (dartEntry != null) {
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ recordElementData(dartEntry, dartCopy, library, library.source, htmlSource);
+ _cache.put(librarySource, dartCopy);
}
}
}
@@ -4133,117 +4430,111 @@
}
void set analysisOptions(AnalysisOptions options) {
- {
- bool needsRecompute = this._options.analyzeFunctionBodies != options.analyzeFunctionBodies || this._options.dart2jsHint != options.dart2jsHint || (this._options.hint && !options.hint) || this._options.preserveComments != options.preserveComments;
- int cacheSize = options.cacheSize;
- if (this._options.cacheSize != cacheSize) {
- this._options.cacheSize = cacheSize;
- _cache.maxCacheSize = cacheSize;
- //
- // Cap the size of the priority list to being less than the cache size. Failure to do so can
- // result in an infinite loop in performAnalysisTask() because re-caching one AST structure
- // can cause another priority source's AST structure to be flushed.
- //
- int maxPriorityOrderSize = cacheSize - _PRIORITY_ORDER_SIZE_DELTA;
- if (_priorityOrder.length > maxPriorityOrderSize) {
- List<Source> newPriorityOrder = new List<Source>(maxPriorityOrderSize);
- JavaSystem.arraycopy(_priorityOrder, 0, newPriorityOrder, 0, maxPriorityOrderSize);
- _priorityOrder = newPriorityOrder;
- }
+ bool needsRecompute = this._options.analyzeFunctionBodies != options.analyzeFunctionBodies || this._options.dart2jsHint != options.dart2jsHint || (this._options.hint && !options.hint) || this._options.preserveComments != options.preserveComments;
+ int cacheSize = options.cacheSize;
+ if (this._options.cacheSize != cacheSize) {
+ this._options.cacheSize = cacheSize;
+ _cache.maxCacheSize = cacheSize;
+ //
+ // Cap the size of the priority list to being less than the cache size. Failure to do so can
+ // result in an infinite loop in performAnalysisTask() because re-caching one AST structure
+ // can cause another priority source's AST structure to be flushed.
+ //
+ int maxPriorityOrderSize = cacheSize - _PRIORITY_ORDER_SIZE_DELTA;
+ if (_priorityOrder.length > maxPriorityOrderSize) {
+ List<Source> newPriorityOrder = new List<Source>(maxPriorityOrderSize);
+ JavaSystem.arraycopy(_priorityOrder, 0, newPriorityOrder, 0, maxPriorityOrderSize);
+ _priorityOrder = newPriorityOrder;
}
- this._options.analyzeFunctionBodies = options.analyzeFunctionBodies;
- this._options.dart2jsHint = options.dart2jsHint;
- this._options.hint = options.hint;
- this._options.incremental = options.incremental;
- this._options.preserveComments = options.preserveComments;
- if (needsRecompute) {
- invalidateAllResolutionInformation();
- }
+ }
+ this._options.analyzeFunctionBodies = options.analyzeFunctionBodies;
+ this._options.dart2jsHint = options.dart2jsHint;
+ this._options.hint = options.hint;
+ this._options.incremental = options.incremental;
+ this._options.preserveComments = options.preserveComments;
+ if (needsRecompute) {
+ invalidateAllResolutionInformation();
}
}
void set analysisPriorityOrder(List<Source> sources) {
- {
- if (sources == null || sources.isEmpty) {
+ if (sources == null || sources.isEmpty) {
+ _priorityOrder = Source.EMPTY_ARRAY;
+ } else {
+ while (sources.remove(null)) {
+ }
+ if (sources.isEmpty) {
_priorityOrder = Source.EMPTY_ARRAY;
- } else {
- while (sources.remove(null)) {
- }
- if (sources.isEmpty) {
- _priorityOrder = Source.EMPTY_ARRAY;
- }
- //
- // Cap the size of the priority list to being less than the cache size. Failure to do so can
- // result in an infinite loop in performAnalysisTask() because re-caching one AST structure
- // can cause another priority source's AST structure to be flushed.
- //
- int count = Math.min(sources.length, _options.cacheSize - _PRIORITY_ORDER_SIZE_DELTA);
- _priorityOrder = new List<Source>(count);
- for (int i = 0; i < count; i++) {
- _priorityOrder[i] = sources[i];
- }
+ }
+ //
+ // Cap the size of the priority list to being less than the cache size. Failure to do so can
+ // result in an infinite loop in performAnalysisTask() because re-caching one AST structure
+ // can cause another priority source's AST structure to be flushed.
+ //
+ int count = Math.min(sources.length, _options.cacheSize - _PRIORITY_ORDER_SIZE_DELTA);
+ _priorityOrder = new List<Source>(count);
+ for (int i = 0; i < count; i++) {
+ _priorityOrder[i] = sources[i];
}
}
}
void setChangedContents(Source source, String contents, int offset, int oldLength, int newLength) {
- {
- _recentTasks.clear();
- String originalContents = _sourceFactory.setContents(source, contents);
- if (contents != null) {
- if (contents != originalContents) {
- if (_options.incremental) {
- _incrementalAnalysisCache = IncrementalAnalysisCache.update(_incrementalAnalysisCache, source, originalContents, contents, offset, oldLength, newLength, getReadableSourceEntry(source));
- }
- sourceChanged(source);
+ _recentTasks.clear();
+ String originalContents = _contentCache.setContents(source, contents);
+ if (contents != null) {
+ if (contents != originalContents) {
+ if (_options.incremental) {
+ _incrementalAnalysisCache = IncrementalAnalysisCache.update(_incrementalAnalysisCache, source, originalContents, contents, offset, oldLength, newLength, getReadableSourceEntry(source));
}
- } else if (originalContents != null) {
- _incrementalAnalysisCache = IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source);
sourceChanged(source);
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry != null) {
+ SourceEntryImpl sourceCopy = sourceEntry.writableCopy;
+ sourceCopy.modificationTime = _contentCache.getModificationStamp(source);
+ sourceCopy.setValue(SourceEntry.CONTENT, contents);
+ _cache.put(source, sourceCopy);
+ }
}
+ } else if (originalContents != null) {
+ _incrementalAnalysisCache = IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source);
+ sourceChanged(source);
}
}
void setContents(Source source, String contents) {
- {
- _recentTasks.clear();
- String originalContents = _sourceFactory.setContents(source, contents);
- if (contents != null) {
- if (contents != originalContents) {
- _incrementalAnalysisCache = IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source);
- sourceChanged(source);
- }
- } else if (originalContents != null) {
+ _recentTasks.clear();
+ String originalContents = _contentCache.setContents(source, contents);
+ if (contents != null) {
+ if (contents != originalContents) {
_incrementalAnalysisCache = IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source);
sourceChanged(source);
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry != null) {
+ SourceEntryImpl sourceCopy = sourceEntry.writableCopy;
+ sourceCopy.modificationTime = _contentCache.getModificationStamp(source);
+ sourceCopy.setValue(SourceEntry.CONTENT, contents);
+ _cache.put(source, sourceCopy);
+ }
}
+ } else if (originalContents != null) {
+ _incrementalAnalysisCache = IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source);
+ sourceChanged(source);
}
}
void set sourceFactory(SourceFactory factory) {
- {
- if (identical(_sourceFactory, factory)) {
- return;
- } else if (factory.context != null) {
- throw new IllegalStateException("Source factories cannot be shared between contexts");
- }
- if (_sourceFactory != null) {
- _sourceFactory.context = null;
- }
- factory.context = this;
- _sourceFactory = factory;
- invalidateAllResolutionInformation();
+ if (identical(_sourceFactory, factory)) {
+ return;
+ } else if (factory.context != null) {
+ throw new IllegalStateException("Source factories cannot be shared between contexts");
}
- }
-
- Iterable<Source> sourcesToResolve(List<Source> changedSources) {
- List<Source> librarySources = new List<Source>();
- for (Source source in changedSources) {
- if (identical(computeKindOf(source), SourceKind.LIBRARY)) {
- librarySources.add(source);
- }
+ if (_sourceFactory != null) {
+ _sourceFactory.context = null;
}
- return librarySources;
+ factory.context = this;
+ _sourceFactory = factory;
+ invalidateAllResolutionInformation();
}
/**
@@ -4283,90 +4574,88 @@
}
return dartCopy;
}
- {
- if (allModificationTimesMatch(resolvedLibraries)) {
- Source htmlSource = sourceFactory.forUri(DartSdk.DART_HTML);
- RecordingErrorListener errorListener = resolver.errorListener;
- for (Library library in resolvedLibraries) {
- Source librarySource = library.librarySource;
- for (Source source in library.compilationUnitSources) {
- CompilationUnit unit = library.getAST(source);
- List<AnalysisError> errors = errorListener.getErrors2(source);
- LineInfo lineInfo = getLineInfo(source);
- DartEntry dartEntry = _cache.get(source) as DartEntry;
- int sourceTime = source.modificationStamp;
- if (dartEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- dartEntry = getReadableDartEntry(source);
- if (dartEntry == null) {
- throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
- }
+ if (allModificationTimesMatch(resolvedLibraries)) {
+ Source htmlSource = sourceFactory.forUri(DartSdk.DART_HTML);
+ RecordingErrorListener errorListener = resolver.errorListener;
+ for (Library library in resolvedLibraries) {
+ Source librarySource = library.librarySource;
+ for (Source source in library.compilationUnitSources) {
+ CompilationUnit unit = library.getAST(source);
+ List<AnalysisError> errors = errorListener.getErrors2(source);
+ LineInfo lineInfo = getLineInfo(source);
+ DartEntry dartEntry = _cache.get(source) as DartEntry;
+ int sourceTime = getModificationStamp(source);
+ if (dartEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
}
+ }
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null) {
+ dartCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
+ dartCopy.setState(DartEntry.PARSED_UNIT, CacheState.FLUSHED);
+ dartCopy.setValue2(DartEntry.RESOLVED_UNIT, librarySource, unit);
+ dartCopy.setValue2(DartEntry.RESOLUTION_ERRORS, librarySource, errors);
+ if (source == librarySource) {
+ recordElementData(dartEntry, dartCopy, library.libraryElement, librarySource, htmlSource);
+ }
+ _cache.storedAst(source);
+ } else {
+ dartCopy.recordResolutionError();
+ _cache.remove(source);
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ if (source != librarySource) {
+ _workManager.add(source, SourcePriority.PRIORITY_PART);
+ }
+ if (source == unitSource) {
+ unitEntry = dartCopy;
+ }
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.compilationUnit = unit;
+ notice.setErrors(dartCopy.allErrors, lineInfo);
+ }
+ }
+ } else {
+ PrintStringWriter writer = new PrintStringWriter();
+ writer.println("Library resolution results discarded for");
+ for (Library library in resolvedLibraries) {
+ for (Source source in library.compilationUnitSources) {
+ DartEntry dartEntry = getReadableDartEntry(source);
+ if (dartEntry != null) {
+ int resultTime = library.getModificationTime(source);
+ writer.println(" ${debuggingString(source)}; sourceTime = ${getModificationStamp(source)}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}");
DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null) {
- dartCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
- dartCopy.setState(DartEntry.PARSED_UNIT, CacheState.FLUSHED);
- dartCopy.setValue2(DartEntry.RESOLVED_UNIT, librarySource, unit);
- dartCopy.setValue2(DartEntry.RESOLUTION_ERRORS, librarySource, errors);
- if (source == librarySource) {
- recordElementData(dartEntry, dartCopy, library.libraryElement, librarySource, htmlSource);
- }
- _cache.storedAst(source);
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the
+ // sources will be re-analyzed using the up-to-date sources.
+ //
+ dartCopy.recordResolutionNotInProcess();
} else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark
+ // the cache so that we won't attempt to re-analyze the sources until there's a
+ // good chance that we'll be able to do so without error.
+ //
dartCopy.recordResolutionError();
_cache.remove(source);
}
dartCopy.exception = thrownException;
_cache.put(source, dartCopy);
- if (source != librarySource) {
- _workManager.add(source, SourcePriority.PRIORITY_PART);
- }
if (source == unitSource) {
unitEntry = dartCopy;
}
- ChangeNoticeImpl notice = getNotice(source);
- notice.compilationUnit = unit;
- notice.setErrors(dartCopy.allErrors, lineInfo);
+ } else {
+ writer.println(" ${debuggingString(source)}; sourceTime = ${getModificationStamp(source)}, no entry");
}
}
- } else {
- PrintStringWriter writer = new PrintStringWriter();
- writer.println("Library resolution results discarded for");
- for (Library library in resolvedLibraries) {
- for (Source source in library.compilationUnitSources) {
- DartEntry dartEntry = getReadableDartEntry(source);
- if (dartEntry != null) {
- int resultTime = library.getModificationTime(source);
- writer.println(" ${debuggingString(source)}; sourceTime = ${source.modificationStamp}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}");
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the
- // sources will be re-analyzed using the up-to-date sources.
- //
- dartCopy.recordResolutionNotInProcess();
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark
- // the cache so that we won't attempt to re-analyze the sources until there's a
- // good chance that we'll be able to do so without error.
- //
- dartCopy.recordResolutionError();
- _cache.remove(source);
- }
- dartCopy.exception = thrownException;
- _cache.put(source, dartCopy);
- if (source == unitSource) {
- unitEntry = dartCopy;
- }
- } else {
- writer.println(" ${debuggingString(source)}; sourceTime = ${source.modificationStamp}, no entry");
- }
- }
- }
- logInformation(writer.toString());
}
+ logInformation(writer.toString());
}
}
if (thrownException != null) {
@@ -4388,9 +4677,7 @@
* @param source the source whose AST structure was accessed
*/
void accessedAst(Source source) {
- {
- _cache.accessedAst(source);
- }
+ _cache.accessedAst(source);
}
/**
@@ -4429,7 +4716,7 @@
// source didn't represent a Dart file, but check to be safe.
throw new AnalysisException.con1("Internal error: attempting to resolve non-Dart file as a Dart file: ${source.fullName}");
}
- int sourceTime = source.modificationStamp;
+ int sourceTime = getModificationStamp(source);
int resultTime = library.getModificationTime(source);
if (sourceTime != resultTime) {
// The source has changed without the context being notified. Simulate notification.
@@ -4508,8 +4795,7 @@
* @param dartEntry the cache entry associated with the Dart file
* @param descriptor the descriptor representing the data to be returned
* @return a cache entry containing the required data
- * @throws AnalysisException if data could not be returned because the source could not be
- * resolved
+ * @throws AnalysisException if data could not be returned because the source could not be parsed
*/
DartEntry cacheDartParseData(Source source, DartEntry dartEntry, DataDescriptor descriptor) {
if (identical(descriptor, DartEntry.PARSED_UNIT)) {
@@ -4565,6 +4851,42 @@
}
/**
+ * Given a source for a Dart file, return a cache entry in which the state of the data represented
+ * by the given descriptor is either [CacheState#VALID] or [CacheState#ERROR]. This
+ * method assumes that the data can be produced by scanning the source if it is not already
+ * cached.
+ *
+ * @param source the source representing the Dart file
+ * @param dartEntry the cache entry associated with the Dart file
+ * @param descriptor the descriptor representing the data to be returned
+ * @return a cache entry containing the required data
+ * @throws AnalysisException if data could not be returned because the source could not be scanned
+ */
+ DartEntry cacheDartScanData(Source source, DartEntry dartEntry, DataDescriptor descriptor) {
+ //
+ // Check to see whether we already have the information being requested.
+ //
+ CacheState state = dartEntry.getState(descriptor);
+ while (state != CacheState.ERROR && state != CacheState.VALID) {
+ //
+ // If not, compute the information. Unless the modification date of the source continues to
+ // change, this loop will eventually terminate.
+ //
+ // TODO(brianwilkerson) Convert this to get the contents from the cache. (I'm not sure how
+ // that would work in an asynchronous environment.)
+ try {
+ dartEntry = new ScanDartTask(this, source, getContents(source)).perform(_resultRecorder) as DartEntry;
+ } on AnalysisException catch (exception) {
+ throw exception;
+ } on JavaException catch (exception) {
+ throw new AnalysisException.con3(exception);
+ }
+ state = dartEntry.getState(descriptor);
+ }
+ return dartEntry;
+ }
+
+ /**
* Given a source for a Dart file and the library that contains it, return a cache entry in which
* the state of the data represented by the given descriptor is either [CacheState#VALID] or
* [CacheState#ERROR]. This method assumes that the data can be produced by verifying the
@@ -4622,7 +4944,15 @@
// If not, compute the information. Unless the modification date of the source continues to
// change, this loop will eventually terminate.
//
- htmlEntry = new ParseHtmlTask(this, source).perform(_resultRecorder) as HtmlEntry;
+ // TODO(brianwilkerson) Convert this to get the contents from the cache. (I'm not sure how
+ // that would work in an asynchronous environment.)
+ try {
+ htmlEntry = new ParseHtmlTask(this, source, getContents(source)).perform(_resultRecorder) as HtmlEntry;
+ } on AnalysisException catch (exception) {
+ throw exception;
+ } on JavaException catch (exception) {
+ throw new AnalysisException.con3(exception);
+ }
state = htmlEntry.getState(descriptor);
}
return htmlEntry;
@@ -4663,11 +4993,7 @@
* @param encoding the encoded form of a source
* @return the source represented by the encoding
*/
- Source computeSourceFromEncoding(String encoding) {
- {
- return _sourceFactory.fromEncoding(encoding);
- }
- }
+ Source computeSourceFromEncoding(String encoding) => _sourceFactory.fromEncoding(encoding);
/**
* Return `true` if the given array of sources contains the given source.
@@ -4712,12 +5038,12 @@
String name = source.shortName;
if (AnalysisEngine.isHtmlFileName(name)) {
HtmlEntryImpl htmlEntry = new HtmlEntryImpl();
- htmlEntry.modificationTime = source.modificationStamp;
+ htmlEntry.modificationTime = getModificationStamp(source);
_cache.put(source, htmlEntry);
return htmlEntry;
} else {
DartEntryImpl dartEntry = new DartEntryImpl();
- dartEntry.modificationTime = source.modificationStamp;
+ dartEntry.modificationTime = getModificationStamp(source);
_cache.put(source, dartEntry);
return dartEntry;
}
@@ -4730,7 +5056,7 @@
* @param source the source for which a debugging string is to be produced
* @return debugging information about the given source
*/
- String debuggingString(Source source) => "'${source.fullName}' [${source.modificationStamp}]";
+ String debuggingString(Source source) => "'${source.fullName}' [${getModificationStamp(source)}]";
/**
* Return an array containing all of the change notices that are waiting to be returned. If there
@@ -4741,17 +5067,15 @@
* @return the change notices that are waiting to be returned
*/
List<ChangeNotice> getChangeNotices(bool nullIfEmpty) {
- {
- if (_pendingNotices.isEmpty) {
- if (nullIfEmpty) {
- return null;
- }
- return ChangeNoticeImpl.EMPTY_ARRAY;
+ if (_pendingNotices.isEmpty) {
+ if (nullIfEmpty) {
+ return null;
}
- List<ChangeNotice> notices = new List.from(_pendingNotices.values);
- _pendingNotices.clear();
- return notices;
+ return ChangeNoticeImpl.EMPTY_ARRAY;
}
+ List<ChangeNotice> notices = new List.from(_pendingNotices.values);
+ _pendingNotices.clear();
+ return notices;
}
/**
@@ -4787,7 +5111,12 @@
if (dartEntry == null) {
return defaultValue;
}
- return getDartDependencyData(source, dartEntry, descriptor);
+ try {
+ return getDartDependencyData(source, dartEntry, descriptor);
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute ${descriptor.toString()}", exception);
+ return defaultValue;
+ }
}
/**
@@ -4847,7 +5176,12 @@
if (dartEntry == null) {
return defaultValue;
}
- return getDartParseData(source, dartEntry, descriptor);
+ try {
+ return getDartParseData(source, dartEntry, descriptor);
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute ${descriptor.toString()}", exception);
+ return defaultValue;
+ }
}
/**
@@ -4892,7 +5226,53 @@
if (dartEntry == null) {
return defaultValue;
}
- return getDartResolutionData(unitSource, librarySource, dartEntry, descriptor);
+ try {
+ return getDartResolutionData(unitSource, librarySource, dartEntry, descriptor);
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute ${descriptor.toString()}", exception);
+ return defaultValue;
+ }
+ }
+
+ /**
+ * Given a source for a Dart file, return the data represented by the given descriptor that is
+ * associated with that source. This method assumes that the data can be produced by scanning the
+ * source if it is not already cached.
+ *
+ * @param source the source representing the Dart file
+ * @param dartEntry the cache entry associated with the Dart file
+ * @param descriptor the descriptor representing the data to be returned
+ * @return the requested data about the given source
+ * @throws AnalysisException if data could not be returned because the source could not be scanned
+ */
+ Object getDartScanData(Source source, DartEntry dartEntry, DataDescriptor descriptor) {
+ dartEntry = cacheDartScanData(source, dartEntry, descriptor);
+ return dartEntry.getValue(descriptor);
+ }
+
+ /**
+ * Given a source for a Dart file, return the data represented by the given descriptor that is
+ * associated with that source, or the given default value if the source is not a Dart file. This
+ * method assumes that the data can be produced by scanning the source if it is not already
+ * cached.
+ *
+ * @param source the source representing the Dart file
+ * @param descriptor the descriptor representing the data to be returned
+ * @param defaultValue the value to be returned if the source is not a Dart file
+ * @return the requested data about the given source
+ * @throws AnalysisException if data could not be returned because the source could not be scanned
+ */
+ Object getDartScanData2(Source source, DataDescriptor descriptor, Object defaultValue) {
+ DartEntry dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ return defaultValue;
+ }
+ try {
+ return getDartScanData(source, dartEntry, descriptor);
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute ${descriptor.toString()}", exception);
+ return defaultValue;
+ }
}
/**
@@ -4955,7 +5335,12 @@
if (htmlEntry == null) {
return defaultValue;
}
- return getHtmlResolutionData2(source, htmlEntry, descriptor);
+ try {
+ return getHtmlResolutionData2(source, htmlEntry, descriptor);
+ } on ObsoleteSourceAnalysisException catch (exception) {
+ AnalysisEngine.instance.logger.logInformation3("Could not compute ${descriptor.toString()}", exception);
+ return defaultValue;
+ }
}
/**
@@ -4985,50 +5370,61 @@
* @return the next task that needs to be performed
*/
AnalysisTask get nextAnalysisTask {
- {
- bool hintsEnabled = _options.hint;
- //
- // Look for incremental analysis
- //
- if (_incrementalAnalysisCache != null && _incrementalAnalysisCache.hasWork()) {
- AnalysisTask task = new IncrementalAnalysisTask(this, _incrementalAnalysisCache);
- _incrementalAnalysisCache = null;
- return task;
- }
- //
- // Look for a priority source that needs to be analyzed.
- //
- for (Source source in _priorityOrder) {
- AnalysisTask task = getNextAnalysisTask2(source, _cache.get(source), true, hintsEnabled);
- if (task != null) {
- return task;
- }
- }
- //
- // Look for a non-priority source that needs to be analyzed.
- //
- Source source = _workManager.nextSource;
- while (source != null) {
- AnalysisTask task = getNextAnalysisTask2(source, _cache.get(source), false, hintsEnabled);
- if (task != null) {
- return task;
- }
- _workManager.remove(source);
- source = _workManager.nextSource;
- }
- // //
- // // Look for a non-priority source that needs to be analyzed and was missed by the loop above.
- // //
- // for (Map.Entry<Source, SourceEntry> entry : cache.entrySet()) {
- // source = entry.getKey();
- // AnalysisTask task = getNextAnalysisTask(source, entry.getValue(), false, hintsEnabled);
- // if (task != null) {
- // System.out.println("Failed to analyze " + source.getFullName());
- // return task;
- // }
- // }
- return null;
+ bool hintsEnabled = _options.hint;
+ bool sdkErrorsEnabled = _options.generateSdkErrors;
+ bool hasBlockedTask = false;
+ //
+ // Look for incremental analysis
+ //
+ if (_incrementalAnalysisCache != null && _incrementalAnalysisCache.hasWork()) {
+ AnalysisTask task = new IncrementalAnalysisTask(this, _incrementalAnalysisCache);
+ _incrementalAnalysisCache = null;
+ return task;
}
+ //
+ // Look for a priority source that needs to be analyzed.
+ //
+ for (Source source in _priorityOrder) {
+ AnalysisContextImpl_TaskData taskData = getNextNondependentAnalysisTask(source, true, hintsEnabled, sdkErrorsEnabled);
+ AnalysisTask task = taskData.task;
+ if (task != null) {
+ return task;
+ } else if (taskData.isBlocked) {
+ hasBlockedTask = true;
+ }
+ }
+ //
+ // Look for a non-priority source that needs to be analyzed.
+ //
+ Source source = _workManager.nextSource;
+ while (source != null) {
+ AnalysisContextImpl_TaskData taskData = getNextNondependentAnalysisTask(source, false, hintsEnabled, sdkErrorsEnabled);
+ AnalysisTask task = taskData.task;
+ if (task != null) {
+ return task;
+ } else if (taskData.isBlocked) {
+ hasBlockedTask = true;
+ } else {
+ _workManager.remove(source);
+ }
+ source = _workManager.nextSource;
+ }
+ // //
+ // // Look for a non-priority source that needs to be analyzed and was missed by the loop above.
+ // //
+ // for (Map.Entry<Source, SourceEntry> entry : cache.entrySet()) {
+ // source = entry.getKey();
+ // TaskData taskData = getNextAnalysisTaskForSource(source, entry.getValue(), false, hintsEnabled);
+ // AnalysisTask task = taskData.getTask();
+ // if (task != null) {
+ // System.out.println("Failed to analyze " + source.getFullName());
+ // return task;
+ // }
+ // }
+ if (hasBlockedTask) {
+ return WaitForAsyncTask.instance;
+ }
+ return null;
}
/**
@@ -5042,17 +5438,56 @@
* @param sourceEntry the cache entry associated with the source
* @param isPriority `true` if the source is a priority source
* @param hintsEnabled `true` if hints are currently enabled
+ * @param sdkErrorsEnabled `true` if errors, warnings and hints should be generated for
+ * sources in the SDK
* @return the next task that needs to be performed for the given source
*/
- AnalysisTask getNextAnalysisTask2(Source source, SourceEntry sourceEntry, bool isPriority, bool hintsEnabled) {
+ AnalysisContextImpl_TaskData getNextAnalysisTaskForSource(Source source, SourceEntry sourceEntry, bool isPriority, bool hintsEnabled, bool sdkErrorsEnabled) {
+ if (sourceEntry == null) {
+ return new AnalysisContextImpl_TaskData(null, false, null);
+ }
+ CacheState contentState = sourceEntry.getState(SourceEntry.CONTENT);
+ if (identical(contentState, CacheState.INVALID)) {
+ SourceEntryImpl sourceCopy = sourceEntry.writableCopy;
+ sourceCopy.setState(SourceEntry.CONTENT, CacheState.IN_PROCESS);
+ _cache.put(source, sourceCopy);
+ return new AnalysisContextImpl_TaskData(new GetContentTask(this, source), false, null);
+ } else if (identical(contentState, CacheState.IN_PROCESS)) {
+ // We are in the process of getting the content. There's nothing else we can do with this
+ // source until that's complete.
+ return new AnalysisContextImpl_TaskData(null, true, null);
+ }
if (sourceEntry is DartEntry) {
DartEntry dartEntry = sourceEntry;
+ CacheState scanErrorsState = dartEntry.getState(DartEntry.SCAN_ERRORS);
+ if (identical(scanErrorsState, CacheState.INVALID) || (isPriority && identical(scanErrorsState, CacheState.FLUSHED))) {
+ // TODO(brianwilkerson) Convert this to get the contents from the cache or to asynchronously
+ // request the contents if they are not in the cache.
+ try {
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ dartCopy.setState(DartEntry.SCAN_ERRORS, CacheState.IN_PROCESS);
+ TimestampedData<String> contentData;
+ if (identical(contentState, CacheState.VALID)) {
+ contentData = new TimestampedData<String>(dartCopy.modificationTime, dartCopy.getValue(SourceEntry.CONTENT));
+ dartCopy.setState(SourceEntry.CONTENT, CacheState.FLUSHED);
+ } else {
+ contentData = getContents(source);
+ }
+ _cache.put(source, dartCopy);
+ return new AnalysisContextImpl_TaskData(new ScanDartTask(this, source, contentData), false, null);
+ } on JavaException catch (exception) {
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ dartCopy.recordScanError();
+ dartCopy.exception = new AnalysisException.con3(exception);
+ _cache.put(source, dartCopy);
+ }
+ }
CacheState parseErrorsState = dartEntry.getState(DartEntry.PARSE_ERRORS);
if (identical(parseErrorsState, CacheState.INVALID) || (isPriority && identical(parseErrorsState, CacheState.FLUSHED))) {
DartEntryImpl dartCopy = dartEntry.writableCopy;
dartCopy.setState(DartEntry.PARSE_ERRORS, CacheState.IN_PROCESS);
_cache.put(source, dartCopy);
- return new ParseDartTask(this, source);
+ return new AnalysisContextImpl_TaskData(new ParseDartTask(this, source), false, null);
}
if (isPriority && parseErrorsState != CacheState.ERROR) {
CompilationUnit parseUnit = dartEntry.anyParsedCompilationUnit;
@@ -5060,7 +5495,7 @@
DartEntryImpl dartCopy = dartEntry.writableCopy;
dartCopy.setState(DartEntry.PARSED_UNIT, CacheState.IN_PROCESS);
_cache.put(source, dartCopy);
- return new ParseDartTask(this, source);
+ return new AnalysisContextImpl_TaskData(new ParseDartTask(this, source), false, null);
}
}
CacheState exportState = dartEntry.getState(DartEntry.EXPORTED_LIBRARIES);
@@ -5068,7 +5503,7 @@
DartEntryImpl dartCopy = dartEntry.writableCopy;
dartCopy.setState(DartEntry.EXPORTED_LIBRARIES, CacheState.IN_PROCESS);
_cache.put(source, dartCopy);
- return new ResolveDartDependenciesTask(this, source);
+ return new AnalysisContextImpl_TaskData(new ResolveDartDependenciesTask(this, source), false, null);
}
List<Source> librariesContaining = dartEntry.getValue(DartEntry.CONTAINING_LIBRARIES);
for (Source librarySource in librariesContaining) {
@@ -5079,7 +5514,7 @@
DartEntryImpl libraryCopy = libraryEntry.writableCopy;
libraryCopy.setState(DartEntry.ELEMENT, CacheState.IN_PROCESS);
_cache.put(librarySource, libraryCopy);
- return new ResolveDartLibraryTask(this, source, librarySource);
+ return new AnalysisContextImpl_TaskData(new ResolveDartLibraryTask(this, source, librarySource), false, null);
}
CacheState resolvedUnitState = dartEntry.getState2(DartEntry.RESOLVED_UNIT, librarySource);
if (identical(resolvedUnitState, CacheState.INVALID) || (isPriority && identical(resolvedUnitState, CacheState.FLUSHED))) {
@@ -5094,27 +5529,29 @@
dartCopy.setState2(DartEntry.RESOLVED_UNIT, librarySource, CacheState.IN_PROCESS);
_cache.put(source, dartCopy);
//return new ResolveDartUnitTask(this, source, libraryElement);
- return new ResolveDartLibraryTask(this, source, librarySource);
+ return new AnalysisContextImpl_TaskData(new ResolveDartLibraryTask(this, source, librarySource), false, null);
}
- CacheState verificationErrorsState = dartEntry.getState2(DartEntry.VERIFICATION_ERRORS, librarySource);
- if (identical(verificationErrorsState, CacheState.INVALID) || (isPriority && identical(verificationErrorsState, CacheState.FLUSHED))) {
- LibraryElement libraryElement = libraryEntry.getValue(DartEntry.ELEMENT);
- if (libraryElement != null) {
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- dartCopy.setState2(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.IN_PROCESS);
- _cache.put(source, dartCopy);
- return new GenerateDartErrorsTask(this, source, libraryElement);
- }
- }
- if (hintsEnabled) {
- CacheState hintsState = dartEntry.getState2(DartEntry.HINTS, librarySource);
- if (identical(hintsState, CacheState.INVALID) || (isPriority && identical(hintsState, CacheState.FLUSHED))) {
+ if (sdkErrorsEnabled || !source.isInSystemLibrary) {
+ CacheState verificationErrorsState = dartEntry.getState2(DartEntry.VERIFICATION_ERRORS, librarySource);
+ if (identical(verificationErrorsState, CacheState.INVALID) || (isPriority && identical(verificationErrorsState, CacheState.FLUSHED))) {
LibraryElement libraryElement = libraryEntry.getValue(DartEntry.ELEMENT);
if (libraryElement != null) {
DartEntryImpl dartCopy = dartEntry.writableCopy;
- dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.IN_PROCESS);
+ dartCopy.setState2(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.IN_PROCESS);
_cache.put(source, dartCopy);
- return new GenerateDartHintsTask(this, libraryElement);
+ return new AnalysisContextImpl_TaskData(new GenerateDartErrorsTask(this, source, libraryElement), false, null);
+ }
+ }
+ if (hintsEnabled) {
+ CacheState hintsState = dartEntry.getState2(DartEntry.HINTS, librarySource);
+ if (identical(hintsState, CacheState.INVALID) || (isPriority && identical(hintsState, CacheState.FLUSHED))) {
+ LibraryElement libraryElement = libraryEntry.getValue(DartEntry.ELEMENT);
+ if (libraryElement != null) {
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.IN_PROCESS);
+ _cache.put(source, dartCopy);
+ return new AnalysisContextImpl_TaskData(new GenerateDartHintsTask(this, libraryElement), false, null);
+ }
}
}
}
@@ -5124,18 +5561,46 @@
HtmlEntry htmlEntry = sourceEntry;
CacheState parseErrorsState = htmlEntry.getState(HtmlEntry.PARSE_ERRORS);
if (identical(parseErrorsState, CacheState.INVALID) || (isPriority && identical(parseErrorsState, CacheState.FLUSHED))) {
- HtmlEntryImpl dartCopy = htmlEntry.writableCopy;
- dartCopy.setState(HtmlEntry.PARSE_ERRORS, CacheState.IN_PROCESS);
- _cache.put(source, dartCopy);
- return new ParseHtmlTask(this, source);
+ try {
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ htmlCopy.setState(HtmlEntry.PARSE_ERRORS, CacheState.IN_PROCESS);
+ TimestampedData<String> contentData;
+ if (identical(contentState, CacheState.VALID)) {
+ contentData = new TimestampedData<String>(htmlCopy.modificationTime, htmlCopy.getValue(SourceEntry.CONTENT));
+ htmlCopy.setState(SourceEntry.CONTENT, CacheState.FLUSHED);
+ } else {
+ contentData = getContents(source);
+ }
+ _cache.put(source, htmlCopy);
+ return new AnalysisContextImpl_TaskData(new ParseHtmlTask(this, source, contentData), false, null);
+ } on JavaException catch (exception) {
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ htmlCopy.recordParseError();
+ htmlCopy.exception = new AnalysisException.con3(exception);
+ _cache.put(source, htmlCopy);
+ }
}
if (isPriority && parseErrorsState != CacheState.ERROR) {
ht.HtmlUnit parsedUnit = htmlEntry.anyParsedUnit;
if (parsedUnit == null) {
- HtmlEntryImpl dartCopy = htmlEntry.writableCopy;
- dartCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.IN_PROCESS);
- _cache.put(source, dartCopy);
- return new ParseHtmlTask(this, source);
+ try {
+ HtmlEntryImpl dartCopy = htmlEntry.writableCopy;
+ dartCopy.setState(HtmlEntry.PARSE_ERRORS, CacheState.IN_PROCESS);
+ TimestampedData<String> contentData;
+ if (identical(contentState, CacheState.VALID)) {
+ contentData = new TimestampedData<String>(dartCopy.modificationTime, dartCopy.getValue(SourceEntry.CONTENT));
+ dartCopy.setState(SourceEntry.CONTENT, CacheState.FLUSHED);
+ } else {
+ contentData = getContents(source);
+ }
+ _cache.put(source, dartCopy);
+ return new AnalysisContextImpl_TaskData(new ParseHtmlTask(this, source, contentData), false, null);
+ } on JavaException catch (exception) {
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ htmlCopy.recordParseError();
+ htmlCopy.exception = new AnalysisException.con3(exception);
+ _cache.put(source, htmlCopy);
+ }
}
}
CacheState resolvedUnitState = htmlEntry.getState(HtmlEntry.RESOLVED_UNIT);
@@ -5143,35 +5608,46 @@
HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
htmlCopy.setState(HtmlEntry.RESOLVED_UNIT, CacheState.IN_PROCESS);
_cache.put(source, htmlCopy);
- return new ResolveHtmlTask(this, source);
+ return new AnalysisContextImpl_TaskData(new ResolveHtmlTask(this, source), false, null);
}
+ // Angular support
if (_options.analyzeAngular) {
+ // try to resolve as an Angular entry point
+ CacheState angularEntryState = htmlEntry.getState(HtmlEntry.ANGULAR_ENTRY);
+ if (identical(angularEntryState, CacheState.INVALID)) {
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ htmlCopy.setState(HtmlEntry.ANGULAR_ENTRY, CacheState.IN_PROCESS);
+ _cache.put(source, htmlCopy);
+ return new AnalysisContextImpl_TaskData(new ResolveAngularEntryHtmlTask(this, source), false, null);
+ }
+ // try to resolve as an Angular application part
CacheState angularErrorsState = htmlEntry.getState(HtmlEntry.ANGULAR_ERRORS);
if (identical(angularErrorsState, CacheState.INVALID)) {
- AngularApplicationInfo entryInfo = htmlEntry.getValue(HtmlEntry.ANGULAR_ENTRY);
- if (entryInfo != null) {
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.IN_PROCESS);
- _cache.put(source, htmlCopy);
- return new ResolveAngularEntryHtmlTask(this, source, entryInfo);
- }
- AngularApplicationInfo applicationInfo = htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION);
- if (applicationInfo != null) {
- AngularComponentElement component = htmlEntry.getValue(HtmlEntry.ANGULAR_COMPONENT);
- if (component != null) {
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.IN_PROCESS);
- _cache.put(source, htmlCopy);
- return new ResolveAngularComponentTemplateTask(this, source, component, applicationInfo);
- }
- }
+ AngularApplication application = htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION);
+ // try to resolve as an Angular template
+ AngularComponentElement component = htmlEntry.getValue(HtmlEntry.ANGULAR_COMPONENT);
HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- htmlCopy.setValue(HtmlEntry.ANGULAR_ERRORS, AnalysisError.NO_ERRORS);
+ htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.IN_PROCESS);
_cache.put(source, htmlCopy);
+ return new AnalysisContextImpl_TaskData(new ResolveAngularComponentTemplateTask(this, source, component, application), false, null);
}
}
}
- return null;
+ return new AnalysisContextImpl_TaskData(null, false, null);
+ }
+
+ AnalysisContextImpl_TaskData getNextNondependentAnalysisTask(Source source, bool isPriority, bool hintsEnabled, bool sdkErrorsEnabled) {
+ AnalysisContextImpl_TaskData taskData = getNextAnalysisTaskForSource(source, _cache.get(source), isPriority, hintsEnabled, sdkErrorsEnabled);
+ if (taskData.task != null || taskData.isBlocked) {
+ return taskData;
+ }
+ while (taskData.dependentSource != null) {
+ taskData = getNextAnalysisTaskForSource(source, _cache.get(source), isPriority, hintsEnabled, sdkErrorsEnabled);
+ if (taskData.task != null || taskData.isBlocked) {
+ return taskData;
+ }
+ }
+ return new AnalysisContextImpl_TaskData(null, false, null);
}
/**
@@ -5197,16 +5673,14 @@
* @return the source cache entry associated with the given source
*/
DartEntry getReadableDartEntry(Source source) {
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry == null) {
- sourceEntry = createSourceEntry(source);
- }
- if (sourceEntry is DartEntry) {
- return sourceEntry as DartEntry;
- }
- return null;
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ sourceEntry = createSourceEntry(source);
}
+ if (sourceEntry is DartEntry) {
+ return sourceEntry as DartEntry;
+ }
+ return null;
}
/**
@@ -5217,16 +5691,14 @@
* @return the source cache entry associated with the given source
*/
HtmlEntry getReadableHtmlEntry(Source source) {
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry == null) {
- sourceEntry = createSourceEntry(source);
- }
- if (sourceEntry is HtmlEntry) {
- return sourceEntry as HtmlEntry;
- }
- return null;
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ sourceEntry = createSourceEntry(source);
}
+ if (sourceEntry is HtmlEntry) {
+ return sourceEntry as HtmlEntry;
+ }
+ return null;
}
/**
@@ -5237,13 +5709,11 @@
* @return the source cache entry associated with the given source
*/
SourceEntry getReadableSourceEntry(Source source) {
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry == null) {
- sourceEntry = createSourceEntry(source);
- }
- return sourceEntry;
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ sourceEntry = createSourceEntry(source);
}
+ return sourceEntry;
}
/**
@@ -5254,11 +5724,9 @@
*/
List<Source> getSources(SourceKind kind) {
List<Source> sources = new List<Source>();
- {
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- if (identical(entry.getValue().kind, kind)) {
- sources.add(entry.getKey());
- }
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ if (identical(entry.getValue().kind, kind)) {
+ sources.add(entry.getKey());
}
}
return new List.from(sources);
@@ -5282,6 +5750,11 @@
void getSourcesNeedingProcessing2(Source source, SourceEntry sourceEntry, bool isPriority, bool hintsEnabled, Set<Source> sources) {
if (sourceEntry is DartEntry) {
DartEntry dartEntry = sourceEntry;
+ CacheState scanErrorsState = dartEntry.getState(DartEntry.SCAN_ERRORS);
+ if (identical(scanErrorsState, CacheState.INVALID) || (isPriority && identical(scanErrorsState, CacheState.FLUSHED))) {
+ sources.add(source);
+ return;
+ }
CacheState parseErrorsState = dartEntry.getState(DartEntry.PARSE_ERRORS);
if (identical(parseErrorsState, CacheState.INVALID) || (isPriority && identical(parseErrorsState, CacheState.FLUSHED))) {
sources.add(source);
@@ -5342,15 +5815,16 @@
sources.add(source);
return;
}
+ // Angular
if (_options.analyzeAngular) {
CacheState angularErrorsState = htmlEntry.getState(HtmlEntry.ANGULAR_ERRORS);
if (identical(angularErrorsState, CacheState.INVALID)) {
- AngularApplicationInfo entryInfo = htmlEntry.getValue(HtmlEntry.ANGULAR_ENTRY);
+ AngularApplication entryInfo = htmlEntry.getValue(HtmlEntry.ANGULAR_ENTRY);
if (entryInfo != null) {
sources.add(source);
return;
}
- AngularApplicationInfo applicationInfo = htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION);
+ AngularApplication applicationInfo = htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION);
if (applicationInfo != null) {
AngularComponentElement component = htmlEntry.getValue(HtmlEntry.ANGULAR_COMPONENT);
if (component != null) {
@@ -5388,6 +5862,55 @@
}
/**
+ * In response to a change to Angular entry point [HtmlElement], invalidate any results that
+ * depend on it.
+ *
+ * <b>Note:</b> This method must only be invoked while we are synchronized on [cacheLock].
+ *
+ * <b>Note:</b> Any cache entries that were accessed before this method was invoked must be
+ * re-accessed after this method returns.
+ *
+ * @param entryCopy the [HtmlEntryImpl] of the (maybe) Angular entry point being invalidated
+ */
+ void invalidateAngularResolution(HtmlEntryImpl entryCopy) {
+ AngularApplication application = entryCopy.getValue(HtmlEntry.ANGULAR_ENTRY);
+ if (application == null) {
+ return;
+ }
+ _angularApplications.remove(application);
+ // invalidate Entry
+ entryCopy.setState(HtmlEntry.ANGULAR_ENTRY, CacheState.INVALID);
+ // reset HTML sources
+ List<AngularElement> oldAngularElements = application.elements;
+ for (AngularElement angularElement in oldAngularElements) {
+ if (angularElement is AngularHasTemplateElement) {
+ AngularHasTemplateElement hasTemplate = angularElement;
+ Source templateSource = hasTemplate.templateSource;
+ if (templateSource != null) {
+ HtmlEntry htmlEntry = getReadableHtmlEntry(templateSource);
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ htmlCopy.setValue(HtmlEntry.ANGULAR_APPLICATION, null);
+ htmlCopy.setValue(HtmlEntry.ANGULAR_COMPONENT, null);
+ htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
+ _cache.put(templateSource, htmlCopy);
+ _workManager.add(templateSource, SourcePriority.HTML);
+ }
+ }
+ }
+ // reset Dart sources
+ List<Source> oldElementSources = application.elementSources;
+ for (Source elementSource in oldElementSources) {
+ DartEntry dartEntry = getReadableDartEntry(elementSource);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ dartCopy.setValue(DartEntry.ANGULAR_ERRORS, AnalysisError.NO_ERRORS);
+ _cache.put(elementSource, dartCopy);
+ // notify about (disappeared) Angular errors
+ ChangeNoticeImpl notice = getNotice(elementSource);
+ notice.setErrors(dartCopy.allErrors, dartEntry.getValue(SourceEntry.LINE_INFO));
+ }
+ }
+
+ /**
* In response to a change to at least one of the compilation units in the given library,
* invalidate any results that are dependent on the result of resolving that library.
*
@@ -5431,6 +5954,18 @@
}
}
}
+ // invalidate Angular applications
+ List<AngularApplication> angularApplicationsCopy = [];
+ for (AngularApplication application in angularApplicationsCopy) {
+ if (application.dependsOn(librarySource)) {
+ Source entryPointSource = application.entryPoint;
+ HtmlEntry entry = getReadableHtmlEntry(entryPointSource);
+ HtmlEntryImpl entryCopy = entry.writableCopy;
+ invalidateAngularResolution(entryCopy);
+ _cache.put(entryPointSource, entryCopy);
+ _workManager.add(entryPointSource, SourcePriority.HTML);
+ }
+ }
}
/**
@@ -5486,59 +6021,49 @@
}
/**
- * Updates [HtmlEntry]s that correspond to the previously known and new Angular components.
- *
- * @param library the [Library] that was resolved
- * @param dartCopy the [DartEntryImpl] to record new Angular components
+ * Updates [HtmlEntry]s that correspond to the previously known and new Angular application
+ * information.
*/
- void recordAngularComponents(HtmlEntryImpl entry, AngularApplicationInfo app) {
- if (!_options.analyzeAngular) {
- return;
- }
- // reset old Angular errors
- AngularApplicationInfo oldApp = entry.getValue(HtmlEntry.ANGULAR_ENTRY);
- if (oldApp != null) {
- List<AngularElement> oldAngularElements = oldApp.elements;
- for (AngularElement angularElement in oldAngularElements) {
- if (angularElement is AngularComponentElement) {
- AngularComponentElement component = angularElement;
- Source templateSource = component.templateSource;
- if (templateSource != null) {
- HtmlEntry htmlEntry = getReadableHtmlEntry(templateSource);
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- htmlCopy.setValue(HtmlEntry.ANGULAR_APPLICATION, null);
- htmlCopy.setValue(HtmlEntry.ANGULAR_COMPONENT, null);
- htmlCopy.setValue(HtmlEntry.ANGULAR_ERRORS, AnalysisError.NO_ERRORS);
- _cache.put(templateSource, htmlCopy);
- // notify about (disappeared) HTML errors
- ChangeNoticeImpl notice = getNotice(templateSource);
- notice.setErrors(htmlCopy.allErrors, computeLineInfo(templateSource));
- }
- }
- }
- }
- // prepare for new Angular analysis
- if (app != null) {
- List<AngularElement> newAngularElements = app.elements;
+ void recordAngularEntryPoint(HtmlEntryImpl entry, ResolveAngularEntryHtmlTask task) {
+ AngularApplication application = task.application;
+ if (application != null) {
+ _angularApplications.add(application);
+ // if this is an entry point, then we already resolved it
+ entry.setValue(HtmlEntry.ANGULAR_ERRORS, task.entryErrors);
+ // schedule HTML templates analysis
+ List<AngularElement> newAngularElements = application.elements;
for (AngularElement angularElement in newAngularElements) {
- if (angularElement is AngularComponentElement) {
- AngularComponentElement component = angularElement;
- Source templateSource = component.templateSource;
+ if (angularElement is AngularHasTemplateElement) {
+ AngularHasTemplateElement hasTemplate = angularElement;
+ Source templateSource = hasTemplate.templateSource;
if (templateSource != null) {
HtmlEntry htmlEntry = getReadableHtmlEntry(templateSource);
HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- htmlCopy.setValue(HtmlEntry.ANGULAR_APPLICATION, app);
- htmlCopy.setValue(HtmlEntry.ANGULAR_COMPONENT, component);
+ htmlCopy.setValue(HtmlEntry.ANGULAR_APPLICATION, application);
+ if (hasTemplate is AngularComponentElement) {
+ AngularComponentElement component = hasTemplate;
+ htmlCopy.setValue(HtmlEntry.ANGULAR_COMPONENT, component);
+ }
htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
_cache.put(templateSource, htmlCopy);
_workManager.add(templateSource, SourcePriority.HTML);
}
}
}
+ // update Dart sources errors
+ List<Source> newElementSources = application.elementSources;
+ for (Source elementSource in newElementSources) {
+ DartEntry dartEntry = getReadableDartEntry(elementSource);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ dartCopy.setValue(DartEntry.ANGULAR_ERRORS, task.getErrors(elementSource));
+ _cache.put(elementSource, dartCopy);
+ // notify about Dart errors
+ ChangeNoticeImpl notice = getNotice(elementSource);
+ notice.setErrors(dartCopy.allErrors, computeLineInfo(elementSource));
+ }
}
- // remember Angular application
- entry.setValue(HtmlEntry.ANGULAR_ENTRY, app);
- entry.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
+ // remember Angular entry point
+ entry.setValue(HtmlEntry.ANGULAR_ENTRY, application);
}
/**
@@ -5589,62 +6114,62 @@
Source librarySource = task.libraryElement.source;
AnalysisException thrownException = task.exception;
DartEntry dartEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is! DartEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent a Dart file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to verify non-Dart file as a Dart file: ${source.fullName}");
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! DartEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent a Dart file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to verify non-Dart file as a Dart file: ${source.fullName}");
+ }
+ dartEntry = sourceEntry as DartEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (dartEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
+ }
}
- dartEntry = sourceEntry as DartEntry;
- int sourceTime = source.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (dartEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- dartEntry = getReadableDartEntry(source);
- if (dartEntry == null) {
- throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
- }
- }
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null) {
- dartCopy.setValue2(DartEntry.VERIFICATION_ERRORS, librarySource, task.errors);
- ChangeNoticeImpl notice = getNotice(source);
- notice.setErrors(dartCopy.allErrors, dartCopy.getValue(SourceEntry.LINE_INFO));
- } else {
- dartCopy.setState2(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.ERROR);
- }
- dartCopy.exception = thrownException;
- _cache.put(source, dartCopy);
- dartEntry = dartCopy;
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null) {
+ dartCopy.setValue2(DartEntry.VERIFICATION_ERRORS, librarySource, task.errors);
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.setErrors(dartCopy.allErrors, dartCopy.getValue(SourceEntry.LINE_INFO));
} else {
- logInformation2("Generated errors discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the source
- // will be re-verified using the up-to-date sources.
- //
- // dartCopy.setState(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.INVALID);
- removeFromParts(source, dartEntry);
- dartCopy.invalidateAllInformation();
- dartCopy.modificationTime = sourceTime;
- _cache.removedAst(source);
- _workManager.add(source, SourcePriority.UNKNOWN);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-verify the source until there's a good chance
- // that we'll be able to do so without error.
- //
- dartCopy.setState2(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.ERROR);
- }
- dartCopy.exception = thrownException;
- _cache.put(source, dartCopy);
- dartEntry = dartCopy;
+ dartCopy.setState2(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.ERROR);
}
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
+ } else {
+ logInformation2("Generated errors discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the source
+ // will be re-verified using the up-to-date sources.
+ //
+ // dartCopy.setState(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.INVALID);
+ removeFromParts(source, dartEntry);
+ dartCopy.invalidateAllInformation();
+ dartCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ _workManager.add(source, SourcePriority.UNKNOWN);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-verify the source until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ dartCopy.setState2(DartEntry.VERIFICATION_ERRORS, librarySource, CacheState.ERROR);
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -5666,88 +6191,86 @@
DartEntry libraryEntry = null;
Map<Source, TimestampedData<List<AnalysisError>>> hintMap = task.hintMap;
if (hintMap == null) {
- {
- // We don't have any information about which sources to mark as invalid other than the library
- // source.
- SourceEntry sourceEntry = _cache.get(librarySource);
- if (sourceEntry is! DartEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent a Dart file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to generate hints for non-Dart file as a Dart file: ${librarySource.fullName}");
- }
- if (thrownException == null) {
- thrownException = new AnalysisException.con1("GenerateDartHintsTask returned a null hint map without throwing an exception: ${librarySource.fullName}");
- }
- DartEntryImpl dartCopy = (sourceEntry as DartEntry).writableCopy;
- dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.ERROR);
- dartCopy.exception = thrownException;
- _cache.put(librarySource, dartCopy);
+ // We don't have any information about which sources to mark as invalid other than the library
+ // source.
+ SourceEntry sourceEntry = _cache.get(librarySource);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(librarySource);
+ } else if (sourceEntry is! DartEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent a Dart file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to generate hints for non-Dart file as a Dart file: ${librarySource.fullName}");
}
+ if (thrownException == null) {
+ thrownException = new AnalysisException.con1("GenerateDartHintsTask returned a null hint map without throwing an exception: ${librarySource.fullName}");
+ }
+ DartEntryImpl dartCopy = (sourceEntry as DartEntry).writableCopy;
+ dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.ERROR);
+ dartCopy.exception = thrownException;
+ _cache.put(librarySource, dartCopy);
throw thrownException;
}
for (MapEntry<Source, TimestampedData<List<AnalysisError>>> entry in getMapEntrySet(hintMap)) {
Source unitSource = entry.getKey();
TimestampedData<List<AnalysisError>> results = entry.getValue();
- {
- SourceEntry sourceEntry = _cache.get(unitSource);
- if (sourceEntry is! DartEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent a Dart file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to parse non-Dart file as a Dart file: ${unitSource.fullName}");
- }
- DartEntry dartEntry = sourceEntry as DartEntry;
- if (unitSource == librarySource) {
- libraryEntry = dartEntry;
- }
- int sourceTime = unitSource.modificationStamp;
- int resultTime = results.modificationTime;
- if (sourceTime == resultTime) {
- if (dartEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(unitSource);
- dartEntry = getReadableDartEntry(unitSource);
- if (dartEntry == null) {
- throw new AnalysisException.con1("A Dart file became a non-Dart file: ${unitSource.fullName}");
- }
+ SourceEntry sourceEntry = _cache.get(unitSource);
+ if (sourceEntry is! DartEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent a Dart file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to parse non-Dart file as a Dart file: ${unitSource.fullName}");
+ }
+ DartEntry dartEntry = sourceEntry as DartEntry;
+ if (unitSource == librarySource) {
+ libraryEntry = dartEntry;
+ }
+ int sourceTime = getModificationStamp(unitSource);
+ int resultTime = results.modificationTime;
+ if (sourceTime == resultTime) {
+ if (dartEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(unitSource);
+ dartEntry = getReadableDartEntry(unitSource);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${unitSource.fullName}");
}
+ }
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null) {
+ dartCopy.setValue2(DartEntry.HINTS, librarySource, results.data);
+ ChangeNoticeImpl notice = getNotice(unitSource);
+ notice.setErrors(dartCopy.allErrors, dartCopy.getValue(SourceEntry.LINE_INFO));
+ } else {
+ dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.ERROR);
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(unitSource, dartCopy);
+ dartEntry = dartCopy;
+ } else {
+ logInformation2("Generated hints discarded for ${debuggingString(unitSource)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
+ if (identical(dartEntry.getState2(DartEntry.HINTS, librarySource), CacheState.IN_PROCESS)) {
DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null) {
- dartCopy.setValue2(DartEntry.HINTS, librarySource, results.data);
- ChangeNoticeImpl notice = getNotice(unitSource);
- notice.setErrors(dartCopy.allErrors, dartCopy.getValue(SourceEntry.LINE_INFO));
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // dartCopy.setState(DartEntry.HINTS, librarySource, CacheState.INVALID);
+ removeFromParts(unitSource, dartEntry);
+ dartCopy.invalidateAllInformation();
+ dartCopy.modificationTime = sourceTime;
+ _cache.removedAst(unitSource);
+ _workManager.add(unitSource, SourcePriority.UNKNOWN);
} else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.ERROR);
}
dartCopy.exception = thrownException;
_cache.put(unitSource, dartCopy);
dartEntry = dartCopy;
- } else {
- logInformation2("Generated hints discarded for ${debuggingString(unitSource)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
- if (identical(dartEntry.getState2(DartEntry.HINTS, librarySource), CacheState.IN_PROCESS)) {
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // dartCopy.setState(DartEntry.HINTS, librarySource, CacheState.INVALID);
- removeFromParts(unitSource, dartEntry);
- dartCopy.invalidateAllInformation();
- dartCopy.modificationTime = sourceTime;
- _cache.removedAst(unitSource);
- _workManager.add(unitSource, SourcePriority.UNKNOWN);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- dartCopy.setState2(DartEntry.HINTS, librarySource, CacheState.ERROR);
- }
- dartCopy.exception = thrownException;
- _cache.put(unitSource, dartCopy);
- dartEntry = dartCopy;
- }
}
}
}
@@ -5758,6 +6281,41 @@
}
/**
+ * Record the results produced by performing a [GetContentTask].
+ *
+ * @param task the task that was performed
+ * @return an entry containing the computed results
+ * @throws AnalysisException if the results could not be recorded
+ */
+ SourceEntry recordGetContentsTask(GetContentTask task) {
+ if (!task.isComplete) {
+ return null;
+ }
+ Source source = task.source;
+ AnalysisException thrownException = task.exception;
+ SourceEntry sourceEntry = null;
+ sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ }
+ SourceEntryImpl sourceCopy = sourceEntry.writableCopy;
+ if (thrownException == null) {
+ sourceCopy.modificationTime = task.modificationTime;
+ sourceCopy.setValue(SourceEntry.CONTENT, task.content);
+ } else {
+ sourceCopy.exception = thrownException;
+ sourceCopy.recordContentError();
+ _workManager.remove(source);
+ }
+ _cache.put(source, sourceCopy);
+ sourceEntry = sourceCopy;
+ if (thrownException != null) {
+ throw thrownException;
+ }
+ return sourceEntry;
+ }
+
+ /**
* Record the results produced by performing a [IncrementalAnalysisTask].
*
* @param task the task that was performed
@@ -5765,13 +6323,11 @@
* @throws AnalysisException if the results could not be recorded
*/
DartEntry recordIncrementalAnalysisTaskResults(IncrementalAnalysisTask task) {
- {
- CompilationUnit unit = task.compilationUnit;
- if (unit != null) {
- ChangeNoticeImpl notice = getNotice(task.source);
- notice.compilationUnit = unit;
- _incrementalAnalysisCache = IncrementalAnalysisCache.cacheResult(task.cache, unit);
- }
+ CompilationUnit unit = task.compilationUnit;
+ if (unit != null) {
+ ChangeNoticeImpl notice = getNotice(task.source);
+ notice.compilationUnit = unit;
+ _incrementalAnalysisCache = IncrementalAnalysisCache.cacheResult(task.cache, unit);
}
return null;
}
@@ -5788,79 +6344,78 @@
Source source = task.source;
AnalysisException thrownException = task.exception;
DartEntry dartEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is! DartEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent a Dart file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to parse non-Dart file as a Dart file: ${source.fullName}");
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! DartEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent a Dart file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to parse non-Dart file as a Dart file: ${source.fullName}");
+ }
+ dartEntry = sourceEntry as DartEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (dartEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
+ }
}
- dartEntry = sourceEntry as DartEntry;
- int sourceTime = source.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (dartEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- dartEntry = getReadableDartEntry(source);
- if (dartEntry == null) {
- throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
- }
- }
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null) {
- LineInfo lineInfo = task.lineInfo;
- dartCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
- if (task.hasPartOfDirective() && !task.hasLibraryDirective()) {
- dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.PART);
- _workManager.add(source, SourcePriority.NORMAL_PART);
- } else {
- dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.LIBRARY);
- dartCopy.containingLibrary = source;
- _workManager.add(source, SourcePriority.LIBRARY);
- }
- dartCopy.setValue(DartEntry.PARSED_UNIT, task.compilationUnit);
- dartCopy.setValue(DartEntry.PARSE_ERRORS, task.errors);
- _cache.storedAst(source);
- ChangeNoticeImpl notice = getNotice(source);
- notice.setErrors(dartEntry.allErrors, lineInfo);
- // Verify that the incrementally parsed and resolved unit in the incremental cache
- // is structurally equivalent to the fully parsed unit
- _incrementalAnalysisCache = IncrementalAnalysisCache.verifyStructure(_incrementalAnalysisCache, source, task.compilationUnit);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null) {
+ if (task.hasPartOfDirective() && !task.hasLibraryDirective()) {
+ dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.PART);
+ dartCopy.removeContainingLibrary(source);
+ _workManager.add(source, SourcePriority.NORMAL_PART);
} else {
- removeFromParts(source, dartEntry);
- dartCopy.recordParseError();
- _cache.removedAst(source);
+ dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.LIBRARY);
+ dartCopy.containingLibrary = source;
+ _workManager.add(source, SourcePriority.LIBRARY);
}
- dartCopy.exception = thrownException;
- _cache.put(source, dartCopy);
- dartEntry = dartCopy;
+ dartCopy.setValue(DartEntry.PARSED_UNIT, task.compilationUnit);
+ dartCopy.setValue(DartEntry.PARSE_ERRORS, task.errors);
+ _cache.storedAst(source);
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.setErrors(dartCopy.allErrors, dartCopy.getValue(SourceEntry.LINE_INFO));
+ // Verify that the incrementally parsed and resolved unit in the incremental cache
+ // is structurally equivalent to the fully parsed unit
+ _incrementalAnalysisCache = IncrementalAnalysisCache.verifyStructure(_incrementalAnalysisCache, source, task.compilationUnit);
} else {
- logInformation2("Parse results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // dartCopy.recordParseNotInProcess();
- removeFromParts(source, dartEntry);
- dartCopy.invalidateAllInformation();
- dartCopy.modificationTime = sourceTime;
- _cache.removedAst(source);
- _workManager.add(source, SourcePriority.UNKNOWN);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- dartCopy.recordParseError();
- }
- dartCopy.exception = thrownException;
- _cache.put(source, dartCopy);
- dartEntry = dartCopy;
+ removeFromParts(source, dartEntry);
+ dartCopy.recordParseError();
+ _cache.removedAst(source);
}
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
+ } else {
+ logInformation2("Parse results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // dartCopy.recordParseNotInProcess();
+ removeFromParts(source, dartEntry);
+ dartCopy.invalidateAllInformation();
+ dartCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ _workManager.add(source, SourcePriority.UNKNOWN);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ dartCopy.recordParseError();
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -5880,78 +6435,78 @@
Source source = task.source;
AnalysisException thrownException = task.exception;
HtmlEntry htmlEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is! HtmlEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent an HTML file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to parse non-HTML file as a HTML file: ${source.fullName}");
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! HtmlEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent an HTML file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to parse non-HTML file as a HTML file: ${source.fullName}");
+ }
+ htmlEntry = sourceEntry as HtmlEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (htmlEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ htmlEntry = getReadableHtmlEntry(source);
+ if (htmlEntry == null) {
+ throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
+ }
}
- htmlEntry = sourceEntry as HtmlEntry;
- int sourceTime = source.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (htmlEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- htmlEntry = getReadableHtmlEntry(source);
- if (htmlEntry == null) {
- throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
- }
- }
- HtmlEntryImpl htmlCopy = (sourceEntry as HtmlEntry).writableCopy;
- if (thrownException == null) {
- LineInfo lineInfo = task.lineInfo;
- ht.HtmlUnit unit = task.htmlUnit;
- htmlCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
- htmlCopy.setValue(HtmlEntry.PARSED_UNIT, unit);
- htmlCopy.setValue(HtmlEntry.PARSE_ERRORS, task.errors);
- htmlCopy.setValue(HtmlEntry.REFERENCED_LIBRARIES, task.referencedLibraries);
- _cache.storedAst(source);
- ChangeNoticeImpl notice = getNotice(source);
- notice.setErrors(htmlEntry.allErrors, lineInfo);
- } else {
- htmlCopy.recordParseError();
- _cache.removedAst(source);
- }
- htmlCopy.exception = thrownException;
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ HtmlEntryImpl htmlCopy = (sourceEntry as HtmlEntry).writableCopy;
+ if (thrownException == null) {
+ LineInfo lineInfo = task.lineInfo;
+ ht.HtmlUnit unit = task.htmlUnit;
+ htmlCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
+ htmlCopy.setValue(HtmlEntry.PARSED_UNIT, unit);
+ htmlCopy.setValue(HtmlEntry.PARSE_ERRORS, task.errors);
+ htmlCopy.setValue(HtmlEntry.REFERENCED_LIBRARIES, task.referencedLibraries);
+ _cache.storedAst(source);
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.setErrors(htmlCopy.allErrors, lineInfo);
} else {
- logInformation2("Parse results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${htmlEntry.modificationTime}", thrownException);
- HtmlEntryImpl htmlCopy = (sourceEntry as HtmlEntry).writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // if (htmlCopy.getState(SourceEntry.LINE_INFO) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.INVALID);
- // }
- // if (htmlCopy.getState(HtmlEntry.PARSED_UNIT) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.INVALID);
- // }
- // if (htmlCopy.getState(HtmlEntry.REFERENCED_LIBRARIES) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.INVALID);
- // }
- htmlCopy.invalidateAllInformation();
- htmlCopy.modificationTime = sourceTime;
- _cache.removedAst(source);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.ERROR);
- htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.ERROR);
- htmlCopy.setState(HtmlEntry.RESOLVED_UNIT, CacheState.ERROR);
- htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.ERROR);
- }
- htmlCopy.exception = thrownException;
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ htmlCopy.recordParseError();
+ _cache.removedAst(source);
}
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
+ } else {
+ logInformation2("Parse results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${htmlEntry.modificationTime}", thrownException);
+ HtmlEntryImpl htmlCopy = (sourceEntry as HtmlEntry).writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // if (htmlCopy.getState(SourceEntry.LINE_INFO) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.INVALID);
+ // }
+ // if (htmlCopy.getState(HtmlEntry.PARSED_UNIT) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.INVALID);
+ // }
+ // if (htmlCopy.getState(HtmlEntry.REFERENCED_LIBRARIES) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.INVALID);
+ // }
+ htmlCopy.invalidateAllInformation();
+ htmlCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.ERROR);
+ htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.ERROR);
+ htmlCopy.setState(HtmlEntry.RESOLVED_UNIT, CacheState.ERROR);
+ htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.ERROR);
+ }
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -5970,68 +6525,69 @@
Source source = task.source;
AnalysisException thrownException = task.exception;
HtmlEntry htmlEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is! HtmlEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent an HTML file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to resolve non-HTML file as an HTML file: ${source.fullName}");
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! HtmlEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent an HTML file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to resolve non-HTML file as an HTML file: ${source.fullName}");
+ }
+ htmlEntry = sourceEntry as HtmlEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (htmlEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ htmlEntry = getReadableHtmlEntry(source);
+ if (htmlEntry == null) {
+ throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
+ }
}
- htmlEntry = sourceEntry as HtmlEntry;
- int sourceTime = source.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (htmlEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- htmlEntry = getReadableHtmlEntry(source);
- if (htmlEntry == null) {
- throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
- }
- }
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- if (thrownException == null) {
- htmlCopy.setValue(HtmlEntry.ANGULAR_ERRORS, task.resolutionErrors);
- ChangeNoticeImpl notice = getNotice(source);
- notice.htmlUnit = task.resolvedUnit;
- notice.setErrors(htmlCopy.allErrors, htmlCopy.getValue(SourceEntry.LINE_INFO));
- } else {
- htmlCopy.recordResolutionError();
- }
- htmlCopy.exception = thrownException;
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ if (thrownException == null) {
+ htmlCopy.setValue(HtmlEntry.ANGULAR_ERRORS, task.resolutionErrors);
+ // notify about errors
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.htmlUnit = task.resolvedUnit;
+ notice.setErrors(htmlCopy.allErrors, htmlCopy.getValue(SourceEntry.LINE_INFO));
} else {
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // if (htmlCopy.getState(HtmlEntry.ANGULAR_ERRORS) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
- // }
- // if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
- // }
- // if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
- // }
- htmlCopy.invalidateAllInformation();
- htmlCopy.modificationTime = sourceTime;
- _cache.removedAst(source);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- htmlCopy.recordResolutionError();
- }
- htmlCopy.exception = thrownException;
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ htmlCopy.recordResolutionError();
}
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
+ } else {
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // if (htmlCopy.getState(HtmlEntry.ANGULAR_ERRORS) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
+ // }
+ // if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
+ // }
+ // if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
+ // }
+ htmlCopy.invalidateAllInformation();
+ htmlCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ htmlCopy.recordResolutionError();
+ }
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -6050,68 +6606,70 @@
Source source = task.source;
AnalysisException thrownException = task.exception;
HtmlEntry htmlEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is! HtmlEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent an HTML file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to resolve non-HTML file as an HTML file: ${source.fullName}");
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! HtmlEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent an HTML file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to resolve non-HTML file as an HTML file: ${source.fullName}");
+ }
+ htmlEntry = sourceEntry as HtmlEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (htmlEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ htmlEntry = getReadableHtmlEntry(source);
+ if (htmlEntry == null) {
+ throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
+ }
}
- htmlEntry = sourceEntry as HtmlEntry;
- int sourceTime = source.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (htmlEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- htmlEntry = getReadableHtmlEntry(source);
- if (htmlEntry == null) {
- throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
- }
- }
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- if (thrownException == null) {
- htmlCopy.setValue(HtmlEntry.ANGULAR_ERRORS, task.resolutionErrors);
- ChangeNoticeImpl notice = getNotice(source);
- notice.htmlUnit = task.resolvedUnit;
- notice.setErrors(htmlCopy.allErrors, htmlCopy.getValue(SourceEntry.LINE_INFO));
- } else {
- htmlCopy.recordResolutionError();
- }
- htmlCopy.exception = thrownException;
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ if (thrownException == null) {
+ htmlCopy.setValue(HtmlEntry.RESOLVED_UNIT, task.resolvedUnit);
+ recordAngularEntryPoint(htmlCopy, task);
+ _cache.storedAst(source);
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.htmlUnit = task.resolvedUnit;
+ notice.setErrors(htmlCopy.allErrors, htmlCopy.getValue(SourceEntry.LINE_INFO));
} else {
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // if (htmlCopy.getState(HtmlEntry.ANGULAR_ERRORS) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
- // }
- // if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
- // }
- // if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
- // }
- htmlCopy.invalidateAllInformation();
- htmlCopy.modificationTime = sourceTime;
- _cache.removedAst(source);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- htmlCopy.recordResolutionError();
- }
- htmlCopy.exception = thrownException;
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ htmlCopy.recordResolutionError();
}
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
+ } else {
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // if (htmlCopy.getState(HtmlEntry.ANGULAR_ERRORS) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.ANGULAR_ERRORS, CacheState.INVALID);
+ // }
+ // if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
+ // }
+ // if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
+ // }
+ htmlCopy.invalidateAllInformation();
+ htmlCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ htmlCopy.recordResolutionError();
+ }
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -6131,75 +6689,75 @@
Source source = task.source;
AnalysisException thrownException = task.exception;
DartEntry dartEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is! DartEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent a Dart file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to resolve Dart dependencies in a non-Dart file: ${source.fullName}");
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! DartEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent a Dart file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to resolve Dart dependencies in a non-Dart file: ${source.fullName}");
+ }
+ dartEntry = sourceEntry as DartEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (dartEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
+ }
}
- dartEntry = sourceEntry as DartEntry;
- int sourceTime = source.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (dartEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- dartEntry = getReadableDartEntry(source);
- if (dartEntry == null) {
- throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
+ removeFromParts(source, dartEntry);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null) {
+ List<Source> newParts = task.includedSources;
+ for (int i = 0; i < newParts.length; i++) {
+ Source partSource = newParts[i];
+ DartEntry partEntry = getReadableDartEntry(partSource);
+ if (partEntry != null && partEntry != dartEntry) {
+ DartEntryImpl partCopy = partEntry.writableCopy;
+ partCopy.addContainingLibrary(source);
+ _cache.put(partSource, partCopy);
}
}
- removeFromParts(source, dartEntry);
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null) {
- List<Source> newParts = task.includedSources;
- for (int i = 0; i < newParts.length; i++) {
- Source partSource = newParts[i];
- DartEntry partEntry = getReadableDartEntry(partSource);
- if (partEntry != null && partEntry != dartEntry) {
- DartEntryImpl partCopy = partEntry.writableCopy;
- partCopy.addContainingLibrary(source);
- _cache.put(partSource, partCopy);
- }
- }
- dartCopy.setValue(DartEntry.EXPORTED_LIBRARIES, task.exportedSources);
- dartCopy.setValue(DartEntry.IMPORTED_LIBRARIES, task.importedSources);
- dartCopy.setValue(DartEntry.INCLUDED_PARTS, newParts);
- } else {
- dartCopy.recordDependencyError();
- }
- dartCopy.exception = thrownException;
- _cache.put(source, dartCopy);
- dartEntry = dartCopy;
+ dartCopy.setValue(DartEntry.EXPORTED_LIBRARIES, task.exportedSources);
+ dartCopy.setValue(DartEntry.IMPORTED_LIBRARIES, task.importedSources);
+ dartCopy.setValue(DartEntry.INCLUDED_PARTS, newParts);
} else {
- logInformation2("Dependency resolution results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // dartCopy.recordDependencyNotInProcess();
- removeFromParts(source, dartEntry);
- dartCopy.invalidateAllInformation();
- dartCopy.modificationTime = sourceTime;
- _cache.removedAst(source);
- _workManager.add(source, SourcePriority.UNKNOWN);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- dartCopy.setState(DartEntry.EXPORTED_LIBRARIES, CacheState.ERROR);
- dartCopy.setState(DartEntry.IMPORTED_LIBRARIES, CacheState.ERROR);
- dartCopy.setState(DartEntry.INCLUDED_PARTS, CacheState.ERROR);
- }
- dartCopy.exception = thrownException;
- _cache.put(source, dartCopy);
- dartEntry = dartCopy;
+ dartCopy.recordDependencyError();
}
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
+ } else {
+ logInformation2("Dependency resolution results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // dartCopy.recordDependencyNotInProcess();
+ removeFromParts(source, dartEntry);
+ dartCopy.invalidateAllInformation();
+ dartCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ _workManager.add(source, SourcePriority.UNKNOWN);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ dartCopy.setState(DartEntry.EXPORTED_LIBRARIES, CacheState.ERROR);
+ dartCopy.setState(DartEntry.IMPORTED_LIBRARIES, CacheState.ERROR);
+ dartCopy.setState(DartEntry.INCLUDED_PARTS, CacheState.ERROR);
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -6215,69 +6773,69 @@
* @return an entry containing the computed results
* @throws AnalysisException if the results could not be recorded
*/
- SourceEntry recordResolveDartUnitTaskResults(ResolveDartUnitTask task) {
+ DartEntry recordResolveDartUnitTaskResults(ResolveDartUnitTask task) {
Source unitSource = task.source;
Source librarySource = task.librarySource;
AnalysisException thrownException = task.exception;
DartEntry dartEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(unitSource);
- if (sourceEntry is! DartEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent a Dart file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to resolve non-Dart file as a Dart file: ${unitSource.fullName}");
+ SourceEntry sourceEntry = _cache.get(unitSource);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(unitSource);
+ } else if (sourceEntry is! DartEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent a Dart file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to resolve non-Dart file as a Dart file: ${unitSource.fullName}");
+ }
+ dartEntry = sourceEntry as DartEntry;
+ int sourceTime = getModificationStamp(unitSource);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (dartEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(unitSource);
+ dartEntry = getReadableDartEntry(unitSource);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${unitSource.fullName}");
+ }
}
- dartEntry = sourceEntry as DartEntry;
- int sourceTime = unitSource.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (dartEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(unitSource);
- dartEntry = getReadableDartEntry(unitSource);
- if (dartEntry == null) {
- throw new AnalysisException.con1("A Dart file became a non-Dart file: ${unitSource.fullName}");
- }
- }
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null) {
- dartCopy.setValue2(DartEntry.RESOLVED_UNIT, librarySource, task.resolvedUnit);
- _cache.storedAst(unitSource);
- } else {
- dartCopy.setState2(DartEntry.RESOLVED_UNIT, librarySource, CacheState.ERROR);
- _cache.removedAst(unitSource);
- }
- dartCopy.exception = thrownException;
- _cache.put(unitSource, dartCopy);
- dartEntry = dartCopy;
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null) {
+ dartCopy.setValue2(DartEntry.RESOLVED_UNIT, librarySource, task.resolvedUnit);
+ _cache.storedAst(unitSource);
} else {
- logInformation2("Resolution results discarded for ${debuggingString(unitSource)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
- DartEntryImpl dartCopy = dartEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // if (dartCopy.getState(DartEntry.RESOLVED_UNIT) == CacheState.IN_PROCESS) {
- // dartCopy.setState(DartEntry.RESOLVED_UNIT, librarySource, CacheState.INVALID);
- // }
- removeFromParts(unitSource, dartEntry);
- dartCopy.invalidateAllInformation();
- dartCopy.modificationTime = sourceTime;
- _cache.removedAst(unitSource);
- _workManager.add(unitSource, SourcePriority.UNKNOWN);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- dartCopy.setState2(DartEntry.RESOLVED_UNIT, librarySource, CacheState.ERROR);
- }
- dartCopy.exception = thrownException;
- _cache.put(unitSource, dartCopy);
- dartEntry = dartCopy;
+ dartCopy.setState2(DartEntry.RESOLVED_UNIT, librarySource, CacheState.ERROR);
+ _cache.removedAst(unitSource);
}
+ dartCopy.exception = thrownException;
+ _cache.put(unitSource, dartCopy);
+ dartEntry = dartCopy;
+ } else {
+ logInformation2("Resolution results discarded for ${debuggingString(unitSource)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // if (dartCopy.getState(DartEntry.RESOLVED_UNIT) == CacheState.IN_PROCESS) {
+ // dartCopy.setState(DartEntry.RESOLVED_UNIT, librarySource, CacheState.INVALID);
+ // }
+ removeFromParts(unitSource, dartEntry);
+ dartCopy.invalidateAllInformation();
+ dartCopy.modificationTime = sourceTime;
+ _cache.removedAst(unitSource);
+ _workManager.add(unitSource, SourcePriority.UNKNOWN);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ dartCopy.setState2(DartEntry.RESOLVED_UNIT, librarySource, CacheState.ERROR);
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(unitSource, dartCopy);
+ dartEntry = dartCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -6293,76 +6851,75 @@
* @return an entry containing the computed results
* @throws AnalysisException if the results could not be recorded
*/
- SourceEntry recordResolveHtmlTaskResults(ResolveHtmlTask task) {
+ HtmlEntry recordResolveHtmlTaskResults(ResolveHtmlTask task) {
Source source = task.source;
AnalysisException thrownException = task.exception;
HtmlEntry htmlEntry = null;
- {
- SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is! HtmlEntry) {
- // This shouldn't be possible because we should never have performed the task if the source
- // didn't represent an HTML file, but check to be safe.
- throw new AnalysisException.con1("Internal error: attempting to resolve non-HTML file as an HTML file: ${source.fullName}");
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! HtmlEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent an HTML file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to resolve non-HTML file as an HTML file: ${source.fullName}");
+ }
+ htmlEntry = sourceEntry as HtmlEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (htmlEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ htmlEntry = getReadableHtmlEntry(source);
+ if (htmlEntry == null) {
+ throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
+ }
}
- htmlEntry = sourceEntry as HtmlEntry;
- int sourceTime = source.modificationStamp;
- int resultTime = task.modificationTime;
- if (sourceTime == resultTime) {
- if (htmlEntry.modificationTime != sourceTime) {
- // The source has changed without the context being notified. Simulate notification.
- sourceChanged(source);
- htmlEntry = getReadableHtmlEntry(source);
- if (htmlEntry == null) {
- throw new AnalysisException.con1("An HTML file became a non-HTML file: ${source.fullName}");
- }
- }
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- if (thrownException == null) {
- htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.FLUSHED);
- htmlCopy.setValue(HtmlEntry.RESOLVED_UNIT, task.resolvedUnit);
- htmlCopy.setValue(HtmlEntry.ELEMENT, task.element);
- htmlCopy.setValue(HtmlEntry.RESOLUTION_ERRORS, task.resolutionErrors);
- _cache.storedAst(source);
- ChangeNoticeImpl notice = getNotice(source);
- notice.htmlUnit = task.resolvedUnit;
- notice.setErrors(htmlCopy.allErrors, htmlCopy.getValue(SourceEntry.LINE_INFO));
- } else {
- htmlCopy.recordResolutionError();
- _cache.removedAst(source);
- }
- htmlCopy.exception = thrownException;
- recordAngularComponents(htmlCopy, task.angularApplication);
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ if (thrownException == null) {
+ htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.FLUSHED);
+ htmlCopy.setValue(HtmlEntry.RESOLVED_UNIT, task.resolvedUnit);
+ htmlCopy.setValue(HtmlEntry.ELEMENT, task.element);
+ htmlCopy.setValue(HtmlEntry.RESOLUTION_ERRORS, task.resolutionErrors);
+ _cache.storedAst(source);
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.htmlUnit = task.resolvedUnit;
+ notice.setErrors(htmlCopy.allErrors, htmlCopy.getValue(SourceEntry.LINE_INFO));
} else {
- logInformation2("Resolution results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${htmlEntry.modificationTime}", thrownException);
- HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
- if (thrownException == null || resultTime >= 0) {
- //
- // The analysis was performed on out-of-date sources. Mark the cache so that the sources
- // will be re-analyzed using the up-to-date sources.
- //
- // if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
- // }
- // if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
- // htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
- // }
- htmlCopy.invalidateAllInformation();
- htmlCopy.modificationTime = sourceTime;
- _cache.removedAst(source);
- } else {
- //
- // We could not determine whether the sources were up-to-date or out-of-date. Mark the
- // cache so that we won't attempt to re-analyze the sources until there's a good chance
- // that we'll be able to do so without error.
- //
- htmlCopy.recordResolutionError();
- }
- htmlCopy.exception = thrownException;
- _cache.put(source, htmlCopy);
- htmlEntry = htmlCopy;
+ htmlCopy.recordResolutionError();
+ _cache.removedAst(source);
}
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
+ } else {
+ logInformation2("Resolution results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${htmlEntry.modificationTime}", thrownException);
+ HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // if (htmlCopy.getState(HtmlEntry.ELEMENT) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.ELEMENT, CacheState.INVALID);
+ // }
+ // if (htmlCopy.getState(HtmlEntry.RESOLUTION_ERRORS) == CacheState.IN_PROCESS) {
+ // htmlCopy.setState(HtmlEntry.RESOLUTION_ERRORS, CacheState.INVALID);
+ // }
+ htmlCopy.invalidateAllInformation();
+ htmlCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ htmlCopy.recordResolutionError();
+ }
+ htmlCopy.exception = thrownException;
+ _cache.put(source, htmlCopy);
+ htmlEntry = htmlCopy;
}
if (thrownException != null) {
throw thrownException;
@@ -6371,6 +6928,88 @@
}
/**
+ * Record the results produced by performing a [ScanDartTask]. If the results were computed
+ * from data that is now out-of-date, then the results will not be recorded.
+ *
+ * @param task the task that was performed
+ * @return an entry containing the computed results
+ * @throws AnalysisException if the results could not be recorded
+ */
+ DartEntry recordScanDartTaskResults(ScanDartTask task) {
+ Source source = task.source;
+ AnalysisException thrownException = task.exception;
+ DartEntry dartEntry = null;
+ SourceEntry sourceEntry = _cache.get(source);
+ if (sourceEntry == null) {
+ throw new ObsoleteSourceAnalysisException(source);
+ } else if (sourceEntry is! DartEntry) {
+ // This shouldn't be possible because we should never have performed the task if the source
+ // didn't represent a Dart file, but check to be safe.
+ throw new AnalysisException.con1("Internal error: attempting to parse non-Dart file as a Dart file: ${source.fullName}");
+ }
+ dartEntry = sourceEntry as DartEntry;
+ int sourceTime = getModificationStamp(source);
+ int resultTime = task.modificationTime;
+ if (sourceTime == resultTime) {
+ if (dartEntry.modificationTime != sourceTime) {
+ // The source has changed without the context being notified. Simulate notification.
+ sourceChanged(source);
+ dartEntry = getReadableDartEntry(source);
+ if (dartEntry == null) {
+ throw new AnalysisException.con1("A Dart file became a non-Dart file: ${source.fullName}");
+ }
+ }
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null) {
+ LineInfo lineInfo = task.lineInfo;
+ dartCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
+ dartCopy.setValue(DartEntry.TOKEN_STREAM, task.tokenStream);
+ dartCopy.setValue(DartEntry.SCAN_ERRORS, task.errors);
+ _cache.storedAst(source);
+ _workManager.add(source, SourcePriority.NORMAL_PART);
+ ChangeNoticeImpl notice = getNotice(source);
+ notice.setErrors(dartEntry.allErrors, lineInfo);
+ } else {
+ removeFromParts(source, dartEntry);
+ dartCopy.recordScanError();
+ _cache.removedAst(source);
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
+ } else {
+ logInformation2("Scan results discarded for ${debuggingString(source)}; sourceTime = ${sourceTime}, resultTime = ${resultTime}, cacheTime = ${dartEntry.modificationTime}", thrownException);
+ DartEntryImpl dartCopy = dartEntry.writableCopy;
+ if (thrownException == null || resultTime >= 0) {
+ //
+ // The analysis was performed on out-of-date sources. Mark the cache so that the sources
+ // will be re-analyzed using the up-to-date sources.
+ //
+ // dartCopy.recordScanNotInProcess();
+ removeFromParts(source, dartEntry);
+ dartCopy.invalidateAllInformation();
+ dartCopy.modificationTime = sourceTime;
+ _cache.removedAst(source);
+ _workManager.add(source, SourcePriority.UNKNOWN);
+ } else {
+ //
+ // We could not determine whether the sources were up-to-date or out-of-date. Mark the
+ // cache so that we won't attempt to re-analyze the sources until there's a good chance
+ // that we'll be able to do so without error.
+ //
+ dartCopy.recordScanError();
+ }
+ dartCopy.exception = thrownException;
+ _cache.put(source, dartCopy);
+ dartEntry = dartCopy;
+ }
+ if (thrownException != null) {
+ throw thrownException;
+ }
+ return dartEntry;
+ }
+
+ /**
* Remove the given library from the list of containing libraries for all of the parts referenced
* by the given entry.
*
@@ -6387,7 +7026,11 @@
if (partEntry != null && partEntry != dartEntry) {
DartEntryImpl partCopy = partEntry.writableCopy;
partCopy.removeContainingLibrary(librarySource);
- _cache.put(partSource, partCopy);
+ if (partCopy.librariesContaining.length == 0 && !exists(partSource)) {
+ _cache.remove(partSource);
+ } else {
+ _cache.put(partSource, partCopy);
+ }
}
}
}
@@ -6427,7 +7070,7 @@
} else {
SourceEntryImpl sourceCopy = sourceEntry.writableCopy;
int oldTime = sourceCopy.modificationTime;
- sourceCopy.modificationTime = source.modificationStamp;
+ sourceCopy.modificationTime = getModificationStamp(source);
// TODO(brianwilkerson) Understand why we're not invalidating the cache.
_cache.put(source, sourceCopy);
logInformation("Added new source: ${debuggingString(source)} (previously modified at ${oldTime})");
@@ -6447,7 +7090,7 @@
*/
void sourceChanged(Source source) {
SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry == null || sourceEntry.modificationTime == source.modificationStamp) {
+ if (sourceEntry == null || sourceEntry.modificationTime == getModificationStamp(source)) {
// Either we have removed this source, in which case we don't care that it is changed, or we
// have already invalidated the cache and don't need to invalidate it again.
if (sourceEntry == null) {
@@ -6460,7 +7103,8 @@
if (sourceEntry is HtmlEntry) {
HtmlEntryImpl htmlCopy = sourceEntry.writableCopy;
int oldTime = htmlCopy.modificationTime;
- htmlCopy.modificationTime = source.modificationStamp;
+ htmlCopy.modificationTime = getModificationStamp(source);
+ invalidateAngularResolution(htmlCopy);
htmlCopy.invalidateAllInformation();
_cache.put(source, htmlCopy);
_cache.removedAst(source);
@@ -6482,9 +7126,9 @@
// for (Source library : containingLibraries) {
invalidateLibraryResolution(library, writer);
}
- removeFromParts(source, sourceEntry);
- DartEntryImpl dartCopy = sourceEntry.writableCopy;
- dartCopy.modificationTime = source.modificationStamp;
+ removeFromParts(source, _cache.get(source) as DartEntry);
+ DartEntryImpl dartCopy = (_cache.get(source) as DartEntry).writableCopy;
+ dartCopy.modificationTime = getModificationStamp(source);
dartCopy.invalidateAllInformation();
_cache.put(source, dartCopy);
_cache.removedAst(source);
@@ -6502,7 +7146,10 @@
PrintStringWriter writer = new PrintStringWriter();
writer.println("Removed source: ${debuggingString(source)}");
SourceEntry sourceEntry = _cache.get(source);
- if (sourceEntry is DartEntry) {
+ if (sourceEntry is HtmlEntry) {
+ HtmlEntryImpl htmlCopy = sourceEntry.writableCopy;
+ invalidateAngularResolution(htmlCopy);
+ } else if (sourceEntry is DartEntry) {
Set<Source> libraries = new Set<Source>();
for (Source librarySource in getLibrariesContaining(source)) {
libraries.add(librarySource);
@@ -6533,19 +7180,17 @@
int consistencyCheckStart = JavaSystem.nanoTime();
List<Source> missingSources = new List<Source>();
int inconsistentCount = 0;
- {
- for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
- Source source = entry.getKey();
- SourceEntry sourceEntry = entry.getValue();
- int sourceTime = source.modificationStamp;
- if (sourceTime != sourceEntry.modificationTime) {
- sourceChanged(source);
- inconsistentCount++;
- }
- if (sourceEntry.exception != null) {
- if (!source.exists()) {
- missingSources.add(source);
- }
+ for (MapEntry<Source, SourceEntry> entry in _cache.entrySet()) {
+ Source source = entry.getKey();
+ SourceEntry sourceEntry = entry.getValue();
+ int sourceTime = getModificationStamp(source);
+ if (sourceTime != sourceEntry.modificationTime) {
+ sourceChanged(source);
+ inconsistentCount++;
+ }
+ if (sourceEntry.exception != null) {
+ if (!exists(source)) {
+ missingSources.add(source);
}
}
}
@@ -6578,11 +7223,13 @@
AnalysisContextImpl_AnalysisTaskResultRecorder(this.AnalysisContextImpl_this);
- SourceEntry visitGenerateDartErrorsTask(GenerateDartErrorsTask task) => AnalysisContextImpl_this.recordGenerateDartErrorsTask(task);
+ DartEntry visitGenerateDartErrorsTask(GenerateDartErrorsTask task) => AnalysisContextImpl_this.recordGenerateDartErrorsTask(task);
- SourceEntry visitGenerateDartHintsTask(GenerateDartHintsTask task) => AnalysisContextImpl_this.recordGenerateDartHintsTask(task);
+ DartEntry visitGenerateDartHintsTask(GenerateDartHintsTask task) => AnalysisContextImpl_this.recordGenerateDartHintsTask(task);
- SourceEntry visitIncrementalAnalysisTask(IncrementalAnalysisTask task) => AnalysisContextImpl_this.recordIncrementalAnalysisTaskResults(task);
+ SourceEntry visitGetContentTask(GetContentTask task) => AnalysisContextImpl_this.recordGetContentsTask(task);
+
+ DartEntry visitIncrementalAnalysisTask(IncrementalAnalysisTask task) => AnalysisContextImpl_this.recordIncrementalAnalysisTaskResults(task);
DartEntry visitParseDartTask(ParseDartTask task) => AnalysisContextImpl_this.recordParseDartTaskResults(task);
@@ -6590,15 +7237,17 @@
HtmlEntry visitResolveAngularComponentTemplateTask(ResolveAngularComponentTemplateTask task) => AnalysisContextImpl_this.recordResolveAngularComponentTemplateTaskResults(task);
- SourceEntry visitResolveAngularEntryHtmlTask(ResolveAngularEntryHtmlTask task) => AnalysisContextImpl_this.recordResolveAngularEntryHtmlTaskResults(task);
+ HtmlEntry visitResolveAngularEntryHtmlTask(ResolveAngularEntryHtmlTask task) => AnalysisContextImpl_this.recordResolveAngularEntryHtmlTaskResults(task);
DartEntry visitResolveDartDependenciesTask(ResolveDartDependenciesTask task) => AnalysisContextImpl_this.recordResolveDartDependenciesTaskResults(task);
DartEntry visitResolveDartLibraryTask(ResolveDartLibraryTask task) => AnalysisContextImpl_this.recordResolveDartLibraryTaskResults(task);
- SourceEntry visitResolveDartUnitTask(ResolveDartUnitTask task) => AnalysisContextImpl_this.recordResolveDartUnitTaskResults(task);
+ DartEntry visitResolveDartUnitTask(ResolveDartUnitTask task) => AnalysisContextImpl_this.recordResolveDartUnitTaskResults(task);
- SourceEntry visitResolveHtmlTask(ResolveHtmlTask task) => AnalysisContextImpl_this.recordResolveHtmlTaskResults(task);
+ HtmlEntry visitResolveHtmlTask(ResolveHtmlTask task) => AnalysisContextImpl_this.recordResolveHtmlTaskResults(task);
+
+ DartEntry visitScanDartTask(ScanDartTask task) => AnalysisContextImpl_this.recordScanDartTaskResults(task);
}
class AnalysisContextImpl_ContextRetentionPolicy implements CacheRetentionPolicy {
@@ -6625,6 +7274,57 @@
}
/**
+ * Instances of the class `TaskData` represent information about the next task to be
+ * performed. Each data has an implicit associated source: the source that might need to be
+ * analyzed. There are essentially three states that can be represented:
+ * * If [getTask] returns a non-`null` value, then that is the task that should
+ * be executed to further analyze the associated source.
+ * * Otherwise, if [isBlocked] returns `true`, then there is no work that can be
+ * done, but analysis for the associated source is not complete.
+ * * Otherwise, [getDependentSource] should return a source that needs to be analyzed
+ * before the analysis of the associated source can be completed.
+ */
+class AnalysisContextImpl_TaskData {
+ /**
+ * The task that is to be performed.
+ */
+ final AnalysisTask task;
+
+ /**
+ * A flag indicating whether the associated source is blocked waiting for its contents to be
+ * loaded.
+ */
+ bool _blocked = false;
+
+ /**
+ * The source that needs to be analyzed before further progress can be made on the associated
+ * source.
+ */
+ final Source dependentSource;
+
+ /**
+ * Initialize a newly created data holder.
+ *
+ * @param task the task that is to be performed
+ * @param blocked `true` if the associated source is blocked waiting for its contents to
+ * be loaded
+ * @param dependentSource t
+ */
+ AnalysisContextImpl_TaskData(this.task, bool blocked, this.dependentSource) {
+ this._blocked = blocked;
+ }
+
+ /**
+ * Return `true` if the associated source is blocked waiting for its contents to be
+ * loaded.
+ *
+ * @return `true` if the associated source is blocked waiting for its contents to be
+ * loaded
+ */
+ bool get isBlocked => _blocked;
+}
+
+/**
* Instances of the class `AnalysisErrorInfoImpl` represent the analysis errors and line info
* associated with a source.
*/
@@ -6674,6 +7374,12 @@
bool dart2jsHint = true;
/**
+ * A flag indicating whether errors, warnings and hints should be generated for sources in the
+ * SDK.
+ */
+ bool _generateSdkErrors = false;
+
+ /**
* A flag indicating whether analysis is to generate hint results (e.g. type inference based
* information and pub best practices).
*/
@@ -6690,7 +7396,7 @@
bool preserveComments = true;
/**
- * A flag indicating whether analysis is to parse comments.
+ * A flag indicating whether analysis is to analyze Angular.
*/
bool analyzeAngular = true;
@@ -6710,15 +7416,25 @@
dart2jsHint = options.dart2jsHint;
hint = options.hint;
incremental = options.incremental;
- analyzeAngular = options.analyzeAngular;
+ }
+
+ bool get generateSdkErrors => _generateSdkErrors;
+
+ /**
+ * Set whether errors, warnings and hints should be generated for sources in the SDK to match the
+ * given value.
+ *
+ * @param generate `true` if errors, warnings and hints should be generated for sources in
+ * the SDK
+ */
+ void set generateSdkErrors(bool generate) {
+ _generateSdkErrors = generate;
}
}
/**
* Instances of the class `ChangeNoticeImpl` represent a change to the analysis results
* associated with a given source.
- *
- * @coverage dart.engine
*/
class ChangeNoticeImpl implements ChangeNotice {
/**
@@ -6776,7 +7492,7 @@
this._errors = errors;
this._lineInfo = lineInfo;
if (lineInfo == null) {
- AnalysisEngine.instance.logger.logError2("No line info: ${source}", new JavaException());
+ AnalysisEngine.instance.logger.logInformation3("No line info: ${source}", new JavaException());
}
}
@@ -6787,8 +7503,6 @@
* Instances of the class `DelegatingAnalysisContextImpl` extend [AnalysisContextImpl
] to delegate sources to the appropriate analysis context. For instance, if the
* source is in a system library then the analysis context from the [DartSdk] is used.
- *
- * @coverage dart.engine
*/
class DelegatingAnalysisContextImpl extends AnalysisContextImpl {
/**
@@ -7180,7 +7894,7 @@
*/
static IncrementalAnalysisCache verifyStructure(IncrementalAnalysisCache cache, Source source, CompilationUnit unit) {
if (cache != null && unit != null && cache.source == source) {
- if (!ASTComparator.equals4(cache.resolvedUnit, unit)) {
+ if (!AstComparator.equals4(cache.resolvedUnit, unit)) {
return null;
}
}
@@ -7250,8 +7964,6 @@
* Instances of the class `InstrumentedAnalysisContextImpl` implement an
* [AnalysisContext] by recording instrumentation data and delegating to
* another analysis context to do the non-instrumentation work.
- *
- * @coverage dart.engine
*/
class InstrumentedAnalysisContextImpl implements InternalAnalysisContext {
/**
@@ -7326,15 +8038,7 @@
}
}
- List<Source> computeExportedLibraries(Source source) {
- InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-computeExportedLibraries");
- try {
- instrumentation.metric3("contextId", _contextId);
- return _basis.computeExportedLibraries(source);
- } finally {
- instrumentation.log();
- }
- }
+ List<Source> computeExportedLibraries(Source source) => _basis.computeExportedLibraries(source);
HtmlElement computeHtmlElement(Source source) {
InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-computeHtmlElement");
@@ -7349,15 +8053,7 @@
}
}
- List<Source> computeImportedLibraries(Source source) {
- InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-computeImportedLibraries");
- try {
- instrumentation.metric3("contextId", _contextId);
- return _basis.computeImportedLibraries(source);
- } finally {
- instrumentation.log();
- }
- }
+ List<Source> computeImportedLibraries(Source source) => _basis.computeImportedLibraries(source);
SourceKind computeKindOf(Source source) {
InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-computeKindOf");
@@ -7401,6 +8097,16 @@
ResolvableHtmlUnit computeResolvableHtmlUnit(Source source) => _basis.computeResolvableHtmlUnit(source);
+ bool exists(Source source) {
+ InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-exists");
+ try {
+ instrumentation.metric3("contextId", _contextId);
+ return _basis.exists(source);
+ } finally {
+ instrumentation.log();
+ }
+ }
+
AnalysisContext extractContext(SourceContainer container) {
InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-extractContext");
try {
@@ -7430,6 +8136,22 @@
*/
AnalysisContext get basis => _basis;
+ CompilationUnitElement getCompilationUnitElement(Source unitSource, Source librarySource) {
+ InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-getCompilationUnitElement");
+ try {
+ instrumentation.metric3("contextId", _contextId);
+ return _basis.getCompilationUnitElement(unitSource, librarySource);
+ } finally {
+ instrumentation.log();
+ }
+ }
+
+ TimestampedData<String> getContents(Source source) => _basis.getContents(source);
+
+ void getContentsToReceiver(Source source, Source_ContentReceiver receiver) {
+ _basis.getContentsToReceiver(source, receiver);
+ }
+
Element getElement(ElementLocation location) {
InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-getElement");
try {
@@ -7592,11 +8314,29 @@
}
}
+ int getModificationStamp(Source source) {
+ InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-getModificationStamp");
+ try {
+ instrumentation.metric3("contextId", _contextId);
+ return _basis.getModificationStamp(source);
+ } finally {
+ instrumentation.log();
+ }
+ }
+
Namespace getPublicNamespace(LibraryElement library) => _basis.getPublicNamespace(library);
Namespace getPublicNamespace2(Source source) => _basis.getPublicNamespace2(source);
- List<Source> get refactoringUnsafeSources => _basis.refactoringUnsafeSources;
+ List<Source> get refactoringUnsafeSources {
+ InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-getRefactoringUnsafeSources");
+ try {
+ instrumentation.metric3("contextId", _contextId);
+ return _basis.refactoringUnsafeSources;
+ } finally {
+ instrumentation.log();
+ }
+ }
CompilationUnit getResolvedCompilationUnit(Source unitSource, LibraryElement library) {
InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-getResolvedCompilationUnit");
@@ -7642,8 +8382,12 @@
TypeProvider get typeProvider => _basis.typeProvider;
+ TimestampedData<CompilationUnit> internalParseCompilationUnit(Source source) => _basis.internalParseCompilationUnit(source);
+
TimestampedData<CompilationUnit> internalResolveCompilationUnit(Source unitSource, LibraryElement libraryElement) => _basis.internalResolveCompilationUnit(unitSource, libraryElement);
+ TimestampedData<Token> internalScanTokenStream(Source source) => _basis.internalScanTokenStream(source);
+
bool isClientLibrary(Source librarySource) {
InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-isClientLibrary");
try {
@@ -7809,16 +8553,6 @@
instrumentation.log();
}
}
-
- Iterable<Source> sourcesToResolve(List<Source> changedSources) {
- InstrumentationBuilder instrumentation = Instrumentation.builder2("Analysis-sourcesToResolve");
- try {
- instrumentation.metric3("contextId", _contextId);
- return _basis.sourcesToResolve(changedSources);
- } finally {
- instrumentation.log();
- }
- }
}
/**
@@ -7932,6 +8666,15 @@
TypeProvider get typeProvider;
/**
+ * Return a time-stamped parsed AST for the given source.
+ *
+ * @param source the source of the compilation unit for which an AST is to be returned
+ * @return a time-stamped AST for the source
+ * @throws AnalysisException if the source could not be parsed
+ */
+ TimestampedData<CompilationUnit> internalParseCompilationUnit(Source source);
+
+ /**
* Return a time-stamped fully-resolved compilation unit for the given source in the given
* library.
*
@@ -7945,6 +8688,15 @@
TimestampedData<CompilationUnit> internalResolveCompilationUnit(Source unitSource, LibraryElement libraryElement);
/**
+ * Return a time-stamped token stream for the given source.
+ *
+ * @param source the source of the compilation unit for which a token stream is to be returned
+ * @return a time-stamped token stream for the source
+ * @throws AnalysisException if the token stream could not be computed
+ */
+ TimestampedData<Token> internalScanTokenStream(Source source);
+
+ /**
* Given a table mapping the source for the libraries represented by the corresponding elements to
* the elements representing the libraries, record those mappings.
*
@@ -7964,6 +8716,11 @@
static TimeCounter angular = new TimeCounter();
/**
+ * The [TimeCounter] for time spent in reading files.
+ */
+ static TimeCounter io = new TimeCounter();
+
+ /**
* The [TimeCounter] for time spent in scanning.
*/
static TimeCounter scan = new TimeCounter();
@@ -7993,8 +8750,6 @@
* Instances of the class `RecordingErrorListener` implement an error listener that will
* record the errors that are reported to it in a way that is appropriate for caching those errors
* within an analysis context.
- *
- * @coverage dart.engine
*/
class RecordingErrorListener implements AnalysisErrorListener {
/**
@@ -8062,7 +8817,7 @@
* Instances of the class `ResolutionEraser` remove any resolution information from an AST
* structure when used to visit that structure.
*/
-class ResolutionEraser extends GeneralizingASTVisitor<Object> {
+class ResolutionEraser extends GeneralizingAstVisitor<Object> {
Object visitAssignmentExpression(AssignmentExpression node) {
node.staticElement = null;
node.propagatedElement = null;
@@ -8334,8 +9089,6 @@
/**
* An [Expression] with optional [AngularFilterNode]s.
- *
- * @coverage dart.engine.ast
*/
class AngularExpression {
/**
@@ -8397,8 +9150,6 @@
/**
* Angular filter argument.
- *
- * @coverage dart.engine.ast
*/
class AngularFilterArgument {
/**
@@ -8421,8 +9172,6 @@
/**
* Angular filter node.
- *
- * @coverage dart.engine.ast
*/
class AngularFilterNode {
/**
@@ -8467,21 +9216,6 @@
}
/**
- * Returns the array of all top-level Angular elements that could be used in the application with
- * this entry point. Maybe `null` of not an Angular entry point.
- */
- static List<AngularElement> getAngularElements(AnalysisContext context, ht.HtmlUnit unit) {
- if (hasAngularAnnotation(unit)) {
- CompilationUnit dartUnit = getDartUnit(context, unit);
- if (dartUnit != null) {
- LibraryElement libraryElement = dartUnit.element.library;
- return getAngularElements2(libraryElement);
- }
- }
- return null;
- }
-
- /**
* @return `true` if the given [HtmlUnit] has <code>ng-app</code> annotation.
*/
static bool hasAngularAnnotation(ht.HtmlUnit htmlUnit) {
@@ -8504,7 +9238,7 @@
* @param angularElements the list to fill with top-level [AngularElement]s
* @param classElement the [ClassElement] to get [AngularElement]s from
*/
- static void addAngularElements(Set<AngularElement> angularElements, ClassElement classElement) {
+ static void addAngularElementsFromClass(Set<AngularElement> angularElements, ClassElement classElement) {
for (ToolkitObjectElement toolkitObject in classElement.toolkitObjects) {
if (toolkitObject is AngularElement) {
angularElements.add(toolkitObject);
@@ -8518,20 +9252,24 @@
* @param libraryElement the [LibraryElement] to analyze
* @return the array of all top-level Angular elements that could be used in this library
*/
- static void addAngularElements2(Set<AngularElement> angularElements, LibraryElement library, Set<LibraryElement> visited) {
+ static void addAngularElementsFromLibrary(Set<AngularElement> angularElements, LibraryElement library, Set<LibraryElement> visited) {
+ if (library == null) {
+ return;
+ }
if (!visited.add(library)) {
return;
}
// add Angular elements from current library
for (CompilationUnitElement unit in library.units) {
+ angularElements.addAll(unit.angularViews);
for (ClassElement type in unit.types) {
- addAngularElements(angularElements, type);
+ addAngularElementsFromClass(angularElements, type);
}
}
// handle imports
for (ImportElement importElement in library.imports) {
LibraryElement importedLibrary = importElement.importedLibrary;
- addAngularElements2(angularElements, importedLibrary, visited);
+ addAngularElementsFromLibrary(angularElements, importedLibrary, visited);
}
}
@@ -8543,9 +9281,9 @@
* @param libraryElement the [LibraryElement] to analyze
* @return the array of all top-level Angular elements that could be used in this library
*/
- static List<AngularElement> getAngularElements2(LibraryElement libraryElement) {
+ static List<AngularElement> getAngularElements(Set<LibraryElement> libraries, LibraryElement libraryElement) {
Set<AngularElement> angularElements = new Set();
- addAngularElements2(angularElements, libraryElement, new Set());
+ addAngularElementsFromLibrary(angularElements, libraryElement, libraries);
return new List.from(angularElements);
}
@@ -8564,11 +9302,19 @@
return null;
}
+ static Set<Source> getLibrarySources(Set<LibraryElement> libraries) {
+ Set<Source> sources = new Set();
+ for (LibraryElement library in libraries) {
+ sources.add(library.source);
+ }
+ return sources;
+ }
+
InternalAnalysisContext _context;
TypeProvider _typeProvider;
- AnalysisErrorListener _errorListener;
+ AngularHtmlUnitResolver_FilteringAnalysisErrorListener _errorListener;
Source _source;
@@ -8601,17 +9347,17 @@
AngularHtmlUnitResolver(InternalAnalysisContext context, AnalysisErrorListener errorListener, Source source, LineInfo lineInfo, ht.HtmlUnit unit) {
this._context = context;
this._typeProvider = context.typeProvider;
- this._errorListener = errorListener;
+ this._errorListener = new AngularHtmlUnitResolver_FilteringAnalysisErrorListener(errorListener);
this._source = source;
this._lineInfo = lineInfo;
this._unit = unit;
}
/**
- * The [AngularApplicationInfo] for the Web application with this entry point, may be
+ * The [AngularApplication] for the Web application with this entry point, may be
* `null` if not an entry point.
*/
- AngularApplicationInfo calculateAngularApplication() {
+ AngularApplication calculateAngularApplication() {
// check if Angular at all
if (!hasAngularAnnotation(_unit)) {
return null;
@@ -8623,36 +9369,50 @@
}
// prepare accessible Angular elements
LibraryElement libraryElement = dartUnit.element.library;
- List<AngularElement> angularElements = getAngularElements2(libraryElement);
- // resolve template URIs
+ Set<LibraryElement> libraries = new Set();
+ List<AngularElement> angularElements = getAngularElements(libraries, libraryElement);
+ // resolve AngularComponentElement template URIs
// TODO(scheglov) resolve to HtmlElement to allow F3 ?
+ Set<Source> angularElementsSources = new Set();
for (AngularElement angularElement in angularElements) {
- if (angularElement is AngularComponentElement) {
- AngularComponentElement component = angularElement;
- String templateUri = component.templateUri;
+ if (angularElement is AngularHasTemplateElement) {
+ AngularHasTemplateElement hasTemplate = angularElement;
+ angularElementsSources.add(angularElement.source);
+ String templateUri = hasTemplate.templateUri;
if (templateUri == null) {
continue;
}
try {
Source templateSource = _source.resolveRelative(parseUriWithException(templateUri));
- if (templateSource == null || !templateSource.exists()) {
+ if (!_context.exists(templateSource)) {
templateSource = _context.sourceFactory.resolveUri(_source, "package:${templateUri}");
- if (templateSource == null || !templateSource.exists()) {
- reportError7(component.templateUriOffset, templateUri.length, AngularCode.URI_DOES_NOT_EXIST, [templateUri]);
+ if (!_context.exists(templateSource)) {
+ _errorListener.onError(new AnalysisError.con2(angularElement.source, hasTemplate.templateUriOffset, templateUri.length, AngularCode.URI_DOES_NOT_EXIST, [templateUri]));
continue;
}
}
if (!AnalysisEngine.isHtmlFileName(templateUri)) {
continue;
}
- (component as AngularComponentElementImpl).templateSource = templateSource;
+ if (hasTemplate is AngularComponentElementImpl) {
+ hasTemplate.templateSource = templateSource;
+ }
+ if (hasTemplate is AngularViewElementImpl) {
+ hasTemplate.templateSource = templateSource;
+ }
} on URISyntaxException catch (exception) {
- reportError7(component.templateUriOffset, templateUri.length, AngularCode.INVALID_URI, [templateUri]);
+ _errorListener.onError(new AnalysisError.con2(angularElement.source, hasTemplate.templateUriOffset, templateUri.length, AngularCode.INVALID_URI, [templateUri]));
}
}
}
+ // create AngularApplication
+ AngularApplication application = new AngularApplication(_source, getLibrarySources(libraries), angularElements, new List.from(angularElementsSources));
+ // set AngularApplication for each AngularElement
+ for (AngularElement angularElement in angularElements) {
+ (angularElement as AngularElementImpl).application = application;
+ }
// done
- return new AngularApplicationInfo(_source, angularElements);
+ return application;
}
/**
@@ -8661,7 +9421,7 @@
* @param application the Angular application we are resolving for
* @param component the [AngularComponentElement] to resolve template for, not `null`
*/
- void resolveComponentTemplate(AngularApplicationInfo application, AngularComponentElement component) {
+ void resolveComponentTemplate(AngularApplication application, AngularComponentElement component) {
_isAngular = true;
resolveInternal(application.elements, component);
}
@@ -8669,12 +9429,12 @@
/**
* Resolves [source] as an Angular application entry point.
*/
- void resolveEntryPoint(AngularApplicationInfo application) {
+ void resolveEntryPoint(AngularApplication application) {
resolveInternal(application.elements, null);
}
Object visitXmlAttributeNode(ht.XmlAttributeNode node) {
- parseEmbeddedExpressions2(node);
+ parseEmbeddedExpressionsInAttribute(node);
resolveExpressions(node.expressions);
return super.visitXmlAttributeNode(node);
}
@@ -8694,7 +9454,7 @@
// process node in separate name scope
pushNameScope();
try {
- parseEmbeddedExpressions3(node);
+ parseEmbeddedExpressions2(node);
// apply processors
for (NgProcessor processor in _processors) {
if (processor.canApply(node)) {
@@ -8804,7 +9564,7 @@
if (identical(colonToken.type, TokenType.COLON)) {
filterToken = filterToken.next;
} else {
- reportError8(colonToken, AngularCode.MISSING_FILTER_COLON, []);
+ reportErrorForToken(AngularCode.MISSING_FILTER_COLON, colonToken, []);
}
// parse argument
Expression argument = parseDartExpression3(filterToken);
@@ -8842,24 +9602,24 @@
}
/**
- * Reports given [ErrorCode] at the given [ASTNode].
+ * Reports given [ErrorCode] at the given [AstNode].
*/
- void reportError(ASTNode node, ErrorCode errorCode, List<Object> arguments) {
- reportError7(node.offset, node.length, errorCode, arguments);
+ void reportErrorForNode(ErrorCode errorCode, AstNode node, List<Object> arguments) {
+ reportErrorForOffset(errorCode, node.offset, node.length, arguments);
}
/**
* Reports given [ErrorCode] at the given position.
*/
- void reportError7(int offset, int length, ErrorCode errorCode, List<Object> arguments) {
+ void reportErrorForOffset(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
_errorListener.onError(new AnalysisError.con2(_source, offset, length, errorCode, arguments));
}
/**
* Reports given [ErrorCode] at the given [Token].
*/
- void reportError8(Token token, ErrorCode errorCode, List<Object> arguments) {
- reportError7(token.offset, token.length, errorCode, arguments);
+ void reportErrorForToken(ErrorCode errorCode, Token token, List<Object> arguments) {
+ reportErrorForOffset(errorCode, token.offset, token.length, arguments);
}
void resolveExpression(AngularExpression angularExpression) {
@@ -8870,9 +9630,9 @@
}
/**
- * Resolves given [ASTNode] using [resolver].
+ * Resolves given [AstNode] using [resolver].
*/
- void resolveNode(ASTNode node) {
+ void resolveNode(AstNode node) {
node.accept(_resolver);
}
@@ -8935,9 +9695,10 @@
}
/**
- * Defines variable for the given [AngularElement].
+ * Defines variable for the given [AngularElement] with type of the enclosing
+ * [ClassElement].
*/
- void defineTopElementVariable(AngularElement element) {
+ void defineTopVariable_forClassElement(AngularElement element) {
ClassElement classElement = element.enclosingElement as ClassElement;
InterfaceType type = classElement.type;
LocalVariableElementImpl variable = createLocalVariable2(type, element.name);
@@ -8946,6 +9707,16 @@
}
/**
+ * Defines variable for the given [AngularScopePropertyElement].
+ */
+ void defineTopVariable_forScopeProperty(AngularScopePropertyElement element) {
+ Type2 type = element.type;
+ LocalVariableElementImpl variable = createLocalVariable2(type, element.name);
+ defineTopVariable(variable);
+ variable.toolkitObjects = <AngularElement> [element];
+ }
+
+ /**
* Parse the value of the given token for embedded expressions, and add any embedded expressions
* that are found to the given list of expressions.
*
@@ -8972,15 +9743,7 @@
}
}
- void parseEmbeddedExpressions2(ht.XmlAttributeNode node) {
- List<AngularMoustacheXmlExpression> expressions = [];
- parseEmbeddedExpressions(expressions, node.valueToken);
- if (!expressions.isEmpty) {
- node.expressions = new List.from(expressions);
- }
- }
-
- void parseEmbeddedExpressions3(ht.XmlTagNode node) {
+ void parseEmbeddedExpressions2(ht.XmlTagNode node) {
List<AngularMoustacheXmlExpression> expressions = [];
ht.Token token = node.attributeEnd;
ht.Token endToken = node.endToken;
@@ -9004,6 +9767,14 @@
node.expressions = new List.from(expressions);
}
+ void parseEmbeddedExpressionsInAttribute(ht.XmlAttributeNode node) {
+ List<AngularMoustacheXmlExpression> expressions = [];
+ parseEmbeddedExpressions(expressions, node.valueToken);
+ if (!expressions.isEmpty) {
+ node.expressions = new List.from(expressions);
+ }
+ }
+
void recordDefinedVariable(LocalVariableElementImpl variable) {
_definedVariables.add(variable);
_functionElement.localVariables = new List.from(_definedVariables);
@@ -9048,13 +9819,6 @@
for (AngularElement angularElement in angularElements) {
_injectedLibraries.add(angularElement.library);
}
- // add accessible processors
- for (AngularElement angularElement in angularElements) {
- NgProcessor processor = createProcessor(angularElement);
- if (processor != null) {
- _processors.add(processor);
- }
- }
// prepare Dart library
createLibraryElement();
(_unit.element as HtmlElementImpl).angularCompilationUnit = _unitElement;
@@ -9062,12 +9826,22 @@
createResolver();
// maybe resolving component template
if (component != null) {
- defineTopElementVariable(component);
+ defineTopVariable_forClassElement(component);
+ for (AngularScopePropertyElement scopeProperty in component.scopeProperties) {
+ defineTopVariable_forScopeProperty(scopeProperty);
+ }
+ }
+ // add processors
+ for (AngularElement angularElement in angularElements) {
+ NgProcessor processor = createProcessor(angularElement);
+ if (processor != null) {
+ _processors.add(processor);
+ }
}
// define filters
for (AngularElement angularElement in angularElements) {
if (angularElement is AngularFilterElement) {
- defineTopElementVariable(angularElement);
+ defineTopVariable_forClassElement(angularElement);
}
}
// run this HTML visitor
@@ -9112,6 +9886,22 @@
}
}
+class AngularHtmlUnitResolver_FilteringAnalysisErrorListener implements AnalysisErrorListener {
+ AnalysisErrorListener _listener;
+
+ AngularHtmlUnitResolver_FilteringAnalysisErrorListener(AnalysisErrorListener listener) {
+ this._listener = listener;
+ }
+
+ void onError(AnalysisError error) {
+ ErrorCode errorCode = error.errorCode;
+ if (identical(errorCode, StaticWarningCode.UNDEFINED_GETTER) || identical(errorCode, StaticWarningCode.UNDEFINED_IDENTIFIER) || identical(errorCode, StaticTypeWarningCode.UNDEFINED_GETTER)) {
+ return;
+ }
+ _listener.onError(error);
+ }
+}
+
class AngularHtmlUnitResolver_FoundAppError extends Error {
}
@@ -9204,20 +9994,20 @@
ht.XmlExpression_Reference getReference(int offset) {
// main expression
- ht.XmlExpression_Reference reference = getReference2(expression.expression, offset);
+ ht.XmlExpression_Reference reference = getReferenceAtNode(expression.expression, offset);
if (reference != null) {
return reference;
}
// filters
for (AngularFilterNode filter in expression.filters) {
// filter name
- reference = getReference2(filter.name, offset);
+ reference = getReferenceAtNode(filter.name, offset);
if (reference != null) {
return reference;
}
// filter arguments
for (AngularFilterArgument filterArgument in filter.arguments) {
- reference = getReference2(filterArgument.expression, offset);
+ reference = getReferenceAtNode(filterArgument.expression, offset);
if (reference != null) {
return reference;
}
@@ -9227,11 +10017,11 @@
}
/**
- * If the given [ASTNode] has an [Element] at the given offset, then returns
+ * If the given [AstNode] has an [Element] at the given offset, then returns
* [Reference] with this [Element].
*/
- ht.XmlExpression_Reference getReference2(ASTNode root, int offset) {
- ASTNode node = new NodeLocator.con1(offset).searchWithin(root);
+ ht.XmlExpression_Reference getReferenceAtNode(AstNode root, int offset) {
+ AstNode node = new NodeLocator.con1(offset).searchWithin(root);
if (node != null) {
Element element = ElementLocator.locate(node);
return new ht.XmlExpression_Reference(element, node.offset, node.length);
@@ -9345,19 +10135,32 @@
}
void apply(AngularHtmlUnitResolver resolver, ht.XmlTagNode node) {
+ String selectorAttributeName = null;
+ {
+ AngularSelectorElement selector = _element.selector;
+ if (selector is HasAttributeSelectorElementImpl) {
+ selectorAttributeName = selector.name;
+ // resolve attribute expression
+ ht.XmlAttributeNode attribute = node.getAttribute(selectorAttributeName);
+ if (attribute != null) {
+ attribute.element = selector;
+ }
+ }
+ }
+ //
for (AngularPropertyElement property in _element.properties) {
// prepare attribute name
String name = property.name;
if (name == ".") {
- AngularSelectorElement selector = _element.selector;
- if (selector is HasAttributeSelectorElementImpl) {
- name = selector.name;
- }
+ name = selectorAttributeName;
}
// resolve attribute expression
ht.XmlAttributeNode attribute = node.getAttribute(name);
if (attribute != null) {
- attribute.element = property;
+ // if not resolved as the selector, resolve as a property
+ if (name != selectorAttributeName) {
+ attribute.element = property;
+ }
// resolve if binding
if (property.propertyKind != AngularPropertyKind.ATTR) {
resolver.pushNameScope();
@@ -9616,6 +10419,15 @@
E visitGenerateDartHintsTask(GenerateDartHintsTask task);
/**
+ * Visit a [GetContentTask].
+ *
+ * @param task the task to be visited
+ * @return the result of visiting the task
+ * @throws AnalysisException if the visitor throws an exception for some reason
+ */
+ E visitGetContentTask(GetContentTask task);
+
+ /**
* Visit an [IncrementalAnalysisTask].
*
* @param task the task to be visited
@@ -9695,6 +10507,15 @@
* @throws AnalysisException if the visitor throws an exception for some reason
*/
E visitResolveHtmlTask(ResolveHtmlTask task);
+
+ /**
+ * Visit a [ScanDartTask].
+ *
+ * @param task the task to be visited
+ * @return the result of visiting the task
+ * @throws AnalysisException if the visitor throws an exception for some reason
+ */
+ E visitScanDartTask(ScanDartTask task);
}
/**
@@ -9876,6 +10697,86 @@
}
/**
+ * Instances of the class `GetContentTask` get the contents of a source.
+ */
+class GetContentTask extends AnalysisTask {
+ /**
+ * The source to be read.
+ */
+ final Source source;
+
+ /**
+ * A flag indicating whether this task is complete.
+ */
+ bool _complete = false;
+
+ /**
+ * The contents of the source.
+ */
+ String _content;
+
+ /**
+ * The time at which the contents of the source were last modified.
+ */
+ int _modificationTime = -1;
+
+ /**
+ * Initialize a newly created task to perform analysis within the given context.
+ *
+ * @param context the context in which the task is to be performed
+ * @param source the source to be parsed
+ * @param contentData the time-stamped contents of the source
+ */
+ GetContentTask(InternalAnalysisContext context, this.source) : super(context) {
+ if (source == null) {
+ throw new IllegalArgumentException("Cannot get contents of null source");
+ }
+ }
+
+ accept(AnalysisTaskVisitor visitor) => visitor.visitGetContentTask(this);
+
+ /**
+ * Return the contents of the source, or `null` if the task has not completed or if there
+ * was an exception while getting the contents.
+ *
+ * @return the contents of the source
+ */
+ String get content => _content;
+
+ /**
+ * Return the time at which the contents of the source that was parsed were last modified, or a
+ * negative value if the task has not yet been performed or if an exception occurred.
+ *
+ * @return the time at which the contents of the source that was parsed were last modified
+ */
+ int get modificationTime => _modificationTime;
+
+ /**
+ * Return `true` if this task is complete. Unlike most tasks, this task is allowed to be
+ * visited more than once in order to support asynchronous IO. If the task is not complete when it
+ * is visited synchronously as part of the [AnalysisTask#perform]
+ * method, it will be visited again, using the same visitor, when the IO operation has been
+ * performed.
+ *
+ * @return `true` if this task is complete
+ */
+ bool get isComplete => _complete;
+
+ String get taskDescription => "get contents of ${source.fullName}";
+
+ void internalPerform() {
+ _complete = true;
+ try {
+ TimestampedData<String> data = context.getContents(source);
+ _content = data.data;
+ _modificationTime = data.modificationTime;
+ } on JavaException catch (exception) {
+ throw new AnalysisException.con2("Could not get contents of ${source}", exception);
+ }
+ }
+}
+
+/**
* Instances of the class `IncrementalAnalysisTask` incrementally update existing analysis.
*/
class IncrementalAnalysisTask extends AnalysisTask {
@@ -9979,11 +10880,6 @@
int _modificationTime = -1;
/**
- * The line information that was produced.
- */
- LineInfo _lineInfo;
-
- /**
* The compilation unit that was produced by parsing the source.
*/
CompilationUnit _unit;
@@ -9996,12 +10892,12 @@
/**
* A flag indicating whether the source contains a 'part of' directive.
*/
- bool _hasPartOfDirective2 = false;
+ bool _containsPartOfDirective = false;
/**
* A flag indicating whether the source contains a 'library' directive.
*/
- bool _hasLibraryDirective2 = false;
+ bool _containsLibraryDirective = false;
/**
* Initialize a newly created task to perform analysis within the given context.
@@ -10030,14 +10926,6 @@
List<AnalysisError> get errors => _errors;
/**
- * Return the line information that was produced, or `null` if the task has not yet been
- * performed or if an exception occurred.
- *
- * @return the line information that was produced
- */
- LineInfo get lineInfo => _lineInfo;
-
- /**
* Return the time at which the contents of the source that was parsed were last modified, or a
* negative value if the task has not yet been performed or if an exception occurred.
*
@@ -10051,7 +10939,7 @@
*
* @return `true` if the source contains a 'library' directive
*/
- bool hasLibraryDirective() => _hasLibraryDirective2;
+ bool hasLibraryDirective() => _containsLibraryDirective;
/**
* Return `true` if the source contains a 'part of' directive, or `false` if the task
@@ -10059,7 +10947,7 @@
*
* @return `true` if the source contains a 'part of' directive
*/
- bool hasPartOfDirective() => _hasPartOfDirective2;
+ bool hasPartOfDirective() => _containsPartOfDirective;
String get taskDescription {
if (source == null) {
@@ -10070,19 +10958,12 @@
void internalPerform() {
RecordingErrorListener errorListener = new RecordingErrorListener();
- List<Token> token = [null];
- //
- // Scan the contents of the file.
- //
- Source_ContentReceiver receiver = new Source_ContentReceiver_ParseDartTask_internalPerform(this, errorListener, token);
- try {
- source.getContents(receiver);
- } on JavaException catch (exception) {
- _modificationTime = source.modificationStamp;
- throw new AnalysisException.con3(exception);
- }
- if (token[0] == null) {
- throw new AnalysisException.con1("Could not get contents for '${source.fullName}'");
+ InternalAnalysisContext context = this.context;
+ TimestampedData<Token> data = context.internalScanTokenStream(source);
+ _modificationTime = data.modificationTime;
+ Token token = data.data;
+ if (token == null) {
+ throw new AnalysisException.con1("Could not get token stream for ${source.fullName}");
}
//
// Then parse the token stream.
@@ -10091,45 +10972,22 @@
try {
Parser parser = new Parser(source, errorListener);
parser.parseFunctionBodies = context.analysisOptions.analyzeFunctionBodies;
- _unit = parser.parseCompilationUnit(token[0]);
+ _unit = parser.parseCompilationUnit(token);
_errors = errorListener.getErrors2(source);
for (Directive directive in _unit.directives) {
if (directive is LibraryDirective) {
- _hasLibraryDirective2 = true;
+ _containsLibraryDirective = true;
} else if (directive is PartOfDirective) {
- _hasPartOfDirective2 = true;
+ _containsPartOfDirective = true;
}
}
- _unit.lineInfo = _lineInfo;
+ _unit.lineInfo = context.getLineInfo(source);
} finally {
timeCounterParse.stop();
}
}
}
-class Source_ContentReceiver_ParseDartTask_internalPerform implements Source_ContentReceiver {
- final ParseDartTask ParseDartTask_this;
-
- RecordingErrorListener errorListener;
-
- List<Token> token;
-
- Source_ContentReceiver_ParseDartTask_internalPerform(this.ParseDartTask_this, this.errorListener, this.token);
-
- void accept(String contents, int modificationTime) {
- ParseDartTask_this._modificationTime = modificationTime;
- TimeCounter_TimeCounterHandle timeCounterScan = PerformanceStatistics.scan.start();
- try {
- Scanner scanner = new Scanner(ParseDartTask_this.source, new CharSequenceReader(contents), errorListener);
- scanner.preserveComments = ParseDartTask_this.context.analysisOptions.preserveComments;
- token[0] = scanner.tokenize();
- ParseDartTask_this._lineInfo = new LineInfo(scanner.lineStarts);
- } finally {
- timeCounterScan.stop();
- }
- }
-}
-
/**
* Instances of the class `ParseHtmlTask` parse a specific source as an HTML file.
*/
@@ -10140,9 +10998,14 @@
final Source source;
/**
+ * The contents of the source.
+ */
+ String _content;
+
+ /**
* The time at which the contents of the source were last modified.
*/
- int _modificationTime = -1;
+ int _modificationTime = 0;
/**
* The line information that was produced.
@@ -10170,28 +11033,21 @@
static String _ATTRIBUTE_SRC = "src";
/**
- * The name of the 'type' attribute in a HTML tag.
- */
- static String _ATTRIBUTE_TYPE = "type";
-
- /**
* The name of the 'script' tag in an HTML file.
*/
static String _TAG_SCRIPT = "script";
/**
- * The value of the 'type' attribute of a 'script' tag that indicates that the script is written
- * in Dart.
- */
- static String _TYPE_DART = "application/dart";
-
- /**
* Initialize a newly created task to perform analysis within the given context.
*
* @param context the context in which the task is to be performed
* @param source the source to be parsed
+ * @param contentData the time-stamped contents of the source
*/
- ParseHtmlTask(InternalAnalysisContext context, this.source) : super(context);
+ ParseHtmlTask(InternalAnalysisContext context, this.source, TimestampedData<String> contentData) : super(context) {
+ _content = contentData.data;
+ _modificationTime = contentData.modificationTime;
+ }
accept(AnalysisTaskVisitor visitor) => visitor.visitParseHtmlTask(this);
@@ -10241,20 +11097,18 @@
}
void internalPerform() {
- ht.HtmlScanner scanner = new ht.HtmlScanner(source);
try {
- source.getContents(scanner);
+ ht.AbstractScanner scanner = new ht.StringScanner(source, _content);
+ scanner.passThroughElements = <String> [_TAG_SCRIPT];
+ ht.Token token = scanner.tokenize();
+ _lineInfo = new LineInfo(scanner.lineStarts);
+ RecordingErrorListener errorListener = new RecordingErrorListener();
+ _unit = new ht.HtmlParser(source, errorListener).parse(token, _lineInfo);
+ _errors = errorListener.getErrors2(source);
+ _referencedLibraries = librarySources;
} on JavaException catch (exception) {
throw new AnalysisException.con3(exception);
}
- ht.HtmlScanResult scannerResult = scanner.result;
- _modificationTime = scannerResult.modificationTime;
- _lineInfo = new LineInfo(scannerResult.lineStarts);
- RecordingErrorListener errorListener = new RecordingErrorListener();
- ht.HtmlParseResult result = new ht.HtmlParser(source, errorListener).parse(scannerResult);
- _unit = result.htmlUnit;
- _errors = errorListener.getErrors2(source);
- _referencedLibraries = librarySources;
}
/**
@@ -10291,7 +11145,7 @@
Uri uri = new Uri(path: scriptAttribute.text);
String fileName = uri.path;
Source librarySource = ParseHtmlTask_this.context.sourceFactory.resolveUri(ParseHtmlTask_this.source, fileName);
- if (librarySource != null && librarySource.exists()) {
+ if (ParseHtmlTask_this.context.exists(librarySource)) {
libraries.add(librarySource);
}
} on URISyntaxException catch (e) {
@@ -10314,7 +11168,7 @@
/**
* The Angular application to resolve in context of.
*/
- AngularApplicationInfo _application;
+ AngularApplication _application;
/**
* The source to be resolved.
@@ -10344,7 +11198,7 @@
* @param component the component that uses this HTML template, not `null`
* @param application the Angular application to resolve in context of
*/
- ResolveAngularComponentTemplateTask(InternalAnalysisContext context, this.source, AngularComponentElement component, AngularApplicationInfo application) : super(context) {
+ ResolveAngularComponentTemplateTask(InternalAnalysisContext context, this.source, AngularComponentElement component, AngularApplication application) : super(context) {
this._component = component;
this._application = application;
}
@@ -10381,12 +11235,13 @@
RecordingErrorListener errorListener = new RecordingErrorListener();
LineInfo lineInfo = context.getLineInfo(source);
// do resolve
- AngularHtmlUnitResolver resolver = new AngularHtmlUnitResolver(context, errorListener, source, lineInfo, unit);
- resolver.resolveComponentTemplate(_application, _component);
+ if (_application != null) {
+ AngularHtmlUnitResolver resolver = new AngularHtmlUnitResolver(context, errorListener, source, lineInfo, unit);
+ resolver.resolveComponentTemplate(_application, _component);
+ _resolvedUnit = unit;
+ }
// remember errors
_resolutionErrors = errorListener.getErrors2(source);
- // remember resolved unit
- _resolvedUnit = unit;
}
}
@@ -10401,9 +11256,9 @@
final Source source;
/**
- * The Angular application to resolve in context of.
+ * The listener to record errors.
*/
- AngularApplicationInfo _application;
+ RecordingErrorListener _errorListener = new RecordingErrorListener();
/**
* The time at which the contents of the source were last modified.
@@ -10421,26 +11276,39 @@
HtmlElement _element = null;
/**
- * The resolution errors that were discovered while resolving the source.
+ * The Angular application to resolve in context of.
*/
- List<AnalysisError> _resolutionErrors = AnalysisError.NO_ERRORS;
+ AngularApplication _application;
/**
* Initialize a newly created task to perform analysis within the given context.
*
* @param context the context in which the task is to be performed
* @param source the source to be resolved
- * @param application the Angular application to resolve in context of
*/
- ResolveAngularEntryHtmlTask(InternalAnalysisContext context, this.source, AngularApplicationInfo application) : super(context) {
- this._application = application;
- }
+ ResolveAngularEntryHtmlTask(InternalAnalysisContext context, this.source) : super(context);
accept(AnalysisTaskVisitor visitor) => visitor.visitResolveAngularEntryHtmlTask(this);
+ /**
+ * Returns the [AngularApplication] for the Web application with this Angular entry point,
+ * maybe `null` if not an Angular entry point.
+ */
+ AngularApplication get application => _application;
+
HtmlElement get element => _element;
/**
+ * The resolution errors that were discovered while resolving the source.
+ */
+ List<AnalysisError> get entryErrors => _errorListener.getErrors2(source);
+
+ /**
+ * Returns [AnalysisError]s recorded for the given [Source].
+ */
+ List<AnalysisError> getErrors(Source source) => _errorListener.getErrors2(source);
+
+ /**
* Return the time at which the contents of the source that was parsed were last modified, or a
* negative value if the task has not yet been performed or if an exception occurred.
*
@@ -10448,8 +11316,6 @@
*/
int get modificationTime => _modificationTime;
- List<AnalysisError> get resolutionErrors => _resolutionErrors;
-
/**
* Return the [HtmlUnit] that was resolved by this task.
*
@@ -10472,12 +11338,13 @@
}
_modificationTime = resolvableHtmlUnit.modificationTime;
// prepare for resolution
- RecordingErrorListener errorListener = new RecordingErrorListener();
LineInfo lineInfo = context.getLineInfo(source);
+ // try to resolve as an Angular entry point
+ _application = new AngularHtmlUnitResolver(context, _errorListener, source, lineInfo, unit).calculateAngularApplication();
// do resolve
- new AngularHtmlUnitResolver(context, errorListener, source, lineInfo, unit).resolveEntryPoint(_application);
- // remember errors
- _resolutionErrors = errorListener.getErrors2(source);
+ if (_application != null) {
+ new AngularHtmlUnitResolver(context, _errorListener, source, lineInfo, unit).resolveEntryPoint(_application);
+ }
// remember resolved unit
_resolvedUnit = unit;
}
@@ -10563,14 +11430,11 @@
}
void internalPerform() {
- ResolvableCompilationUnit unit = context.computeResolvableCompilationUnit(source);
+ TimestampedData<CompilationUnit> unit = context.internalParseCompilationUnit(source);
_modificationTime = unit.modificationTime;
- //
- // Then parse the token stream.
- //
TimeCounter_TimeCounterHandle timeCounterParse = PerformanceStatistics.parse.start();
try {
- for (Directive directive in unit.compilationUnit.directives) {
+ for (Directive directive in unit.data.directives) {
if (directive is ExportDirective) {
Source exportSource = resolveSource(source, directive);
if (exportSource != null) {
@@ -10854,16 +11718,6 @@
List<AnalysisError> _resolutionErrors = AnalysisError.NO_ERRORS;
/**
- * The flag that says is this unit is an Angular application.
- */
- bool _isAngularApplication2 = false;
-
- /**
- * The Angular application information, maybe `null`
- */
- AngularApplicationInfo _angularApplication;
-
- /**
* Initialize a newly created task to perform analysis within the given context.
*
* @param context the context in which the task is to be performed
@@ -10873,12 +11727,6 @@
accept(AnalysisTaskVisitor visitor) => visitor.visitResolveHtmlTask(this);
- /**
- * Returns the [AngularApplicationInfo] for the Web application with this Angular entry
- * point, maybe `null` if not an Angular entry point.
- */
- AngularApplicationInfo get angularApplication => _angularApplication;
-
HtmlElement get element => _element;
/**
@@ -10898,11 +11746,6 @@
*/
ht.HtmlUnit get resolvedUnit => _resolvedUnit;
- /**
- * Returns `true` if analyzed unit is an Angular application.
- */
- bool get isAngularApplication => _isAngularApplication2;
-
String get taskDescription {
if (source == null) {
return "resolve as html null source";
@@ -10921,12 +11764,6 @@
HtmlUnitBuilder builder = new HtmlUnitBuilder(context);
_element = builder.buildHtmlElement2(source, _modificationTime, unit);
RecordingErrorListener errorListener = builder.errorListener;
- LineInfo lineInfo = context.getLineInfo(source);
- // try to resolve as an Angular entry point
- if (context.analysisOptions.analyzeAngular) {
- _isAngularApplication2 = AngularHtmlUnitResolver.hasAngularAnnotation(unit);
- _angularApplication = new AngularHtmlUnitResolver(context, errorListener, source, lineInfo, unit).calculateAngularApplication();
- }
// record all resolution errors
_resolutionErrors = errorListener.getErrors2(source);
// remember resolved unit
@@ -10935,12 +11772,145 @@
}
/**
+ * Instances of the class `ScanDartTask` scan a specific source as a Dart file.
+ */
+class ScanDartTask extends AnalysisTask {
+ /**
+ * The source to be scanned.
+ */
+ final Source source;
+
+ /**
+ * The contents of the source.
+ */
+ String _content;
+
+ /**
+ * The time at which the contents of the source were last modified.
+ */
+ int _modificationTime = 0;
+
+ /**
+ * The token stream that was produced by scanning the source.
+ */
+ Token _tokenStream;
+
+ /**
+ * The line information that was produced.
+ */
+ LineInfo _lineInfo;
+
+ /**
+ * The errors that were produced by scanning the source.
+ */
+ List<AnalysisError> _errors = AnalysisError.NO_ERRORS;
+
+ /**
+ * Initialize a newly created task to perform analysis within the given context.
+ *
+ * @param context the context in which the task is to be performed
+ * @param source the source to be parsed
+ * @param contentData the time-stamped contents of the source
+ */
+ ScanDartTask(InternalAnalysisContext context, this.source, TimestampedData<String> contentData) : super(context) {
+ this._content = contentData.data;
+ this._modificationTime = contentData.modificationTime;
+ }
+
+ accept(AnalysisTaskVisitor visitor) => visitor.visitScanDartTask(this);
+
+ /**
+ * Return the errors that were produced by scanning the source, or `null` if the task has
+ * not yet been performed or if an exception occurred.
+ *
+ * @return the errors that were produced by scanning the source
+ */
+ List<AnalysisError> get errors => _errors;
+
+ /**
+ * Return the line information that was produced, or `null` if the task has not yet been
+ * performed or if an exception occurred.
+ *
+ * @return the line information that was produced
+ */
+ LineInfo get lineInfo => _lineInfo;
+
+ /**
+ * Return the time at which the contents of the source that was parsed were last modified, or a
+ * negative value if the task has not yet been performed or if an exception occurred.
+ *
+ * @return the time at which the contents of the source that was parsed were last modified
+ */
+ int get modificationTime => _modificationTime;
+
+ /**
+ * Return the token stream that was produced by scanning the source, or `null` if the task
+ * has not yet been performed or if an exception occurred.
+ *
+ * @return the token stream that was produced by scanning the source
+ */
+ Token get tokenStream => _tokenStream;
+
+ String get taskDescription {
+ if (source == null) {
+ return "scan as dart null source";
+ }
+ return "scan as dart ${source.fullName}";
+ }
+
+ void internalPerform() {
+ RecordingErrorListener errorListener = new RecordingErrorListener();
+ TimeCounter_TimeCounterHandle timeCounterScan = PerformanceStatistics.scan.start();
+ try {
+ Scanner scanner = new Scanner(source, new CharSequenceReader(_content), errorListener);
+ scanner.preserveComments = context.analysisOptions.preserveComments;
+ _tokenStream = scanner.tokenize();
+ _lineInfo = new LineInfo(scanner.lineStarts);
+ _errors = errorListener.getErrors2(source);
+ } on JavaException catch (exception) {
+ throw new AnalysisException.con3(exception);
+ } finally {
+ timeCounterScan.stop();
+ }
+ }
+}
+
+/**
+ * The unique instances of the class `WaitForAsyncTask` represents a state in which there is
+ * no analysis work that can be done until some asynchronous task (such as IO) has completed, but
+ * where analysis is not yet complete.
+ */
+class WaitForAsyncTask extends AnalysisTask {
+ /**
+ * The unique instance of this class.
+ */
+ static WaitForAsyncTask _UniqueInstance = new WaitForAsyncTask();
+
+ /**
+ * Return the unique instance of this class.
+ *
+ * @return the unique instance of this class
+ */
+ static WaitForAsyncTask get instance => _UniqueInstance;
+
+ /**
+ * Prevent the creation of instances of this class.
+ */
+ WaitForAsyncTask() : super(null);
+
+ accept(AnalysisTaskVisitor visitor) => null;
+
+ String get taskDescription => "Waiting for async analysis";
+
+ void internalPerform() {
+ }
+}
+
+/**
* The interface `Logger` defines the behavior of objects that can be used to receive
* information about errors within the analysis engine. Implementations usually write this
* information to a file, but can also record the information for later use (such as during testing)
* or even ignore the information.
- *
- * @coverage dart.engine.utilities
*/
abstract class Logger {
static final Logger NULL = new Logger_NullLogger();
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 70408c6..031254b 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -10,14 +10,12 @@
import 'java_core.dart';
import 'source.dart';
import 'scanner.dart' show Token;
-import 'ast.dart' show ASTNode;
+import 'ast.dart' show AstNode;
import 'element.dart' show Element;
/**
* Instances of the enumeration `ErrorSeverity` represent the severity of an [ErrorCode]
* .
- *
- * @coverage dart.engine.error
*/
class ErrorSeverity extends Enum<ErrorSeverity> {
/**
@@ -210,12 +208,12 @@
*/
AngularCode.con2(String name, int ordinal, String message, ErrorSeverity severity) : super(name, ordinal) {
this._message = message;
- this._severity = severity;
+ this._severity = ErrorSeverity.INFO;
}
String get correction => null;
- ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
+ ErrorSeverity get errorSeverity => _severity;
String get message => _message;
@@ -225,8 +223,6 @@
/**
* Instances of the class `ErrorReporter` wrap an error listener with utility methods used to
* create the errors being reported.
- *
- * @coverage dart.engine.error
*/
class ErrorReporter {
/**
@@ -268,7 +264,7 @@
* @param node the node specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, ASTNode node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source, node.offset, node.length, errorCode, arguments);
+ AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, AstNode node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source, node.offset, node.length, errorCode, arguments);
/**
* Report a passed error.
@@ -286,8 +282,8 @@
* @param node the node specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError3(ErrorCode errorCode, ASTNode node, List<Object> arguments) {
- reportError5(errorCode, node.offset, node.length, arguments);
+ void reportError2(ErrorCode errorCode, AstNode node, List<Object> arguments) {
+ reportError4(errorCode, node.offset, node.length, arguments);
}
/**
@@ -297,8 +293,8 @@
* @param element the element which name should be used as the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError4(ErrorCode errorCode, Element element, List<Object> arguments) {
- reportError5(errorCode, element.nameOffset, element.displayName.length, arguments);
+ void reportError3(ErrorCode errorCode, Element element, List<Object> arguments) {
+ reportError4(errorCode, element.nameOffset, element.displayName.length, arguments);
}
/**
@@ -309,7 +305,7 @@
* @param length the length of the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError5(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
+ void reportError4(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
_errorListener.onError(new AnalysisError.con2(_source, offset, length, errorCode, arguments));
}
@@ -320,8 +316,8 @@
* @param token the token specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError6(ErrorCode errorCode, Token token, List<Object> arguments) {
- reportError5(errorCode, token.offset, token.length, arguments);
+ void reportError5(ErrorCode errorCode, Token token, List<Object> arguments) {
+ reportError4(errorCode, token.offset, token.length, arguments);
}
/**
@@ -340,7 +336,6 @@
* some Dart code.
*
* @see AnalysisErrorListener
- * @coverage dart.engine.error
*/
class AnalysisError {
/**
@@ -656,7 +651,22 @@
*
* @param returnType the name of the declared return type
*/
- static final HintCode MISSING_RETURN = new HintCode.con2('MISSING_RETURN', 10, "This function declares a return type of '%s', but does not end with a return statement.", "Either add a return statement or change the return type to 'void'.");
+ static final HintCode MISSING_RETURN = new HintCode.con2('MISSING_RETURN', 10, "This function declares a return type of '%s', but does not end with a return statement", "Either add a return statement or change the return type to 'void'");
+
+ /**
+ * A getter with the override annotation does not override an existing getter.
+ */
+ static final HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = new HintCode.con1('OVERRIDE_ON_NON_OVERRIDING_GETTER', 11, "Getter does not override an inherited getter");
+
+ /**
+ * A method with the override annotation does not override an existing method.
+ */
+ static final HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = new HintCode.con1('OVERRIDE_ON_NON_OVERRIDING_METHOD', 12, "Method does not override an inherited method");
+
+ /**
+ * A setter with the override annotation does not override an existing setter.
+ */
+ static final HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = new HintCode.con1('OVERRIDE_ON_NON_OVERRIDING_SETTER', 13, "Setter does not override an inherited setter");
/**
* It is not in best practice to declare a private method that happens to override the method in a
@@ -667,24 +677,24 @@
* @param memberName some private member name
* @param className the class name where the member is overriding the functionality
*/
- static final HintCode OVERRIDDING_PRIVATE_MEMBER = new HintCode.con1('OVERRIDDING_PRIVATE_MEMBER', 11, "The %s '%s' does not override the definition from '%s' because it is private and in a different library");
+ static final HintCode OVERRIDDING_PRIVATE_MEMBER = new HintCode.con1('OVERRIDDING_PRIVATE_MEMBER', 14, "The %s '%s' does not override the definition from '%s' because it is private and in a different library");
/**
* Hint for classes that override equals, but not hashCode.
*
* @param className the name of the current class
*/
- static final HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = new HintCode.con1('OVERRIDE_EQUALS_BUT_NOT_HASH_CODE', 12, "The class '%s' overrides 'operator==', but not 'get hashCode'");
+ static final HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = new HintCode.con1('OVERRIDE_EQUALS_BUT_NOT_HASH_CODE', 15, "The class '%s' overrides 'operator==', but not 'get hashCode'");
/**
* Type checks of the type `x is! Null` should be done with `x != null`.
*/
- static final HintCode TYPE_CHECK_IS_NOT_NULL = new HintCode.con1('TYPE_CHECK_IS_NOT_NULL', 13, "Tests for non-null should be done with '!= null'");
+ static final HintCode TYPE_CHECK_IS_NOT_NULL = new HintCode.con1('TYPE_CHECK_IS_NOT_NULL', 16, "Tests for non-null should be done with '!= null'");
/**
* Type checks of the type `x is Null` should be done with `x == null`.
*/
- static final HintCode TYPE_CHECK_IS_NULL = new HintCode.con1('TYPE_CHECK_IS_NULL', 14, "Tests for null should be done with '== null'");
+ static final HintCode TYPE_CHECK_IS_NULL = new HintCode.con1('TYPE_CHECK_IS_NULL', 17, "Tests for null should be done with '== null'");
/**
* This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_GETTER] or
@@ -696,7 +706,7 @@
* @see StaticTypeWarningCode#UNDEFINED_GETTER
* @see StaticWarningCode#UNDEFINED_GETTER
*/
- static final HintCode UNDEFINED_GETTER = new HintCode.con1('UNDEFINED_GETTER', 15, StaticTypeWarningCode.UNDEFINED_GETTER.message);
+ static final HintCode UNDEFINED_GETTER = new HintCode.con1('UNDEFINED_GETTER', 18, StaticTypeWarningCode.UNDEFINED_GETTER.message);
/**
* This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_METHOD] would
@@ -706,7 +716,7 @@
* @param typeName the resolved type name that the method lookup is happening on
* @see StaticTypeWarningCode#UNDEFINED_METHOD
*/
- static final HintCode UNDEFINED_METHOD = new HintCode.con1('UNDEFINED_METHOD', 16, StaticTypeWarningCode.UNDEFINED_METHOD.message);
+ static final HintCode UNDEFINED_METHOD = new HintCode.con1('UNDEFINED_METHOD', 19, StaticTypeWarningCode.UNDEFINED_METHOD.message);
/**
* This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_OPERATOR]
@@ -716,7 +726,7 @@
* @param enclosingType the name of the enclosing type where the operator is being looked for
* @see StaticTypeWarningCode#UNDEFINED_OPERATOR
*/
- static final HintCode UNDEFINED_OPERATOR = new HintCode.con1('UNDEFINED_OPERATOR', 17, StaticTypeWarningCode.UNDEFINED_OPERATOR.message);
+ static final HintCode UNDEFINED_OPERATOR = new HintCode.con1('UNDEFINED_OPERATOR', 20, StaticTypeWarningCode.UNDEFINED_OPERATOR.message);
/**
* This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_SETTER] or
@@ -728,27 +738,27 @@
* @see StaticTypeWarningCode#UNDEFINED_SETTER
* @see StaticWarningCode#UNDEFINED_SETTER
*/
- static final HintCode UNDEFINED_SETTER = new HintCode.con1('UNDEFINED_SETTER', 18, StaticTypeWarningCode.UNDEFINED_SETTER.message);
+ static final HintCode UNDEFINED_SETTER = new HintCode.con1('UNDEFINED_SETTER', 21, StaticTypeWarningCode.UNDEFINED_SETTER.message);
/**
* Unnecessary cast.
*/
- static final HintCode UNNECESSARY_CAST = new HintCode.con1('UNNECESSARY_CAST', 19, "Unnecessary cast");
+ static final HintCode UNNECESSARY_CAST = new HintCode.con1('UNNECESSARY_CAST', 22, "Unnecessary cast");
/**
* Unnecessary type checks, the result is always true.
*/
- static final HintCode UNNECESSARY_TYPE_CHECK_FALSE = new HintCode.con1('UNNECESSARY_TYPE_CHECK_FALSE', 20, "Unnecessary type check, the result is always false");
+ static final HintCode UNNECESSARY_TYPE_CHECK_FALSE = new HintCode.con1('UNNECESSARY_TYPE_CHECK_FALSE', 23, "Unnecessary type check, the result is always false");
/**
* Unnecessary type checks, the result is always false.
*/
- static final HintCode UNNECESSARY_TYPE_CHECK_TRUE = new HintCode.con1('UNNECESSARY_TYPE_CHECK_TRUE', 21, "Unnecessary type check, the result is always true");
+ static final HintCode UNNECESSARY_TYPE_CHECK_TRUE = new HintCode.con1('UNNECESSARY_TYPE_CHECK_TRUE', 24, "Unnecessary type check, the result is always true");
/**
* Unused imports are imports which are never not used.
*/
- static final HintCode UNUSED_IMPORT = new HintCode.con1('UNUSED_IMPORT', 22, "Unused import");
+ static final HintCode UNUSED_IMPORT = new HintCode.con1('UNUSED_IMPORT', 25, "Unused import");
/**
* Hint for cases where the source expects a method or function to return a non-void result, but
@@ -756,7 +766,7 @@
*
* @param name the name of the method or function that returns void
*/
- static final HintCode USE_OF_VOID_RESULT = new HintCode.con1('USE_OF_VOID_RESULT', 23, "The result of '%s' is being used, even though it is declared to be 'void'");
+ static final HintCode USE_OF_VOID_RESULT = new HintCode.con1('USE_OF_VOID_RESULT', 26, "The result of '%s' is being used, even though it is declared to be 'void'");
static final List<HintCode> values = [
DEAD_CODE,
@@ -770,6 +780,9 @@
IS_NOT_DOUBLE,
IS_NOT_INT,
MISSING_RETURN,
+ OVERRIDE_ON_NON_OVERRIDING_GETTER,
+ OVERRIDE_ON_NON_OVERRIDING_METHOD,
+ OVERRIDE_ON_NON_OVERRIDING_SETTER,
OVERRIDDING_PRIVATE_MEMBER,
OVERRIDE_EQUALS_BUT_NOT_HASH_CODE,
TYPE_CHECK_IS_NOT_NULL,
@@ -826,8 +839,6 @@
* Generally, we want to provide messages that consist of three sentences: 1. what is wrong, 2. why
* is it wrong, and 3. how do I fix it. However, we combine the first two in the result of
* [getMessage] and the last in the result of [getCorrection].
- *
- * @coverage dart.engine.error
*/
abstract class ErrorCode {
/**
@@ -864,8 +875,6 @@
/**
* Instances of the enumeration `ErrorType` represent the type of an [ErrorCode].
- *
- * @coverage dart.engine.error
*/
class ErrorType extends Enum<ErrorType> {
/**
@@ -943,8 +952,6 @@
* errors. The convention for this class is for the name of the error code to indicate the problem
* that caused the error to be generated and for the error message to explain what is wrong and,
* when appropriate, how the problem can be corrected.
- *
- * @coverage dart.engine.error
*/
class CompileTimeErrorCode extends Enum<CompileTimeErrorCode> implements ErrorCode {
/**
@@ -1609,11 +1616,9 @@
/**
* 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i> ...
* <i>e<sub>n</sub></i>] is evaluated as follows:
- *
* * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument
* <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i>
*
- *
* 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
* <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 <= i <=
* n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
@@ -1625,11 +1630,9 @@
/**
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> :
* <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
- *
* * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
* argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i>
*
- *
* 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
* <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 <= i <=
* n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
@@ -1641,11 +1644,9 @@
/**
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> :
* <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
- *
* * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
* argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i>
*
- *
* 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
* <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 <= i <=
* n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
@@ -2364,8 +2365,6 @@
* convention for this class is for the name of the error code to indicate the problem that caused
* the error to be generated and for the error message to explain what is wrong and, when
* appropriate, how the problem can be corrected.
- *
- * @coverage dart.engine.error
*/
class StaticWarningCode extends Enum<StaticWarningCode> implements ErrorCode {
/**
@@ -2421,7 +2420,7 @@
* to be thrown, because no setter is defined for it. The assignment will also give rise to a
* static warning for the same reason.
*/
- static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode.con1('ASSIGNMENT_TO_FINAL', 3, "Final variables cannot be assigned a value");
+ static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode.con1('ASSIGNMENT_TO_FINAL', 3, "'%s' cannot be used as a setter, it is final");
/**
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
@@ -2451,11 +2450,9 @@
* 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i>N</i> would be
* introduced into the top level scope of <i>L</i> by an import from a library whose URI begins
* with <i>dart:</i> and an import from a library whose URI does not begin with <i>dart:</i>:
- *
* * The import from <i>dart:</i> is implicitly extended by a hide N clause.
* * A static warning is issued.
*
- *
* @param ambiguousName the ambiguous name
* @param sdkLibraryName the name of the dart: library that the element is found
* @param otherLibraryName the name of the non-dart: library that the element is found
@@ -2576,10 +2573,8 @@
* 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declared in the
* immediately enclosing class must have an initializer in <i>k</i>'s initializer list unless it
* has already been initialized by one of the following means:
- *
* * Initialization at the declaration of <i>f</i>.
* * Initialization by means of an initializing formal of <i>k</i>.
- *
* or a static warning occurs.
*
* @param name the name of the uninitialized final variable
@@ -2741,11 +2736,9 @@
/**
* 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i> ...
* <i>e<sub>n</sub></i>] is evaluated as follows:
- *
* * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument
* <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i>
*
- *
* 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
* <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 <= i <=
* n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
@@ -2757,11 +2750,9 @@
/**
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> :
* <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
- *
* * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
* argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i>
*
- *
* 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
* <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 <= i <=
* n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
@@ -2773,11 +2764,9 @@
/**
* 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</sub></i> :
* <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
- *
* * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
* argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i>
*
- *
* 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
* <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 <= i <=
* n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
@@ -2871,7 +2860,7 @@
* @param memberName the name of the fourth member
* @param additionalCount the number of additional missing members that aren't listed
*/
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', 49, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more");
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', 49, "Missing concrete implementation of '%s', '%s', '%s', '%s' and %d more");
/**
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2890,7 +2879,7 @@
* @param memberName the name of the third member
* @param memberName the name of the fourth member
*/
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 50, "Missing inherited members: '%s', '%s', '%s' and '%s'");
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 50, "Missing concrete implementation of '%s', '%s', '%s' and '%s'");
/**
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2906,7 +2895,7 @@
*
* @param memberName the name of the member
*/
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 51, "Missing inherited member '%s'");
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 51, "Missing concrete implementation of '%s'");
/**
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2924,7 +2913,7 @@
* @param memberName the name of the second member
* @param memberName the name of the third member
*/
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 52, "Missing inherited members: '%s', '%s' and '%s'");
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 52, "Missing concrete implementation of '%s', '%s' and '%s'");
/**
* 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2941,7 +2930,7 @@
* @param memberName the name of the first member
* @param memberName the name of the second member
*/
- static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 53, "Missing inherited members: '%s' and '%s'");
+ static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 53, "Missing concrete implementation of '%s' and '%s'");
/**
* 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<sub>2</sub>) s</i> or
@@ -2970,7 +2959,6 @@
* <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type parameter in the
* enclosing lexical scope, but occurs in the signature or body of a static member. *
* <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<sub>n</sub>></i>,
- * and <i>G</i> is malformed.
*
* Any use of a malformed type gives rise to a static warning.
*
@@ -3252,8 +3240,6 @@
/**
* The interface `AnalysisErrorListener` defines the behavior of objects that listen for
* [AnalysisError] being produced by the analysis engine.
- *
- * @coverage dart.engine.error
*/
abstract class AnalysisErrorListener {
/**
@@ -3279,8 +3265,6 @@
* The convention for this class is for the name of the error code to indicate the problem that
* caused the error to be generated and for the error message to explain what is wrong and, when
* appropriate, how the problem can be corrected.
- *
- * @coverage dart.engine.error
*/
class HtmlWarningCode extends Enum<HtmlWarningCode> implements ErrorCode {
/**
@@ -3341,8 +3325,6 @@
* warnings. The convention for this class is for the name of the error code to indicate the problem
* that caused the error to be generated and for the error message to explain what is wrong and,
* when appropriate, how the problem can be corrected.
- *
- * @coverage dart.engine.error
*/
class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements ErrorCode {
/**
@@ -3389,7 +3371,7 @@
* * Otherwise none of the members <i>m<sub>1</sub>, …, m<sub>k</sub></i> is inherited.
* </ol>
*/
- static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new StaticTypeWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE', 3, "'%s' is inherited by at least two interfaces inconsistently");
+ static final StaticTypeWarningCode INCONSISTENT_METHOD_INHERITANCE = new StaticTypeWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE', 3, "'%s' is inherited by at least two interfaces inconsistently, from %s");
/**
* 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does not have an
diff --git a/pkg/analyzer/lib/src/generated/html.dart b/pkg/analyzer/lib/src/generated/html.dart
index 2d511c1..97df6cd 100644
--- a/pkg/analyzer/lib/src/generated/html.dart
+++ b/pkg/analyzer/lib/src/generated/html.dart
@@ -21,8 +21,6 @@
/**
* Instances of the class `Token` represent a token that was scanned from the input. Each
* token knows which token follows it, acting as the head of a linked list of tokens.
- *
- * @coverage dart.engine.html
*/
class Token {
/**
@@ -156,7 +154,7 @@
int get offset => expression.offset;
XmlExpression_Reference getReference(int offset) {
- ASTNode node = new NodeLocator.con1(offset).searchWithin(expression);
+ AstNode node = new NodeLocator.con1(offset).searchWithin(expression);
if (node != null) {
Element element = ElementLocator.locate(node);
return new XmlExpression_Reference(element, node.offset, node.length);
@@ -166,29 +164,6 @@
}
/**
- * Instances of `HtmlParseResult` hold the result of parsing an HTML file.
- *
- * @coverage dart.engine.html
- */
-class HtmlParseResult extends HtmlScanResult {
- /**
- * The unit containing the parsed information (not `null`).
- */
- HtmlUnit _unit;
-
- HtmlParseResult(int modificationTime, Token token, List<int> lineStarts, HtmlUnit unit) : super(modificationTime, token, lineStarts) {
- this._unit = unit;
- }
-
- /**
- * Answer the unit generated by parsing the source
- *
- * @return the unit (not `null`)
- */
- HtmlUnit get htmlUnit => _unit;
-}
-
-/**
* Instances of the class `RecursiveXmlVisitor` implement an XML visitor that will recursively
* visit all of the nodes in an XML structure. For example, using an instance of this class to visit
* a [XmlTagNode] will also cause all of the contained [XmlAttributeNode]s and
@@ -197,8 +172,6 @@
* Subclasses that override a visit method must either invoke the overridden visit method or must
* explicitly ask the visited node to visit its children. Failure to do so will cause the children
* of the visited node to not be visited.
- *
- * @coverage dart.engine.html
*/
class RecursiveXmlVisitor<R> implements XmlVisitor<R> {
R visitHtmlScriptTagNode(HtmlScriptTagNode node) {
@@ -312,12 +285,12 @@
}
/**
- * Returns the [Expression] that is part of the given root [ASTNode] and encloses the
+ * Returns the [Expression] that is part of the given root [AstNode] and encloses the
* given offset.
*/
- static Expression getExpressionAt(ASTNode root, int offset) {
+ static Expression getExpressionAt(AstNode root, int offset) {
if (root.offset <= offset && offset < root.end) {
- ASTNode dartNode = new NodeLocator.con1(offset).searchWithin(root);
+ AstNode dartNode = new NodeLocator.con1(offset).searchWithin(root);
if (dartNode is Expression) {
return dartNode;
}
@@ -438,8 +411,6 @@
/**
* The abstract class `XmlNode` defines behavior common to all XML/HTML nodes.
- *
- * @coverage dart.engine.html
*/
abstract class XmlNode {
/**
@@ -657,8 +628,6 @@
/**
* The abstract class `AbstractScanner` implements a scanner for HTML code. Subclasses are
* required to implement the interface used to access the characters being scanned.
- *
- * @coverage dart.engine.html
*/
abstract class AbstractScanner {
static List<String> _NO_PASS_THROUGH_ELEMENTS = <String> [];
@@ -976,34 +945,8 @@
}
/**
- * Instances of `HtmlScanResult` hold the result of scanning an HTML file.
- *
- * @coverage dart.engine.html
- */
-class HtmlScanResult {
- /**
- * The time at which the contents of the source were last set.
- */
- final int modificationTime;
-
- /**
- * The first token in the token stream (not `null`).
- */
- final Token token;
-
- /**
- * The line start information that was produced.
- */
- final List<int> lineStarts;
-
- HtmlScanResult(this.modificationTime, this.token, this.lineStarts);
-}
-
-/**
* Instances of the class `StringScanner` implement a scanner that reads from a string. The
* scanning logic is in the superclass.
- *
- * @coverage dart.engine.html
*/
class StringScanner extends AbstractScanner {
/**
@@ -1060,8 +1003,6 @@
/**
* Instances of the class `ToSourceVisitor` write a source representation of a visited XML
* node (and all of it's children) to a writer.
- *
- * @coverage dart.engine.html
*/
class ToSourceVisitor implements XmlVisitor<Object> {
/**
@@ -1140,8 +1081,6 @@
/**
* The enumeration `TokenType` defines the types of tokens that can be returned by the
* scanner.
- *
- * @coverage dart.engine.html
*/
class TokenType extends Enum<TokenType> {
/**
@@ -1202,8 +1141,6 @@
/**
* Instances of `XmlAttributeNode` represent name/value pairs owned by an [XmlTagNode].
- *
- * @coverage dart.engine.html
*/
class XmlAttributeNode extends XmlNode {
Token _name;
@@ -1293,8 +1230,6 @@
/**
* The interface `XmlVisitor` defines the behavior of objects that can be used to visit an
* [XmlNode] structure.
- *
- * @coverage dart.engine.html
*/
abstract class XmlVisitor<R> {
R visitHtmlScriptTagNode(HtmlScriptTagNode node);
@@ -1366,69 +1301,8 @@
}
/**
- * Instances of `HtmlScanner` receive and scan HTML content from a [Source].<br/>
- * For example, the following code scans HTML source and returns the result:
- *
- * <pre>
- * HtmlScanner scanner = new HtmlScanner(source);
- * source.getContents(scanner);
- * return scanner.getResult();
- * </pre>
- *
- * @coverage dart.engine.html
- */
-class HtmlScanner implements Source_ContentReceiver {
- List<String> _SCRIPT_TAG = <String> ["script"];
-
- /**
- * The source being scanned (not `null`)
- */
- Source _source;
-
- /**
- * The time at which the contents of the source were last set.
- */
- int _modificationTime = 0;
-
- /**
- * The scanner used to scan the source
- */
- AbstractScanner _scanner;
-
- /**
- * The first token in the token stream.
- */
- Token _token;
-
- /**
- * Construct a new instance to scan the specified source.
- *
- * @param source the source to be scanned (not `null`)
- */
- HtmlScanner(Source source) {
- this._source = source;
- }
-
- void accept(String contents, int modificationTime) {
- this._modificationTime = modificationTime;
- _scanner = new StringScanner(_source, contents);
- _scanner.passThroughElements = _SCRIPT_TAG;
- _token = _scanner.tokenize();
- }
-
- /**
- * Answer the result of scanning the source
- *
- * @return the result (not `null`)
- */
- HtmlScanResult get result => new HtmlScanResult(_modificationTime, _token, _scanner.lineStarts);
-}
-
-/**
* Instances of the class `XmlParser` are used to parse tokens into a AST structure comprised
* of [XmlNode]s.
- *
- * @coverage dart.engine.html
*/
class XmlParser {
/**
@@ -1491,22 +1365,20 @@
List<XmlTagNode> parseTopTagNodes(Token firstToken) {
_currentToken = firstToken;
List<XmlTagNode> tagNodes = new List<XmlTagNode>();
- while (true) {
- while (true) {
- if (_currentToken.type == TokenType.LT) {
- tagNodes.add(parseTagNode());
- } else if (_currentToken.type == TokenType.DECLARATION || _currentToken.type == TokenType.DIRECTIVE || _currentToken.type == TokenType.COMMENT) {
- // ignored tokens
- _currentToken = _currentToken.next;
- } else if (_currentToken.type == TokenType.EOF) {
- return tagNodes;
- } else {
- reportUnexpectedToken();
- _currentToken = _currentToken.next;
- }
- break;
+ TokenType type = _currentToken.type;
+ while (type != TokenType.EOF) {
+ if (identical(type, TokenType.LT)) {
+ tagNodes.add(parseTagNode());
+ } else if (identical(type, TokenType.DECLARATION) || identical(type, TokenType.DIRECTIVE) || identical(type, TokenType.COMMENT)) {
+ // ignored tokens
+ _currentToken = _currentToken.next;
+ } else {
+ reportUnexpectedToken();
+ _currentToken = _currentToken.next;
}
+ type = _currentToken.type;
}
+ return tagNodes;
}
/**
@@ -1572,19 +1444,16 @@
return XmlTagNode.NO_ATTRIBUTES;
}
List<XmlAttributeNode> attributes = new List<XmlAttributeNode>();
- while (true) {
- while (true) {
- if (_currentToken.type == TokenType.GT || _currentToken.type == TokenType.SLASH_GT || _currentToken.type == TokenType.EOF) {
- return attributes;
- } else if (_currentToken.type == TokenType.TAG) {
- attributes.add(parseAttribute());
- } else {
- reportUnexpectedToken();
- _currentToken = _currentToken.next;
- }
- break;
+ while (type != TokenType.GT && type != TokenType.SLASH_GT && type != TokenType.EOF) {
+ if (identical(type, TokenType.TAG)) {
+ attributes.add(parseAttribute());
+ } else {
+ reportUnexpectedToken();
+ _currentToken = _currentToken.next;
}
+ type = _currentToken.type;
}
+ return attributes;
}
/**
@@ -1599,22 +1468,19 @@
return XmlTagNode.NO_TAG_NODES;
}
List<XmlTagNode> nodes = new List<XmlTagNode>();
- while (true) {
- while (true) {
- if (_currentToken.type == TokenType.LT) {
- nodes.add(parseTagNode());
- } else if (_currentToken.type == TokenType.LT_SLASH || _currentToken.type == TokenType.EOF) {
- return nodes;
- } else if (_currentToken.type == TokenType.COMMENT) {
- // ignored token
- _currentToken = _currentToken.next;
- } else {
- reportUnexpectedToken();
- _currentToken = _currentToken.next;
- }
- break;
+ while (type != TokenType.LT_SLASH && type != TokenType.EOF) {
+ if (identical(type, TokenType.LT)) {
+ nodes.add(parseTagNode());
+ } else if (identical(type, TokenType.COMMENT)) {
+ // ignored token
+ _currentToken = _currentToken.next;
+ } else {
+ reportUnexpectedToken();
+ _currentToken = _currentToken.next;
}
+ type = _currentToken.type;
}
+ return nodes;
}
/**
@@ -1695,8 +1561,6 @@
/**
* Instances of `XmlTagNode` represent XML or HTML elements such as `` and
* `<body foo="bar"> ... </body>`.
- *
- * @coverage dart.engine.html
*/
class XmlTagNode extends XmlNode {
/**
@@ -1738,14 +1602,12 @@
/**
* The token (not `null`) after the content, which may be
- *
* * (1) [TokenType#LT_SLASH] for nodes with open and close tags, or
* * (2) the [TokenType#LT] nodeStart of the next sibling node if this node is self
* closing or the attributeEnd is [TokenType#SLASH_GT], or
* * (3) [TokenType#EOF] if the node does not have a closing tag and is the last node in
* the stream [TokenType#LT_SLASH] token after the content, or `null` if there is no
* content and the attributes ended with [TokenType#SLASH_GT].
- *
*/
final Token contentEnd;
@@ -1778,14 +1640,12 @@
* @param tagNodes child tag nodes of the receiver or [NO_TAG_NODES] (not `null`,
* contains no `null`s)
* @param contentEnd the token (not `null`) after the content, which may be
- *
* * (1) [TokenType#LT_SLASH] for nodes with open and close tags, or
* * (2) the [TokenType#LT] nodeStart of the next sibling node if this node is
* self closing or the attributeEnd is [TokenType#SLASH_GT], or
* * (3) [TokenType#EOF] if the node does not have a closing tag and is the last
* node in the stream [TokenType#LT_SLASH] token after the content, or `null`
* if there is no content and the attributes ended with [TokenType#SLASH_GT].
- *
* @param closingTag the closing [TokenType#TAG] after the child elements or `null` if
* there is no content and the attributes ended with [TokenType#SLASH_GT]
* @param nodeEnd the ending [TokenType#GT] or [TokenType#SLASH_GT] token (not
@@ -1930,8 +1790,6 @@
/**
* Instances of the class `HtmlParser` are used to parse tokens into a AST structure comprised
* of [XmlNode]s.
- *
- * @coverage dart.engine.html
*/
class HtmlParser extends XmlParser {
/**
@@ -1997,30 +1855,16 @@
}
/**
- * Parse the tokens specified by the given scan result.
+ * Parse the given tokens.
*
- * @param scanResult the result of scanning an HTML source (not `null`)
+ * @param token the first token in the stream of tokens to be parsed
+ * @param lineInfo the line information created by the scanner
* @return the parse result (not `null`)
*/
- HtmlParseResult parse(HtmlScanResult scanResult) {
- List<int> lineStarts = scanResult.lineStarts;
- _lineInfo = new LineInfo(lineStarts);
- Token firstToken = scanResult.token;
- List<XmlTagNode> tagNodes = parseTopTagNodes(firstToken);
- HtmlUnit unit = new HtmlUnit(firstToken, tagNodes, currentToken);
- return new HtmlParseResult(scanResult.modificationTime, firstToken, scanResult.lineStarts, unit);
- }
-
- /**
- * Scan then parse the specified source.
- *
- * @param source the source to be scanned and parsed (not `null`)
- * @return the parse result (not `null`)
- */
- HtmlParseResult parse2(Source source) {
- HtmlScanner scanner = new HtmlScanner(source);
- source.getContents(scanner);
- return parse(scanner.result);
+ HtmlUnit parse(Token token, LineInfo lineInfo) {
+ this._lineInfo = lineInfo;
+ List<XmlTagNode> tagNodes = parseTopTagNodes(token);
+ return new HtmlUnit(token, tagNodes, currentToken);
}
XmlAttributeNode createAttributeNode(Token name, Token equals, Token value) => new XmlAttributeNode(name, equals, value);
@@ -2072,8 +1916,6 @@
/**
* Instances of the class `HtmlUnit` represent the contents of an HTML file.
- *
- * @coverage dart.engine.html
*/
class HtmlUnit extends XmlNode {
/**
diff --git a/pkg/analyzer/lib/src/generated/index.dart b/pkg/analyzer/lib/src/generated/index.dart
index 12d012ac..5133837 100644
--- a/pkg/analyzer/lib/src/generated/index.dart
+++ b/pkg/analyzer/lib/src/generated/index.dart
@@ -21,8 +21,6 @@
/**
* Instances of the [RemoveSourceOperation] implement an operation that removes from the index
* any data based on the content of a specified source.
- *
- * @coverage dart.engine.index
*/
class RemoveSourceOperation implements IndexOperation {
/**
@@ -55,9 +53,7 @@
bool get isQuery => false;
void performOperation() {
- {
- _indexStore.removeSource(_context, source);
- }
+ _indexStore.removeSource(_context, source);
}
bool removeWhenSourceRemoved(Source source) => false;
@@ -68,8 +64,6 @@
/**
* The interface [IndexOperation] defines the behavior of objects used to perform operations
* on an index.
- *
- * @coverage dart.engine.index
*/
abstract class IndexOperation {
/**
@@ -97,8 +91,6 @@
/**
* [IndexStore] which keeps full index in memory.
- *
- * @coverage dart.engine.index
*/
class MemoryIndexStoreImpl implements MemoryIndexStore {
static Object _WEAK_SET_VALUE = new Object();
@@ -606,8 +598,6 @@
/**
* Instances of the [IndexUnitOperation] implement an operation that adds data to the index
* based on the resolved [CompilationUnit].
- *
- * @coverage dart.engine.index
*/
class IndexUnitOperation implements IndexOperation {
/**
@@ -657,17 +647,15 @@
bool get isQuery => false;
void performOperation() {
- {
- try {
- bool mayIndex = _indexStore.aboutToIndex(_context, _unitElement);
- if (!mayIndex) {
- return;
- }
- unit.accept(new IndexContributor(_indexStore));
- unit.accept(new AngularDartIndexContributor(_indexStore));
- } catch (exception) {
- AnalysisEngine.instance.logger.logError2("Could not index ${unit.element.location}", exception);
+ try {
+ bool mayIndex = _indexStore.aboutToIndex(_context, _unitElement);
+ if (!mayIndex) {
+ return;
}
+ unit.accept(new IndexContributor(_indexStore));
+ unit.accept(new AngularDartIndexContributor(_indexStore));
+ } catch (exception) {
+ AnalysisEngine.instance.logger.logError2("Could not index ${unit.element.location}", exception);
}
}
@@ -720,8 +708,6 @@
/**
* Relationship between an element and a location. Relationships are identified by a globally unique
* identifier.
- *
- * @coverage dart.engine.index
*/
class Relationship {
/**
@@ -741,14 +727,12 @@
* @return the relationship with the given unique identifier
*/
static Relationship getRelationship(String uniqueId) {
- {
- Relationship relationship = _RelationshipMap[uniqueId];
- if (relationship == null) {
- relationship = new Relationship(uniqueId);
- _RelationshipMap[uniqueId] = relationship;
- }
- return relationship;
+ Relationship relationship = _RelationshipMap[uniqueId];
+ if (relationship == null) {
+ relationship = new Relationship(uniqueId);
+ _RelationshipMap[uniqueId] = relationship;
}
+ return relationship;
}
/**
@@ -777,8 +761,6 @@
/**
* Implementation of [Index].
- *
- * @coverage dart.engine.index
*/
class IndexImpl implements Index {
IndexStore _store;
@@ -846,8 +828,6 @@
/**
* Instances of the [RemoveSourcesOperation] implement an operation that removes from the
* index any data based on the content of source belonging to a [SourceContainer].
- *
- * @coverage dart.engine.index
*/
class RemoveSourcesOperation implements IndexOperation {
/**
@@ -880,9 +860,7 @@
bool get isQuery => false;
void performOperation() {
- {
- _indexStore.removeSources(_context, container);
- }
+ _indexStore.removeSources(_context, container);
}
bool removeWhenSourceRemoved(Source source) => false;
@@ -893,8 +871,6 @@
/**
* The interface `UniverseElement` defines element to use when we want to request "defines"
* relations without specifying exact library.
- *
- * @coverage dart.engine.index
*/
abstract class UniverseElement implements Element {
static final UniverseElement INSTANCE = UniverseElementImpl.INSTANCE;
@@ -903,8 +879,6 @@
/**
* Instances of the [OperationProcessor] process the operations on a single
* [OperationQueue]. Each processor can be run one time on a single thread.
- *
- * @coverage dart.engine.index
*/
class OperationProcessor {
/**
@@ -939,14 +913,12 @@
* the processor has been interrupted.
*/
void run() {
- {
- // This processor is, or was, already running on a different thread.
- if (_state != ProcessorState.READY) {
- throw new IllegalStateException("Operation processors can only be run one time");
- }
- // OK, run.
- _state = ProcessorState.RUNNING;
+ // This processor is, or was, already running on a different thread.
+ if (_state != ProcessorState.READY) {
+ throw new IllegalStateException("Operation processors can only be run one time");
}
+ // OK, run.
+ _state = ProcessorState.RUNNING;
try {
while (isRunning) {
// wait for operation
@@ -964,9 +936,7 @@
}
}
} finally {
- {
- _state = ProcessorState.STOPPED;
- }
+ _state = ProcessorState.STOPPED;
}
}
@@ -981,21 +951,17 @@
* started.
*/
List<Source> stop(bool wait) {
- {
- if (identical(_state, ProcessorState.READY)) {
- _state = ProcessorState.STOPPED;
- return unanalyzedSources;
- } else if (identical(_state, ProcessorState.STOPPED)) {
- return unanalyzedSources;
- } else if (identical(_state, ProcessorState.RUNNING)) {
- _state = ProcessorState.STOP_REQESTED;
- }
+ if (identical(_state, ProcessorState.READY)) {
+ _state = ProcessorState.STOPPED;
+ return unanalyzedSources;
+ } else if (identical(_state, ProcessorState.STOPPED)) {
+ return unanalyzedSources;
+ } else if (identical(_state, ProcessorState.RUNNING)) {
+ _state = ProcessorState.STOP_REQESTED;
}
while (wait) {
- {
- if (identical(_state, ProcessorState.STOPPED)) {
- return unanalyzedSources;
- }
+ if (identical(_state, ProcessorState.STOPPED)) {
+ return unanalyzedSources;
}
waitOneMs();
}
@@ -1034,11 +1000,7 @@
*
* @return `true` if this processor is running
*/
- bool get isRunning {
- {
- return identical(_state, ProcessorState.RUNNING);
- }
- }
+ bool get isRunning => identical(_state, ProcessorState.RUNNING);
void threadYield() {
}
@@ -1079,8 +1041,6 @@
/**
* Constants used when populating and accessing the index.
- *
- * @coverage dart.engine.index
*/
abstract class IndexConstants {
/**
@@ -1212,12 +1172,20 @@
* location (the right operand). This is used for methods.
*/
static final Relationship IS_INVOKED_BY_UNQUALIFIED = Relationship.getRelationship("is-invoked-by-unqualified");
+
+ /**
+ * Reference to some [AngularElement].
+ */
+ static final Relationship ANGULAR_REFERENCE = Relationship.getRelationship("angular-reference");
+
+ /**
+ * Reference to some closing tag of an XML element.
+ */
+ static final Relationship ANGULAR_CLOSING_TAG_REFERENCE = Relationship.getRelationship("angular-closing-tag-reference");
}
/**
* Visits resolved [HtmlUnit] and adds relationships into [IndexStore].
- *
- * @coverage dart.engine.index
*/
class AngularHtmlIndexContributor extends ExpressionVisitor {
/**
@@ -1248,7 +1216,7 @@
SimpleIdentifier identifier = expression;
Element element = identifier.bestElement;
if (element is AngularElement) {
- _store.recordRelationship(element, IndexConstants.IS_REFERENCED_BY, createLocation(identifier));
+ _store.recordRelationship(element, IndexConstants.ANGULAR_REFERENCE, createLocationForIdentifier(identifier));
return;
}
}
@@ -1267,8 +1235,8 @@
Element element = node.element;
if (element != null) {
ht.Token nameToken = node.nameToken;
- Location location = createLocation2(nameToken);
- _store.recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
+ Location location = createLocationForToken(nameToken);
+ _store.recordRelationship(element, IndexConstants.ANGULAR_REFERENCE, location);
}
return super.visitXmlAttributeNode(node);
}
@@ -1276,16 +1244,25 @@
Object visitXmlTagNode(ht.XmlTagNode node) {
Element element = node.element;
if (element != null) {
- ht.Token tagToken = node.tagToken;
- Location location = createLocation2(tagToken);
- _store.recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
+ // tag
+ {
+ ht.Token tagToken = node.tagToken;
+ Location location = createLocationForToken(tagToken);
+ _store.recordRelationship(element, IndexConstants.ANGULAR_REFERENCE, location);
+ }
+ // maybe add closing tag range
+ ht.Token closingTag = node.closingTag;
+ if (closingTag != null) {
+ Location location = createLocationForToken(closingTag);
+ _store.recordRelationship(element, IndexConstants.ANGULAR_CLOSING_TAG_REFERENCE, location);
+ }
}
return super.visitXmlTagNode(node);
}
- Location createLocation(SimpleIdentifier identifier) => new Location(_htmlUnitElement, identifier.offset, identifier.length);
+ Location createLocationForIdentifier(SimpleIdentifier identifier) => new Location(_htmlUnitElement, identifier.offset, identifier.length);
- Location createLocation2(ht.Token token) => new Location(_htmlUnitElement, token.offset, token.length);
+ Location createLocationForToken(ht.Token token) => new Location(_htmlUnitElement, token.offset, token.length);
}
class IndexContributor_AngularHtmlIndexContributor extends IndexContributor {
@@ -1299,7 +1276,7 @@
AngularElement angularElement = AngularHtmlUnitResolver.getAngularElement(element);
if (angularElement != null) {
element = angularElement;
- relationship = IndexConstants.IS_REFERENCED_BY;
+ relationship = IndexConstants.ANGULAR_REFERENCE;
}
super.recordRelationship(element, relationship, location);
}
@@ -1315,8 +1292,6 @@
* the expectation that operations are performed in the order in which they are requested.
* Modification operations are executed before any read operation. There is no guarantee about the
* order in which the callbacks for read operations will be invoked.
- *
- * @coverage dart.engine.index
*/
abstract class Index {
/**
@@ -1402,8 +1377,6 @@
/**
* Container of information computed by the index - relationships between elements.
- *
- * @coverage dart.engine.index
*/
abstract class IndexStore {
/**
@@ -1510,8 +1483,6 @@
/**
* Implementation of [UniverseElement].
- *
- * @coverage dart.engine.index
*/
class UniverseElementImpl extends ElementImpl implements UniverseElement {
static UniverseElementImpl INSTANCE = new UniverseElementImpl();
@@ -1525,10 +1496,8 @@
/**
* Visits resolved AST and adds relationships into [IndexStore].
- *
- * @coverage dart.engine.index
*/
-class IndexContributor extends GeneralizingASTVisitor<Object> {
+class IndexContributor extends GeneralizingAstVisitor<Object> {
/**
* @return the [Location] representing location of the [Element].
*/
@@ -1557,20 +1526,24 @@
static IndexContributor_ImportElementInfo getImportElementInfo(SimpleIdentifier prefixNode) {
IndexContributor_ImportElementInfo info = new IndexContributor_ImportElementInfo();
// prepare environment
- ASTNode parent = prefixNode.parent;
- CompilationUnit unit = prefixNode.getAncestor(CompilationUnit);
+ AstNode parent = prefixNode.parent;
+ CompilationUnit unit = prefixNode.getAncestor((node) => node is CompilationUnit);
LibraryElement libraryElement = unit.element.library;
// prepare used element
Element usedElement = null;
if (parent is PrefixedIdentifier) {
PrefixedIdentifier prefixed = parent;
- usedElement = prefixed.staticElement;
- info._periodEnd = prefixed.period.end;
+ if (identical(prefixed.prefix, prefixNode)) {
+ usedElement = prefixed.staticElement;
+ info._periodEnd = prefixed.period.end;
+ }
}
if (parent is MethodInvocation) {
MethodInvocation invocation = parent;
- usedElement = invocation.methodName.staticElement;
- info._periodEnd = invocation.period.end;
+ if (identical(invocation.target, prefixNode)) {
+ usedElement = invocation.methodName.staticElement;
+ info._periodEnd = invocation.period.end;
+ }
}
// we need used Element
if (usedElement == null) {
@@ -1709,9 +1682,9 @@
return location;
}
// should be LHS of assignment
- ASTNode parent;
+ AstNode parent;
{
- ASTNode node = identifier;
+ AstNode node = identifier;
parent = node.parent;
// new T().field = x;
if (parent is PropertyAccess) {
@@ -1741,10 +1714,18 @@
}
/**
+ * @return `true` if given "node" is part of an import [Combinator].
+ */
+ static bool isIdentifierInImportCombinator(SimpleIdentifier node) {
+ AstNode parent = node.parent;
+ return parent is Combinator;
+ }
+
+ /**
* @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node".
*/
static bool isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
return parent is PrefixedIdentifier && identical(parent.identifier, node);
}
@@ -1753,7 +1734,7 @@
* method invocation.
*/
static bool isQualified(SimpleIdentifier node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is PrefixedIdentifier) {
return identical(parent.identifier, node);
}
@@ -1826,7 +1807,7 @@
InterfaceType superType = element.supertype;
if (superType != null) {
ClassElement objectElement = superType.element;
- recordRelationship(objectElement, IndexConstants.IS_EXTENDED_BY, createLocation4(node.name.offset, 0));
+ recordRelationship(objectElement, IndexConstants.IS_EXTENDED_BY, createLocationFromOffset(node.name.offset, 0));
}
}
}
@@ -1905,10 +1886,10 @@
if (node.name != null) {
int start = node.period.offset;
int end = node.name.end;
- location = createLocation4(start, end - start);
+ location = createLocationFromOffset(start, end - start);
} else {
int start = node.returnType.end;
- location = createLocation4(start, 0);
+ location = createLocationFromOffset(start, 0);
}
recordRelationship(element, IndexConstants.IS_DEFINED_BY, location);
}
@@ -1923,15 +1904,21 @@
Object visitConstructorName(ConstructorName node) {
ConstructorElement element = node.staticElement;
+ // in 'class B = A;' actually A constructors are invoked
+ if (element != null && element.isSynthetic && element.redirectedConstructor != null) {
+ element = element.redirectedConstructor;
+ }
+ // prepare location
Location location;
if (node.name != null) {
int start = node.period.offset;
int end = node.name.end;
- location = createLocation4(start, end - start);
+ location = createLocationFromOffset(start, end - start);
} else {
int start = node.type.end;
- location = createLocation4(start, 0);
+ location = createLocationFromOffset(start, 0);
}
+ // record relationship
recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
return super.visitConstructorName(node);
}
@@ -1985,7 +1972,7 @@
MethodElement element = node.bestElement;
if (element is MethodElement) {
Token operator = node.leftBracket;
- Location location = createLocation5(operator);
+ Location location = createLocationFromToken(operator);
recordRelationship(element, IndexConstants.IS_INVOKED_BY_QUALIFIED, location);
}
return super.visitIndexExpression(node);
@@ -2005,7 +1992,7 @@
SimpleIdentifier name = node.methodName;
Element element = name.bestElement;
if (element is MethodElement) {
- Location location = createLocation3(name);
+ Location location = createLocationFromNode(name);
Relationship relationship;
if (node.target != null) {
relationship = IndexConstants.IS_INVOKED_BY_QUALIFIED;
@@ -2015,7 +2002,7 @@
recordRelationship(element, relationship, location);
}
if (element is FunctionElement) {
- Location location = createLocation3(name);
+ Location location = createLocationFromNode(name);
recordRelationship(element, IndexConstants.IS_INVOKED_BY, location);
}
recordImportElementReferenceWithoutPrefix(name);
@@ -2024,13 +2011,13 @@
Object visitPartDirective(PartDirective node) {
Element element = node.element;
- Location location = createLocation3(node.uri);
+ Location location = createLocationFromNode(node.uri);
recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
return super.visitPartDirective(node);
}
Object visitPartOfDirective(PartOfDirective node) {
- Location location = createLocation3(node.libraryName);
+ Location location = createLocationFromNode(node.libraryName);
recordRelationship(node.element, IndexConstants.IS_REFERENCED_BY, location);
return null;
}
@@ -2047,7 +2034,7 @@
Object visitSimpleIdentifier(SimpleIdentifier node) {
Element nameElement = new NameElementImpl(node.name);
- Location location = createLocation3(node);
+ Location location = createLocationFromNode(node);
// name in declaration
if (node.inDeclarationContext()) {
recordRelationship(nameElement, IndexConstants.IS_DEFINED_BY, location);
@@ -2103,10 +2090,10 @@
if (node.constructorName != null) {
int start = node.period.offset;
int end = node.constructorName.end;
- location = createLocation4(start, end - start);
+ location = createLocationFromOffset(start, end - start);
} else {
int start = node.keyword.end;
- location = createLocation4(start, 0);
+ location = createLocationFromOffset(start, 0);
}
recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
return super.visitSuperConstructorInvocation(node);
@@ -2136,7 +2123,7 @@
// record declaration
{
SimpleIdentifier name = node.name;
- Location location = createLocation3(name);
+ Location location = createLocationFromNode(name);
location = getLocationWithExpressionType(location, node.initializer);
recordRelationship(element, IndexConstants.IS_DEFINED_BY, location);
}
@@ -2184,9 +2171,9 @@
}
/**
- * @return the [Location] representing location of the [ASTNode].
+ * @return the [Location] representing location of the [AstNode].
*/
- Location createLocation3(ASTNode node) => createLocation4(node.offset, node.length);
+ Location createLocationFromNode(AstNode node) => createLocationFromOffset(node.offset, node.length);
/**
* @param offset the offset of the location within [Source]
@@ -2194,7 +2181,7 @@
* @return the [Location] representing the given offset and length within the inner-most
* [Element].
*/
- Location createLocation4(int offset, int length) {
+ Location createLocationFromOffset(int offset, int length) {
Element element = peekElement();
return new Location(element, offset, length);
}
@@ -2202,7 +2189,7 @@
/**
* @return the [Location] representing location of the [Token].
*/
- Location createLocation5(Token token) => createLocation4(token.offset, token.length);
+ Location createLocationFromToken(Token token) => createLocationFromOffset(token.offset, token.length);
/**
* Exit the current scope.
@@ -2216,7 +2203,7 @@
* not be indexed again.
*/
bool isAlreadyHandledName(SimpleIdentifier node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is MethodInvocation) {
Element element = node.staticElement;
if (element is MethodElement || element is FunctionElement) {
@@ -2240,13 +2227,16 @@
* top-level element and not qualified with import prefix.
*/
void recordImportElementReferenceWithoutPrefix(SimpleIdentifier node) {
+ if (isIdentifierInImportCombinator(node)) {
+ return;
+ }
if (isIdentifierInPrefixedIdentifier(node)) {
return;
}
Element element = node.staticElement;
ImportElement importElement = getImportElement2(_libraryElement, null, element, _importElementsMap);
if (importElement != null) {
- Location location = createLocation4(node.offset, 0);
+ Location location = createLocationFromOffset(node.offset, 0);
recordRelationship(importElement, IndexConstants.IS_REFERENCED_BY, location);
}
}
@@ -2260,7 +2250,7 @@
if (info != null) {
int offset = prefixNode.offset;
int length = info._periodEnd - offset;
- Location location = createLocation4(offset, length);
+ Location location = createLocationFromOffset(offset, length);
recordRelationship(info._element, IndexConstants.IS_REFERENCED_BY, location);
}
}
@@ -2271,7 +2261,7 @@
*/
void recordLibraryReference(UriBasedDirective node, LibraryElement library) {
if (library != null) {
- Location location = createLocation3(node.uri);
+ Location location = createLocationFromNode(node.uri);
recordRelationship(library.definingCompilationUnit, IndexConstants.IS_REFERENCED_BY, location);
}
}
@@ -2281,7 +2271,7 @@
*/
void recordOperatorReference(Token operator, Element element) {
// prepare location
- Location location = createLocation5(operator);
+ Location location = createLocationFromToken(operator);
// record name reference
{
String name = operator.lexeme;
@@ -2324,7 +2314,7 @@
Identifier superName = superNode.name;
if (superName != null) {
Element superElement = superName.staticElement;
- recordRelationship(superElement, relationship, createLocation3(superNode));
+ recordRelationship(superElement, relationship, createLocationFromNode(superNode));
}
}
}
@@ -2342,8 +2332,6 @@
/**
* Factory for [Index] and [IndexStore].
- *
- * @coverage dart.engine.index
*/
class IndexFactory {
/**
@@ -2364,8 +2352,6 @@
/**
* Instances of the [OperationQueue] represent a queue of operations against the index that
* are waiting to be performed.
- *
- * @coverage dart.engine.index
*/
class OperationQueue {
/**
@@ -2407,21 +2393,19 @@
* while it was waiting for an operation to be added to the queue
*/
IndexOperation dequeue(int timeout) {
- {
- if (_nonQueryOperations.isEmpty && (!_processQueries || _queryOperations.isEmpty)) {
- if (timeout <= 0) {
- return null;
- }
- waitForOperationAvailable(timeout);
+ if (_nonQueryOperations.isEmpty && (!_processQueries || _queryOperations.isEmpty)) {
+ if (timeout <= 0) {
+ return null;
}
- if (!_nonQueryOperations.isEmpty) {
- return _nonQueryOperations.removeFirst();
- }
- if (_processQueries && !_queryOperations.isEmpty) {
- return _queryOperations.removeFirst();
- }
- return null;
+ waitForOperationAvailable(timeout);
}
+ if (!_nonQueryOperations.isEmpty) {
+ return _nonQueryOperations.removeFirst();
+ }
+ if (_processQueries && !_queryOperations.isEmpty) {
+ return _queryOperations.removeFirst();
+ }
+ return null;
}
/**
@@ -2430,19 +2414,17 @@
* @param operation the operation to be added to the queue
*/
void enqueue(IndexOperation operation) {
- {
- if (operation is RemoveSourceOperation) {
- Source source = operation.source;
- removeForSource(source, _nonQueryOperations);
- removeForSource(source, _queryOperations);
- }
- if (operation.isQuery) {
- _queryOperations.add(operation);
- } else {
- _nonQueryOperations.add(operation);
- }
- notifyOperationAvailable();
+ if (operation is RemoveSourceOperation) {
+ Source source = operation.source;
+ removeForSource(source, _nonQueryOperations);
+ removeForSource(source, _queryOperations);
}
+ if (operation.isQuery) {
+ _queryOperations.add(operation);
+ } else {
+ _nonQueryOperations.add(operation);
+ }
+ notifyOperationAvailable();
}
/**
@@ -2453,10 +2435,8 @@
*/
List<IndexOperation> get operations {
List<IndexOperation> operations = [];
- {
- operations.addAll(_nonQueryOperations);
- operations.addAll(_queryOperations);
- }
+ operations.addAll(_nonQueryOperations);
+ operations.addAll(_queryOperations);
return operations;
}
@@ -2469,12 +2449,10 @@
* with a value of `true`.
*/
void set processQueries(bool processQueries) {
- {
- if (this._processQueries != processQueries) {
- this._processQueries = processQueries;
- if (processQueries && !_queryOperations.isEmpty) {
- notifyOperationAvailable();
- }
+ if (this._processQueries != processQueries) {
+ this._processQueries = processQueries;
+ if (processQueries && !_queryOperations.isEmpty) {
+ notifyOperationAvailable();
}
}
}
@@ -2484,11 +2462,7 @@
*
* @return the number of operations on the queue
*/
- int size() {
- {
- return _nonQueryOperations.length + _queryOperations.length;
- }
- }
+ int size() => _nonQueryOperations.length + _queryOperations.length;
void notifyOperationAvailable() {
}
@@ -2507,8 +2481,6 @@
/**
* Special [Element] which is used to index references to the name without specifying concrete
* kind of this name - field, method or something else.
- *
- * @coverage dart.engine.index
*/
class NameElementImpl extends ElementImpl {
NameElementImpl(String name) : super.con2("name:${name}", -1);
@@ -2521,10 +2493,8 @@
/**
* Visits resolved [CompilationUnit] and adds Angular specific relationships into
* [IndexStore].
- *
- * @coverage dart.engine.index
*/
-class AngularDartIndexContributor extends GeneralizingASTVisitor<Object> {
+class AngularDartIndexContributor extends GeneralizingAstVisitor<Object> {
IndexStore _store;
AngularDartIndexContributor(IndexStore store) {
@@ -2559,11 +2529,17 @@
indexProperties(directive.properties);
}
+ /**
+ * Index [FieldElement] references from [AngularPropertyElement]s.
+ */
void indexProperties(List<AngularPropertyElement> properties) {
for (AngularPropertyElement property in properties) {
FieldElement field = property.field;
if (field != null) {
int offset = property.fieldNameOffset;
+ if (offset == -1) {
+ continue;
+ }
int length = field.name.length;
Location location = new Location(property, offset, length);
// getter reference
@@ -2588,8 +2564,6 @@
/**
* Instances of the [RemoveContextOperation] implement an operation that removes from the
* index any data based on the specified [AnalysisContext].
- *
- * @coverage dart.engine.index
*/
class RemoveContextOperation implements IndexOperation {
/**
@@ -2615,9 +2589,7 @@
bool get isQuery => false;
void performOperation() {
- {
- _indexStore.removeContext(context);
- }
+ _indexStore.removeContext(context);
}
bool removeWhenSourceRemoved(Source source) => false;
@@ -2628,8 +2600,6 @@
/**
* Instances of the [IndexHtmlUnitOperation] implement an operation that adds data to the
* index based on the resolved [HtmlUnit].
- *
- * @coverage dart.engine.index
*/
class IndexHtmlUnitOperation implements IndexOperation {
/**
@@ -2679,17 +2649,15 @@
bool get isQuery => false;
void performOperation() {
- {
- try {
- bool mayIndex = _indexStore.aboutToIndex2(_context, _htmlElement);
- if (!mayIndex) {
- return;
- }
- AngularHtmlIndexContributor contributor = new AngularHtmlIndexContributor(_indexStore);
- unit.accept(contributor);
- } catch (exception) {
- AnalysisEngine.instance.logger.logError2("Could not index ${unit.element.location}", exception);
+ try {
+ bool mayIndex = _indexStore.aboutToIndex2(_context, _htmlElement);
+ if (!mayIndex) {
+ return;
}
+ AngularHtmlIndexContributor contributor = new AngularHtmlIndexContributor(_indexStore);
+ unit.accept(contributor);
+ } catch (exception) {
+ AnalysisEngine.instance.logger.logError2("Could not index ${unit.element.location}", exception);
}
}
@@ -2702,8 +2670,6 @@
* Instances of the class <code>Location</code> represent a location related to an element. The
* location is expressed as an offset and length, but the offset is relative to the resource
* containing the element rather than the start of the element within that resource.
- *
- * @coverage dart.engine.index
*/
class Location {
/**
@@ -2753,8 +2719,6 @@
/**
* [IndexStore] which keeps all information in memory, but can write it to stream and read
* later.
- *
- * @coverage dart.engine.index
*/
abstract class MemoryIndexStore implements IndexStore {
}
@@ -2762,8 +2726,6 @@
/**
* Instances of the [GetRelationshipsOperation] implement an operation used to access the
* locations that have a specified relationship with a specified element.
- *
- * @coverage dart.engine.index
*/
class GetRelationshipsOperation implements IndexOperation {
IndexStore _indexStore;
@@ -2786,9 +2748,7 @@
void performOperation() {
List<Location> locations;
- {
- locations = _indexStore.getRelationships(element, relationship);
- }
+ locations = _indexStore.getRelationships(element, relationship);
callback.hasRelationships(element, relationship, locations);
}
@@ -2813,8 +2773,6 @@
/**
* The interface <code>RelationshipCallback</code> defines the behavior of objects that are invoked
* with the results of a query about a given relationship.
- *
- * @coverage dart.engine.index
*/
abstract class RelationshipCallback {
/**
diff --git a/pkg/analyzer/lib/src/generated/instrumentation.dart b/pkg/analyzer/lib/src/generated/instrumentation.dart
index 0a89639..ee22f0b 100644
--- a/pkg/analyzer/lib/src/generated/instrumentation.dart
+++ b/pkg/analyzer/lib/src/generated/instrumentation.dart
@@ -37,8 +37,6 @@
* arguments and records the time at which the method is called so that the time to complete the
* save operation can be calculated. The `log` method tells the builder that all of the data
* has been collected and that the resulting information should be logged.
- *
- * @coverage dart.engine.utilities
*/
class Instrumentation {
/**
@@ -140,8 +138,6 @@
* about an operation that has occurred and record that data through an instrumentation logger.
*
* For an example of using objects that implement this interface, see [Instrumentation].
- *
- * @coverage dart.engine.utilities
*/
abstract class InstrumentationBuilder {
/**
@@ -272,8 +268,6 @@
* The instrumentation recording level representing (1) recording [EVERYTHING] recording of
* all instrumentation data, (2) recording only [METRICS] information, or (3) recording
* turned [OFF] in which case nothing is recorded.
- *
- * @coverage dart.engine.utilities
*/
class InstrumentationLevel extends Enum<InstrumentationLevel> {
/** Recording all instrumented information */
@@ -308,8 +302,6 @@
* instrumentation data.
*
* For an example of using objects that implement this interface, see [Instrumentation].
- *
- * @coverage dart.engine.utilities
*/
abstract class InstrumentationLogger {
/**
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index 255ea31..4c47b62 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -23,79 +23,6 @@
}
}
-Stopwatch instanceOfTimer = new Stopwatch();
-
-/**
- * Limited implementation of "o is instanceOfType", see
- * http://code.google.com/p/dart/issues/detail?id=8184
- */
-bool isInstanceOf(o, Type t) {
- instanceOfTimer.start();
- try {
- if (o == null) {
- return false;
- }
- if (o.runtimeType == t) {
- return true;
- }
- String oTypeName = o.runtimeType.toString();
- String tTypeName = t.toString();
- if (oTypeName == tTypeName) {
- return true;
- }
- if (oTypeName.startsWith("List") && tTypeName == "List") {
- return true;
- }
- if (tTypeName == "Map" && o is Map) {
- return true;
- }
- // Dart Analysis Engine specific
- if (oTypeName == "${tTypeName}Impl") {
- return true;
- }
- if (tTypeName == "FormalParameter") {
- return
- oTypeName == "DefaultFormalParameter" ||
- oTypeName == "FieldNormalParameter" ||
- oTypeName == "FunctionTypedFormalParameter" ||
- oTypeName == "SimpleFormalParameter";
- }
- if (tTypeName == "MethodElement") {
- if (oTypeName == "MethodMember") {
- return true;
- }
- }
- if (tTypeName == "ExecutableElement") {
- if (oTypeName == "MethodElementImpl" ||
- oTypeName == "FunctionElementImpl" ||
- oTypeName == "PropertyAccessorElementImpl") {
- return true;
- }
- }
- if (tTypeName == "ParameterElement") {
- if (oTypeName == "FieldFormalParameterElementImpl" ||
- oTypeName == "DefaultFieldFormalParameterElementImpl" ||
- oTypeName == "DefaultParameterElementImpl") {
- return true;
- }
- }
- if (tTypeName == "VariableElement") {
- if (oTypeName == "LocalVariableElementImpl" ||
- oTypeName == "ConstLocalVariableElementImpl" ||
- oTypeName == "FieldElementImpl" ||
- oTypeName == "ConstFieldElementImpl" ||
- oTypeName == "TopLevelVariableElementImpl" ||
- oTypeName == "ConstTopLevelVariableElementImpl") {
- return true;
- }
- }
- // no
- return false;
- } finally {
- instanceOfTimer.stop();
- }
-}
-
class JavaArrays {
static bool equals(List a, List b) {
if (identical(a, b)) {
@@ -284,7 +211,7 @@
}
class StringUtils {
- static List<String> split(String s, String pattern) => s.split(pattern);
+ static List<String> split(String s, [String pattern = '']) => s.split(pattern);
static String replace(String s, String from, String to) => s.replaceAll(from, to);
static String repeat(String s, int n) {
StringBuffer sb = new StringBuffer();
diff --git a/pkg/analyzer/lib/src/generated/java_engine.dart b/pkg/analyzer/lib/src/generated/java_engine.dart
index 7415687..f523e8f 100644
--- a/pkg/analyzer/lib/src/generated/java_engine.dart
+++ b/pkg/analyzer/lib/src/generated/java_engine.dart
@@ -2,9 +2,14 @@
import 'java_core.dart';
+/**
+ * A predicate is a one-argument function that returns a boolean value.
+ */
+typedef bool Predicate<E>(E argument);
+
class StringUtilities {
static const String EMPTY = '';
- static const List<String> EMPTY_ARRAY = const <String> [];
+ static const List<String> EMPTY_ARRAY = const <String>[];
static String intern(String s) => s;
static bool isTagName(String s) {
if (s == null || s.length == 0) {
@@ -43,50 +48,37 @@
}
static endsWith3(String str, int c1, int c2, int c3) {
var length = str.length;
- return length >= 3 &&
- str.codeUnitAt(length - 3) == c1 &&
- str.codeUnitAt(length - 2) == c2 &&
- str.codeUnitAt(length - 1) == c3;
+ return length >= 3 && str.codeUnitAt(length - 3) == c1 && str.codeUnitAt(
+ length - 2) == c2 && str.codeUnitAt(length - 1) == c3;
}
static startsWithChar(String str, int c) {
return str.length != 0 && str.codeUnitAt(0) == c;
}
static startsWith2(String str, int start, int c1, int c2) {
- return str.length - start >= 2 &&
- str.codeUnitAt(start) == c1 &&
+ return str.length - start >= 2 && str.codeUnitAt(start) == c1 &&
str.codeUnitAt(start + 1) == c2;
}
static startsWith3(String str, int start, int c1, int c2, int c3) {
- return str.length - start >= 3 &&
- str.codeUnitAt(start) == c1 &&
- str.codeUnitAt(start + 1) == c2 &&
- str.codeUnitAt(start + 2) == c3;
+ return str.length - start >= 3 && str.codeUnitAt(start) == c1 &&
+ str.codeUnitAt(start + 1) == c2 && str.codeUnitAt(start + 2) == c3;
}
static startsWith4(String str, int start, int c1, int c2, int c3, int c4) {
- return str.length - start >= 4 &&
- str.codeUnitAt(start) == c1 &&
- str.codeUnitAt(start + 1) == c2 &&
- str.codeUnitAt(start + 2) == c3 &&
+ return str.length - start >= 4 && str.codeUnitAt(start) == c1 &&
+ str.codeUnitAt(start + 1) == c2 && str.codeUnitAt(start + 2) == c3 &&
str.codeUnitAt(start + 3) == c4;
}
- static startsWith5(String str, int start, int c1, int c2, int c3, int c4,
- int c5) {
- return str.length - start >= 5 &&
- str.codeUnitAt(start) == c1 &&
- str.codeUnitAt(start + 1) == c2 &&
- str.codeUnitAt(start + 2) == c3 &&
- str.codeUnitAt(start + 3) == c4 &&
- str.codeUnitAt(start + 4) == c5;
+ static startsWith5(String str, int start, int c1, int c2, int c3, int c4, int
+ c5) {
+ return str.length - start >= 5 && str.codeUnitAt(start) == c1 &&
+ str.codeUnitAt(start + 1) == c2 && str.codeUnitAt(start + 2) == c3 &&
+ str.codeUnitAt(start + 3) == c4 && str.codeUnitAt(start + 4) == c5;
}
- static startsWith6(String str, int start, int c1, int c2, int c3, int c4,
- int c5, int c6) {
- return str.length - start >= 6 &&
- str.codeUnitAt(start) == c1 &&
- str.codeUnitAt(start + 1) == c2 &&
- str.codeUnitAt(start + 2) == c3 &&
- str.codeUnitAt(start + 3) == c4 &&
- str.codeUnitAt(start + 4) == c5 &&
+ static startsWith6(String str, int start, int c1, int c2, int c3, int c4, int
+ c5, int c6) {
+ return str.length - start >= 6 && str.codeUnitAt(start) == c1 &&
+ str.codeUnitAt(start + 1) == c2 && str.codeUnitAt(start + 2) == c3 &&
+ str.codeUnitAt(start + 3) == c4 && str.codeUnitAt(start + 4) == c5 &&
str.codeUnitAt(start + 5) == c6;
}
static int indexOf1(String str, int start, int c) {
@@ -111,29 +103,26 @@
}
return -1;
}
- static int indexOf4(String string, int start, int c1, int c2, int c3, int c4) {
+ static int indexOf4(String string, int start, int c1, int c2, int c3, int c4)
+ {
int index = start;
int last = string.length - 3;
while (index < last) {
- if (string.codeUnitAt(index) == c1 &&
- string.codeUnitAt(index + 1) == c2 &&
- string.codeUnitAt(index + 2) == c3 &&
- string.codeUnitAt(index + 3) == c4) {
+ if (string.codeUnitAt(index) == c1 && string.codeUnitAt(index + 1) == c2
+ && string.codeUnitAt(index + 2) == c3 && string.codeUnitAt(index + 3) == c4) {
return index;
}
index++;
}
return -1;
}
- static int indexOf5(String str, int start, int c1, int c2, int c3, int c4,
- int c5) {
+ static int indexOf5(String str, int start, int c1, int c2, int c3, int c4, int
+ c5) {
int index = start;
int last = str.length - 4;
while (index < last) {
- if (str.codeUnitAt(index) == c1 &&
- str.codeUnitAt(index + 1) == c2 &&
- str.codeUnitAt(index + 2) == c3 &&
- str.codeUnitAt(index + 3) == c4 &&
+ if (str.codeUnitAt(index) == c1 && str.codeUnitAt(index + 1) == c2 &&
+ str.codeUnitAt(index + 2) == c3 && str.codeUnitAt(index + 3) == c4 &&
str.codeUnitAt(index + 4) == c5) {
return index;
}
@@ -151,6 +140,24 @@
}
return str.substring(0, pos);
}
+
+ /**
+ * Return the index of the first not letter/digit character in the [string]
+ * that is at or after the [startIndex]. Return the length of the [string] if
+ * all characters to the end are letters/digits.
+ */
+ static int indexOfFirstNotLetterDigit(String string, int startIndex) {
+ int index = startIndex;
+ int last = string.length;
+ while (index < last) {
+ int c = string.codeUnitAt(index);
+ if (!Character.isLetterOrDigit(c)) {
+ return index;
+ }
+ index++;
+ }
+ return last;
+ }
}
class FileNameUtilities {
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 4c93ace..9bb9313 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -21,8 +21,6 @@
/**
* Instances of the class `CommentAndMetadata` implement a simple data-holder for a method
* that needs to return multiple values.
- *
- * @coverage dart.engine.parser
*/
class CommentAndMetadata {
/**
@@ -47,8 +45,6 @@
/**
* Instances of the class `FinalConstVarOrType` implement a simple data-holder for a method
* that needs to return multiple values.
- *
- * @coverage dart.engine.parser
*/
class FinalConstVarOrType {
/**
@@ -73,8 +69,6 @@
/**
* Instances of the class `Modifiers` implement a simple data-holder for a method that needs
* to return multiple values.
- *
- * @coverage dart.engine.parser
*/
class Modifiers {
/**
@@ -152,7 +146,7 @@
* the methods will throw an [IncrementalParseException] if the node could not be parsed for
* some reason.
*/
-class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
+class IncrementalParseDispatcher implements AstVisitor<AstNode> {
/**
* The parser used to parse the replacement for the node.
*/
@@ -161,7 +155,7 @@
/**
* The node that is to be replaced.
*/
- ASTNode _oldNode;
+ AstNode _oldNode;
/**
* Initialize a newly created dispatcher to parse a single node that will replace the given node.
@@ -169,19 +163,19 @@
* @param parser the parser used to parse the replacement for the node
* @param oldNode the node that is to be replaced
*/
- IncrementalParseDispatcher(Parser parser, ASTNode oldNode) {
+ IncrementalParseDispatcher(Parser parser, AstNode oldNode) {
this._parser = parser;
this._oldNode = oldNode;
}
- ASTNode visitAdjacentStrings(AdjacentStrings node) {
+ AstNode visitAdjacentStrings(AdjacentStrings node) {
if (node.strings.contains(_oldNode)) {
return _parser.parseStringLiteral();
}
return notAChild(node);
}
- ASTNode visitAnnotation(Annotation node) {
+ AstNode visitAnnotation(Annotation node) {
if (identical(_oldNode, node.name)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.constructorName)) {
@@ -192,21 +186,21 @@
return notAChild(node);
}
- ASTNode visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
+ AstNode visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
if (identical(_oldNode, node.identifier)) {
return _parser.parseSimpleIdentifier();
}
return notAChild(node);
}
- ASTNode visitArgumentList(ArgumentList node) {
+ AstNode visitArgumentList(ArgumentList node) {
if (node.arguments.contains(_oldNode)) {
return _parser.parseArgument();
}
return notAChild(node);
}
- ASTNode visitAsExpression(AsExpression node) {
+ AstNode visitAsExpression(AsExpression node) {
if (identical(_oldNode, node.expression)) {
return _parser.parseBitwiseOrExpression();
} else if (identical(_oldNode, node.type)) {
@@ -215,14 +209,14 @@
return notAChild(node);
}
- ASTNode visitAssertStatement(AssertStatement node) {
+ AstNode visitAssertStatement(AssertStatement node) {
if (identical(_oldNode, node.condition)) {
return _parser.parseExpression2();
}
return notAChild(node);
}
- ASTNode visitAssignmentExpression(AssignmentExpression node) {
+ AstNode visitAssignmentExpression(AssignmentExpression node) {
if (identical(_oldNode, node.leftHandSide)) {
// TODO(brianwilkerson) If the assignment is part of a cascade section, then we don't have a
// single parse method that will work. Otherwise, we can parse a conditional expression, but
@@ -230,7 +224,7 @@
// return parser.parseConditionalExpression();
throw new InsufficientContextException();
} else if (identical(_oldNode, node.rightHandSide)) {
- if (isCascadeAllowed(node)) {
+ if (isCascadeAllowedInAssignment(node)) {
return _parser.parseExpression2();
}
return _parser.parseExpressionWithoutCascade();
@@ -238,7 +232,7 @@
return notAChild(node);
}
- ASTNode visitBinaryExpression(BinaryExpression node) {
+ AstNode visitBinaryExpression(BinaryExpression node) {
if (identical(_oldNode, node.leftOperand)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.rightOperand)) {
@@ -247,30 +241,30 @@
return notAChild(node);
}
- ASTNode visitBlock(Block node) {
+ AstNode visitBlock(Block node) {
if (node.statements.contains(_oldNode)) {
return _parser.parseStatement2();
}
return notAChild(node);
}
- ASTNode visitBlockFunctionBody(BlockFunctionBody node) {
+ AstNode visitBlockFunctionBody(BlockFunctionBody node) {
if (identical(_oldNode, node.block)) {
return _parser.parseBlock();
}
return notAChild(node);
}
- ASTNode visitBooleanLiteral(BooleanLiteral node) => notAChild(node);
+ AstNode visitBooleanLiteral(BooleanLiteral node) => notAChild(node);
- ASTNode visitBreakStatement(BreakStatement node) {
+ AstNode visitBreakStatement(BreakStatement node) {
if (identical(_oldNode, node.label)) {
return _parser.parseSimpleIdentifier();
}
return notAChild(node);
}
- ASTNode visitCascadeExpression(CascadeExpression node) {
+ AstNode visitCascadeExpression(CascadeExpression node) {
if (identical(_oldNode, node.target)) {
return _parser.parseConditionalExpression();
} else if (node.cascadeSections.contains(_oldNode)) {
@@ -279,7 +273,7 @@
return notAChild(node);
}
- ASTNode visitCatchClause(CatchClause node) {
+ AstNode visitCatchClause(CatchClause node) {
if (identical(_oldNode, node.exceptionType)) {
return _parser.parseTypeName();
} else if (identical(_oldNode, node.exceptionParameter)) {
@@ -292,7 +286,7 @@
return notAChild(node);
}
- ASTNode visitClassDeclaration(ClassDeclaration node) {
+ AstNode visitClassDeclaration(ClassDeclaration node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -308,12 +302,16 @@
} else if (identical(_oldNode, node.implementsClause)) {
return _parser.parseImplementsClause();
} else if (node.members.contains(_oldNode)) {
- return _parser.parseClassMember(node.name.name);
+ ClassMember member = _parser.parseClassMember(node.name.name);
+ if (member == null) {
+ throw new InsufficientContextException();
+ }
+ return member;
}
return notAChild(node);
}
- ASTNode visitClassTypeAlias(ClassTypeAlias node) {
+ AstNode visitClassTypeAlias(ClassTypeAlias node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -332,22 +330,22 @@
return notAChild(node);
}
- ASTNode visitComment(Comment node) {
+ AstNode visitComment(Comment node) {
throw new InsufficientContextException();
}
- ASTNode visitCommentReference(CommentReference node) {
+ AstNode visitCommentReference(CommentReference node) {
if (identical(_oldNode, node.identifier)) {
return _parser.parsePrefixedIdentifier();
}
return notAChild(node);
}
- ASTNode visitCompilationUnit(CompilationUnit node) {
+ AstNode visitCompilationUnit(CompilationUnit node) {
throw new InsufficientContextException();
}
- ASTNode visitConditionalExpression(ConditionalExpression node) {
+ AstNode visitConditionalExpression(ConditionalExpression node) {
if (identical(_oldNode, node.condition)) {
return _parser.parseLogicalOrExpression();
} else if (identical(_oldNode, node.thenExpression)) {
@@ -358,7 +356,7 @@
return notAChild(node);
}
- ASTNode visitConstructorDeclaration(ConstructorDeclaration node) {
+ AstNode visitConstructorDeclaration(ConstructorDeclaration node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -379,7 +377,7 @@
return notAChild(node);
}
- ASTNode visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+ AstNode visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
if (identical(_oldNode, node.fieldName)) {
return _parser.parseSimpleIdentifier();
} else if (identical(_oldNode, node.expression)) {
@@ -388,7 +386,7 @@
return notAChild(node);
}
- ASTNode visitConstructorName(ConstructorName node) {
+ AstNode visitConstructorName(ConstructorName node) {
if (identical(_oldNode, node.type)) {
return _parser.parseTypeName();
} else if (identical(_oldNode, node.name)) {
@@ -397,14 +395,14 @@
return notAChild(node);
}
- ASTNode visitContinueStatement(ContinueStatement node) {
+ AstNode visitContinueStatement(ContinueStatement node) {
if (identical(_oldNode, node.label)) {
return _parser.parseSimpleIdentifier();
}
return notAChild(node);
}
- ASTNode visitDeclaredIdentifier(DeclaredIdentifier node) {
+ AstNode visitDeclaredIdentifier(DeclaredIdentifier node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -417,7 +415,7 @@
return notAChild(node);
}
- ASTNode visitDefaultFormalParameter(DefaultFormalParameter node) {
+ AstNode visitDefaultFormalParameter(DefaultFormalParameter node) {
if (identical(_oldNode, node.parameter)) {
return _parser.parseNormalFormalParameter();
} else if (identical(_oldNode, node.defaultValue)) {
@@ -426,7 +424,7 @@
return notAChild(node);
}
- ASTNode visitDoStatement(DoStatement node) {
+ AstNode visitDoStatement(DoStatement node) {
if (identical(_oldNode, node.body)) {
return _parser.parseStatement2();
} else if (identical(_oldNode, node.condition)) {
@@ -435,13 +433,13 @@
return notAChild(node);
}
- ASTNode visitDoubleLiteral(DoubleLiteral node) => notAChild(node);
+ AstNode visitDoubleLiteral(DoubleLiteral node) => notAChild(node);
- ASTNode visitEmptyFunctionBody(EmptyFunctionBody node) => notAChild(node);
+ AstNode visitEmptyFunctionBody(EmptyFunctionBody node) => notAChild(node);
- ASTNode visitEmptyStatement(EmptyStatement node) => notAChild(node);
+ AstNode visitEmptyStatement(EmptyStatement node) => notAChild(node);
- ASTNode visitExportDirective(ExportDirective node) {
+ AstNode visitExportDirective(ExportDirective node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -454,28 +452,28 @@
return notAChild(node);
}
- ASTNode visitExpressionFunctionBody(ExpressionFunctionBody node) {
+ AstNode visitExpressionFunctionBody(ExpressionFunctionBody node) {
if (identical(_oldNode, node.expression)) {
return _parser.parseExpression2();
}
return notAChild(node);
}
- ASTNode visitExpressionStatement(ExpressionStatement node) {
+ AstNode visitExpressionStatement(ExpressionStatement node) {
if (identical(_oldNode, node.expression)) {
return _parser.parseExpression2();
}
return notAChild(node);
}
- ASTNode visitExtendsClause(ExtendsClause node) {
+ AstNode visitExtendsClause(ExtendsClause node) {
if (identical(_oldNode, node.superclass)) {
return _parser.parseTypeName();
}
return notAChild(node);
}
- ASTNode visitFieldDeclaration(FieldDeclaration node) {
+ AstNode visitFieldDeclaration(FieldDeclaration node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -486,7 +484,7 @@
return notAChild(node);
}
- ASTNode visitFieldFormalParameter(FieldFormalParameter node) {
+ AstNode visitFieldFormalParameter(FieldFormalParameter node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -501,7 +499,7 @@
return notAChild(node);
}
- ASTNode visitForEachStatement(ForEachStatement node) {
+ AstNode visitForEachStatement(ForEachStatement node) {
if (identical(_oldNode, node.loopVariable)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.identifier)) {
@@ -512,12 +510,12 @@
return notAChild(node);
}
- ASTNode visitFormalParameterList(FormalParameterList node) {
+ AstNode visitFormalParameterList(FormalParameterList node) {
// We don't know which kind of parameter to parse.
throw new InsufficientContextException();
}
- ASTNode visitForStatement(ForStatement node) {
+ AstNode visitForStatement(ForStatement node) {
if (identical(_oldNode, node.variables)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.initialization)) {
@@ -532,7 +530,7 @@
return notAChild(node);
}
- ASTNode visitFunctionDeclaration(FunctionDeclaration node) {
+ AstNode visitFunctionDeclaration(FunctionDeclaration node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -547,14 +545,14 @@
return notAChild(node);
}
- ASTNode visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+ AstNode visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
if (identical(_oldNode, node.functionDeclaration)) {
throw new InsufficientContextException();
}
return notAChild(node);
}
- ASTNode visitFunctionExpression(FunctionExpression node) {
+ AstNode visitFunctionExpression(FunctionExpression node) {
if (identical(_oldNode, node.parameters)) {
return _parser.parseFormalParameterList();
} else if (identical(_oldNode, node.body)) {
@@ -563,7 +561,7 @@
return notAChild(node);
}
- ASTNode visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+ AstNode visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
if (identical(_oldNode, node.function)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.argumentList)) {
@@ -572,7 +570,7 @@
return notAChild(node);
}
- ASTNode visitFunctionTypeAlias(FunctionTypeAlias node) {
+ AstNode visitFunctionTypeAlias(FunctionTypeAlias node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -589,7 +587,7 @@
return notAChild(node);
}
- ASTNode visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+ AstNode visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -604,14 +602,14 @@
return notAChild(node);
}
- ASTNode visitHideCombinator(HideCombinator node) {
+ AstNode visitHideCombinator(HideCombinator node) {
if (node.hiddenNames.contains(_oldNode)) {
return _parser.parseSimpleIdentifier();
}
return notAChild(node);
}
- ASTNode visitIfStatement(IfStatement node) {
+ AstNode visitIfStatement(IfStatement node) {
if (identical(_oldNode, node.condition)) {
return _parser.parseExpression2();
} else if (identical(_oldNode, node.thenStatement)) {
@@ -622,14 +620,14 @@
return notAChild(node);
}
- ASTNode visitImplementsClause(ImplementsClause node) {
+ AstNode visitImplementsClause(ImplementsClause node) {
if (node.interfaces.contains(node)) {
return _parser.parseTypeName();
}
return notAChild(node);
}
- ASTNode visitImportDirective(ImportDirective node) {
+ AstNode visitImportDirective(ImportDirective node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -644,7 +642,7 @@
return notAChild(node);
}
- ASTNode visitIndexExpression(IndexExpression node) {
+ AstNode visitIndexExpression(IndexExpression node) {
if (identical(_oldNode, node.target)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.index)) {
@@ -653,7 +651,7 @@
return notAChild(node);
}
- ASTNode visitInstanceCreationExpression(InstanceCreationExpression node) {
+ AstNode visitInstanceCreationExpression(InstanceCreationExpression node) {
if (identical(_oldNode, node.constructorName)) {
return _parser.parseConstructorName();
} else if (identical(_oldNode, node.argumentList)) {
@@ -662,9 +660,9 @@
return notAChild(node);
}
- ASTNode visitIntegerLiteral(IntegerLiteral node) => notAChild(node);
+ AstNode visitIntegerLiteral(IntegerLiteral node) => notAChild(node);
- ASTNode visitInterpolationExpression(InterpolationExpression node) {
+ AstNode visitInterpolationExpression(InterpolationExpression node) {
if (identical(_oldNode, node.expression)) {
if (node.leftBracket == null) {
throw new InsufficientContextException();
@@ -674,11 +672,11 @@
return notAChild(node);
}
- ASTNode visitInterpolationString(InterpolationString node) {
+ AstNode visitInterpolationString(InterpolationString node) {
throw new InsufficientContextException();
}
- ASTNode visitIsExpression(IsExpression node) {
+ AstNode visitIsExpression(IsExpression node) {
if (identical(_oldNode, node.expression)) {
return _parser.parseBitwiseOrExpression();
} else if (identical(_oldNode, node.type)) {
@@ -687,14 +685,14 @@
return notAChild(node);
}
- ASTNode visitLabel(Label node) {
+ AstNode visitLabel(Label node) {
if (identical(_oldNode, node.label)) {
return _parser.parseSimpleIdentifier();
}
return notAChild(node);
}
- ASTNode visitLabeledStatement(LabeledStatement node) {
+ AstNode visitLabeledStatement(LabeledStatement node) {
if (node.labels.contains(_oldNode)) {
return _parser.parseLabel();
} else if (identical(_oldNode, node.statement)) {
@@ -703,7 +701,7 @@
return notAChild(node);
}
- ASTNode visitLibraryDirective(LibraryDirective node) {
+ AstNode visitLibraryDirective(LibraryDirective node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -714,14 +712,14 @@
return notAChild(node);
}
- ASTNode visitLibraryIdentifier(LibraryIdentifier node) {
+ AstNode visitLibraryIdentifier(LibraryIdentifier node) {
if (node.components.contains(_oldNode)) {
return _parser.parseSimpleIdentifier();
}
return notAChild(node);
}
- ASTNode visitListLiteral(ListLiteral node) {
+ AstNode visitListLiteral(ListLiteral node) {
if (identical(_oldNode, node.typeArguments)) {
return _parser.parseTypeArgumentList();
} else if (node.elements.contains(_oldNode)) {
@@ -730,7 +728,7 @@
return notAChild(node);
}
- ASTNode visitMapLiteral(MapLiteral node) {
+ AstNode visitMapLiteral(MapLiteral node) {
if (identical(_oldNode, node.typeArguments)) {
return _parser.parseTypeArgumentList();
} else if (node.entries.contains(_oldNode)) {
@@ -739,7 +737,7 @@
return notAChild(node);
}
- ASTNode visitMapLiteralEntry(MapLiteralEntry node) {
+ AstNode visitMapLiteralEntry(MapLiteralEntry node) {
if (identical(_oldNode, node.key)) {
return _parser.parseExpression2();
} else if (identical(_oldNode, node.value)) {
@@ -748,7 +746,7 @@
return notAChild(node);
}
- ASTNode visitMethodDeclaration(MethodDeclaration node) {
+ AstNode visitMethodDeclaration(MethodDeclaration node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -767,7 +765,7 @@
return notAChild(node);
}
- ASTNode visitMethodInvocation(MethodInvocation node) {
+ AstNode visitMethodInvocation(MethodInvocation node) {
if (identical(_oldNode, node.target)) {
throw new IncrementalParseException();
} else if (identical(_oldNode, node.methodName)) {
@@ -778,7 +776,7 @@
return notAChild(node);
}
- ASTNode visitNamedExpression(NamedExpression node) {
+ AstNode visitNamedExpression(NamedExpression node) {
if (identical(_oldNode, node.name)) {
return _parser.parseLabel();
} else if (identical(_oldNode, node.expression)) {
@@ -787,30 +785,30 @@
return notAChild(node);
}
- ASTNode visitNativeClause(NativeClause node) {
+ AstNode visitNativeClause(NativeClause node) {
if (identical(_oldNode, node.name)) {
return _parser.parseStringLiteral();
}
return notAChild(node);
}
- ASTNode visitNativeFunctionBody(NativeFunctionBody node) {
+ AstNode visitNativeFunctionBody(NativeFunctionBody node) {
if (identical(_oldNode, node.stringLiteral)) {
return _parser.parseStringLiteral();
}
return notAChild(node);
}
- ASTNode visitNullLiteral(NullLiteral node) => notAChild(node);
+ AstNode visitNullLiteral(NullLiteral node) => notAChild(node);
- ASTNode visitParenthesizedExpression(ParenthesizedExpression node) {
+ AstNode visitParenthesizedExpression(ParenthesizedExpression node) {
if (identical(_oldNode, node.expression)) {
return _parser.parseExpression2();
}
return notAChild(node);
}
- ASTNode visitPartDirective(PartDirective node) {
+ AstNode visitPartDirective(PartDirective node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -821,7 +819,7 @@
return notAChild(node);
}
- ASTNode visitPartOfDirective(PartOfDirective node) {
+ AstNode visitPartOfDirective(PartOfDirective node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -832,14 +830,14 @@
return notAChild(node);
}
- ASTNode visitPostfixExpression(PostfixExpression node) {
+ AstNode visitPostfixExpression(PostfixExpression node) {
if (identical(_oldNode, node.operand)) {
throw new InsufficientContextException();
}
return notAChild(node);
}
- ASTNode visitPrefixedIdentifier(PrefixedIdentifier node) {
+ AstNode visitPrefixedIdentifier(PrefixedIdentifier node) {
if (identical(_oldNode, node.prefix)) {
return _parser.parseSimpleIdentifier();
} else if (identical(_oldNode, node.identifier)) {
@@ -848,14 +846,14 @@
return notAChild(node);
}
- ASTNode visitPrefixExpression(PrefixExpression node) {
+ AstNode visitPrefixExpression(PrefixExpression node) {
if (identical(_oldNode, node.operand)) {
throw new InsufficientContextException();
}
return notAChild(node);
}
- ASTNode visitPropertyAccess(PropertyAccess node) {
+ AstNode visitPropertyAccess(PropertyAccess node) {
if (identical(_oldNode, node.target)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.propertyName)) {
@@ -864,7 +862,7 @@
return notAChild(node);
}
- ASTNode visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
+ AstNode visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
if (identical(_oldNode, node.constructorName)) {
return _parser.parseSimpleIdentifier();
} else if (identical(_oldNode, node.argumentList)) {
@@ -873,25 +871,25 @@
return notAChild(node);
}
- ASTNode visitRethrowExpression(RethrowExpression node) => notAChild(node);
+ AstNode visitRethrowExpression(RethrowExpression node) => notAChild(node);
- ASTNode visitReturnStatement(ReturnStatement node) {
+ AstNode visitReturnStatement(ReturnStatement node) {
if (identical(_oldNode, node.expression)) {
return _parser.parseExpression2();
}
return notAChild(node);
}
- ASTNode visitScriptTag(ScriptTag node) => notAChild(node);
+ AstNode visitScriptTag(ScriptTag node) => notAChild(node);
- ASTNode visitShowCombinator(ShowCombinator node) {
+ AstNode visitShowCombinator(ShowCombinator node) {
if (node.shownNames.contains(_oldNode)) {
return _parser.parseSimpleIdentifier();
}
return notAChild(node);
}
- ASTNode visitSimpleFormalParameter(SimpleFormalParameter node) {
+ AstNode visitSimpleFormalParameter(SimpleFormalParameter node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -904,18 +902,18 @@
return notAChild(node);
}
- ASTNode visitSimpleIdentifier(SimpleIdentifier node) => notAChild(node);
+ AstNode visitSimpleIdentifier(SimpleIdentifier node) => notAChild(node);
- ASTNode visitSimpleStringLiteral(SimpleStringLiteral node) => notAChild(node);
+ AstNode visitSimpleStringLiteral(SimpleStringLiteral node) => notAChild(node);
- ASTNode visitStringInterpolation(StringInterpolation node) {
+ AstNode visitStringInterpolation(StringInterpolation node) {
if (node.elements.contains(_oldNode)) {
throw new InsufficientContextException();
}
return notAChild(node);
}
- ASTNode visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+ AstNode visitSuperConstructorInvocation(SuperConstructorInvocation node) {
if (identical(_oldNode, node.constructorName)) {
return _parser.parseSimpleIdentifier();
} else if (identical(_oldNode, node.argumentList)) {
@@ -924,9 +922,9 @@
return notAChild(node);
}
- ASTNode visitSuperExpression(SuperExpression node) => notAChild(node);
+ AstNode visitSuperExpression(SuperExpression node) => notAChild(node);
- ASTNode visitSwitchCase(SwitchCase node) {
+ AstNode visitSwitchCase(SwitchCase node) {
if (node.labels.contains(_oldNode)) {
return _parser.parseLabel();
} else if (identical(_oldNode, node.expression)) {
@@ -937,7 +935,7 @@
return notAChild(node);
}
- ASTNode visitSwitchDefault(SwitchDefault node) {
+ AstNode visitSwitchDefault(SwitchDefault node) {
if (node.labels.contains(_oldNode)) {
return _parser.parseLabel();
} else if (node.statements.contains(_oldNode)) {
@@ -946,7 +944,7 @@
return notAChild(node);
}
- ASTNode visitSwitchStatement(SwitchStatement node) {
+ AstNode visitSwitchStatement(SwitchStatement node) {
if (identical(_oldNode, node.expression)) {
return _parser.parseExpression2();
} else if (node.members.contains(_oldNode)) {
@@ -955,13 +953,13 @@
return notAChild(node);
}
- ASTNode visitSymbolLiteral(SymbolLiteral node) => notAChild(node);
+ AstNode visitSymbolLiteral(SymbolLiteral node) => notAChild(node);
- ASTNode visitThisExpression(ThisExpression node) => notAChild(node);
+ AstNode visitThisExpression(ThisExpression node) => notAChild(node);
- ASTNode visitThrowExpression(ThrowExpression node) {
+ AstNode visitThrowExpression(ThrowExpression node) {
if (identical(_oldNode, node.expression)) {
- if (isCascadeAllowed2(node)) {
+ if (isCascadeAllowedInThrow(node)) {
return _parser.parseExpression2();
}
return _parser.parseExpressionWithoutCascade();
@@ -969,7 +967,7 @@
return notAChild(node);
}
- ASTNode visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+ AstNode visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -980,7 +978,7 @@
return notAChild(node);
}
- ASTNode visitTryStatement(TryStatement node) {
+ AstNode visitTryStatement(TryStatement node) {
if (identical(_oldNode, node.body)) {
return _parser.parseBlock();
} else if (node.catchClauses.contains(_oldNode)) {
@@ -991,14 +989,14 @@
return notAChild(node);
}
- ASTNode visitTypeArgumentList(TypeArgumentList node) {
+ AstNode visitTypeArgumentList(TypeArgumentList node) {
if (node.arguments.contains(_oldNode)) {
return _parser.parseTypeName();
}
return notAChild(node);
}
- ASTNode visitTypeName(TypeName node) {
+ AstNode visitTypeName(TypeName node) {
if (identical(_oldNode, node.name)) {
return _parser.parsePrefixedIdentifier();
} else if (identical(_oldNode, node.typeArguments)) {
@@ -1007,7 +1005,7 @@
return notAChild(node);
}
- ASTNode visitTypeParameter(TypeParameter node) {
+ AstNode visitTypeParameter(TypeParameter node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -1020,14 +1018,14 @@
return notAChild(node);
}
- ASTNode visitTypeParameterList(TypeParameterList node) {
+ AstNode visitTypeParameterList(TypeParameterList node) {
if (node.typeParameters.contains(node)) {
return _parser.parseTypeParameter();
}
return notAChild(node);
}
- ASTNode visitVariableDeclaration(VariableDeclaration node) {
+ AstNode visitVariableDeclaration(VariableDeclaration node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -1040,7 +1038,7 @@
return notAChild(node);
}
- ASTNode visitVariableDeclarationList(VariableDeclarationList node) {
+ AstNode visitVariableDeclarationList(VariableDeclarationList node) {
if (identical(_oldNode, node.documentationComment)) {
throw new InsufficientContextException();
} else if (node.metadata.contains(_oldNode)) {
@@ -1051,14 +1049,14 @@
return notAChild(node);
}
- ASTNode visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+ AstNode visitVariableDeclarationStatement(VariableDeclarationStatement node) {
if (identical(_oldNode, node.variables)) {
throw new InsufficientContextException();
}
return notAChild(node);
}
- ASTNode visitWhileStatement(WhileStatement node) {
+ AstNode visitWhileStatement(WhileStatement node) {
if (identical(_oldNode, node.condition)) {
return _parser.parseExpression2();
} else if (identical(_oldNode, node.body)) {
@@ -1067,7 +1065,7 @@
return notAChild(node);
}
- ASTNode visitWithClause(WithClause node) {
+ AstNode visitWithClause(WithClause node) {
if (node.mixinTypes.contains(node)) {
return _parser.parseTypeName();
}
@@ -1081,7 +1079,7 @@
* @param node the assignment expression being tested
* @return `true` if the right-hand side can be a cascade expression
*/
- bool isCascadeAllowed(AssignmentExpression node) {
+ bool isCascadeAllowedInAssignment(AssignmentExpression node) {
// TODO(brianwilkerson) Implement this method.
throw new InsufficientContextException();
}
@@ -1092,7 +1090,7 @@
* @param node the throw expression being tested
* @return `true` if the expression can be a cascade expression
*/
- bool isCascadeAllowed2(ThrowExpression node) {
+ bool isCascadeAllowedInThrow(ThrowExpression node) {
// TODO(brianwilkerson) Implement this method.
throw new InsufficientContextException();
}
@@ -1103,7 +1101,7 @@
*
* @param visitedNode the visited node that should have been the parent of the node to be replaced
*/
- ASTNode notAChild(ASTNode visitedNode) {
+ AstNode notAChild(AstNode visitedNode) {
throw new IncrementalParseException.con1("Internal error: the visited node (a ${visitedNode.runtimeType.toString()}) was not the parent of the node to be replaced (a ${_oldNode.runtimeType.toString()})");
}
}
@@ -1156,7 +1154,7 @@
/**
* The node in the AST structure that contains the revised content.
*/
- ASTNode _updatedNode;
+ AstNode _updatedNode;
/**
* Initialize a newly created incremental parser to parse a portion of the content of the given
@@ -1178,7 +1176,7 @@
*
* @return the updated node
*/
- ASTNode get updatedNode => _updatedNode;
+ AstNode get updatedNode => _updatedNode;
/**
* Given a range of tokens that were re-scanned, re-parse the minimum number of tokens to produce
@@ -1192,9 +1190,9 @@
* @param originalStart the offset in the original source of the first character that was modified
* @param originalEnd the offset in the original source of the last character that was modified
*/
- ASTNode reparse(ASTNode originalStructure, Token leftToken, Token rightToken, int originalStart, int originalEnd) {
- ASTNode oldNode = null;
- ASTNode newNode = null;
+ AstNode reparse(AstNode originalStructure, Token leftToken, Token rightToken, int originalStart, int originalEnd) {
+ AstNode oldNode = null;
+ AstNode newNode = null;
//
// Find the first token that needs to be re-parsed.
//
@@ -1225,7 +1223,7 @@
Parser parser = new Parser(_source, _errorListener);
parser.currentToken = parseToken;
while (newNode == null) {
- ASTNode parent = oldNode.parent;
+ AstNode parent = oldNode.parent;
if (parent == null) {
parseToken = findFirstToken(parseToken);
parser.currentToken = parseToken;
@@ -1265,8 +1263,8 @@
return newNode;
}
ResolutionCopier.copyResolutionData(oldNode, newNode);
- IncrementalASTCloner cloner = new IncrementalASTCloner(oldNode, newNode, _tokenMap);
- return originalStructure.accept(cloner) as ASTNode;
+ IncrementalAstCloner cloner = new IncrementalAstCloner(oldNode, newNode, _tokenMap);
+ return originalStructure.accept(cloner) as AstNode;
}
/**
@@ -1326,8 +1324,6 @@
/**
* Instances of the class `Parser` are used to parse tokens into an AST structure.
- *
- * @coverage dart.engine.parser
*/
class Parser {
/**
@@ -1448,7 +1444,7 @@
InstrumentationBuilder instrumentation = Instrumentation.builder2("dart.engine.Parser.parseStatements");
try {
_currentToken = token;
- return parseStatements2();
+ return parseStatementList();
} finally {
instrumentation.log();
}
@@ -1474,16 +1470,16 @@
* @return the annotation that was parsed
*/
Annotation parseAnnotation() {
- Token atSign = expect2(TokenType.AT);
+ Token atSign = expect(TokenType.AT);
Identifier name = parsePrefixedIdentifier();
Token period = null;
SimpleIdentifier constructorName = null;
- if (matches5(TokenType.PERIOD)) {
+ if (matches(TokenType.PERIOD)) {
period = andAdvance;
constructorName = parseSimpleIdentifier();
}
ArgumentList arguments = null;
- if (matches5(TokenType.OPEN_PAREN)) {
+ if (matches(TokenType.OPEN_PAREN)) {
arguments = parseArgumentList();
}
return new Annotation(atSign, name, period, constructorName, arguments);
@@ -1508,7 +1504,7 @@
// Both namedArgument and expression can start with an identifier, but only namedArgument can
// have an identifier followed by a colon.
//
- if (matchesIdentifier() && matches4(peek(), TokenType.COLON)) {
+ if (matchesIdentifier() && tokenMatches(peek(), TokenType.COLON)) {
return new NamedExpression(parseLabel(), parseExpression2());
} else {
return parseExpression2();
@@ -1530,9 +1526,9 @@
* @return the argument list that was parsed
*/
ArgumentList parseArgumentList() {
- Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
+ Token leftParenthesis = expect(TokenType.OPEN_PAREN);
List<Expression> arguments = new List<Expression>();
- if (matches5(TokenType.CLOSE_PAREN)) {
+ if (matches(TokenType.CLOSE_PAREN)) {
return new ArgumentList(leftParenthesis, arguments, andAdvance);
}
//
@@ -1549,7 +1545,7 @@
if (foundNamedArgument) {
if (!generatedError && argument is! NamedExpression) {
// Report the error, once, but allow the arguments to be in any order in the AST.
- reportError13(ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, []);
+ reportErrorForCurrentToken(ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, []);
generatedError = true;
}
} else if (argument is NamedExpression) {
@@ -1559,7 +1555,7 @@
// TODO(brianwilkerson) Recovery: Look at the left parenthesis to see whether there is a
// matching right parenthesis. If there is, then we're more likely missing a comma and should
// go back to parsing arguments.
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
return new ArgumentList(leftParenthesis, arguments, rightParenthesis);
}
@@ -1576,12 +1572,12 @@
*/
Expression parseBitwiseOrExpression() {
Expression expression;
- if (matches(Keyword.SUPER) && matches4(peek(), TokenType.BAR)) {
+ if (matchesKeyword(Keyword.SUPER) && tokenMatches(peek(), TokenType.BAR)) {
expression = new SuperExpression(andAdvance);
} else {
expression = parseBitwiseXorExpression();
}
- while (matches5(TokenType.BAR)) {
+ while (matches(TokenType.BAR)) {
Token operator = andAdvance;
expression = new BinaryExpression(expression, operator, parseBitwiseXorExpression());
}
@@ -1599,22 +1595,22 @@
* @return the block that was parsed
*/
Block parseBlock() {
- Token leftBracket = expect2(TokenType.OPEN_CURLY_BRACKET);
+ Token leftBracket = expect(TokenType.OPEN_CURLY_BRACKET);
List<Statement> statements = new List<Statement>();
Token statementStart = _currentToken;
- while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET)) {
+ while (!matches(TokenType.EOF) && !matches(TokenType.CLOSE_CURLY_BRACKET)) {
Statement statement = parseStatement2();
if (statement != null) {
statements.add(statement);
}
if (identical(_currentToken, statementStart)) {
// Ensure that we are making progress and report an error if we're not.
- reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportErrorForToken(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
}
statementStart = _currentToken;
}
- Token rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET);
+ Token rightBracket = expect(TokenType.CLOSE_CURLY_BRACKET);
return new Block(leftBracket, statements, rightBracket);
}
@@ -1634,15 +1630,15 @@
ClassMember parseClassMember(String className) {
CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
Modifiers modifiers = parseModifiers();
- if (matches(Keyword.VOID)) {
+ if (matchesKeyword(Keyword.VOID)) {
TypeName returnType = parseReturnType();
- if (matches(Keyword.GET) && matchesIdentifier2(peek())) {
+ if (matchesKeyword(Keyword.GET) && tokenMatchesIdentifier(peek())) {
validateModifiersForGetterOrSetterOrMethod(modifiers);
return parseGetter(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, returnType);
- } else if (matches(Keyword.SET) && matchesIdentifier2(peek())) {
+ } else if (matchesKeyword(Keyword.SET) && tokenMatchesIdentifier(peek())) {
validateModifiersForGetterOrSetterOrMethod(modifiers);
return parseSetter(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, returnType);
- } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
+ } else if (matchesKeyword(Keyword.OPERATOR) && isOperator(peek())) {
validateModifiersForOperator(modifiers);
return parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType);
} else if (matchesIdentifier() && matchesAny(peek(), [
@@ -1650,7 +1646,7 @@
TokenType.OPEN_CURLY_BRACKET,
TokenType.FUNCTION])) {
validateModifiersForGetterOrSetterOrMethod(modifiers);
- return parseMethodDeclaration(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, returnType);
+ return parseMethodDeclarationAfterReturnType(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, returnType);
} else {
//
// We have found an error of some kind. Try to recover.
@@ -1660,7 +1656,7 @@
//
// We appear to have a variable declaration with a type of "void".
//
- reportError12(ParserErrorCode.VOID_VARIABLE, returnType, []);
+ reportErrorForNode(ParserErrorCode.VOID_VARIABLE, returnType, []);
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), returnType);
}
}
@@ -1671,16 +1667,16 @@
validateModifiersForOperator(modifiers);
return parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType);
}
- reportError14(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportErrorForToken(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
return null;
}
- } else if (matches(Keyword.GET) && matchesIdentifier2(peek())) {
+ } else if (matchesKeyword(Keyword.GET) && tokenMatchesIdentifier(peek())) {
validateModifiersForGetterOrSetterOrMethod(modifiers);
return parseGetter(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, null);
- } else if (matches(Keyword.SET) && matchesIdentifier2(peek())) {
+ } else if (matchesKeyword(Keyword.SET) && tokenMatchesIdentifier(peek())) {
validateModifiersForGetterOrSetterOrMethod(modifiers);
return parseSetter(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, null);
- } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
+ } else if (matchesKeyword(Keyword.OPERATOR) && isOperator(peek())) {
validateModifiersForOperator(modifiers);
return parseOperator(commentAndMetadata, modifiers.externalKeyword, null);
} else if (!matchesIdentifier()) {
@@ -1691,37 +1687,45 @@
validateModifiersForOperator(modifiers);
return parseOperator(commentAndMetadata, modifiers.externalKeyword, null);
}
- reportError14(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []);
+ reportErrorForToken(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []);
+ if (commentAndMetadata.comment != null || !commentAndMetadata.metadata.isEmpty) {
+ //
+ // We appear to have found an incomplete declaration at the end of the class. At this point
+ // it consists of a metadata, which we don't want to loose, so we'll treat it as a method
+ // declaration with a missing name, parameters and empty body.
+ //
+ return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, null, null, null, null, null, createSyntheticIdentifier(), new FormalParameterList(null, new List<FormalParameter>(), null, null, null), new EmptyFunctionBody(createSyntheticToken(TokenType.SEMICOLON)));
+ }
return null;
- } else if (matches4(peek(), TokenType.PERIOD) && matchesIdentifier2(peek2(2)) && matches4(peek2(3), TokenType.OPEN_PAREN)) {
+ } else if (tokenMatches(peek(), TokenType.PERIOD) && tokenMatchesIdentifier(peek2(2)) && tokenMatches(peek2(3), TokenType.OPEN_PAREN)) {
return parseConstructor(commentAndMetadata, modifiers.externalKeyword, validateModifiersForConstructor(modifiers), modifiers.factoryKeyword, parseSimpleIdentifier(), andAdvance, parseSimpleIdentifier(), parseFormalParameterList());
- } else if (matches4(peek(), TokenType.OPEN_PAREN)) {
+ } else if (tokenMatches(peek(), TokenType.OPEN_PAREN)) {
SimpleIdentifier methodName = parseSimpleIdentifier();
FormalParameterList parameters = parseFormalParameterList();
- if (matches5(TokenType.COLON) || modifiers.factoryKeyword != null || methodName.name == className) {
+ if (matches(TokenType.COLON) || modifiers.factoryKeyword != null || methodName.name == className) {
return parseConstructor(commentAndMetadata, modifiers.externalKeyword, validateModifiersForConstructor(modifiers), modifiers.factoryKeyword, methodName, null, null, parameters);
}
validateModifiersForGetterOrSetterOrMethod(modifiers);
validateFormalParameterList(parameters);
- return parseMethodDeclaration2(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, null, methodName, parameters);
+ return parseMethodDeclarationAfterParameters(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, null, methodName, parameters);
} else if (matchesAny(peek(), [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) {
if (modifiers.constKeyword == null && modifiers.finalKeyword == null && modifiers.varKeyword == null) {
- reportError13(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
}
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), null);
}
TypeName type = parseTypeName();
- if (matches(Keyword.GET) && matchesIdentifier2(peek())) {
+ if (matchesKeyword(Keyword.GET) && tokenMatchesIdentifier(peek())) {
validateModifiersForGetterOrSetterOrMethod(modifiers);
return parseGetter(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, type);
- } else if (matches(Keyword.SET) && matchesIdentifier2(peek())) {
+ } else if (matchesKeyword(Keyword.SET) && tokenMatchesIdentifier(peek())) {
validateModifiersForGetterOrSetterOrMethod(modifiers);
return parseSetter(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, type);
- } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
+ } else if (matchesKeyword(Keyword.OPERATOR) && isOperator(peek())) {
validateModifiersForOperator(modifiers);
return parseOperator(commentAndMetadata, modifiers.externalKeyword, type);
} else if (!matchesIdentifier()) {
- if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
+ if (matches(TokenType.CLOSE_CURLY_BRACKET)) {
//
// We appear to have found an incomplete declaration at the end of the class. At this point
// it consists of a type name, so we'll treat it as a field declaration with a missing
@@ -1741,23 +1745,23 @@
// At this point it consists of a type name, so we'll treat it as a field declaration
// with a missing field name and semicolon.
//
- reportError14(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []);
+ reportErrorForToken(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []);
try {
lockErrorListener();
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), type);
} finally {
unlockErrorListener();
}
- } else if (matches4(peek(), TokenType.OPEN_PAREN)) {
+ } else if (tokenMatches(peek(), TokenType.OPEN_PAREN)) {
SimpleIdentifier methodName = parseSimpleIdentifier();
FormalParameterList parameters = parseFormalParameterList();
if (methodName.name == className) {
- reportError12(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, type, []);
+ reportErrorForNode(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, type, []);
return parseConstructor(commentAndMetadata, modifiers.externalKeyword, validateModifiersForConstructor(modifiers), modifiers.factoryKeyword, methodName, null, null, parameters);
}
validateModifiersForGetterOrSetterOrMethod(modifiers);
validateFormalParameterList(parameters);
- return parseMethodDeclaration2(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, type, methodName, parameters);
+ return parseMethodDeclarationAfterParameters(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, type, methodName, parameters);
}
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), type);
}
@@ -1787,7 +1791,7 @@
CompilationUnit parseCompilationUnit2() {
Token firstToken = _currentToken;
ScriptTag scriptTag = null;
- if (matches5(TokenType.SCRIPT_TAG)) {
+ if (matches(TokenType.SCRIPT_TAG)) {
scriptTag = new ScriptTag(andAdvance);
}
//
@@ -1801,20 +1805,20 @@
List<Directive> directives = new List<Directive>();
List<CompilationUnitMember> declarations = new List<CompilationUnitMember>();
Token memberStart = _currentToken;
- while (!matches5(TokenType.EOF)) {
+ while (!matches(TokenType.EOF)) {
CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
- if ((matches(Keyword.IMPORT) || matches(Keyword.EXPORT) || matches(Keyword.LIBRARY) || matches(Keyword.PART)) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT) && !matches4(peek(), TokenType.OPEN_PAREN)) {
+ if ((matchesKeyword(Keyword.IMPORT) || matchesKeyword(Keyword.EXPORT) || matchesKeyword(Keyword.LIBRARY) || matchesKeyword(Keyword.PART)) && !tokenMatches(peek(), TokenType.PERIOD) && !tokenMatches(peek(), TokenType.LT) && !tokenMatches(peek(), TokenType.OPEN_PAREN)) {
Directive directive = parseDirective(commentAndMetadata);
if (declarations.length > 0 && !directiveFoundAfterDeclaration) {
- reportError13(ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, []);
+ reportErrorForCurrentToken(ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, []);
directiveFoundAfterDeclaration = true;
}
if (directive is LibraryDirective) {
if (libraryDirectiveFound) {
- reportError13(ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES, []);
+ reportErrorForCurrentToken(ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES, []);
} else {
if (directives.length > 0) {
- reportError14(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, directive.libraryToken, []);
+ reportErrorForToken(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, directive.libraryToken, []);
}
libraryDirectiveFound = true;
}
@@ -1822,29 +1826,29 @@
partDirectiveFound = true;
} else if (partDirectiveFound) {
if (directive is ExportDirective) {
- reportError14(ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
+ reportErrorForToken(ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
} else if (directive is ImportDirective) {
- reportError14(ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
+ reportErrorForToken(ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
}
}
if (directive is PartOfDirective) {
if (partOfDirectiveFound) {
- reportError13(ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES, []);
+ reportErrorForCurrentToken(ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES, []);
} else {
int directiveCount = directives.length;
for (int i = 0; i < directiveCount; i++) {
- reportError14(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directives[i].keyword, []);
+ reportErrorForToken(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directives[i].keyword, []);
}
partOfDirectiveFound = true;
}
} else {
if (partOfDirectiveFound) {
- reportError14(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directive.keyword, []);
+ reportErrorForToken(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directive.keyword, []);
}
}
directives.add(directive);
- } else if (matches5(TokenType.SEMICOLON)) {
- reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ } else if (matches(TokenType.SEMICOLON)) {
+ reportErrorForToken(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
} else {
CompilationUnitMember member = parseCompilationUnitMember(commentAndMetadata);
@@ -1853,9 +1857,9 @@
}
}
if (identical(_currentToken, memberStart)) {
- reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportErrorForToken(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
- while (!matches5(TokenType.EOF) && !couldBeStartOfCompilationUnitMember()) {
+ while (!matches(TokenType.EOF) && !couldBeStartOfCompilationUnitMember()) {
advance();
}
}
@@ -1876,12 +1880,12 @@
*/
Expression parseConditionalExpression() {
Expression condition = parseLogicalOrExpression();
- if (!matches5(TokenType.QUESTION)) {
+ if (!matches(TokenType.QUESTION)) {
return condition;
}
Token question = andAdvance;
Expression thenExpression = parseExpressionWithoutCascade();
- Token colon = expect2(TokenType.COLON);
+ Token colon = expect(TokenType.COLON);
Expression elseExpression = parseExpressionWithoutCascade();
return new ConditionalExpression(condition, question, thenExpression, colon, elseExpression);
}
@@ -1900,7 +1904,7 @@
TypeName type = parseTypeName();
Token period = null;
SimpleIdentifier name = null;
- if (matches5(TokenType.PERIOD)) {
+ if (matches(TokenType.PERIOD)) {
period = andAdvance;
name = parseSimpleIdentifier();
}
@@ -1920,9 +1924,9 @@
* @return the expression that was parsed
*/
Expression parseExpression2() {
- if (matches(Keyword.THROW)) {
+ if (matchesKeyword(Keyword.THROW)) {
return parseThrowExpression();
- } else if (matches(Keyword.RETHROW)) {
+ } else if (matchesKeyword(Keyword.RETHROW)) {
return parseRethrowExpression();
}
//
@@ -1963,9 +1967,9 @@
* @return the expression that was parsed
*/
Expression parseExpressionWithoutCascade() {
- if (matches(Keyword.THROW)) {
+ if (matchesKeyword(Keyword.THROW)) {
return parseThrowExpressionWithoutCascade();
- } else if (matches(Keyword.RETHROW)) {
+ } else if (matchesKeyword(Keyword.RETHROW)) {
return parseRethrowExpression();
}
//
@@ -1993,7 +1997,7 @@
* @return the class extends clause that was parsed
*/
ExtendsClause parseExtendsClause() {
- Token keyword = expect(Keyword.EXTENDS);
+ Token keyword = expectKeyword(Keyword.EXTENDS);
TypeName superclass = parseTypeName();
return new ExtendsClause(keyword, superclass);
}
@@ -2024,8 +2028,8 @@
* @return the formal parameters that were parsed
*/
FormalParameterList parseFormalParameterList() {
- Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
- if (matches5(TokenType.CLOSE_PAREN)) {
+ Token leftParenthesis = expect(TokenType.OPEN_PAREN);
+ if (matches(TokenType.CLOSE_PAREN)) {
return new FormalParameterList(leftParenthesis, null, null, null, andAdvance);
}
//
@@ -2055,9 +2059,9 @@
} else if (!optional(TokenType.COMMA)) {
// TODO(brianwilkerson) The token is wrong, we need to recover from this case.
if (getEndToken(leftParenthesis) != null) {
- reportError13(ParserErrorCode.EXPECTED_TOKEN, [TokenType.COMMA.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_TOKEN, [TokenType.COMMA.lexeme]);
} else {
- reportError14(ParserErrorCode.MISSING_CLOSING_PARENTHESIS, _currentToken.previous, []);
+ reportErrorForToken(ParserErrorCode.MISSING_CLOSING_PARENTHESIS, _currentToken.previous, []);
break;
}
}
@@ -2065,27 +2069,27 @@
//
// Handle the beginning of parameter groups.
//
- if (matches5(TokenType.OPEN_SQUARE_BRACKET)) {
+ if (matches(TokenType.OPEN_SQUARE_BRACKET)) {
wasOptionalParameter = true;
if (leftSquareBracket != null && !reportedMuliplePositionalGroups) {
- reportError13(ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS, []);
+ reportErrorForCurrentToken(ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS, []);
reportedMuliplePositionalGroups = true;
}
if (leftCurlyBracket != null && !reportedMixedGroups) {
- reportError13(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
+ reportErrorForCurrentToken(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
reportedMixedGroups = true;
}
leftSquareBracket = andAdvance;
currentParameters = positionalParameters;
kind = ParameterKind.POSITIONAL;
- } else if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
+ } else if (matches(TokenType.OPEN_CURLY_BRACKET)) {
wasOptionalParameter = true;
if (leftCurlyBracket != null && !reportedMulipleNamedGroups) {
- reportError13(ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS, []);
+ reportErrorForCurrentToken(ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS, []);
reportedMulipleNamedGroups = true;
}
if (leftSquareBracket != null && !reportedMixedGroups) {
- reportError13(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
+ reportErrorForCurrentToken(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
reportedMixedGroups = true;
}
leftCurlyBracket = andAdvance;
@@ -2099,49 +2103,49 @@
parameters.add(parameter);
currentParameters.add(parameter);
if (identical(kind, ParameterKind.REQUIRED) && wasOptionalParameter) {
- reportError12(ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS, parameter, []);
+ reportErrorForNode(ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS, parameter, []);
}
//
// Handle the end of parameter groups.
//
// TODO(brianwilkerson) Improve the detection and reporting of missing and mismatched delimiters.
- if (matches5(TokenType.CLOSE_SQUARE_BRACKET)) {
+ if (matches(TokenType.CLOSE_SQUARE_BRACKET)) {
rightSquareBracket = andAdvance;
currentParameters = normalParameters;
if (leftSquareBracket == null) {
if (leftCurlyBracket != null) {
- reportError13(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
+ reportErrorForCurrentToken(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
rightCurlyBracket = rightSquareBracket;
rightSquareBracket = null;
} else {
- reportError13(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["["]);
+ reportErrorForCurrentToken(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["["]);
}
}
kind = ParameterKind.REQUIRED;
- } else if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
+ } else if (matches(TokenType.CLOSE_CURLY_BRACKET)) {
rightCurlyBracket = andAdvance;
currentParameters = normalParameters;
if (leftCurlyBracket == null) {
if (leftSquareBracket != null) {
- reportError13(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
+ reportErrorForCurrentToken(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
rightSquareBracket = rightCurlyBracket;
rightCurlyBracket = null;
} else {
- reportError13(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["{"]);
+ reportErrorForCurrentToken(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["{"]);
}
}
kind = ParameterKind.REQUIRED;
}
- } while (!matches5(TokenType.CLOSE_PAREN) && initialToken != _currentToken);
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ } while (!matches(TokenType.CLOSE_PAREN) && initialToken != _currentToken);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
//
// Check that the groups were closed correctly.
//
if (leftSquareBracket != null && rightSquareBracket == null) {
- reportError13(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
}
if (leftCurlyBracket != null && rightCurlyBracket == null) {
- reportError13(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
}
//
// Build the parameter list.
@@ -2183,7 +2187,7 @@
* @return the implements clause that was parsed
*/
ImplementsClause parseImplementsClause() {
- Token keyword = expect(Keyword.IMPLEMENTS);
+ Token keyword = expectKeyword(Keyword.IMPLEMENTS);
List<TypeName> interfaces = new List<TypeName>();
interfaces.add(parseTypeName());
while (optional(TokenType.COMMA)) {
@@ -2204,7 +2208,7 @@
*/
Label parseLabel() {
SimpleIdentifier label = parseSimpleIdentifier();
- Token colon = expect2(TokenType.COLON);
+ Token colon = expect(TokenType.COLON);
return new Label(label, colon);
}
@@ -2221,7 +2225,7 @@
LibraryIdentifier parseLibraryIdentifier() {
List<SimpleIdentifier> components = new List<SimpleIdentifier>();
components.add(parseSimpleIdentifier());
- while (matches5(TokenType.PERIOD)) {
+ while (matches(TokenType.PERIOD)) {
advance();
components.add(parseSimpleIdentifier());
}
@@ -2240,7 +2244,7 @@
*/
Expression parseLogicalOrExpression() {
Expression expression = parseLogicalAndExpression();
- while (matches5(TokenType.BAR_BAR)) {
+ while (matches(TokenType.BAR_BAR)) {
Token operator = andAdvance;
expression = new BinaryExpression(expression, operator, parseLogicalAndExpression());
}
@@ -2259,7 +2263,7 @@
*/
MapLiteralEntry parseMapLiteralEntry() {
Expression key = parseExpression2();
- Token separator = expect2(TokenType.COLON);
+ Token separator = expect(TokenType.COLON);
Expression value = parseExpression2();
return new MapLiteralEntry(key, separator, value);
}
@@ -2291,16 +2295,16 @@
FinalConstVarOrType holder = parseFinalConstVarOrType(true);
Token thisKeyword = null;
Token period = null;
- if (matches(Keyword.THIS)) {
+ if (matchesKeyword(Keyword.THIS)) {
thisKeyword = andAdvance;
- period = expect2(TokenType.PERIOD);
+ period = expect(TokenType.PERIOD);
}
SimpleIdentifier identifier = parseSimpleIdentifier();
- if (matches5(TokenType.OPEN_PAREN)) {
+ if (matches(TokenType.OPEN_PAREN)) {
FormalParameterList parameters = parseFormalParameterList();
if (thisKeyword == null) {
if (holder.keyword != null) {
- reportError14(ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR, holder.keyword, []);
+ reportErrorForToken(ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR, holder.keyword, []);
}
return new FunctionTypedFormalParameter(commentAndMetadata.comment, commentAndMetadata.metadata, holder.type, identifier, parameters);
} else {
@@ -2309,10 +2313,10 @@
}
TypeName type = holder.type;
if (type != null) {
- if (matches3(type.name.beginToken, Keyword.VOID)) {
- reportError14(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []);
- } else if (holder.keyword != null && matches3(holder.keyword, Keyword.VAR)) {
- reportError14(ParserErrorCode.VAR_AND_TYPE, holder.keyword, []);
+ if (tokenMatchesKeyword(type.name.beginToken, Keyword.VOID)) {
+ reportErrorForToken(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []);
+ } else if (holder.keyword != null && tokenMatchesKeyword(holder.keyword, Keyword.VAR)) {
+ reportErrorForToken(ParserErrorCode.VAR_AND_TYPE, holder.keyword, []);
}
}
if (thisKeyword != null) {
@@ -2333,7 +2337,7 @@
*/
Identifier parsePrefixedIdentifier() {
SimpleIdentifier qualifier = parseSimpleIdentifier();
- if (!matches5(TokenType.PERIOD)) {
+ if (!matches(TokenType.PERIOD)) {
return qualifier;
}
Token period = andAdvance;
@@ -2353,7 +2357,7 @@
* @return the return type that was parsed
*/
TypeName parseReturnType() {
- if (matches(Keyword.VOID)) {
+ if (matchesKeyword(Keyword.VOID)) {
return new TypeName(new SimpleIdentifier(andAdvance), null);
} else {
return parseTypeName();
@@ -2374,7 +2378,7 @@
if (matchesIdentifier()) {
return new SimpleIdentifier(andAdvance);
}
- reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER, []);
return createSyntheticIdentifier();
}
@@ -2390,7 +2394,7 @@
*/
Statement parseStatement2() {
List<Label> labels = new List<Label>();
- while (matchesIdentifier() && matches4(peek(), TokenType.COLON)) {
+ while (matchesIdentifier() && tokenMatches(peek(), TokenType.COLON)) {
labels.add(parseLabel());
}
Statement statement = parseNonLabeledStatement();
@@ -2413,16 +2417,16 @@
*/
StringLiteral parseStringLiteral() {
List<StringLiteral> strings = new List<StringLiteral>();
- while (matches5(TokenType.STRING)) {
+ while (matches(TokenType.STRING)) {
Token string = andAdvance;
- if (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches5(TokenType.STRING_INTERPOLATION_IDENTIFIER)) {
+ if (matches(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches(TokenType.STRING_INTERPOLATION_IDENTIFIER)) {
strings.add(parseStringInterpolation(string));
} else {
strings.add(new SimpleStringLiteral(string, computeStringValue(string.lexeme, true, true)));
}
}
if (strings.length < 1) {
- reportError13(ParserErrorCode.EXPECTED_STRING_LITERAL, []);
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_STRING_LITERAL, []);
return createSyntheticStringLiteral();
} else if (strings.length == 1) {
return strings[0];
@@ -2445,13 +2449,13 @@
* @return the type argument list that was parsed
*/
TypeArgumentList parseTypeArgumentList() {
- Token leftBracket = expect2(TokenType.LT);
+ Token leftBracket = expect(TokenType.LT);
List<TypeName> arguments = new List<TypeName>();
arguments.add(parseTypeName());
while (optional(TokenType.COMMA)) {
arguments.add(parseTypeName());
}
- Token rightBracket = expect2(TokenType.GT);
+ Token rightBracket = expect(TokenType.GT);
return new TypeArgumentList(leftBracket, arguments, rightBracket);
}
@@ -2467,17 +2471,17 @@
*/
TypeName parseTypeName() {
Identifier typeName;
- if (matches(Keyword.VAR)) {
- reportError13(ParserErrorCode.VAR_AS_TYPE_NAME, []);
+ if (matchesKeyword(Keyword.VAR)) {
+ reportErrorForCurrentToken(ParserErrorCode.VAR_AS_TYPE_NAME, []);
typeName = new SimpleIdentifier(andAdvance);
} else if (matchesIdentifier()) {
typeName = parsePrefixedIdentifier();
} else {
typeName = createSyntheticIdentifier();
- reportError13(ParserErrorCode.EXPECTED_TYPE_NAME, []);
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_TYPE_NAME, []);
}
TypeArgumentList typeArguments = null;
- if (matches5(TokenType.LT)) {
+ if (matches(TokenType.LT)) {
typeArguments = parseTypeArgumentList();
}
return new TypeName(typeName, typeArguments);
@@ -2496,7 +2500,7 @@
TypeParameter parseTypeParameter() {
CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
SimpleIdentifier name = parseSimpleIdentifier();
- if (matches(Keyword.EXTENDS)) {
+ if (matchesKeyword(Keyword.EXTENDS)) {
Token keyword = andAdvance;
TypeName bound = parseTypeName();
return new TypeParameter(commentAndMetadata.comment, commentAndMetadata.metadata, name, keyword, bound);
@@ -2515,13 +2519,13 @@
* @return the list of type parameters that were parsed
*/
TypeParameterList parseTypeParameterList() {
- Token leftBracket = expect2(TokenType.LT);
+ Token leftBracket = expect(TokenType.LT);
List<TypeParameter> typeParameters = new List<TypeParameter>();
typeParameters.add(parseTypeParameter());
while (optional(TokenType.COMMA)) {
typeParameters.add(parseTypeParameter());
}
- Token rightBracket = expect2(TokenType.GT);
+ Token rightBracket = expect(TokenType.GT);
return new TypeParameterList(leftBracket, typeParameters, rightBracket);
}
@@ -2536,7 +2540,7 @@
* @return the with clause that was parsed
*/
WithClause parseWithClause() {
- Token with2 = expect(Keyword.WITH);
+ Token with2 = expectKeyword(Keyword.WITH);
List<TypeName> types = new List<TypeName>();
types.add(parseTypeName());
while (optional(TokenType.COMMA)) {
@@ -2569,7 +2573,7 @@
*/
void appendScalarValue(JavaStringBuilder builder, String escapeSequence, int scalarValue, int startIndex, int endIndex) {
if (scalarValue < 0 || scalarValue > Character.MAX_CODE_POINT || (scalarValue >= 0xD800 && scalarValue <= 0xDFFF)) {
- reportError13(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]);
return;
}
if (scalarValue < Character.MAX_VALUE) {
@@ -2643,20 +2647,20 @@
* @return `true` if the current token could be the start of a compilation unit member
*/
bool couldBeStartOfCompilationUnitMember() {
- if ((matches(Keyword.IMPORT) || matches(Keyword.EXPORT) || matches(Keyword.LIBRARY) || matches(Keyword.PART)) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) {
+ if ((matchesKeyword(Keyword.IMPORT) || matchesKeyword(Keyword.EXPORT) || matchesKeyword(Keyword.LIBRARY) || matchesKeyword(Keyword.PART)) && !tokenMatches(peek(), TokenType.PERIOD) && !tokenMatches(peek(), TokenType.LT)) {
// This looks like the start of a directive
return true;
- } else if (matches(Keyword.CLASS)) {
+ } else if (matchesKeyword(Keyword.CLASS)) {
// This looks like the start of a class definition
return true;
- } else if (matches(Keyword.TYPEDEF) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) {
+ } else if (matchesKeyword(Keyword.TYPEDEF) && !tokenMatches(peek(), TokenType.PERIOD) && !tokenMatches(peek(), TokenType.LT)) {
// This looks like the start of a typedef
return true;
- } else if (matches(Keyword.VOID) || ((matches(Keyword.GET) || matches(Keyword.SET)) && matchesIdentifier2(peek())) || (matches(Keyword.OPERATOR) && isOperator(peek()))) {
+ } else if (matchesKeyword(Keyword.VOID) || ((matchesKeyword(Keyword.GET) || matchesKeyword(Keyword.SET)) && tokenMatchesIdentifier(peek())) || (matchesKeyword(Keyword.OPERATOR) && isOperator(peek()))) {
// This looks like the start of a function
return true;
} else if (matchesIdentifier()) {
- if (matches4(peek(), TokenType.OPEN_PAREN)) {
+ if (tokenMatches(peek(), TokenType.OPEN_PAREN)) {
// This looks like the start of a function
return true;
}
@@ -2664,7 +2668,7 @@
if (token == null) {
return false;
}
- if (matches(Keyword.GET) || matches(Keyword.SET) || (matches(Keyword.OPERATOR) && isOperator(peek())) || matchesIdentifier()) {
+ if (matchesKeyword(Keyword.GET) || matchesKeyword(Keyword.SET) || (matchesKeyword(Keyword.OPERATOR) && isOperator(peek())) || matchesIdentifier()) {
return true;
}
}
@@ -2685,31 +2689,31 @@
// In the code completion behavior will depend on a cursor position - before or on "is".
syntheticToken = injectToken(new SyntheticStringToken(TokenType.IDENTIFIER, _currentToken.lexeme, _currentToken.offset));
} else {
- syntheticToken = createSyntheticToken2(TokenType.IDENTIFIER);
+ syntheticToken = createSyntheticToken(TokenType.IDENTIFIER);
}
return new SimpleIdentifier(syntheticToken);
}
/**
- * Create a synthetic string literal.
- *
- * @return the synthetic string literal that was created
- */
- SimpleStringLiteral createSyntheticStringLiteral() => new SimpleStringLiteral(createSyntheticToken2(TokenType.STRING), "");
-
- /**
* Create a synthetic token representing the given keyword.
*
* @return the synthetic token that was created
*/
- Token createSyntheticToken(Keyword keyword) => injectToken(new Parser_SyntheticKeywordToken(keyword, _currentToken.offset));
+ Token createSyntheticKeyword(Keyword keyword) => injectToken(new Parser_SyntheticKeywordToken(keyword, _currentToken.offset));
+
+ /**
+ * Create a synthetic string literal.
+ *
+ * @return the synthetic string literal that was created
+ */
+ SimpleStringLiteral createSyntheticStringLiteral() => new SimpleStringLiteral(createSyntheticToken(TokenType.STRING), "");
/**
* Create a synthetic token with the given type.
*
* @return the synthetic token that was created
*/
- Token createSyntheticToken2(TokenType type) => injectToken(new StringToken(type, "", _currentToken.offset));
+ Token createSyntheticToken(TokenType type) => injectToken(new StringToken(type, "", _currentToken.offset));
/**
* Check that the given expression is assignable and report an error if it isn't.
@@ -2729,49 +2733,64 @@
*/
void ensureAssignable(Expression expression) {
if (expression != null && !expression.isAssignable) {
- reportError13(ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, []);
+ reportErrorForCurrentToken(ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, []);
}
}
/**
- * If the current token is a keyword matching the given string, return it after advancing to the
- * next token. Otherwise report an error and return the current token without advancing.
- *
- * @param keyword the keyword that is expected
- * @return the token that matched the given type
- */
- Token expect(Keyword keyword) {
- if (matches(keyword)) {
- return andAdvance;
- }
- // Remove uses of this method in favor of matches?
- // Pass in the error code to use to report the error?
- reportError13(ParserErrorCode.EXPECTED_TOKEN, [keyword.syntax]);
- return _currentToken;
- }
-
- /**
* If the current token has the expected type, return it after advancing to the next token.
* Otherwise report an error and return the current token without advancing.
*
* @param type the type of token that is expected
* @return the token that matched the given type
*/
- Token expect2(TokenType type) {
- if (matches5(type)) {
+ Token expect(TokenType type) {
+ if (matches(type)) {
return andAdvance;
}
// Remove uses of this method in favor of matches?
// Pass in the error code to use to report the error?
if (identical(type, TokenType.SEMICOLON)) {
- reportError14(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [type.lexeme]);
+ reportErrorForToken(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [type.lexeme]);
} else {
- reportError13(ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]);
}
return _currentToken;
}
/**
+ * If the current token is a keyword matching the given string, return it after advancing to the
+ * next token. Otherwise report an error and return the current token without advancing.
+ *
+ * @param keyword the keyword that is expected
+ * @return the token that matched the given type
+ */
+ Token expectKeyword(Keyword keyword) {
+ if (matchesKeyword(keyword)) {
+ return andAdvance;
+ }
+ // Remove uses of this method in favor of matches?
+ // Pass in the error code to use to report the error?
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_TOKEN, [keyword.syntax]);
+ return _currentToken;
+ }
+
+ /**
+ * If [currentToken] is a semicolon, returns it; otherwise reports error and creates a
+ * synthetic one.
+ *
+ * TODO(scheglov) consider pushing this into [expect]
+ */
+ Token expectSemicolon() {
+ if (matches(TokenType.SEMICOLON)) {
+ return andAdvance;
+ } else {
+ reportErrorForToken(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [";"]);
+ return createSyntheticToken(TokenType.SEMICOLON);
+ }
+ }
+
+ /**
* Search the given list of ranges for a range that contains the given index. Return the range
* that was found, or `null` if none of the ranges contain the index.
*
@@ -2882,7 +2901,7 @@
if (next == null) {
return false;
}
- return matchesIdentifier2(next);
+ return tokenMatchesIdentifier(next);
}
/**
@@ -2904,7 +2923,7 @@
* @return `true` if the current token appears to be the beginning of a function declaration
*/
bool isFunctionDeclaration() {
- if (matches(Keyword.VOID)) {
+ if (matchesKeyword(Keyword.VOID)) {
return true;
}
Token afterReturnType = skipTypeName(_currentToken);
@@ -2926,12 +2945,12 @@
}
// It's possible that we have found a getter. While this isn't valid at this point we test for
// it in order to recover better.
- if (matches(Keyword.GET)) {
+ if (matchesKeyword(Keyword.GET)) {
Token afterName = skipSimpleIdentifier(_currentToken.next);
if (afterName == null) {
return false;
}
- return matches4(afterName, TokenType.FUNCTION) || matches4(afterName, TokenType.OPEN_CURLY_BRACKET);
+ return tokenMatches(afterName, TokenType.FUNCTION) || tokenMatches(afterName, TokenType.OPEN_CURLY_BRACKET);
}
return false;
}
@@ -2987,11 +3006,11 @@
* declaration
*/
bool isInitializedVariableDeclaration() {
- if (matches(Keyword.FINAL) || matches(Keyword.VAR)) {
+ if (matchesKeyword(Keyword.FINAL) || matchesKeyword(Keyword.VAR)) {
// An expression cannot start with a keyword other than 'const', 'rethrow', or 'throw'.
return true;
}
- if (matches(Keyword.CONST)) {
+ if (matchesKeyword(Keyword.CONST)) {
// Look to see whether we might be at the start of a list or map literal, otherwise this
// should be the start of a variable declaration.
return !matchesAny(peek(), [
@@ -3011,7 +3030,7 @@
return false;
}
TokenType type = token.type;
- return identical(type, TokenType.EQ) || identical(type, TokenType.COMMA) || identical(type, TokenType.SEMICOLON) || matches3(token, Keyword.IN);
+ return identical(type, TokenType.EQ) || identical(type, TokenType.COMMA) || identical(type, TokenType.SEMICOLON) || tokenMatchesKeyword(token, Keyword.IN);
}
/**
@@ -3067,7 +3086,7 @@
token = token.next;
}
// Formal parameter list is expect now.
- return matches4(token, TokenType.OPEN_PAREN);
+ return tokenMatches(token, TokenType.OPEN_PAREN);
}
/**
@@ -3077,7 +3096,7 @@
*/
bool isSwitchMember() {
Token token = _currentToken;
- while (matches4(token, TokenType.IDENTIFIER) && matches4(token.next, TokenType.COLON)) {
+ while (tokenMatches(token, TokenType.IDENTIFIER) && tokenMatches(token.next, TokenType.COLON)) {
token = token.next.next;
}
if (identical(token.type, TokenType.KEYWORD)) {
@@ -3098,9 +3117,9 @@
Token token = skipReturnType(startToken);
if (token == null) {
return false;
- } else if (matchesIdentifier2(token)) {
+ } else if (tokenMatchesIdentifier(token)) {
return true;
- } else if (matches3(token, Keyword.THIS) && matches4(token.next, TokenType.PERIOD) && matchesIdentifier2(token.next.next)) {
+ } else if (tokenMatchesKeyword(token, Keyword.THIS) && tokenMatches(token.next, TokenType.PERIOD) && tokenMatchesIdentifier(token.next.next)) {
return true;
}
return false;
@@ -3139,40 +3158,6 @@
}
/**
- * Return `true` if the current token matches the given keyword.
- *
- * @param keyword the keyword that can optionally appear in the current location
- * @return `true` if the current token matches the given keyword
- */
- bool matches(Keyword keyword) => matches3(_currentToken, keyword);
-
- /**
- * Return `true` if the current token matches the given identifier.
- *
- * @param identifier the identifier that can optionally appear in the current location
- * @return `true` if the current token matches the given identifier
- */
- bool matches2(String identifier) => identical(_currentToken.type, TokenType.IDENTIFIER) && _currentToken.lexeme == identifier;
-
- /**
- * Return `true` if the given token matches the given keyword.
- *
- * @param token the token being tested
- * @param keyword the keyword that is being tested for
- * @return `true` if the given token matches the given keyword
- */
- bool matches3(Token token, Keyword keyword) => identical(token.type, TokenType.KEYWORD) && identical((token as KeywordToken).keyword, keyword);
-
- /**
- * Return `true` if the given token has the given type.
- *
- * @param token the token being tested
- * @param type the type of token that is being tested for
- * @return `true` if the given token has the given type
- */
- bool matches4(Token token, TokenType type) => identical(token.type, type);
-
- /**
* Return `true` if the current token has the given type. Note that this method, unlike
* other variants, will modify the token stream if possible to match a wider range of tokens. In
* particular, if we are attempting to match a '>' and the next token is either a '>>' or '>>>',
@@ -3181,7 +3166,7 @@
* @param type the type of token that can optionally appear in the current location
* @return `true` if the current token has the given type
*/
- bool matches5(TokenType type) {
+ bool matches(TokenType type) {
TokenType currentType = _currentToken.type;
if (currentType != type) {
if (identical(type, TokenType.GT)) {
@@ -3244,15 +3229,23 @@
*
* @return `true` if the current token is a valid identifier
*/
- bool matchesIdentifier() => matchesIdentifier2(_currentToken);
+ bool matchesIdentifier() => tokenMatchesIdentifier(_currentToken);
/**
- * Return `true` if the given token is a valid identifier. Valid identifiers include
- * built-in identifiers (pseudo-keywords).
+ * Return `true` if the current token matches the given keyword.
*
- * @return `true` if the given token is a valid identifier
+ * @param keyword the keyword that can optionally appear in the current location
+ * @return `true` if the current token matches the given keyword
*/
- bool matchesIdentifier2(Token token) => matches4(token, TokenType.IDENTIFIER) || (matches4(token, TokenType.KEYWORD) && (token as KeywordToken).keyword.isPseudoKeyword);
+ bool matchesKeyword(Keyword keyword) => tokenMatchesKeyword(_currentToken, keyword);
+
+ /**
+ * Return `true` if the current token matches the given identifier.
+ *
+ * @param identifier the identifier that can optionally appear in the current location
+ * @return `true` if the current token matches the given identifier
+ */
+ bool matchesString(String identifier) => identical(_currentToken.type, TokenType.IDENTIFIER) && _currentToken.lexeme == identifier;
/**
* If the current token has the given type, then advance to the next token and return `true`
@@ -3262,7 +3255,7 @@
* @return `true` if the current token has the given type
*/
bool optional(TokenType type) {
- if (matches5(type)) {
+ if (matches(type)) {
advance();
return true;
}
@@ -3282,7 +3275,7 @@
*/
Expression parseAdditiveExpression() {
Expression expression;
- if (matches(Keyword.SUPER) && _currentToken.next.type.isAdditiveOperator) {
+ if (matchesKeyword(Keyword.SUPER) && _currentToken.next.type.isAdditiveOperator) {
expression = new SuperExpression(andAdvance);
} else {
expression = parseMultiplicativeExpression();
@@ -3305,9 +3298,9 @@
* @return the argument definition test that was parsed
*/
ArgumentDefinitionTest parseArgumentDefinitionTest() {
- Token question = expect2(TokenType.QUESTION);
+ Token question = expect(TokenType.QUESTION);
SimpleIdentifier identifier = parseSimpleIdentifier();
- reportError14(ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST, question, []);
+ reportErrorForToken(ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST, question, []);
return new ArgumentDefinitionTest(question, identifier);
}
@@ -3322,20 +3315,20 @@
* @return the assert statement
*/
AssertStatement parseAssertStatement() {
- Token keyword = expect(Keyword.ASSERT);
- Token leftParen = expect2(TokenType.OPEN_PAREN);
+ Token keyword = expectKeyword(Keyword.ASSERT);
+ Token leftParen = expect(TokenType.OPEN_PAREN);
Expression expression = parseExpression2();
if (expression is AssignmentExpression) {
- reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT, expression, []);
+ reportErrorForNode(ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT, expression, []);
} else if (expression is CascadeExpression) {
- reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE, expression, []);
+ reportErrorForNode(ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE, expression, []);
} else if (expression is ThrowExpression) {
- reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW, expression, []);
+ reportErrorForNode(ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW, expression, []);
} else if (expression is RethrowExpression) {
- reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW, expression, []);
+ reportErrorForNode(ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW, expression, []);
}
- Token rightParen = expect2(TokenType.CLOSE_PAREN);
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token rightParen = expect(TokenType.CLOSE_PAREN);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new AssertStatement(keyword, leftParen, expression, rightParen, semicolon);
}
@@ -3354,7 +3347,7 @@
* @return the assignable expression that was parsed
*/
Expression parseAssignableExpression(bool primaryAllowed) {
- if (matches(Keyword.SUPER)) {
+ if (matchesKeyword(Keyword.SUPER)) {
return parseAssignableSelector(new SuperExpression(andAdvance), false);
}
//
@@ -3365,7 +3358,7 @@
Expression expression = parsePrimaryExpression();
bool isOptional = primaryAllowed || expression is SimpleIdentifier;
while (true) {
- while (matches5(TokenType.OPEN_PAREN)) {
+ while (matches(TokenType.OPEN_PAREN)) {
ArgumentList argumentList = parseArgumentList();
if (expression is SimpleIdentifier) {
expression = new MethodInvocation(null, null, expression as SimpleIdentifier, argumentList);
@@ -3409,18 +3402,18 @@
* @return the assignable selector that was parsed
*/
Expression parseAssignableSelector(Expression prefix, bool optional) {
- if (matches5(TokenType.OPEN_SQUARE_BRACKET)) {
+ if (matches(TokenType.OPEN_SQUARE_BRACKET)) {
Token leftBracket = andAdvance;
Expression index = parseExpression2();
- Token rightBracket = expect2(TokenType.CLOSE_SQUARE_BRACKET);
+ Token rightBracket = expect(TokenType.CLOSE_SQUARE_BRACKET);
return new IndexExpression.forTarget(prefix, leftBracket, index, rightBracket);
- } else if (matches5(TokenType.PERIOD)) {
+ } else if (matches(TokenType.PERIOD)) {
Token period = andAdvance;
return new PropertyAccess(prefix, period, parseSimpleIdentifier());
} else {
if (!optional) {
// Report the missing selector.
- reportError13(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []);
}
return prefix;
}
@@ -3439,12 +3432,12 @@
*/
Expression parseBitwiseAndExpression() {
Expression expression;
- if (matches(Keyword.SUPER) && matches4(peek(), TokenType.AMPERSAND)) {
+ if (matchesKeyword(Keyword.SUPER) && tokenMatches(peek(), TokenType.AMPERSAND)) {
expression = new SuperExpression(andAdvance);
} else {
expression = parseShiftExpression();
}
- while (matches5(TokenType.AMPERSAND)) {
+ while (matches(TokenType.AMPERSAND)) {
Token operator = andAdvance;
expression = new BinaryExpression(expression, operator, parseShiftExpression());
}
@@ -3464,12 +3457,12 @@
*/
Expression parseBitwiseXorExpression() {
Expression expression;
- if (matches(Keyword.SUPER) && matches4(peek(), TokenType.CARET)) {
+ if (matchesKeyword(Keyword.SUPER) && tokenMatches(peek(), TokenType.CARET)) {
expression = new SuperExpression(andAdvance);
} else {
expression = parseBitwiseAndExpression();
}
- while (matches5(TokenType.CARET)) {
+ while (matches(TokenType.CARET)) {
Token operator = andAdvance;
expression = new BinaryExpression(expression, operator, parseBitwiseAndExpression());
}
@@ -3487,15 +3480,15 @@
* @return the break statement that was parsed
*/
Statement parseBreakStatement() {
- Token breakKeyword = expect(Keyword.BREAK);
+ Token breakKeyword = expectKeyword(Keyword.BREAK);
SimpleIdentifier label = null;
if (matchesIdentifier()) {
label = parseSimpleIdentifier();
}
if (!_inLoop && !_inSwitch && label == null) {
- reportError14(ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, breakKeyword, []);
+ reportErrorForToken(ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, breakKeyword, []);
}
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new BreakStatement(breakKeyword, label, semicolon);
}
@@ -3517,7 +3510,7 @@
* @return the expression representing the cascaded method invocation
*/
Expression parseCascadeSection() {
- Token period = expect2(TokenType.PERIOD_PERIOD);
+ Token period = expect(TokenType.PERIOD_PERIOD);
Expression expression = null;
SimpleIdentifier functionName = null;
if (matchesIdentifier()) {
@@ -3525,11 +3518,11 @@
} else if (identical(_currentToken.type, TokenType.OPEN_SQUARE_BRACKET)) {
Token leftBracket = andAdvance;
Expression index = parseExpression2();
- Token rightBracket = expect2(TokenType.CLOSE_SQUARE_BRACKET);
+ Token rightBracket = expect(TokenType.CLOSE_SQUARE_BRACKET);
expression = new IndexExpression.forCascade(period, leftBracket, index, rightBracket);
period = null;
} else {
- reportError14(ParserErrorCode.MISSING_IDENTIFIER, _currentToken, [_currentToken.lexeme]);
+ reportErrorForToken(ParserErrorCode.MISSING_IDENTIFIER, _currentToken, [_currentToken.lexeme]);
functionName = createSyntheticIdentifier();
}
if (identical(_currentToken.type, TokenType.OPEN_PAREN)) {
@@ -3589,22 +3582,22 @@
* @return the class declaration that was parsed
*/
CompilationUnitMember parseClassDeclaration(CommentAndMetadata commentAndMetadata, Token abstractKeyword) {
- Token keyword = expect(Keyword.CLASS);
+ Token keyword = expectKeyword(Keyword.CLASS);
if (matchesIdentifier()) {
Token next = peek();
- if (matches4(next, TokenType.LT)) {
+ if (tokenMatches(next, TokenType.LT)) {
next = skipTypeParameterList(next);
- if (next != null && matches4(next, TokenType.EQ)) {
+ if (next != null && tokenMatches(next, TokenType.EQ)) {
return parseClassTypeAlias(commentAndMetadata, abstractKeyword, keyword);
}
- } else if (matches4(next, TokenType.EQ)) {
+ } else if (tokenMatches(next, TokenType.EQ)) {
return parseClassTypeAlias(commentAndMetadata, abstractKeyword, keyword);
}
}
SimpleIdentifier name = parseSimpleIdentifier();
String className = name.name;
TypeParameterList typeParameters = null;
- if (matches5(TokenType.LT)) {
+ if (matches(TokenType.LT)) {
typeParameters = parseTypeParameterList();
}
//
@@ -3616,33 +3609,33 @@
ImplementsClause implementsClause = null;
bool foundClause = true;
while (foundClause) {
- if (matches(Keyword.EXTENDS)) {
+ if (matchesKeyword(Keyword.EXTENDS)) {
if (extendsClause == null) {
extendsClause = parseExtendsClause();
if (withClause != null) {
- reportError14(ParserErrorCode.WITH_BEFORE_EXTENDS, withClause.withKeyword, []);
+ reportErrorForToken(ParserErrorCode.WITH_BEFORE_EXTENDS, withClause.withKeyword, []);
} else if (implementsClause != null) {
- reportError14(ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS, implementsClause.keyword, []);
+ reportErrorForToken(ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS, implementsClause.keyword, []);
}
} else {
- reportError14(ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES, extendsClause.keyword, []);
+ reportErrorForToken(ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES, extendsClause.keyword, []);
parseExtendsClause();
}
- } else if (matches(Keyword.WITH)) {
+ } else if (matchesKeyword(Keyword.WITH)) {
if (withClause == null) {
withClause = parseWithClause();
if (implementsClause != null) {
- reportError14(ParserErrorCode.IMPLEMENTS_BEFORE_WITH, implementsClause.keyword, []);
+ reportErrorForToken(ParserErrorCode.IMPLEMENTS_BEFORE_WITH, implementsClause.keyword, []);
}
} else {
- reportError14(ParserErrorCode.MULTIPLE_WITH_CLAUSES, withClause.withKeyword, []);
+ reportErrorForToken(ParserErrorCode.MULTIPLE_WITH_CLAUSES, withClause.withKeyword, []);
parseWithClause();
}
- } else if (matches(Keyword.IMPLEMENTS)) {
+ } else if (matchesKeyword(Keyword.IMPLEMENTS)) {
if (implementsClause == null) {
implementsClause = parseImplementsClause();
} else {
- reportError14(ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES, implementsClause.keyword, []);
+ reportErrorForToken(ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES, implementsClause.keyword, []);
parseImplementsClause();
}
} else {
@@ -3650,13 +3643,13 @@
}
}
if (withClause != null && extendsClause == null) {
- reportError14(ParserErrorCode.WITH_WITHOUT_EXTENDS, withClause.withKeyword, []);
+ reportErrorForToken(ParserErrorCode.WITH_WITHOUT_EXTENDS, withClause.withKeyword, []);
}
//
// Look for and skip over the extra-lingual 'native' specification.
//
NativeClause nativeClause = null;
- if (matches2(_NATIVE) && matches4(peek(), TokenType.STRING)) {
+ if (matchesString(_NATIVE) && tokenMatches(peek(), TokenType.STRING)) {
nativeClause = parseNativeClause();
}
//
@@ -3665,14 +3658,14 @@
Token leftBracket = null;
List<ClassMember> members = null;
Token rightBracket = null;
- if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
- leftBracket = expect2(TokenType.OPEN_CURLY_BRACKET);
+ if (matches(TokenType.OPEN_CURLY_BRACKET)) {
+ leftBracket = expect(TokenType.OPEN_CURLY_BRACKET);
members = parseClassMembers(className, getEndToken(leftBracket));
- rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET);
+ rightBracket = expect(TokenType.CLOSE_CURLY_BRACKET);
} else {
- leftBracket = createSyntheticToken2(TokenType.OPEN_CURLY_BRACKET);
- rightBracket = createSyntheticToken2(TokenType.CLOSE_CURLY_BRACKET);
- reportError13(ParserErrorCode.MISSING_CLASS_BODY, []);
+ leftBracket = createSyntheticToken(TokenType.OPEN_CURLY_BRACKET);
+ rightBracket = createSyntheticToken(TokenType.CLOSE_CURLY_BRACKET);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_CLASS_BODY, []);
}
ClassDeclaration classDeclaration = new ClassDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, abstractKeyword, keyword, name, typeParameters, extendsClause, withClause, implementsClause, leftBracket, members, rightBracket);
classDeclaration.nativeClause = nativeClause;
@@ -3695,9 +3688,9 @@
List<ClassMember> parseClassMembers(String className, Token closingBracket) {
List<ClassMember> members = new List<ClassMember>();
Token memberStart = _currentToken;
- while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && (closingBracket != null || (!matches(Keyword.CLASS) && !matches(Keyword.TYPEDEF)))) {
- if (matches5(TokenType.SEMICOLON)) {
- reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ while (!matches(TokenType.EOF) && !matches(TokenType.CLOSE_CURLY_BRACKET) && (closingBracket != null || (!matchesKeyword(Keyword.CLASS) && !matchesKeyword(Keyword.TYPEDEF)))) {
+ if (matches(TokenType.SEMICOLON)) {
+ reportErrorForToken(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
} else {
ClassMember member = parseClassMember(className);
@@ -3706,7 +3699,7 @@
}
}
if (identical(_currentToken, memberStart)) {
- reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportErrorForToken(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
}
memberStart = _currentToken;
@@ -3733,35 +3726,35 @@
ClassTypeAlias parseClassTypeAlias(CommentAndMetadata commentAndMetadata, Token abstractKeyword, Token classKeyword) {
SimpleIdentifier className = parseSimpleIdentifier();
TypeParameterList typeParameters = null;
- if (matches5(TokenType.LT)) {
+ if (matches(TokenType.LT)) {
typeParameters = parseTypeParameterList();
}
- Token equals = expect2(TokenType.EQ);
- if (matches(Keyword.ABSTRACT)) {
+ Token equals = expect(TokenType.EQ);
+ if (matchesKeyword(Keyword.ABSTRACT)) {
abstractKeyword = andAdvance;
}
TypeName superclass = parseTypeName();
WithClause withClause = null;
- if (matches(Keyword.WITH)) {
+ if (matchesKeyword(Keyword.WITH)) {
withClause = parseWithClause();
}
ImplementsClause implementsClause = null;
- if (matches(Keyword.IMPLEMENTS)) {
+ if (matchesKeyword(Keyword.IMPLEMENTS)) {
implementsClause = parseImplementsClause();
}
Token semicolon;
- if (matches5(TokenType.SEMICOLON)) {
+ if (matches(TokenType.SEMICOLON)) {
semicolon = andAdvance;
} else {
- if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
- reportError13(ParserErrorCode.EXPECTED_TOKEN, [TokenType.SEMICOLON.lexeme]);
+ if (matches(TokenType.OPEN_CURLY_BRACKET)) {
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_TOKEN, [TokenType.SEMICOLON.lexeme]);
Token leftBracket = andAdvance;
parseClassMembers(className.name, getEndToken(leftBracket));
- expect2(TokenType.CLOSE_CURLY_BRACKET);
+ expect(TokenType.CLOSE_CURLY_BRACKET);
} else {
- reportError14(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [TokenType.SEMICOLON.lexeme]);
+ reportErrorForToken(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [TokenType.SEMICOLON.lexeme]);
}
- semicolon = createSyntheticToken2(TokenType.SEMICOLON);
+ semicolon = createSyntheticToken(TokenType.SEMICOLON);
}
return new ClassTypeAlias(commentAndMetadata.comment, commentAndMetadata.metadata, classKeyword, className, typeParameters, equals, abstractKeyword, superclass, withClause, implementsClause, semicolon);
}
@@ -3779,8 +3772,8 @@
*/
List<Combinator> parseCombinators() {
List<Combinator> combinators = new List<Combinator>();
- while (matches2(_SHOW) || matches2(_HIDE)) {
- Token keyword = expect2(TokenType.IDENTIFIER);
+ while (matchesString(_SHOW) || matchesString(_HIDE)) {
+ Token keyword = expect(TokenType.IDENTIFIER);
if (keyword.lexeme == _SHOW) {
List<SimpleIdentifier> shownNames = parseIdentifierList();
combinators.add(new ShowCombinator(keyword, shownNames));
@@ -3807,7 +3800,7 @@
CommentAndMetadata parseCommentAndMetadata() {
Comment comment = parseDocumentationComment();
List<Annotation> metadata = new List<Annotation>();
- while (matches5(TokenType.AT)) {
+ while (matches(TokenType.AT)) {
metadata.add(parseAnnotation());
Comment optionalComment = parseDocumentationComment();
if (optionalComment != null) {
@@ -3833,7 +3826,8 @@
CommentReference parseCommentReference(String referenceSource, int sourceOffset) {
// TODO(brianwilkerson) The errors are not getting the right offset/length and are being duplicated.
if (referenceSource.length == 0) {
- return null;
+ Token syntheticToken = new SyntheticStringToken(TokenType.IDENTIFIER, "", sourceOffset);
+ return new CommentReference(null, new SimpleIdentifier(syntheticToken));
}
try {
BooleanErrorListener listener = new BooleanErrorListener();
@@ -3844,16 +3838,16 @@
return null;
}
Token newKeyword = null;
- if (matches3(firstToken, Keyword.NEW)) {
+ if (tokenMatchesKeyword(firstToken, Keyword.NEW)) {
newKeyword = firstToken;
firstToken = firstToken.next;
}
- if (matchesIdentifier2(firstToken)) {
+ if (tokenMatchesIdentifier(firstToken)) {
Token secondToken = firstToken.next;
Token thirdToken = secondToken.next;
Token nextToken;
Identifier identifier;
- if (matches4(secondToken, TokenType.PERIOD) && matchesIdentifier2(thirdToken)) {
+ if (tokenMatches(secondToken, TokenType.PERIOD) && tokenMatchesIdentifier(thirdToken)) {
identifier = new PrefixedIdentifier(new SimpleIdentifier(firstToken), secondToken, new SimpleIdentifier(thirdToken));
nextToken = thirdToken.next;
} else {
@@ -3864,7 +3858,7 @@
return null;
}
return new CommentReference(newKeyword, identifier);
- } else if (matches3(firstToken, Keyword.THIS) || matches3(firstToken, Keyword.NULL) || matches3(firstToken, Keyword.TRUE) || matches3(firstToken, Keyword.FALSE)) {
+ } else if (tokenMatchesKeyword(firstToken, Keyword.THIS) || tokenMatchesKeyword(firstToken, Keyword.NULL) || tokenMatchesKeyword(firstToken, Keyword.TRUE) || tokenMatchesKeyword(firstToken, Keyword.FALSE)) {
// TODO(brianwilkerson) If we want to support this we will need to extend the definition
// of CommentReference to take an expression rather than an identifier. For now we just
// ignore it to reduce the number of errors produced, but that's probably not a valid
@@ -3900,19 +3894,32 @@
while (leftIndex >= 0 && leftIndex + 1 < length) {
List<int> range = findRange(codeBlockRanges, leftIndex);
if (range == null) {
+ int nameOffset = token.offset + leftIndex + 1;
int rightIndex = JavaString.indexOf(comment, ']', leftIndex);
if (rightIndex >= 0) {
int firstChar = comment.codeUnitAt(leftIndex + 1);
if (firstChar != 0x27 && firstChar != 0x22) {
if (isLinkText(comment, rightIndex)) {
} else {
- CommentReference reference = parseCommentReference(comment.substring(leftIndex + 1, rightIndex), token.offset + leftIndex + 1);
+ CommentReference reference = parseCommentReference(comment.substring(leftIndex + 1, rightIndex), nameOffset);
if (reference != null) {
references.add(reference);
}
}
}
} else {
+ // terminating ']' is not typed yet
+ int charAfterLeft = comment.codeUnitAt(leftIndex + 1);
+ if (Character.isLetterOrDigit(charAfterLeft)) {
+ int nameEnd = StringUtilities.indexOfFirstNotLetterDigit(comment, leftIndex + 1);
+ String name = comment.substring(leftIndex + 1, nameEnd);
+ Token nameToken = new StringToken(TokenType.IDENTIFIER, name, nameOffset);
+ references.add(new CommentReference(null, new SimpleIdentifier(nameToken)));
+ } else {
+ Token nameToken = new SyntheticStringToken(TokenType.IDENTIFIER, "", nameOffset);
+ references.add(new CommentReference(null, new SimpleIdentifier(nameToken)));
+ }
+ // next character
rightIndex = leftIndex + 1;
}
leftIndex = JavaString.indexOf(comment, '[', rightIndex);
@@ -3946,19 +3953,19 @@
*/
CompilationUnitMember parseCompilationUnitMember(CommentAndMetadata commentAndMetadata) {
Modifiers modifiers = parseModifiers();
- if (matches(Keyword.CLASS)) {
+ if (matchesKeyword(Keyword.CLASS)) {
return parseClassDeclaration(commentAndMetadata, validateModifiersForClass(modifiers));
- } else if (matches(Keyword.TYPEDEF) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT) && !matches4(peek(), TokenType.OPEN_PAREN)) {
+ } else if (matchesKeyword(Keyword.TYPEDEF) && !tokenMatches(peek(), TokenType.PERIOD) && !tokenMatches(peek(), TokenType.LT) && !tokenMatches(peek(), TokenType.OPEN_PAREN)) {
validateModifiersForTypedef(modifiers);
return parseTypeAlias(commentAndMetadata);
}
- if (matches(Keyword.VOID)) {
+ if (matchesKeyword(Keyword.VOID)) {
TypeName returnType = parseReturnType();
- if ((matches(Keyword.GET) || matches(Keyword.SET)) && matchesIdentifier2(peek())) {
+ if ((matchesKeyword(Keyword.GET) || matchesKeyword(Keyword.SET)) && tokenMatchesIdentifier(peek())) {
validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
- } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
- reportError14(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
+ } else if (matchesKeyword(Keyword.OPERATOR) && isOperator(peek())) {
+ reportErrorForToken(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType));
} else if (matchesIdentifier() && matchesAny(peek(), [
TokenType.OPEN_PAREN,
@@ -3975,48 +3982,48 @@
//
// We appear to have a variable declaration with a type of "void".
//
- reportError12(ParserErrorCode.VOID_VARIABLE, returnType, []);
- return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), null), expect2(TokenType.SEMICOLON));
+ reportErrorForNode(ParserErrorCode.VOID_VARIABLE, returnType, []);
+ return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationListAfterType(null, validateModifiersForTopLevelVariable(modifiers), null), expect(TokenType.SEMICOLON));
}
}
- reportError14(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportErrorForToken(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
return null;
}
- } else if ((matches(Keyword.GET) || matches(Keyword.SET)) && matchesIdentifier2(peek())) {
+ } else if ((matchesKeyword(Keyword.GET) || matchesKeyword(Keyword.SET)) && tokenMatchesIdentifier(peek())) {
validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, null);
- } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
- reportError14(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
+ } else if (matchesKeyword(Keyword.OPERATOR) && isOperator(peek())) {
+ reportErrorForToken(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, null));
} else if (!matchesIdentifier()) {
- reportError14(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportErrorForToken(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
return null;
- } else if (matches4(peek(), TokenType.OPEN_PAREN)) {
+ } else if (tokenMatches(peek(), TokenType.OPEN_PAREN)) {
validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, null);
} else if (matchesAny(peek(), [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) {
if (modifiers.constKeyword == null && modifiers.finalKeyword == null && modifiers.varKeyword == null) {
- reportError13(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
}
- return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), null), expect2(TokenType.SEMICOLON));
+ return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationListAfterType(null, validateModifiersForTopLevelVariable(modifiers), null), expect(TokenType.SEMICOLON));
}
TypeName returnType = parseReturnType();
- if ((matches(Keyword.GET) || matches(Keyword.SET)) && matchesIdentifier2(peek())) {
+ if ((matchesKeyword(Keyword.GET) || matchesKeyword(Keyword.SET)) && tokenMatchesIdentifier(peek())) {
validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
- } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
- reportError14(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
+ } else if (matchesKeyword(Keyword.OPERATOR) && isOperator(peek())) {
+ reportErrorForToken(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType));
- } else if (matches5(TokenType.AT)) {
- return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), returnType), expect2(TokenType.SEMICOLON));
+ } else if (matches(TokenType.AT)) {
+ return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationListAfterType(null, validateModifiersForTopLevelVariable(modifiers), returnType), expect(TokenType.SEMICOLON));
} else if (!matchesIdentifier()) {
// TODO(brianwilkerson) Generalize this error. We could also be parsing a top-level variable at this point.
- reportError14(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportErrorForToken(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
Token semicolon;
- if (matches5(TokenType.SEMICOLON)) {
+ if (matches(TokenType.SEMICOLON)) {
semicolon = andAdvance;
} else {
- semicolon = createSyntheticToken2(TokenType.SEMICOLON);
+ semicolon = createSyntheticToken(TokenType.SEMICOLON);
}
List<VariableDeclaration> variables = new List<VariableDeclaration>();
variables.add(new VariableDeclaration(null, null, createSyntheticIdentifier(), null, null));
@@ -4029,7 +4036,7 @@
validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
}
- return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), returnType), expect2(TokenType.SEMICOLON));
+ return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationListAfterType(null, validateModifiersForTopLevelVariable(modifiers), returnType), expect(TokenType.SEMICOLON));
}
/**
@@ -4045,12 +4052,12 @@
* @return the const expression that was parsed
*/
Expression parseConstExpression() {
- Token keyword = expect(Keyword.CONST);
- if (matches5(TokenType.OPEN_SQUARE_BRACKET) || matches5(TokenType.INDEX)) {
+ Token keyword = expectKeyword(Keyword.CONST);
+ if (matches(TokenType.OPEN_SQUARE_BRACKET) || matches(TokenType.INDEX)) {
return parseListLiteral(keyword, null);
- } else if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
+ } else if (matches(TokenType.OPEN_CURLY_BRACKET)) {
return parseMapLiteral(keyword, null);
- } else if (matches5(TokenType.LT)) {
+ } else if (matches(TokenType.LT)) {
return parseListOrMapLiteral(keyword);
}
return parseInstanceCreationExpression(keyword);
@@ -4060,21 +4067,21 @@
bool bodyAllowed = externalKeyword == null;
Token separator = null;
List<ConstructorInitializer> initializers = null;
- if (matches5(TokenType.COLON)) {
+ if (matches(TokenType.COLON)) {
separator = andAdvance;
initializers = new List<ConstructorInitializer>();
do {
- if (matches(Keyword.THIS)) {
- if (matches4(peek(), TokenType.OPEN_PAREN)) {
+ if (matchesKeyword(Keyword.THIS)) {
+ if (tokenMatches(peek(), TokenType.OPEN_PAREN)) {
bodyAllowed = false;
initializers.add(parseRedirectingConstructorInvocation());
- } else if (matches4(peek(), TokenType.PERIOD) && matches4(peek2(3), TokenType.OPEN_PAREN)) {
+ } else if (tokenMatches(peek(), TokenType.PERIOD) && tokenMatches(peek2(3), TokenType.OPEN_PAREN)) {
bodyAllowed = false;
initializers.add(parseRedirectingConstructorInvocation());
} else {
initializers.add(parseConstructorFieldInitializer());
}
- } else if (matches(Keyword.SUPER)) {
+ } else if (matchesKeyword(Keyword.SUPER)) {
initializers.add(parseSuperConstructorInvocation());
} else {
initializers.add(parseConstructorFieldInitializer());
@@ -4083,26 +4090,26 @@
}
ConstructorName redirectedConstructor = null;
FunctionBody body;
- if (matches5(TokenType.EQ)) {
+ if (matches(TokenType.EQ)) {
separator = andAdvance;
redirectedConstructor = parseConstructorName();
- body = new EmptyFunctionBody(expect2(TokenType.SEMICOLON));
+ body = new EmptyFunctionBody(expect(TokenType.SEMICOLON));
if (factoryKeyword == null) {
- reportError12(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, redirectedConstructor, []);
+ reportErrorForNode(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, redirectedConstructor, []);
}
} else {
body = parseFunctionBody(true, ParserErrorCode.MISSING_FUNCTION_BODY, false);
if (constKeyword != null && factoryKeyword != null && externalKeyword == null) {
- reportError14(ParserErrorCode.CONST_FACTORY, factoryKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_FACTORY, factoryKeyword, []);
} else if (body is EmptyFunctionBody) {
if (factoryKeyword != null && externalKeyword == null) {
- reportError14(ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword, []);
+ reportErrorForToken(ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword, []);
}
} else {
if (constKeyword != null) {
- reportError12(ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body, []);
+ reportErrorForNode(ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body, []);
} else if (!bodyAllowed) {
- reportError12(ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body, []);
+ reportErrorForNode(ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body, []);
}
}
}
@@ -4122,12 +4129,12 @@
ConstructorFieldInitializer parseConstructorFieldInitializer() {
Token keyword = null;
Token period = null;
- if (matches(Keyword.THIS)) {
+ if (matchesKeyword(Keyword.THIS)) {
keyword = andAdvance;
- period = expect2(TokenType.PERIOD);
+ period = expect(TokenType.PERIOD);
}
SimpleIdentifier fieldName = parseSimpleIdentifier();
- Token equals = expect2(TokenType.EQ);
+ Token equals = expect(TokenType.EQ);
Expression expression = parseConditionalExpression();
TokenType tokenType = _currentToken.type;
if (identical(tokenType, TokenType.PERIOD_PERIOD)) {
@@ -4155,18 +4162,18 @@
* @return the continue statement that was parsed
*/
Statement parseContinueStatement() {
- Token continueKeyword = expect(Keyword.CONTINUE);
+ Token continueKeyword = expectKeyword(Keyword.CONTINUE);
if (!_inLoop && !_inSwitch) {
- reportError14(ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, continueKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, continueKeyword, []);
}
SimpleIdentifier label = null;
if (matchesIdentifier()) {
label = parseSimpleIdentifier();
}
if (_inSwitch && !_inLoop && label == null) {
- reportError14(ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE, continueKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE, continueKeyword, []);
}
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new ContinueStatement(continueKeyword, label, semicolon);
}
@@ -4185,13 +4192,13 @@
* @return the directive that was parsed
*/
Directive parseDirective(CommentAndMetadata commentAndMetadata) {
- if (matches(Keyword.IMPORT)) {
+ if (matchesKeyword(Keyword.IMPORT)) {
return parseImportDirective(commentAndMetadata);
- } else if (matches(Keyword.EXPORT)) {
+ } else if (matchesKeyword(Keyword.EXPORT)) {
return parseExportDirective(commentAndMetadata);
- } else if (matches(Keyword.LIBRARY)) {
+ } else if (matchesKeyword(Keyword.LIBRARY)) {
return parseLibraryDirective(commentAndMetadata);
- } else if (matches(Keyword.PART)) {
+ } else if (matchesKeyword(Keyword.PART)) {
return parsePartDirective(commentAndMetadata);
} else {
// Internal error: this method should not have been invoked if the current token was something
@@ -4252,13 +4259,13 @@
bool wasInLoop = _inLoop;
_inLoop = true;
try {
- Token doKeyword = expect(Keyword.DO);
+ Token doKeyword = expectKeyword(Keyword.DO);
Statement body = parseStatement2();
- Token whileKeyword = expect(Keyword.WHILE);
- Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
+ Token whileKeyword = expectKeyword(Keyword.WHILE);
+ Token leftParenthesis = expect(TokenType.OPEN_PAREN);
Expression condition = parseExpression2();
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new DoStatement(doKeyword, body, whileKeyword, leftParenthesis, condition, rightParenthesis, semicolon);
} finally {
_inLoop = wasInLoop;
@@ -4290,7 +4297,7 @@
*/
Expression parseEqualityExpression() {
Expression expression;
- if (matches(Keyword.SUPER) && _currentToken.next.type.isEqualityOperator) {
+ if (matchesKeyword(Keyword.SUPER) && _currentToken.next.type.isEqualityOperator) {
expression = new SuperExpression(andAdvance);
} else {
expression = parseRelationalExpression();
@@ -4299,7 +4306,7 @@
while (_currentToken.type.isEqualityOperator) {
Token operator = andAdvance;
if (leftEqualityExpression) {
- reportError12(ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND, expression, []);
+ reportErrorForNode(ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND, expression, []);
}
expression = new BinaryExpression(expression, operator, parseRelationalExpression());
leftEqualityExpression = true;
@@ -4319,10 +4326,10 @@
* @return the export directive that was parsed
*/
ExportDirective parseExportDirective(CommentAndMetadata commentAndMetadata) {
- Token exportKeyword = expect(Keyword.EXPORT);
+ Token exportKeyword = expectKeyword(Keyword.EXPORT);
StringLiteral libraryUri = parseStringLiteral();
List<Combinator> combinators = parseCombinators();
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expectSemicolon();
return new ExportDirective(commentAndMetadata.comment, commentAndMetadata.metadata, exportKeyword, libraryUri, combinators, semicolon);
}
@@ -4362,18 +4369,18 @@
FinalConstVarOrType parseFinalConstVarOrType(bool optional) {
Token keyword = null;
TypeName type = null;
- if (matches(Keyword.FINAL) || matches(Keyword.CONST)) {
+ if (matchesKeyword(Keyword.FINAL) || matchesKeyword(Keyword.CONST)) {
keyword = andAdvance;
if (isTypedIdentifier(_currentToken)) {
type = parseTypeName();
}
- } else if (matches(Keyword.VAR)) {
+ } else if (matchesKeyword(Keyword.VAR)) {
keyword = andAdvance;
} else {
if (isTypedIdentifier(_currentToken)) {
type = parseReturnType();
} else if (!optional) {
- reportError13(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
}
}
return new FinalConstVarOrType(keyword, type);
@@ -4397,22 +4404,22 @@
*/
FormalParameter parseFormalParameter(ParameterKind kind) {
NormalFormalParameter parameter = parseNormalFormalParameter();
- if (matches5(TokenType.EQ)) {
+ if (matches(TokenType.EQ)) {
Token seperator = andAdvance;
Expression defaultValue = parseExpression2();
if (identical(kind, ParameterKind.NAMED)) {
- reportError14(ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER, seperator, []);
+ reportErrorForToken(ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER, seperator, []);
} else if (identical(kind, ParameterKind.REQUIRED)) {
- reportError12(ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, parameter, []);
+ reportErrorForNode(ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, parameter, []);
}
return new DefaultFormalParameter(parameter, kind, seperator, defaultValue);
- } else if (matches5(TokenType.COLON)) {
+ } else if (matches(TokenType.COLON)) {
Token seperator = andAdvance;
Expression defaultValue = parseExpression2();
if (identical(kind, ParameterKind.POSITIONAL)) {
- reportError14(ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, seperator, []);
+ reportErrorForToken(ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, seperator, []);
} else if (identical(kind, ParameterKind.REQUIRED)) {
- reportError12(ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP, parameter, []);
+ reportErrorForNode(ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP, parameter, []);
}
return new DefaultFormalParameter(parameter, kind, seperator, defaultValue);
} else if (kind != ParameterKind.REQUIRED) {
@@ -4444,36 +4451,36 @@
bool wasInLoop = _inLoop;
_inLoop = true;
try {
- Token forKeyword = expect(Keyword.FOR);
- Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
+ Token forKeyword = expectKeyword(Keyword.FOR);
+ Token leftParenthesis = expect(TokenType.OPEN_PAREN);
VariableDeclarationList variableList = null;
Expression initialization = null;
- if (!matches5(TokenType.SEMICOLON)) {
+ if (!matches(TokenType.SEMICOLON)) {
CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
- if (matchesIdentifier() && matches3(peek(), Keyword.IN)) {
+ if (matchesIdentifier() && tokenMatchesKeyword(peek(), Keyword.IN)) {
List<VariableDeclaration> variables = new List<VariableDeclaration>();
SimpleIdentifier variableName = parseSimpleIdentifier();
variables.add(new VariableDeclaration(null, null, variableName, null, null));
variableList = new VariableDeclarationList(commentAndMetadata.comment, commentAndMetadata.metadata, null, null, variables);
} else if (isInitializedVariableDeclaration()) {
- variableList = parseVariableDeclarationList(commentAndMetadata);
+ variableList = parseVariableDeclarationListAfterMetadata(commentAndMetadata);
} else {
initialization = parseExpression2();
}
- if (matches(Keyword.IN)) {
+ if (matchesKeyword(Keyword.IN)) {
DeclaredIdentifier loopVariable = null;
SimpleIdentifier identifier = null;
if (variableList == null) {
// We found: <expression> 'in'
- reportError13(ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH, []);
} else {
NodeList<VariableDeclaration> variables = variableList.variables;
if (variables.length > 1) {
- reportError13(ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH, [variables.length.toString()]);
+ reportErrorForCurrentToken(ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH, [variables.length.toString()]);
}
VariableDeclaration variable = variables[0];
if (variable.initializer != null) {
- reportError13(ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH, []);
+ reportErrorForCurrentToken(ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH, []);
}
Token keyword = variableList.keyword;
TypeName type = variableList.type;
@@ -4485,9 +4492,9 @@
identifier = variable.name;
}
}
- Token inKeyword = expect(Keyword.IN);
+ Token inKeyword = expectKeyword(Keyword.IN);
Expression iterator = parseExpression2();
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
Statement body = parseStatement2();
if (loopVariable == null) {
return new ForEachStatement.con2(forKeyword, leftParenthesis, identifier, inKeyword, iterator, rightParenthesis, body);
@@ -4495,17 +4502,17 @@
return new ForEachStatement.con1(forKeyword, leftParenthesis, loopVariable, inKeyword, iterator, rightParenthesis, body);
}
}
- Token leftSeparator = expect2(TokenType.SEMICOLON);
+ Token leftSeparator = expect(TokenType.SEMICOLON);
Expression condition = null;
- if (!matches5(TokenType.SEMICOLON)) {
+ if (!matches(TokenType.SEMICOLON)) {
condition = parseExpression2();
}
- Token rightSeparator = expect2(TokenType.SEMICOLON);
+ Token rightSeparator = expect(TokenType.SEMICOLON);
List<Expression> updaters = null;
- if (!matches5(TokenType.CLOSE_PAREN)) {
+ if (!matches(TokenType.CLOSE_PAREN)) {
updaters = parseExpressionList();
}
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
Statement body = parseStatement2();
return new ForStatement(forKeyword, leftParenthesis, variableList, initialization, leftSeparator, condition, rightSeparator, updaters, rightParenthesis, body);
} finally {
@@ -4538,39 +4545,39 @@
_inLoop = false;
_inSwitch = false;
try {
- if (matches5(TokenType.SEMICOLON)) {
+ if (matches(TokenType.SEMICOLON)) {
if (!mayBeEmpty) {
- reportError13(emptyErrorCode, []);
+ reportErrorForCurrentToken(emptyErrorCode, []);
}
return new EmptyFunctionBody(andAdvance);
- } else if (matches5(TokenType.FUNCTION)) {
+ } else if (matches(TokenType.FUNCTION)) {
Token functionDefinition = andAdvance;
Expression expression = parseExpression2();
Token semicolon = null;
if (!inExpression) {
- semicolon = expect2(TokenType.SEMICOLON);
+ semicolon = expect(TokenType.SEMICOLON);
}
if (!_parseFunctionBodies) {
- return new EmptyFunctionBody(createSyntheticToken2(TokenType.SEMICOLON));
+ return new EmptyFunctionBody(createSyntheticToken(TokenType.SEMICOLON));
}
return new ExpressionFunctionBody(functionDefinition, expression, semicolon);
- } else if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
+ } else if (matches(TokenType.OPEN_CURLY_BRACKET)) {
if (!_parseFunctionBodies) {
skipBlock();
- return new EmptyFunctionBody(createSyntheticToken2(TokenType.SEMICOLON));
+ return new EmptyFunctionBody(createSyntheticToken(TokenType.SEMICOLON));
}
return new BlockFunctionBody(parseBlock());
- } else if (matches2(_NATIVE)) {
+ } else if (matchesString(_NATIVE)) {
Token nativeToken = andAdvance;
StringLiteral stringLiteral = null;
- if (matches5(TokenType.STRING)) {
+ if (matches(TokenType.STRING)) {
stringLiteral = parseStringLiteral();
}
- return new NativeFunctionBody(nativeToken, stringLiteral, expect2(TokenType.SEMICOLON));
+ return new NativeFunctionBody(nativeToken, stringLiteral, expect(TokenType.SEMICOLON));
} else {
// Invalid function body
- reportError13(emptyErrorCode, []);
- return new EmptyFunctionBody(createSyntheticToken2(TokenType.SEMICOLON));
+ reportErrorForCurrentToken(emptyErrorCode, []);
+ return new EmptyFunctionBody(createSyntheticToken(TokenType.SEMICOLON));
}
} finally {
_inLoop = wasInLoop;
@@ -4597,30 +4604,30 @@
FunctionDeclaration parseFunctionDeclaration(CommentAndMetadata commentAndMetadata, Token externalKeyword, TypeName returnType) {
Token keyword = null;
bool isGetter = false;
- if (matches(Keyword.GET) && !matches4(peek(), TokenType.OPEN_PAREN)) {
+ if (matchesKeyword(Keyword.GET) && !tokenMatches(peek(), TokenType.OPEN_PAREN)) {
keyword = andAdvance;
isGetter = true;
- } else if (matches(Keyword.SET) && !matches4(peek(), TokenType.OPEN_PAREN)) {
+ } else if (matchesKeyword(Keyword.SET) && !tokenMatches(peek(), TokenType.OPEN_PAREN)) {
keyword = andAdvance;
}
SimpleIdentifier name = parseSimpleIdentifier();
FormalParameterList parameters = null;
if (!isGetter) {
- if (matches5(TokenType.OPEN_PAREN)) {
+ if (matches(TokenType.OPEN_PAREN)) {
parameters = parseFormalParameterList();
validateFormalParameterList(parameters);
} else {
- reportError13(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, []);
}
- } else if (matches5(TokenType.OPEN_PAREN)) {
- reportError13(ParserErrorCode.GETTER_WITH_PARAMETERS, []);
+ } else if (matches(TokenType.OPEN_PAREN)) {
+ reportErrorForCurrentToken(ParserErrorCode.GETTER_WITH_PARAMETERS, []);
parseFormalParameterList();
}
FunctionBody body;
if (externalKeyword == null) {
body = parseFunctionBody(false, ParserErrorCode.MISSING_FUNCTION_BODY, false);
} else {
- body = new EmptyFunctionBody(expect2(TokenType.SEMICOLON));
+ body = new EmptyFunctionBody(expect(TokenType.SEMICOLON));
}
// if (!isStatement && matches(TokenType.SEMICOLON)) {
// // TODO(brianwilkerson) Improve this error message.
@@ -4643,7 +4650,7 @@
Statement parseFunctionDeclarationStatement() {
Modifiers modifiers = parseModifiers();
validateModifiersForFunctionDeclarationStatement(modifiers);
- return parseFunctionDeclarationStatement2(parseCommentAndMetadata(), parseOptionalReturnType());
+ return parseFunctionDeclarationStatementAfterReturnType(parseCommentAndMetadata(), parseOptionalReturnType());
}
/**
@@ -4659,14 +4666,14 @@
* @param returnType the return type, or `null` if there is no return type
* @return the function declaration statement that was parsed
*/
- Statement parseFunctionDeclarationStatement2(CommentAndMetadata commentAndMetadata, TypeName returnType) {
+ Statement parseFunctionDeclarationStatementAfterReturnType(CommentAndMetadata commentAndMetadata, TypeName returnType) {
FunctionDeclaration declaration = parseFunctionDeclaration(commentAndMetadata, null, returnType);
Token propertyKeyword = declaration.propertyKeyword;
if (propertyKeyword != null) {
if (identical((propertyKeyword as KeywordToken).keyword, Keyword.GET)) {
- reportError14(ParserErrorCode.GETTER_IN_FUNCTION, propertyKeyword, []);
+ reportErrorForToken(ParserErrorCode.GETTER_IN_FUNCTION, propertyKeyword, []);
} else {
- reportError14(ParserErrorCode.SETTER_IN_FUNCTION, propertyKeyword, []);
+ reportErrorForToken(ParserErrorCode.SETTER_IN_FUNCTION, propertyKeyword, []);
}
}
return new FunctionDeclarationStatement(declaration);
@@ -4694,24 +4701,24 @@
}
SimpleIdentifier name = parseSimpleIdentifier();
TypeParameterList typeParameters = null;
- if (matches5(TokenType.LT)) {
+ if (matches(TokenType.LT)) {
typeParameters = parseTypeParameterList();
}
- if (matches5(TokenType.SEMICOLON) || matches5(TokenType.EOF)) {
- reportError13(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
- FormalParameterList parameters = new FormalParameterList(createSyntheticToken2(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken2(TokenType.CLOSE_PAREN));
- Token semicolon = expect2(TokenType.SEMICOLON);
+ if (matches(TokenType.SEMICOLON) || matches(TokenType.EOF)) {
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
+ FormalParameterList parameters = new FormalParameterList(createSyntheticToken(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken(TokenType.CLOSE_PAREN));
+ Token semicolon = expect(TokenType.SEMICOLON);
return new FunctionTypeAlias(commentAndMetadata.comment, commentAndMetadata.metadata, keyword, returnType, name, typeParameters, parameters, semicolon);
- } else if (!matches5(TokenType.OPEN_PAREN)) {
- reportError13(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
+ } else if (!matches(TokenType.OPEN_PAREN)) {
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
// TODO(brianwilkerson) Recover from this error. At the very least we should skip to the start
// of the next valid compilation unit member, allowing for the possibility of finding the
// typedef parameters before that point.
- return new FunctionTypeAlias(commentAndMetadata.comment, commentAndMetadata.metadata, keyword, returnType, name, typeParameters, new FormalParameterList(createSyntheticToken2(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken2(TokenType.CLOSE_PAREN)), createSyntheticToken2(TokenType.SEMICOLON));
+ return new FunctionTypeAlias(commentAndMetadata.comment, commentAndMetadata.metadata, keyword, returnType, name, typeParameters, new FormalParameterList(createSyntheticToken(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken(TokenType.CLOSE_PAREN)), createSyntheticToken(TokenType.SEMICOLON));
}
FormalParameterList parameters = parseFormalParameterList();
validateFormalParameterList(parameters);
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new FunctionTypeAlias(commentAndMetadata.comment, commentAndMetadata.metadata, keyword, returnType, name, typeParameters, parameters, semicolon);
}
@@ -4735,16 +4742,16 @@
* @return the getter that was parsed
*/
MethodDeclaration parseGetter(CommentAndMetadata commentAndMetadata, Token externalKeyword, Token staticKeyword, TypeName returnType) {
- Token propertyKeyword = expect(Keyword.GET);
+ Token propertyKeyword = expectKeyword(Keyword.GET);
SimpleIdentifier name = parseSimpleIdentifier();
- if (matches5(TokenType.OPEN_PAREN) && matches4(peek(), TokenType.CLOSE_PAREN)) {
- reportError13(ParserErrorCode.GETTER_WITH_PARAMETERS, []);
+ if (matches(TokenType.OPEN_PAREN) && tokenMatches(peek(), TokenType.CLOSE_PAREN)) {
+ reportErrorForCurrentToken(ParserErrorCode.GETTER_WITH_PARAMETERS, []);
advance();
advance();
}
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.STATIC_GETTER_WITHOUT_BODY, false);
if (externalKeyword != null && body is! EmptyFunctionBody) {
- reportError13(ParserErrorCode.EXTERNAL_GETTER_WITH_BODY, []);
+ reportErrorForCurrentToken(ParserErrorCode.EXTERNAL_GETTER_WITH_BODY, []);
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, propertyKeyword, null, name, null, body);
}
@@ -4762,7 +4769,7 @@
List<SimpleIdentifier> parseIdentifierList() {
List<SimpleIdentifier> identifiers = new List<SimpleIdentifier>();
identifiers.add(parseSimpleIdentifier());
- while (matches5(TokenType.COMMA)) {
+ while (matches(TokenType.COMMA)) {
advance();
identifiers.add(parseSimpleIdentifier());
}
@@ -4780,14 +4787,14 @@
* @return the if statement that was parsed
*/
Statement parseIfStatement() {
- Token ifKeyword = expect(Keyword.IF);
- Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
+ Token ifKeyword = expectKeyword(Keyword.IF);
+ Token leftParenthesis = expect(TokenType.OPEN_PAREN);
Expression condition = parseExpression2();
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
Statement thenStatement = parseStatement2();
Token elseKeyword = null;
Statement elseStatement = null;
- if (matches(Keyword.ELSE)) {
+ if (matchesKeyword(Keyword.ELSE)) {
elseKeyword = andAdvance;
elseStatement = parseStatement2();
}
@@ -4806,16 +4813,16 @@
* @return the import directive that was parsed
*/
ImportDirective parseImportDirective(CommentAndMetadata commentAndMetadata) {
- Token importKeyword = expect(Keyword.IMPORT);
+ Token importKeyword = expectKeyword(Keyword.IMPORT);
StringLiteral libraryUri = parseStringLiteral();
Token asToken = null;
SimpleIdentifier prefix = null;
- if (matches(Keyword.AS)) {
+ if (matchesKeyword(Keyword.AS)) {
asToken = andAdvance;
prefix = parseSimpleIdentifier();
}
List<Combinator> combinators = parseCombinators();
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expectSemicolon();
return new ImportDirective(commentAndMetadata.comment, commentAndMetadata.metadata, importKeyword, libraryUri, asToken, prefix, combinators, semicolon);
}
@@ -4843,8 +4850,8 @@
* @return the getter that was parsed
*/
FieldDeclaration parseInitializedIdentifierList(CommentAndMetadata commentAndMetadata, Token staticKeyword, Token keyword, TypeName type) {
- VariableDeclarationList fieldList = parseVariableDeclarationList2(null, keyword, type);
- return new FieldDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, staticKeyword, fieldList, expect2(TokenType.SEMICOLON));
+ VariableDeclarationList fieldList = parseVariableDeclarationListAfterType(null, keyword, type);
+ return new FieldDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, staticKeyword, fieldList, expect(TokenType.SEMICOLON));
}
/**
@@ -4876,9 +4883,9 @@
* @return the library directive that was parsed
*/
LibraryDirective parseLibraryDirective(CommentAndMetadata commentAndMetadata) {
- Token keyword = expect(Keyword.LIBRARY);
+ Token keyword = expectKeyword(Keyword.LIBRARY);
LibraryIdentifier libraryName = parseLibraryName(ParserErrorCode.MISSING_NAME_IN_LIBRARY_DIRECTIVE, keyword);
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new LibraryDirective(commentAndMetadata.comment, commentAndMetadata.metadata, keyword, libraryName, semicolon);
}
@@ -4898,13 +4905,13 @@
LibraryIdentifier parseLibraryName(ParserErrorCode missingNameError, Token missingNameToken) {
if (matchesIdentifier()) {
return parseLibraryIdentifier();
- } else if (matches5(TokenType.STRING)) {
+ } else if (matches(TokenType.STRING)) {
// TODO(brianwilkerson) Recovery: This should be extended to handle arbitrary tokens until we
// can find a token that can start a compilation unit member.
StringLiteral string = parseStringLiteral();
- reportError12(ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME, string, []);
+ reportErrorForNode(ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME, string, []);
} else {
- reportError14(missingNameError, missingNameToken, []);
+ reportErrorForToken(missingNameError, missingNameToken, []);
}
List<SimpleIdentifier> components = new List<SimpleIdentifier>();
components.add(createSyntheticIdentifier());
@@ -4927,7 +4934,7 @@
*/
ListLiteral parseListLiteral(Token modifier, TypeArgumentList typeArguments) {
// may be empty list literal
- if (matches5(TokenType.INDEX)) {
+ if (matches(TokenType.INDEX)) {
BeginToken leftBracket = new BeginToken(TokenType.OPEN_SQUARE_BRACKET, _currentToken.offset);
Token rightBracket = new Token(TokenType.CLOSE_SQUARE_BRACKET, _currentToken.offset + 1);
leftBracket.endToken = rightBracket;
@@ -4938,19 +4945,19 @@
return new ListLiteral(modifier, typeArguments, leftBracket, null, rightBracket);
}
// open
- Token leftBracket = expect2(TokenType.OPEN_SQUARE_BRACKET);
- if (matches5(TokenType.CLOSE_SQUARE_BRACKET)) {
+ Token leftBracket = expect(TokenType.OPEN_SQUARE_BRACKET);
+ if (matches(TokenType.CLOSE_SQUARE_BRACKET)) {
return new ListLiteral(modifier, typeArguments, leftBracket, null, andAdvance);
}
List<Expression> elements = new List<Expression>();
elements.add(parseExpression2());
while (optional(TokenType.COMMA)) {
- if (matches5(TokenType.CLOSE_SQUARE_BRACKET)) {
+ if (matches(TokenType.CLOSE_SQUARE_BRACKET)) {
return new ListLiteral(modifier, typeArguments, leftBracket, elements, andAdvance);
}
elements.add(parseExpression2());
}
- Token rightBracket = expect2(TokenType.CLOSE_SQUARE_BRACKET);
+ Token rightBracket = expect(TokenType.CLOSE_SQUARE_BRACKET);
return new ListLiteral(modifier, typeArguments, leftBracket, elements, rightBracket);
}
@@ -4969,16 +4976,16 @@
*/
TypedLiteral parseListOrMapLiteral(Token modifier) {
TypeArgumentList typeArguments = null;
- if (matches5(TokenType.LT)) {
+ if (matches(TokenType.LT)) {
typeArguments = parseTypeArgumentList();
}
- if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
+ if (matches(TokenType.OPEN_CURLY_BRACKET)) {
return parseMapLiteral(modifier, typeArguments);
- } else if (matches5(TokenType.OPEN_SQUARE_BRACKET) || matches5(TokenType.INDEX)) {
+ } else if (matches(TokenType.OPEN_SQUARE_BRACKET) || matches(TokenType.INDEX)) {
return parseListLiteral(modifier, typeArguments);
}
- reportError13(ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL, []);
- return new ListLiteral(modifier, typeArguments, createSyntheticToken2(TokenType.OPEN_SQUARE_BRACKET), null, createSyntheticToken2(TokenType.CLOSE_SQUARE_BRACKET));
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL, []);
+ return new ListLiteral(modifier, typeArguments, createSyntheticToken(TokenType.OPEN_SQUARE_BRACKET), null, createSyntheticToken(TokenType.CLOSE_SQUARE_BRACKET));
}
/**
@@ -4993,7 +5000,7 @@
*/
Expression parseLogicalAndExpression() {
Expression expression = parseEqualityExpression();
- while (matches5(TokenType.AMPERSAND_AMPERSAND)) {
+ while (matches(TokenType.AMPERSAND_AMPERSAND)) {
Token operator = andAdvance;
expression = new BinaryExpression(expression, operator, parseEqualityExpression());
}
@@ -5015,19 +5022,19 @@
* @return the map literal that was parsed
*/
MapLiteral parseMapLiteral(Token modifier, TypeArgumentList typeArguments) {
- Token leftBracket = expect2(TokenType.OPEN_CURLY_BRACKET);
+ Token leftBracket = expect(TokenType.OPEN_CURLY_BRACKET);
List<MapLiteralEntry> entries = new List<MapLiteralEntry>();
- if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
+ if (matches(TokenType.CLOSE_CURLY_BRACKET)) {
return new MapLiteral(modifier, typeArguments, leftBracket, entries, andAdvance);
}
entries.add(parseMapLiteralEntry());
while (optional(TokenType.COMMA)) {
- if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
+ if (matches(TokenType.CLOSE_CURLY_BRACKET)) {
return new MapLiteral(modifier, typeArguments, leftBracket, entries, andAdvance);
}
entries.add(parseMapLiteralEntry());
}
- Token rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET);
+ Token rightBracket = expect(TokenType.CLOSE_CURLY_BRACKET);
return new MapLiteral(modifier, typeArguments, leftBracket, entries, rightBracket);
}
@@ -5036,29 +5043,6 @@
*
* <pre>
* functionDeclaration ::=
- * 'external'? 'static'? functionSignature functionBody
- * | 'external'? functionSignature ';'
- * </pre>
- *
- * @param commentAndMetadata the documentation comment and metadata to be associated with the
- * declaration
- * @param externalKeyword the 'external' token
- * @param staticKeyword the static keyword, or `null` if the getter is not static
- * @param returnType the return type of the method
- * @return the method declaration that was parsed
- */
- MethodDeclaration parseMethodDeclaration(CommentAndMetadata commentAndMetadata, Token externalKeyword, Token staticKeyword, TypeName returnType) {
- SimpleIdentifier methodName = parseSimpleIdentifier();
- FormalParameterList parameters = parseFormalParameterList();
- validateFormalParameterList(parameters);
- return parseMethodDeclaration2(commentAndMetadata, externalKeyword, staticKeyword, returnType, methodName, parameters);
- }
-
- /**
- * Parse a method declaration.
- *
- * <pre>
- * functionDeclaration ::=
* ('external' 'static'?)? functionSignature functionBody
* | 'external'? functionSignature ';'
* </pre>
@@ -5072,21 +5056,44 @@
* @param parameters the parameters to the method
* @return the method declaration that was parsed
*/
- MethodDeclaration parseMethodDeclaration2(CommentAndMetadata commentAndMetadata, Token externalKeyword, Token staticKeyword, TypeName returnType, SimpleIdentifier name, FormalParameterList parameters) {
+ MethodDeclaration parseMethodDeclarationAfterParameters(CommentAndMetadata commentAndMetadata, Token externalKeyword, Token staticKeyword, TypeName returnType, SimpleIdentifier name, FormalParameterList parameters) {
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.MISSING_FUNCTION_BODY, false);
if (externalKeyword != null) {
if (body is! EmptyFunctionBody) {
- reportError12(ParserErrorCode.EXTERNAL_METHOD_WITH_BODY, body, []);
+ reportErrorForNode(ParserErrorCode.EXTERNAL_METHOD_WITH_BODY, body, []);
}
} else if (staticKeyword != null) {
if (body is EmptyFunctionBody) {
- reportError12(ParserErrorCode.ABSTRACT_STATIC_METHOD, body, []);
+ reportErrorForNode(ParserErrorCode.ABSTRACT_STATIC_METHOD, body, []);
}
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, null, null, name, parameters, body);
}
/**
+ * Parse a method declaration.
+ *
+ * <pre>
+ * functionDeclaration ::=
+ * 'external'? 'static'? functionSignature functionBody
+ * | 'external'? functionSignature ';'
+ * </pre>
+ *
+ * @param commentAndMetadata the documentation comment and metadata to be associated with the
+ * declaration
+ * @param externalKeyword the 'external' token
+ * @param staticKeyword the static keyword, or `null` if the getter is not static
+ * @param returnType the return type of the method
+ * @return the method declaration that was parsed
+ */
+ MethodDeclaration parseMethodDeclarationAfterReturnType(CommentAndMetadata commentAndMetadata, Token externalKeyword, Token staticKeyword, TypeName returnType) {
+ SimpleIdentifier methodName = parseSimpleIdentifier();
+ FormalParameterList parameters = parseFormalParameterList();
+ validateFormalParameterList(parameters);
+ return parseMethodDeclarationAfterParameters(commentAndMetadata, externalKeyword, staticKeyword, returnType, methodName, parameters);
+ }
+
+ /**
* Parse the modifiers preceding a declaration. This method allows the modifiers to appear in any
* order but does generate errors for duplicated modifiers. Checks for other problems, such as
* having the modifiers appear in the wrong order or specifying both 'const' and 'final', are
@@ -5103,54 +5110,54 @@
Modifiers modifiers = new Modifiers();
bool progress = true;
while (progress) {
- if (matches4(peek(), TokenType.PERIOD) || matches4(peek(), TokenType.LT) || matches4(peek(), TokenType.OPEN_PAREN)) {
+ if (tokenMatches(peek(), TokenType.PERIOD) || tokenMatches(peek(), TokenType.LT) || tokenMatches(peek(), TokenType.OPEN_PAREN)) {
return modifiers;
}
- if (matches(Keyword.ABSTRACT)) {
+ if (matchesKeyword(Keyword.ABSTRACT)) {
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.abstractKeyword = andAdvance;
}
- } else if (matches(Keyword.CONST)) {
+ } else if (matchesKeyword(Keyword.CONST)) {
if (modifiers.constKeyword != null) {
- reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.constKeyword = andAdvance;
}
- } else if (matches(Keyword.EXTERNAL) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) {
+ } else if (matchesKeyword(Keyword.EXTERNAL) && !tokenMatches(peek(), TokenType.PERIOD) && !tokenMatches(peek(), TokenType.LT)) {
if (modifiers.externalKeyword != null) {
- reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.externalKeyword = andAdvance;
}
- } else if (matches(Keyword.FACTORY) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) {
+ } else if (matchesKeyword(Keyword.FACTORY) && !tokenMatches(peek(), TokenType.PERIOD) && !tokenMatches(peek(), TokenType.LT)) {
if (modifiers.factoryKeyword != null) {
- reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.factoryKeyword = andAdvance;
}
- } else if (matches(Keyword.FINAL)) {
+ } else if (matchesKeyword(Keyword.FINAL)) {
if (modifiers.finalKeyword != null) {
- reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.finalKeyword = andAdvance;
}
- } else if (matches(Keyword.STATIC) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) {
+ } else if (matchesKeyword(Keyword.STATIC) && !tokenMatches(peek(), TokenType.PERIOD) && !tokenMatches(peek(), TokenType.LT)) {
if (modifiers.staticKeyword != null) {
- reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.staticKeyword = andAdvance;
}
- } else if (matches(Keyword.VAR)) {
+ } else if (matchesKeyword(Keyword.VAR)) {
if (modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.varKeyword = andAdvance;
@@ -5175,7 +5182,7 @@
*/
Expression parseMultiplicativeExpression() {
Expression expression;
- if (matches(Keyword.SUPER) && _currentToken.next.type.isMultiplicativeOperator) {
+ if (matchesKeyword(Keyword.SUPER) && _currentToken.next.type.isMultiplicativeOperator) {
expression = new SuperExpression(andAdvance);
} else {
expression = parseUnaryExpression();
@@ -5213,7 +5220,7 @@
*
* @return the new expression that was parsed
*/
- InstanceCreationExpression parseNewExpression() => parseInstanceCreationExpression(expect(Keyword.NEW));
+ InstanceCreationExpression parseNewExpression() => parseInstanceCreationExpression(expectKeyword(Keyword.NEW));
/**
* Parse a non-labeled statement.
@@ -5241,15 +5248,15 @@
Statement parseNonLabeledStatement() {
// TODO(brianwilkerson) Pass the comment and metadata on where appropriate.
CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
- if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
- if (matches4(peek(), TokenType.STRING)) {
+ if (matches(TokenType.OPEN_CURLY_BRACKET)) {
+ if (tokenMatches(peek(), TokenType.STRING)) {
Token afterString = skipStringLiteral(_currentToken.next);
if (afterString != null && identical(afterString.type, TokenType.COLON)) {
- return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect(TokenType.SEMICOLON));
}
}
return parseBlock();
- } else if (matches5(TokenType.KEYWORD) && !(_currentToken as KeywordToken).keyword.isPseudoKeyword) {
+ } else if (matches(TokenType.KEYWORD) && !(_currentToken as KeywordToken).keyword.isPseudoKeyword) {
Keyword keyword = (_currentToken as KeywordToken).keyword;
// TODO(jwren) compute some metrics to figure out a better order for this if-then sequence to optimize performance
if (identical(keyword, Keyword.ASSERT)) {
@@ -5265,26 +5272,26 @@
} else if (identical(keyword, Keyword.IF)) {
return parseIfStatement();
} else if (identical(keyword, Keyword.RETHROW)) {
- return new ExpressionStatement(parseRethrowExpression(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseRethrowExpression(), expect(TokenType.SEMICOLON));
} else if (identical(keyword, Keyword.RETURN)) {
return parseReturnStatement();
} else if (identical(keyword, Keyword.SWITCH)) {
return parseSwitchStatement();
} else if (identical(keyword, Keyword.THROW)) {
- return new ExpressionStatement(parseThrowExpression(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseThrowExpression(), expect(TokenType.SEMICOLON));
} else if (identical(keyword, Keyword.TRY)) {
return parseTryStatement();
} else if (identical(keyword, Keyword.WHILE)) {
return parseWhileStatement();
} else if (identical(keyword, Keyword.VAR) || identical(keyword, Keyword.FINAL)) {
- return parseVariableDeclarationStatement(commentAndMetadata);
+ return parseVariableDeclarationStatementAfterMetadata(commentAndMetadata);
} else if (identical(keyword, Keyword.VOID)) {
TypeName returnType = parseReturnType();
if (matchesIdentifier() && matchesAny(peek(), [
TokenType.OPEN_PAREN,
TokenType.OPEN_CURLY_BRACKET,
TokenType.FUNCTION])) {
- return parseFunctionDeclarationStatement2(commentAndMetadata, returnType);
+ return parseFunctionDeclarationStatementAfterReturnType(commentAndMetadata, returnType);
} else {
//
// We have found an error of some kind. Try to recover.
@@ -5294,19 +5301,19 @@
//
// We appear to have a variable declaration with a type of "void".
//
- reportError12(ParserErrorCode.VOID_VARIABLE, returnType, []);
- return parseVariableDeclarationStatement(commentAndMetadata);
+ reportErrorForNode(ParserErrorCode.VOID_VARIABLE, returnType, []);
+ return parseVariableDeclarationStatementAfterMetadata(commentAndMetadata);
}
- } else if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
+ } else if (matches(TokenType.CLOSE_CURLY_BRACKET)) {
//
// We appear to have found an incomplete statement at the end of a block. Parse it as a
// variable declaration.
//
- return parseVariableDeclarationStatement2(commentAndMetadata, null, returnType);
+ return parseVariableDeclarationStatementAfterType(commentAndMetadata, null, returnType);
}
- reportError13(ParserErrorCode.MISSING_STATEMENT, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT, []);
// TODO(brianwilkerson) Recover from this error.
- return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON));
+ return new EmptyStatement(createSyntheticToken(TokenType.SEMICOLON));
}
} else if (identical(keyword, Keyword.CONST)) {
if (matchesAny(peek(), [
@@ -5314,36 +5321,36 @@
TokenType.OPEN_CURLY_BRACKET,
TokenType.OPEN_SQUARE_BRACKET,
TokenType.INDEX])) {
- return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
- } else if (matches4(peek(), TokenType.IDENTIFIER)) {
+ return new ExpressionStatement(parseExpression2(), expect(TokenType.SEMICOLON));
+ } else if (tokenMatches(peek(), TokenType.IDENTIFIER)) {
Token afterType = skipTypeName(peek());
if (afterType != null) {
- if (matches4(afterType, TokenType.OPEN_PAREN) || (matches4(afterType, TokenType.PERIOD) && matches4(afterType.next, TokenType.IDENTIFIER) && matches4(afterType.next.next, TokenType.OPEN_PAREN))) {
- return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
+ if (tokenMatches(afterType, TokenType.OPEN_PAREN) || (tokenMatches(afterType, TokenType.PERIOD) && tokenMatches(afterType.next, TokenType.IDENTIFIER) && tokenMatches(afterType.next.next, TokenType.OPEN_PAREN))) {
+ return new ExpressionStatement(parseExpression2(), expect(TokenType.SEMICOLON));
}
}
}
- return parseVariableDeclarationStatement(commentAndMetadata);
+ return parseVariableDeclarationStatementAfterMetadata(commentAndMetadata);
} else if (identical(keyword, Keyword.NEW) || identical(keyword, Keyword.TRUE) || identical(keyword, Keyword.FALSE) || identical(keyword, Keyword.NULL) || identical(keyword, Keyword.SUPER) || identical(keyword, Keyword.THIS)) {
- return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect(TokenType.SEMICOLON));
} else {
//
// We have found an error of some kind. Try to recover.
//
- reportError13(ParserErrorCode.MISSING_STATEMENT, []);
- return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON));
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT, []);
+ return new EmptyStatement(createSyntheticToken(TokenType.SEMICOLON));
}
- } else if (matches5(TokenType.SEMICOLON)) {
+ } else if (matches(TokenType.SEMICOLON)) {
return parseEmptyStatement();
} else if (isInitializedVariableDeclaration()) {
- return parseVariableDeclarationStatement(commentAndMetadata);
+ return parseVariableDeclarationStatementAfterMetadata(commentAndMetadata);
} else if (isFunctionDeclaration()) {
return parseFunctionDeclarationStatement();
- } else if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
- reportError13(ParserErrorCode.MISSING_STATEMENT, []);
- return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON));
+ } else if (matches(TokenType.CLOSE_CURLY_BRACKET)) {
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT, []);
+ return new EmptyStatement(createSyntheticToken(TokenType.SEMICOLON));
} else {
- return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect(TokenType.SEMICOLON));
}
}
@@ -5367,20 +5374,20 @@
*/
MethodDeclaration parseOperator(CommentAndMetadata commentAndMetadata, Token externalKeyword, TypeName returnType) {
Token operatorKeyword;
- if (matches(Keyword.OPERATOR)) {
+ if (matchesKeyword(Keyword.OPERATOR)) {
operatorKeyword = andAdvance;
} else {
- reportError14(ParserErrorCode.MISSING_KEYWORD_OPERATOR, _currentToken, []);
- operatorKeyword = createSyntheticToken(Keyword.OPERATOR);
+ reportErrorForToken(ParserErrorCode.MISSING_KEYWORD_OPERATOR, _currentToken, []);
+ operatorKeyword = createSyntheticKeyword(Keyword.OPERATOR);
}
if (!_currentToken.isUserDefinableOperator) {
- reportError13(ParserErrorCode.NON_USER_DEFINABLE_OPERATOR, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.NON_USER_DEFINABLE_OPERATOR, [_currentToken.lexeme]);
}
SimpleIdentifier name = new SimpleIdentifier(andAdvance);
- if (matches5(TokenType.EQ)) {
+ if (matches(TokenType.EQ)) {
Token previous = _currentToken.previous;
- if ((matches4(previous, TokenType.EQ_EQ) || matches4(previous, TokenType.BANG_EQ)) && _currentToken.offset == previous.offset + 2) {
- reportError13(ParserErrorCode.INVALID_OPERATOR, ["${previous.lexeme}${_currentToken.lexeme}"]);
+ if ((tokenMatches(previous, TokenType.EQ_EQ) || tokenMatches(previous, TokenType.BANG_EQ)) && _currentToken.offset == previous.offset + 2) {
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_OPERATOR, ["${previous.lexeme}${_currentToken.lexeme}"]);
advance();
}
}
@@ -5388,7 +5395,7 @@
validateFormalParameterList(parameters);
FunctionBody body = parseFunctionBody(true, ParserErrorCode.MISSING_FUNCTION_BODY, false);
if (externalKeyword != null && body is! EmptyFunctionBody) {
- reportError13(ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY, []);
+ reportErrorForCurrentToken(ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY, []);
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, null, returnType, null, operatorKeyword, name, parameters, body);
}
@@ -5399,11 +5406,11 @@
* @return the return type that was parsed
*/
TypeName parseOptionalReturnType() {
- if (matches(Keyword.VOID)) {
+ if (matchesKeyword(Keyword.VOID)) {
return parseReturnType();
- } else if (matchesIdentifier() && !matches(Keyword.GET) && !matches(Keyword.SET) && !matches(Keyword.OPERATOR) && (matchesIdentifier2(peek()) || matches4(peek(), TokenType.LT))) {
+ } else if (matchesIdentifier() && !matchesKeyword(Keyword.GET) && !matchesKeyword(Keyword.SET) && !matchesKeyword(Keyword.OPERATOR) && (tokenMatchesIdentifier(peek()) || tokenMatches(peek(), TokenType.LT))) {
return parseReturnType();
- } else if (matchesIdentifier() && matches4(peek(), TokenType.PERIOD) && matchesIdentifier2(peek2(2)) && (matchesIdentifier2(peek2(3)) || matches4(peek2(3), TokenType.LT))) {
+ } else if (matchesIdentifier() && tokenMatches(peek(), TokenType.PERIOD) && tokenMatchesIdentifier(peek2(2)) && (tokenMatchesIdentifier(peek2(3)) || tokenMatches(peek2(3), TokenType.LT))) {
return parseReturnType();
}
return null;
@@ -5424,15 +5431,15 @@
* @return the part or part-of directive that was parsed
*/
Directive parsePartDirective(CommentAndMetadata commentAndMetadata) {
- Token partKeyword = expect(Keyword.PART);
- if (matches2(_OF)) {
+ Token partKeyword = expectKeyword(Keyword.PART);
+ if (matchesString(_OF)) {
Token ofKeyword = andAdvance;
LibraryIdentifier libraryName = parseLibraryName(ParserErrorCode.MISSING_NAME_IN_PART_OF_DIRECTIVE, ofKeyword);
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new PartOfDirective(commentAndMetadata.comment, commentAndMetadata.metadata, partKeyword, ofKeyword, libraryName, semicolon);
}
StringLiteral partUri = parseStringLiteral();
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new PartDirective(commentAndMetadata.comment, commentAndMetadata.metadata, partKeyword, partUri, semicolon);
}
@@ -5453,9 +5460,9 @@
*/
Expression parsePostfixExpression() {
Expression operand = parseAssignableExpression(true);
- if (matches5(TokenType.OPEN_SQUARE_BRACKET) || matches5(TokenType.PERIOD) || matches5(TokenType.OPEN_PAREN)) {
+ if (matches(TokenType.OPEN_SQUARE_BRACKET) || matches(TokenType.PERIOD) || matches(TokenType.OPEN_PAREN)) {
do {
- if (matches5(TokenType.OPEN_PAREN)) {
+ if (matches(TokenType.OPEN_PAREN)) {
ArgumentList argumentList = parseArgumentList();
if (operand is PropertyAccess) {
PropertyAccess access = operand as PropertyAccess;
@@ -5466,15 +5473,13 @@
} else {
operand = parseAssignableSelector(operand, true);
}
- } while (matches5(TokenType.OPEN_SQUARE_BRACKET) || matches5(TokenType.PERIOD) || matches5(TokenType.OPEN_PAREN));
+ } while (matches(TokenType.OPEN_SQUARE_BRACKET) || matches(TokenType.PERIOD) || matches(TokenType.OPEN_PAREN));
return operand;
}
if (!_currentToken.type.isIncrementOperator) {
return operand;
}
- if (operand is Literal || operand is FunctionExpressionInvocation) {
- reportError13(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []);
- }
+ ensureAssignable(operand);
Token operator = andAdvance;
return new PostfixExpression(operand, operator);
}
@@ -5507,17 +5512,17 @@
* @return the primary expression that was parsed
*/
Expression parsePrimaryExpression() {
- if (matches(Keyword.THIS)) {
+ if (matchesKeyword(Keyword.THIS)) {
return new ThisExpression(andAdvance);
- } else if (matches(Keyword.SUPER)) {
+ } else if (matchesKeyword(Keyword.SUPER)) {
return parseAssignableSelector(new SuperExpression(andAdvance), false);
- } else if (matches(Keyword.NULL)) {
+ } else if (matchesKeyword(Keyword.NULL)) {
return new NullLiteral(andAdvance);
- } else if (matches(Keyword.FALSE)) {
+ } else if (matchesKeyword(Keyword.FALSE)) {
return new BooleanLiteral(andAdvance, false);
- } else if (matches(Keyword.TRUE)) {
+ } else if (matchesKeyword(Keyword.TRUE)) {
return new BooleanLiteral(andAdvance, true);
- } else if (matches5(TokenType.DOUBLE)) {
+ } else if (matches(TokenType.DOUBLE)) {
Token token = andAdvance;
double value = 0.0;
try {
@@ -5525,7 +5530,7 @@
} on FormatException catch (exception) {
}
return new DoubleLiteral(token, value);
- } else if (matches5(TokenType.HEXADECIMAL)) {
+ } else if (matches(TokenType.HEXADECIMAL)) {
Token token = andAdvance;
int value = null;
try {
@@ -5533,7 +5538,7 @@
} on FormatException catch (exception) {
}
return new IntegerLiteral(token, value);
- } else if (matches5(TokenType.INT)) {
+ } else if (matches(TokenType.INT)) {
Token token = andAdvance;
int value = null;
try {
@@ -5541,11 +5546,11 @@
} on FormatException catch (exception) {
}
return new IntegerLiteral(token, value);
- } else if (matches5(TokenType.STRING)) {
+ } else if (matches(TokenType.STRING)) {
return parseStringLiteral();
- } else if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
+ } else if (matches(TokenType.OPEN_CURLY_BRACKET)) {
return parseMapLiteral(null, null);
- } else if (matches5(TokenType.OPEN_SQUARE_BRACKET) || matches5(TokenType.INDEX)) {
+ } else if (matches(TokenType.OPEN_SQUARE_BRACKET) || matches(TokenType.INDEX)) {
return parseListLiteral(null, null);
} else if (matchesIdentifier()) {
// TODO(brianwilkerson) The code below was an attempt to recover from an error case, but it
@@ -5559,34 +5564,34 @@
// return parseFunctionExpression();
// }
return parsePrefixedIdentifier();
- } else if (matches(Keyword.NEW)) {
+ } else if (matchesKeyword(Keyword.NEW)) {
return parseNewExpression();
- } else if (matches(Keyword.CONST)) {
+ } else if (matchesKeyword(Keyword.CONST)) {
return parseConstExpression();
- } else if (matches5(TokenType.OPEN_PAREN)) {
+ } else if (matches(TokenType.OPEN_PAREN)) {
if (isFunctionExpression(_currentToken)) {
return parseFunctionExpression();
}
Token leftParenthesis = andAdvance;
Expression expression = parseExpression2();
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
return new ParenthesizedExpression(leftParenthesis, expression, rightParenthesis);
- } else if (matches5(TokenType.LT)) {
+ } else if (matches(TokenType.LT)) {
return parseListOrMapLiteral(null);
- } else if (matches5(TokenType.QUESTION)) {
+ } else if (matches(TokenType.QUESTION)) {
return parseArgumentDefinitionTest();
- } else if (matches(Keyword.VOID)) {
+ } else if (matchesKeyword(Keyword.VOID)) {
//
// Recover from having a return type of "void" where a return type is not expected.
//
// TODO(brianwilkerson) Improve this error message.
- reportError13(ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]);
advance();
return parsePrimaryExpression();
- } else if (matches5(TokenType.HASH)) {
+ } else if (matches(TokenType.HASH)) {
return parseSymbolLiteral();
} else {
- reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER, []);
return createSyntheticIdentifier();
}
}
@@ -5602,10 +5607,10 @@
* @return the redirecting constructor invocation that was parsed
*/
RedirectingConstructorInvocation parseRedirectingConstructorInvocation() {
- Token keyword = expect(Keyword.THIS);
+ Token keyword = expectKeyword(Keyword.THIS);
Token period = null;
SimpleIdentifier constructorName = null;
- if (matches5(TokenType.PERIOD)) {
+ if (matches(TokenType.PERIOD)) {
period = andAdvance;
constructorName = parseSimpleIdentifier();
}
@@ -5625,20 +5630,20 @@
* @return the relational expression that was parsed
*/
Expression parseRelationalExpression() {
- if (matches(Keyword.SUPER) && _currentToken.next.type.isRelationalOperator) {
+ if (matchesKeyword(Keyword.SUPER) && _currentToken.next.type.isRelationalOperator) {
Expression expression = new SuperExpression(andAdvance);
Token operator = andAdvance;
expression = new BinaryExpression(expression, operator, parseBitwiseOrExpression());
return expression;
}
Expression expression = parseBitwiseOrExpression();
- if (matches(Keyword.AS)) {
+ if (matchesKeyword(Keyword.AS)) {
Token asOperator = andAdvance;
expression = new AsExpression(expression, asOperator, parseTypeName());
- } else if (matches(Keyword.IS)) {
+ } else if (matchesKeyword(Keyword.IS)) {
Token isOperator = andAdvance;
Token notOperator = null;
- if (matches5(TokenType.BANG)) {
+ if (matches(TokenType.BANG)) {
notOperator = andAdvance;
}
expression = new IsExpression(expression, isOperator, notOperator, parseTypeName());
@@ -5659,7 +5664,7 @@
*
* @return the rethrow expression that was parsed
*/
- Expression parseRethrowExpression() => new RethrowExpression(expect(Keyword.RETHROW));
+ Expression parseRethrowExpression() => new RethrowExpression(expectKeyword(Keyword.RETHROW));
/**
* Parse a return statement.
@@ -5672,12 +5677,12 @@
* @return the return statement that was parsed
*/
Statement parseReturnStatement() {
- Token returnKeyword = expect(Keyword.RETURN);
- if (matches5(TokenType.SEMICOLON)) {
+ Token returnKeyword = expectKeyword(Keyword.RETURN);
+ if (matches(TokenType.SEMICOLON)) {
return new ReturnStatement(returnKeyword, null, andAdvance);
}
Expression expression = parseExpression2();
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new ReturnStatement(returnKeyword, expression, semicolon);
}
@@ -5701,13 +5706,13 @@
* @return the setter that was parsed
*/
MethodDeclaration parseSetter(CommentAndMetadata commentAndMetadata, Token externalKeyword, Token staticKeyword, TypeName returnType) {
- Token propertyKeyword = expect(Keyword.SET);
+ Token propertyKeyword = expectKeyword(Keyword.SET);
SimpleIdentifier name = parseSimpleIdentifier();
FormalParameterList parameters = parseFormalParameterList();
validateFormalParameterList(parameters);
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.STATIC_SETTER_WITHOUT_BODY, false);
if (externalKeyword != null && body is! EmptyFunctionBody) {
- reportError13(ParserErrorCode.EXTERNAL_SETTER_WITH_BODY, []);
+ reportErrorForCurrentToken(ParserErrorCode.EXTERNAL_SETTER_WITH_BODY, []);
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, propertyKeyword, null, name, parameters, body);
}
@@ -5725,7 +5730,7 @@
*/
Expression parseShiftExpression() {
Expression expression;
- if (matches(Keyword.SUPER) && _currentToken.next.type.isShiftOperator) {
+ if (matchesKeyword(Keyword.SUPER) && _currentToken.next.type.isShiftOperator) {
expression = new SuperExpression(andAdvance);
} else {
expression = parseAdditiveExpression();
@@ -5747,13 +5752,13 @@
*
* @return the statements that were parsed
*/
- List<Statement> parseStatements2() {
+ List<Statement> parseStatementList() {
List<Statement> statements = new List<Statement>();
Token statementStart = _currentToken;
- while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && !isSwitchMember()) {
+ while (!matches(TokenType.EOF) && !matches(TokenType.CLOSE_CURLY_BRACKET) && !isSwitchMember()) {
statements.add(parseStatement2());
if (identical(_currentToken, statementStart)) {
- reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportErrorForToken(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
}
statementStart = _currentToken;
@@ -5768,27 +5773,27 @@
*/
StringInterpolation parseStringInterpolation(Token string) {
List<InterpolationElement> elements = new List<InterpolationElement>();
- bool hasMore = matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches5(TokenType.STRING_INTERPOLATION_IDENTIFIER);
+ bool hasMore = matches(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches(TokenType.STRING_INTERPOLATION_IDENTIFIER);
elements.add(new InterpolationString(string, computeStringValue(string.lexeme, true, !hasMore)));
while (hasMore) {
- if (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION)) {
+ if (matches(TokenType.STRING_INTERPOLATION_EXPRESSION)) {
Token openToken = andAdvance;
Expression expression = parseExpression2();
- Token rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET);
+ Token rightBracket = expect(TokenType.CLOSE_CURLY_BRACKET);
elements.add(new InterpolationExpression(openToken, expression, rightBracket));
} else {
Token openToken = andAdvance;
Expression expression = null;
- if (matches(Keyword.THIS)) {
+ if (matchesKeyword(Keyword.THIS)) {
expression = new ThisExpression(andAdvance);
} else {
expression = parseSimpleIdentifier();
}
elements.add(new InterpolationExpression(openToken, expression, null));
}
- if (matches5(TokenType.STRING)) {
+ if (matches(TokenType.STRING)) {
string = andAdvance;
- hasMore = matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches5(TokenType.STRING_INTERPOLATION_IDENTIFIER);
+ hasMore = matches(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches(TokenType.STRING_INTERPOLATION_IDENTIFIER);
elements.add(new InterpolationString(string, computeStringValue(string.lexeme, false, !hasMore)));
}
}
@@ -5806,10 +5811,10 @@
* @return the super constructor invocation that was parsed
*/
SuperConstructorInvocation parseSuperConstructorInvocation() {
- Token keyword = expect(Keyword.SUPER);
+ Token keyword = expectKeyword(Keyword.SUPER);
Token period = null;
SimpleIdentifier constructorName = null;
- if (matches5(TokenType.PERIOD)) {
+ if (matches(TokenType.PERIOD)) {
period = andAdvance;
constructorName = parseSimpleIdentifier();
}
@@ -5838,51 +5843,51 @@
_inSwitch = true;
try {
Set<String> definedLabels = new Set<String>();
- Token keyword = expect(Keyword.SWITCH);
- Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
+ Token keyword = expectKeyword(Keyword.SWITCH);
+ Token leftParenthesis = expect(TokenType.OPEN_PAREN);
Expression expression = parseExpression2();
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
- Token leftBracket = expect2(TokenType.OPEN_CURLY_BRACKET);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
+ Token leftBracket = expect(TokenType.OPEN_CURLY_BRACKET);
Token defaultKeyword = null;
List<SwitchMember> members = new List<SwitchMember>();
- while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET)) {
+ while (!matches(TokenType.EOF) && !matches(TokenType.CLOSE_CURLY_BRACKET)) {
List<Label> labels = new List<Label>();
- while (matchesIdentifier() && matches4(peek(), TokenType.COLON)) {
+ while (matchesIdentifier() && tokenMatches(peek(), TokenType.COLON)) {
SimpleIdentifier identifier = parseSimpleIdentifier();
String label = identifier.token.lexeme;
if (definedLabels.contains(label)) {
- reportError14(ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT, identifier.token, [label]);
+ reportErrorForToken(ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT, identifier.token, [label]);
} else {
definedLabels.add(label);
}
- Token colon = expect2(TokenType.COLON);
+ Token colon = expect(TokenType.COLON);
labels.add(new Label(identifier, colon));
}
- if (matches(Keyword.CASE)) {
+ if (matchesKeyword(Keyword.CASE)) {
Token caseKeyword = andAdvance;
Expression caseExpression = parseExpression2();
- Token colon = expect2(TokenType.COLON);
- members.add(new SwitchCase(labels, caseKeyword, caseExpression, colon, parseStatements2()));
+ Token colon = expect(TokenType.COLON);
+ members.add(new SwitchCase(labels, caseKeyword, caseExpression, colon, parseStatementList()));
if (defaultKeyword != null) {
- reportError14(ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, caseKeyword, []);
+ reportErrorForToken(ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, caseKeyword, []);
}
- } else if (matches(Keyword.DEFAULT)) {
+ } else if (matchesKeyword(Keyword.DEFAULT)) {
if (defaultKeyword != null) {
- reportError14(ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES, peek(), []);
+ reportErrorForToken(ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES, peek(), []);
}
defaultKeyword = andAdvance;
- Token colon = expect2(TokenType.COLON);
- members.add(new SwitchDefault(labels, defaultKeyword, colon, parseStatements2()));
+ Token colon = expect(TokenType.COLON);
+ members.add(new SwitchDefault(labels, defaultKeyword, colon, parseStatementList()));
} else {
// We need to advance, otherwise we could end up in an infinite loop, but this could be a
// lot smarter about recovering from the error.
- reportError13(ParserErrorCode.EXPECTED_CASE_OR_DEFAULT, []);
- while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && !matches(Keyword.CASE) && !matches(Keyword.DEFAULT)) {
+ reportErrorForCurrentToken(ParserErrorCode.EXPECTED_CASE_OR_DEFAULT, []);
+ while (!matches(TokenType.EOF) && !matches(TokenType.CLOSE_CURLY_BRACKET) && !matchesKeyword(Keyword.CASE) && !matchesKeyword(Keyword.DEFAULT)) {
advance();
}
}
}
- Token rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET);
+ Token rightBracket = expect(TokenType.CLOSE_CURLY_BRACKET);
return new SwitchStatement(keyword, leftParenthesis, expression, rightParenthesis, leftBracket, members, rightBracket);
} finally {
_inSwitch = wasInSwitch;
@@ -5904,21 +5909,21 @@
List<Token> components = new List<Token>();
if (matchesIdentifier()) {
components.add(andAdvance);
- while (matches5(TokenType.PERIOD)) {
+ while (matches(TokenType.PERIOD)) {
advance();
if (matchesIdentifier()) {
components.add(andAdvance);
} else {
- reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
- components.add(createSyntheticToken2(TokenType.IDENTIFIER));
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER, []);
+ components.add(createSyntheticToken(TokenType.IDENTIFIER));
break;
}
}
} else if (_currentToken.isOperator) {
components.add(andAdvance);
} else {
- reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
- components.add(createSyntheticToken2(TokenType.IDENTIFIER));
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER, []);
+ components.add(createSyntheticToken(TokenType.IDENTIFIER));
}
return new SymbolLiteral(poundSign, new List.from(components));
}
@@ -5934,9 +5939,9 @@
* @return the throw expression that was parsed
*/
Expression parseThrowExpression() {
- Token keyword = expect(Keyword.THROW);
- if (matches5(TokenType.SEMICOLON) || matches5(TokenType.CLOSE_PAREN)) {
- reportError14(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
+ Token keyword = expectKeyword(Keyword.THROW);
+ if (matches(TokenType.SEMICOLON) || matches(TokenType.CLOSE_PAREN)) {
+ reportErrorForToken(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
return new ThrowExpression(keyword, createSyntheticIdentifier());
}
Expression expression = parseExpression2();
@@ -5954,9 +5959,9 @@
* @return the throw expression that was parsed
*/
Expression parseThrowExpressionWithoutCascade() {
- Token keyword = expect(Keyword.THROW);
- if (matches5(TokenType.SEMICOLON) || matches5(TokenType.CLOSE_PAREN)) {
- reportError14(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
+ Token keyword = expectKeyword(Keyword.THROW);
+ if (matches(TokenType.SEMICOLON) || matches(TokenType.CLOSE_PAREN)) {
+ reportErrorForToken(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
return new ThrowExpression(keyword, createSyntheticIdentifier());
}
Expression expression = parseExpressionWithoutCascade();
@@ -5984,14 +5989,14 @@
* @return the try statement that was parsed
*/
Statement parseTryStatement() {
- Token tryKeyword = expect(Keyword.TRY);
+ Token tryKeyword = expectKeyword(Keyword.TRY);
Block body = parseBlock();
List<CatchClause> catchClauses = new List<CatchClause>();
Block finallyClause = null;
- while (matches2(_ON) || matches(Keyword.CATCH)) {
+ while (matchesString(_ON) || matchesKeyword(Keyword.CATCH)) {
Token onKeyword = null;
TypeName exceptionType = null;
- if (matches2(_ON)) {
+ if (matchesString(_ON)) {
onKeyword = andAdvance;
exceptionType = parseTypeName();
}
@@ -6001,26 +6006,26 @@
Token comma = null;
SimpleIdentifier stackTraceParameter = null;
Token rightParenthesis = null;
- if (matches(Keyword.CATCH)) {
+ if (matchesKeyword(Keyword.CATCH)) {
catchKeyword = andAdvance;
- leftParenthesis = expect2(TokenType.OPEN_PAREN);
+ leftParenthesis = expect(TokenType.OPEN_PAREN);
exceptionParameter = parseSimpleIdentifier();
- if (matches5(TokenType.COMMA)) {
+ if (matches(TokenType.COMMA)) {
comma = andAdvance;
stackTraceParameter = parseSimpleIdentifier();
}
- rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ rightParenthesis = expect(TokenType.CLOSE_PAREN);
}
Block catchBody = parseBlock();
catchClauses.add(new CatchClause(onKeyword, exceptionType, catchKeyword, leftParenthesis, exceptionParameter, comma, stackTraceParameter, rightParenthesis, catchBody));
}
Token finallyKeyword = null;
- if (matches(Keyword.FINALLY)) {
+ if (matchesKeyword(Keyword.FINALLY)) {
finallyKeyword = andAdvance;
finallyClause = parseBlock();
} else {
if (catchClauses.isEmpty) {
- reportError13(ParserErrorCode.MISSING_CATCH_OR_FINALLY, []);
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_CATCH_OR_FINALLY, []);
}
}
return new TryStatement(tryKeyword, body, catchClauses, finallyKeyword, finallyClause);
@@ -6054,19 +6059,19 @@
* @return the type alias that was parsed
*/
TypeAlias parseTypeAlias(CommentAndMetadata commentAndMetadata) {
- Token keyword = expect(Keyword.TYPEDEF);
+ Token keyword = expectKeyword(Keyword.TYPEDEF);
if (matchesIdentifier()) {
Token next = peek();
- if (matches4(next, TokenType.LT)) {
+ if (tokenMatches(next, TokenType.LT)) {
next = skipTypeParameterList(next);
- if (next != null && matches4(next, TokenType.EQ)) {
+ if (next != null && tokenMatches(next, TokenType.EQ)) {
TypeAlias typeAlias = parseClassTypeAlias(commentAndMetadata, null, keyword);
- reportError14(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
+ reportErrorForToken(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
return typeAlias;
}
- } else if (matches4(next, TokenType.EQ)) {
+ } else if (tokenMatches(next, TokenType.EQ)) {
TypeAlias typeAlias = parseClassTypeAlias(commentAndMetadata, null, keyword);
- reportError14(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
+ reportErrorForToken(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
return typeAlias;
}
}
@@ -6088,10 +6093,10 @@
* @return the unary expression that was parsed
*/
Expression parseUnaryExpression() {
- if (matches5(TokenType.MINUS) || matches5(TokenType.BANG) || matches5(TokenType.TILDE)) {
+ if (matches(TokenType.MINUS) || matches(TokenType.BANG) || matches(TokenType.TILDE)) {
Token operator = andAdvance;
- if (matches(Keyword.SUPER)) {
- if (matches4(peek(), TokenType.OPEN_SQUARE_BRACKET) || matches4(peek(), TokenType.PERIOD)) {
+ if (matchesKeyword(Keyword.SUPER)) {
+ if (tokenMatches(peek(), TokenType.OPEN_SQUARE_BRACKET) || tokenMatches(peek(), TokenType.PERIOD)) {
// "prefixOperator unaryExpression"
// --> "prefixOperator postfixExpression"
// --> "prefixOperator primary selector*"
@@ -6103,8 +6108,8 @@
return new PrefixExpression(operator, parseUnaryExpression());
} else if (_currentToken.type.isIncrementOperator) {
Token operator = andAdvance;
- if (matches(Keyword.SUPER)) {
- if (matches4(peek(), TokenType.OPEN_SQUARE_BRACKET) || matches4(peek(), TokenType.PERIOD)) {
+ if (matchesKeyword(Keyword.SUPER)) {
+ if (tokenMatches(peek(), TokenType.OPEN_SQUARE_BRACKET) || tokenMatches(peek(), TokenType.PERIOD)) {
// --> "prefixOperator 'super' assignableSelector selector*"
return new PrefixExpression(operator, parseUnaryExpression());
}
@@ -6123,13 +6128,13 @@
return new PrefixExpression(firstOperator, new PrefixExpression(secondOperator, new SuperExpression(andAdvance)));
} else {
// Invalid operator before 'super'
- reportError13(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, [operator.lexeme]);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, [operator.lexeme]);
return new PrefixExpression(operator, new SuperExpression(andAdvance));
}
}
return new PrefixExpression(operator, parseAssignableExpression(false));
- } else if (matches5(TokenType.PLUS)) {
- reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
+ } else if (matches(TokenType.PLUS)) {
+ reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER, []);
return createSyntheticIdentifier();
}
return parsePostfixExpression();
@@ -6150,7 +6155,7 @@
SimpleIdentifier name = parseSimpleIdentifier();
Token equals = null;
Expression initializer = null;
- if (matches5(TokenType.EQ)) {
+ if (matches(TokenType.EQ)) {
equals = andAdvance;
initializer = parseExpression2();
}
@@ -6168,9 +6173,9 @@
* @param commentAndMetadata the metadata to be associated with the variable declaration list
* @return the variable declaration list that was parsed
*/
- VariableDeclarationList parseVariableDeclarationList(CommentAndMetadata commentAndMetadata) {
+ VariableDeclarationList parseVariableDeclarationListAfterMetadata(CommentAndMetadata commentAndMetadata) {
FinalConstVarOrType holder = parseFinalConstVarOrType(false);
- return parseVariableDeclarationList2(commentAndMetadata, holder.keyword, holder.type);
+ return parseVariableDeclarationListAfterType(commentAndMetadata, holder.keyword, holder.type);
}
/**
@@ -6188,13 +6193,13 @@
* @param type the type of the variables in the list
* @return the variable declaration list that was parsed
*/
- VariableDeclarationList parseVariableDeclarationList2(CommentAndMetadata commentAndMetadata, Token keyword, TypeName type) {
- if (type != null && keyword != null && matches3(keyword, Keyword.VAR)) {
- reportError14(ParserErrorCode.VAR_AND_TYPE, keyword, []);
+ VariableDeclarationList parseVariableDeclarationListAfterType(CommentAndMetadata commentAndMetadata, Token keyword, TypeName type) {
+ if (type != null && keyword != null && tokenMatchesKeyword(keyword, Keyword.VAR)) {
+ reportErrorForToken(ParserErrorCode.VAR_AND_TYPE, keyword, []);
}
List<VariableDeclaration> variables = new List<VariableDeclaration>();
variables.add(parseVariableDeclaration());
- while (matches5(TokenType.COMMA)) {
+ while (matches(TokenType.COMMA)) {
advance();
variables.add(parseVariableDeclaration());
}
@@ -6213,16 +6218,16 @@
* statement, or `null` if there is no attempt at parsing the comment and metadata
* @return the variable declaration statement that was parsed
*/
- VariableDeclarationStatement parseVariableDeclarationStatement(CommentAndMetadata commentAndMetadata) {
+ VariableDeclarationStatement parseVariableDeclarationStatementAfterMetadata(CommentAndMetadata commentAndMetadata) {
// Token startToken = currentToken;
- VariableDeclarationList variableList = parseVariableDeclarationList(commentAndMetadata);
+ VariableDeclarationList variableList = parseVariableDeclarationListAfterMetadata(commentAndMetadata);
// if (!matches(TokenType.SEMICOLON)) {
// if (matches(startToken, Keyword.VAR) && isTypedIdentifier(startToken.getNext())) {
// // TODO(brianwilkerson) This appears to be of the form "var type variable". We should do
// // a better job of recovering in this case.
// }
// }
- Token semicolon = expect2(TokenType.SEMICOLON);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new VariableDeclarationStatement(variableList, semicolon);
}
@@ -6241,9 +6246,9 @@
* @param type the type of the variables in the list
* @return the variable declaration statement that was parsed
*/
- VariableDeclarationStatement parseVariableDeclarationStatement2(CommentAndMetadata commentAndMetadata, Token keyword, TypeName type) {
- VariableDeclarationList variableList = parseVariableDeclarationList2(commentAndMetadata, keyword, type);
- Token semicolon = expect2(TokenType.SEMICOLON);
+ VariableDeclarationStatement parseVariableDeclarationStatementAfterType(CommentAndMetadata commentAndMetadata, Token keyword, TypeName type) {
+ VariableDeclarationList variableList = parseVariableDeclarationListAfterType(commentAndMetadata, keyword, type);
+ Token semicolon = expect(TokenType.SEMICOLON);
return new VariableDeclarationStatement(variableList, semicolon);
}
@@ -6261,10 +6266,10 @@
bool wasInLoop = _inLoop;
_inLoop = true;
try {
- Token keyword = expect(Keyword.WHILE);
- Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
+ Token keyword = expectKeyword(Keyword.WHILE);
+ Token leftParenthesis = expect(TokenType.OPEN_PAREN);
Expression condition = parseExpression2();
- Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
+ Token rightParenthesis = expect(TokenType.CLOSE_PAREN);
Statement body = parseStatement2();
return new WhileStatement(keyword, leftParenthesis, condition, rightParenthesis, body);
} finally {
@@ -6311,21 +6316,21 @@
* Report an error with the given error code and arguments.
*
* @param errorCode the error code of the error to be reported
- * @param node the node specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError12(ParserErrorCode errorCode, ASTNode node, List<Object> arguments) {
- reportError(new AnalysisError.con2(_source, node.offset, node.length, errorCode, arguments));
+ void reportErrorForCurrentToken(ParserErrorCode errorCode, List<Object> arguments) {
+ reportErrorForToken(errorCode, _currentToken, arguments);
}
/**
* Report an error with the given error code and arguments.
*
* @param errorCode the error code of the error to be reported
+ * @param node the node specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError13(ParserErrorCode errorCode, List<Object> arguments) {
- reportError14(errorCode, _currentToken, arguments);
+ void reportErrorForNode(ParserErrorCode errorCode, AstNode node, List<Object> arguments) {
+ reportError(new AnalysisError.con2(_source, node.offset, node.length, errorCode, arguments));
}
/**
@@ -6335,7 +6340,7 @@
* @param token the token specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError14(ParserErrorCode errorCode, Token token, List<Object> arguments) {
+ void reportErrorForToken(ParserErrorCode errorCode, Token token, List<Object> arguments) {
reportError(new AnalysisError.con2(_source, token.offset, token.length, errorCode, arguments));
}
@@ -6364,22 +6369,22 @@
* @return the token following the type that was parsed
*/
Token skipFinalConstVarOrType(Token startToken) {
- if (matches3(startToken, Keyword.FINAL) || matches3(startToken, Keyword.CONST)) {
+ if (tokenMatchesKeyword(startToken, Keyword.FINAL) || tokenMatchesKeyword(startToken, Keyword.CONST)) {
Token next = startToken.next;
- if (matchesIdentifier2(next)) {
+ if (tokenMatchesIdentifier(next)) {
Token next2 = next.next;
// "Type parameter" or "Type<" or "prefix.Type"
- if (matchesIdentifier2(next2) || matches4(next2, TokenType.LT) || matches4(next2, TokenType.PERIOD)) {
+ if (tokenMatchesIdentifier(next2) || tokenMatches(next2, TokenType.LT) || tokenMatches(next2, TokenType.PERIOD)) {
return skipTypeName(next);
}
// "parameter"
return next;
}
- } else if (matches3(startToken, Keyword.VAR)) {
+ } else if (tokenMatchesKeyword(startToken, Keyword.VAR)) {
return startToken.next;
- } else if (matchesIdentifier2(startToken)) {
+ } else if (tokenMatchesIdentifier(startToken)) {
Token next = startToken.next;
- if (matchesIdentifier2(next) || matches4(next, TokenType.LT) || matches3(next, Keyword.THIS) || (matches4(next, TokenType.PERIOD) && matchesIdentifier2(next.next) && (matchesIdentifier2(next.next.next) || matches4(next.next.next, TokenType.LT) || matches3(next.next.next, Keyword.THIS)))) {
+ if (tokenMatchesIdentifier(next) || tokenMatches(next, TokenType.LT) || tokenMatchesKeyword(next, Keyword.THIS) || (tokenMatches(next, TokenType.PERIOD) && tokenMatchesIdentifier(next.next) && (tokenMatchesIdentifier(next.next.next) || tokenMatches(next.next.next, TokenType.LT) || tokenMatchesKeyword(next.next.next, Keyword.THIS)))) {
return skipReturnType(startToken);
}
}
@@ -6424,11 +6429,11 @@
* @return the token following the formal parameter list that was parsed
*/
Token skipFormalParameterList(Token startToken) {
- if (!matches4(startToken, TokenType.OPEN_PAREN)) {
+ if (!tokenMatches(startToken, TokenType.OPEN_PAREN)) {
return null;
}
Token next = startToken.next;
- if (matches4(next, TokenType.CLOSE_PAREN)) {
+ if (tokenMatches(next, TokenType.CLOSE_PAREN)) {
return next.next;
}
//
@@ -6438,13 +6443,13 @@
if (matchesAny(next, [
TokenType.AT,
TokenType.OPEN_SQUARE_BRACKET,
- TokenType.OPEN_CURLY_BRACKET]) || matches3(next, Keyword.VOID) || (matchesIdentifier2(next) && (matchesAny(next.next, [TokenType.COMMA, TokenType.CLOSE_PAREN])))) {
+ TokenType.OPEN_CURLY_BRACKET]) || tokenMatchesKeyword(next, Keyword.VOID) || (tokenMatchesIdentifier(next) && (matchesAny(next.next, [TokenType.COMMA, TokenType.CLOSE_PAREN])))) {
return skipPastMatchingToken(startToken);
}
//
// Look to see whether the first parameter is a function typed parameter without a return type.
//
- if (matchesIdentifier2(next) && matches4(next.next, TokenType.OPEN_PAREN)) {
+ if (tokenMatchesIdentifier(next) && tokenMatches(next.next, TokenType.OPEN_PAREN)) {
Token afterParameters = skipFormalParameterList(next.next);
if (afterParameters != null && (matchesAny(afterParameters, [TokenType.COMMA, TokenType.CLOSE_PAREN]))) {
return skipPastMatchingToken(startToken);
@@ -6502,7 +6507,7 @@
Token token = skipSimpleIdentifier(startToken);
if (token == null) {
return null;
- } else if (!matches4(token, TokenType.PERIOD)) {
+ } else if (!tokenMatches(token, TokenType.PERIOD)) {
return token;
}
return skipSimpleIdentifier(token.next);
@@ -6525,7 +6530,7 @@
* @return the token following the return type that was parsed
*/
Token skipReturnType(Token startToken) {
- if (matches3(startToken, Keyword.VOID)) {
+ if (tokenMatchesKeyword(startToken, Keyword.VOID)) {
return startToken.next;
} else {
return skipTypeName(startToken);
@@ -6549,7 +6554,7 @@
* @return the token following the simple identifier that was parsed
*/
Token skipSimpleIdentifier(Token startToken) {
- if (matches4(startToken, TokenType.IDENTIFIER) || (matches4(startToken, TokenType.KEYWORD) && (startToken as KeywordToken).keyword.isPseudoKeyword)) {
+ if (tokenMatches(startToken, TokenType.IDENTIFIER) || (tokenMatches(startToken, TokenType.KEYWORD) && (startToken as KeywordToken).keyword.isPseudoKeyword)) {
return startToken.next;
}
return null;
@@ -6632,7 +6637,7 @@
*/
Token skipStringLiteral(Token startToken) {
Token token = startToken;
- while (token != null && matches4(token, TokenType.STRING)) {
+ while (token != null && tokenMatches(token, TokenType.STRING)) {
token = token.next;
TokenType type = token.type;
if (identical(type, TokenType.STRING_INTERPOLATION_EXPRESSION) || identical(type, TokenType.STRING_INTERPOLATION_IDENTIFIER)) {
@@ -6665,14 +6670,14 @@
*/
Token skipTypeArgumentList(Token startToken) {
Token token = startToken;
- if (!matches4(token, TokenType.LT)) {
+ if (!tokenMatches(token, TokenType.LT)) {
return null;
}
token = skipTypeName(token.next);
if (token == null) {
return null;
}
- while (matches4(token, TokenType.COMMA)) {
+ while (tokenMatches(token, TokenType.COMMA)) {
token = skipTypeName(token.next);
if (token == null) {
return null;
@@ -6708,7 +6713,7 @@
if (token == null) {
return null;
}
- if (matches4(token, TokenType.LT)) {
+ if (tokenMatches(token, TokenType.LT)) {
token = skipTypeArgumentList(token);
}
return token;
@@ -6731,7 +6736,7 @@
* @return the token following the type parameter list that was parsed
*/
Token skipTypeParameterList(Token startToken) {
- if (!matches4(startToken, TokenType.LT)) {
+ if (!tokenMatches(startToken, TokenType.LT)) {
return null;
}
//
@@ -6741,22 +6746,22 @@
int depth = 1;
Token next = startToken.next;
while (depth > 0) {
- if (matches4(next, TokenType.EOF)) {
+ if (tokenMatches(next, TokenType.EOF)) {
return null;
- } else if (matches4(next, TokenType.LT)) {
+ } else if (tokenMatches(next, TokenType.LT)) {
depth++;
- } else if (matches4(next, TokenType.GT)) {
+ } else if (tokenMatches(next, TokenType.GT)) {
depth--;
- } else if (matches4(next, TokenType.GT_EQ)) {
+ } else if (tokenMatches(next, TokenType.GT_EQ)) {
if (depth == 1) {
Token fakeEquals = new Token(TokenType.EQ, next.offset + 2);
fakeEquals.setNextWithoutSettingPrevious(next.next);
return fakeEquals;
}
depth--;
- } else if (matches4(next, TokenType.GT_GT)) {
+ } else if (tokenMatches(next, TokenType.GT_GT)) {
depth -= 2;
- } else if (matches4(next, TokenType.GT_GT_EQ)) {
+ } else if (tokenMatches(next, TokenType.GT_GT_EQ)) {
if (depth < 2) {
return null;
} else if (depth == 2) {
@@ -6772,6 +6777,32 @@
}
/**
+ * Return `true` if the given token has the given type.
+ *
+ * @param token the token being tested
+ * @param type the type of token that is being tested for
+ * @return `true` if the given token has the given type
+ */
+ bool tokenMatches(Token token, TokenType type) => identical(token.type, type);
+
+ /**
+ * Return `true` if the given token is a valid identifier. Valid identifiers include
+ * built-in identifiers (pseudo-keywords).
+ *
+ * @return `true` if the given token is a valid identifier
+ */
+ bool tokenMatchesIdentifier(Token token) => tokenMatches(token, TokenType.IDENTIFIER) || (tokenMatches(token, TokenType.KEYWORD) && (token as KeywordToken).keyword.isPseudoKeyword);
+
+ /**
+ * Return `true` if the given token matches the given keyword.
+ *
+ * @param token the token being tested
+ * @param keyword the keyword that is being tested for
+ * @return `true` if the given token matches the given keyword
+ */
+ bool tokenMatchesKeyword(Token token, Keyword keyword) => identical(token.type, TokenType.KEYWORD) && identical((token as KeywordToken).keyword, keyword);
+
+ /**
* Translate the characters at the given index in the given string, appending the translated
* character to the given builder. The index is assumed to be valid.
*
@@ -6816,14 +6847,14 @@
} else if (currentChar == 0x78) {
if (currentIndex + 2 >= length) {
// Illegal escape sequence: not enough hex digits
- reportError13(ParserErrorCode.INVALID_HEX_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_HEX_ESCAPE, []);
return length;
}
int firstDigit = lexeme.codeUnitAt(currentIndex + 1);
int secondDigit = lexeme.codeUnitAt(currentIndex + 2);
if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit)) {
// Illegal escape sequence: invalid hex digit
- reportError13(ParserErrorCode.INVALID_HEX_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_HEX_ESCAPE, []);
} else {
builder.appendChar(((Character.digit(firstDigit, 16) << 4) + Character.digit(secondDigit, 16)));
}
@@ -6832,7 +6863,7 @@
currentIndex++;
if (currentIndex >= length) {
// Illegal escape sequence: not enough hex digits
- reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
currentChar = lexeme.codeUnitAt(currentIndex);
@@ -6840,7 +6871,7 @@
currentIndex++;
if (currentIndex >= length) {
// Illegal escape sequence: incomplete escape
- reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
currentChar = lexeme.codeUnitAt(currentIndex);
@@ -6849,7 +6880,7 @@
while (currentChar != 0x7D) {
if (!isHexDigit(currentChar)) {
// Illegal escape sequence: invalid hex digit
- reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
currentIndex++;
while (currentIndex < length && lexeme.codeUnitAt(currentIndex) != 0x7D) {
currentIndex++;
@@ -6861,21 +6892,21 @@
currentIndex++;
if (currentIndex >= length) {
// Illegal escape sequence: incomplete escape
- reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
currentChar = lexeme.codeUnitAt(currentIndex);
}
if (digitCount < 1 || digitCount > 6) {
// Illegal escape sequence: not enough or too many hex digits
- reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
}
appendScalarValue(builder, lexeme.substring(index, currentIndex + 1), value, index, currentIndex);
return currentIndex + 1;
} else {
if (currentIndex + 3 >= length) {
// Illegal escape sequence: not enough hex digits
- reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
int firstDigit = currentChar;
@@ -6884,7 +6915,7 @@
int fourthDigit = lexeme.codeUnitAt(currentIndex + 3);
if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit) || !isHexDigit(thirdDigit) || !isHexDigit(fourthDigit)) {
// Illegal escape sequence: invalid hex digits
- reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportErrorForCurrentToken(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
} else {
appendScalarValue(builder, lexeme.substring(index, currentIndex + 1), (((((Character.digit(firstDigit, 16) << 4) + Character.digit(secondDigit, 16)) << 4) + Character.digit(thirdDigit, 16)) << 4) + Character.digit(fourthDigit, 16), index, currentIndex + 3);
}
@@ -6915,7 +6946,7 @@
void validateFormalParameterList(FormalParameterList parameterList) {
for (FormalParameter parameter in parameterList.parameters) {
if (parameter is FieldFormalParameter) {
- reportError12(ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, parameter.identifier, []);
+ reportErrorForNode(ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, parameter.identifier, []);
}
}
}
@@ -6929,16 +6960,16 @@
Token validateModifiersForClass(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.constKeyword != null) {
- reportError14(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
}
if (modifiers.externalKeyword != null) {
- reportError14(ParserErrorCode.EXTERNAL_CLASS, modifiers.externalKeyword, []);
+ reportErrorForToken(ParserErrorCode.EXTERNAL_CLASS, modifiers.externalKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError14(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError14(ParserErrorCode.VAR_CLASS, modifiers.varKeyword, []);
+ reportErrorForToken(ParserErrorCode.VAR_CLASS, modifiers.varKeyword, []);
}
return modifiers.abstractKeyword;
}
@@ -6952,25 +6983,25 @@
*/
Token validateModifiersForConstructor(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportErrorForToken(ParserErrorCode.ABSTRACT_CLASS_MEMBER, modifiers.abstractKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError14(ParserErrorCode.FINAL_CONSTRUCTOR, modifiers.finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_CONSTRUCTOR, modifiers.finalKeyword, []);
}
if (modifiers.staticKeyword != null) {
- reportError14(ParserErrorCode.STATIC_CONSTRUCTOR, modifiers.staticKeyword, []);
+ reportErrorForToken(ParserErrorCode.STATIC_CONSTRUCTOR, modifiers.staticKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError14(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, modifiers.varKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, modifiers.varKeyword, []);
}
Token externalKeyword = modifiers.externalKeyword;
Token constKeyword = modifiers.constKeyword;
Token factoryKeyword = modifiers.factoryKeyword;
if (externalKeyword != null && constKeyword != null && constKeyword.offset < externalKeyword.offset) {
- reportError14(ParserErrorCode.EXTERNAL_AFTER_CONST, externalKeyword, []);
+ reportErrorForToken(ParserErrorCode.EXTERNAL_AFTER_CONST, externalKeyword, []);
}
if (externalKeyword != null && factoryKeyword != null && factoryKeyword.offset < externalKeyword.offset) {
- reportError14(ParserErrorCode.EXTERNAL_AFTER_FACTORY, externalKeyword, []);
+ reportErrorForToken(ParserErrorCode.EXTERNAL_AFTER_FACTORY, externalKeyword, []);
}
return constKeyword;
}
@@ -6984,13 +7015,13 @@
*/
Token validateModifiersForField(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
}
if (modifiers.externalKeyword != null) {
- reportError14(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
+ reportErrorForToken(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
}
if (modifiers.factoryKeyword != null) {
- reportError14(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
+ reportErrorForToken(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
}
Token staticKeyword = modifiers.staticKeyword;
Token constKeyword = modifiers.constKeyword;
@@ -6998,23 +7029,23 @@
Token varKeyword = modifiers.varKeyword;
if (constKeyword != null) {
if (finalKeyword != null) {
- reportError14(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
}
if (varKeyword != null) {
- reportError14(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
}
if (staticKeyword != null && constKeyword.offset < staticKeyword.offset) {
- reportError14(ParserErrorCode.STATIC_AFTER_CONST, staticKeyword, []);
+ reportErrorForToken(ParserErrorCode.STATIC_AFTER_CONST, staticKeyword, []);
}
} else if (finalKeyword != null) {
if (varKeyword != null) {
- reportError14(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
}
if (staticKeyword != null && finalKeyword.offset < staticKeyword.offset) {
- reportError14(ParserErrorCode.STATIC_AFTER_FINAL, staticKeyword, []);
+ reportErrorForToken(ParserErrorCode.STATIC_AFTER_FINAL, staticKeyword, []);
}
} else if (varKeyword != null && staticKeyword != null && varKeyword.offset < staticKeyword.offset) {
- reportError14(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword, []);
+ reportErrorForToken(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword, []);
}
return lexicallyFirst([constKeyword, finalKeyword, varKeyword]);
}
@@ -7026,7 +7057,7 @@
*/
void validateModifiersForFunctionDeclarationStatement(Modifiers modifiers) {
if (modifiers.abstractKeyword != null || modifiers.constKeyword != null || modifiers.externalKeyword != null || modifiers.factoryKeyword != null || modifiers.finalKeyword != null || modifiers.staticKeyword != null || modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER, []);
+ reportErrorForCurrentToken(ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER, []);
}
}
@@ -7037,24 +7068,24 @@
*/
void validateModifiersForGetterOrSetterOrMethod(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
}
if (modifiers.constKeyword != null) {
- reportError14(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
}
if (modifiers.factoryKeyword != null) {
- reportError14(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
+ reportErrorForToken(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError14(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError14(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
+ reportErrorForToken(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
}
Token externalKeyword = modifiers.externalKeyword;
Token staticKeyword = modifiers.staticKeyword;
if (externalKeyword != null && staticKeyword != null && staticKeyword.offset < externalKeyword.offset) {
- reportError14(ParserErrorCode.EXTERNAL_AFTER_STATIC, externalKeyword, []);
+ reportErrorForToken(ParserErrorCode.EXTERNAL_AFTER_STATIC, externalKeyword, []);
}
}
@@ -7065,22 +7096,22 @@
*/
void validateModifiersForOperator(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
}
if (modifiers.constKeyword != null) {
- reportError14(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
}
if (modifiers.factoryKeyword != null) {
- reportError14(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
+ reportErrorForToken(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError14(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
}
if (modifiers.staticKeyword != null) {
- reportError14(ParserErrorCode.STATIC_OPERATOR, modifiers.staticKeyword, []);
+ reportErrorForToken(ParserErrorCode.STATIC_OPERATOR, modifiers.staticKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError14(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
+ reportErrorForToken(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
}
}
@@ -7091,10 +7122,10 @@
*/
void validateModifiersForTopLevelDeclaration(Modifiers modifiers) {
if (modifiers.factoryKeyword != null) {
- reportError14(ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION, modifiers.factoryKeyword, []);
+ reportErrorForToken(ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION, modifiers.factoryKeyword, []);
}
if (modifiers.staticKeyword != null) {
- reportError14(ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION, modifiers.staticKeyword, []);
+ reportErrorForToken(ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION, modifiers.staticKeyword, []);
}
}
@@ -7106,16 +7137,16 @@
void validateModifiersForTopLevelFunction(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION, []);
+ reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION, []);
}
if (modifiers.constKeyword != null) {
- reportError14(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError14(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError14(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
+ reportErrorForToken(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
}
}
@@ -7129,24 +7160,24 @@
Token validateModifiersForTopLevelVariable(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE, []);
+ reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE, []);
}
if (modifiers.externalKeyword != null) {
- reportError14(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
+ reportErrorForToken(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
}
Token constKeyword = modifiers.constKeyword;
Token finalKeyword = modifiers.finalKeyword;
Token varKeyword = modifiers.varKeyword;
if (constKeyword != null) {
if (finalKeyword != null) {
- reportError14(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
}
if (varKeyword != null) {
- reportError14(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
}
} else if (finalKeyword != null) {
if (varKeyword != null) {
- reportError14(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
}
}
return lexicallyFirst([constKeyword, finalKeyword, varKeyword]);
@@ -7161,19 +7192,19 @@
void validateModifiersForTypedef(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.abstractKeyword != null) {
- reportError14(ParserErrorCode.ABSTRACT_TYPEDEF, modifiers.abstractKeyword, []);
+ reportErrorForToken(ParserErrorCode.ABSTRACT_TYPEDEF, modifiers.abstractKeyword, []);
}
if (modifiers.constKeyword != null) {
- reportError14(ParserErrorCode.CONST_TYPEDEF, modifiers.constKeyword, []);
+ reportErrorForToken(ParserErrorCode.CONST_TYPEDEF, modifiers.constKeyword, []);
}
if (modifiers.externalKeyword != null) {
- reportError14(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []);
+ reportErrorForToken(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError14(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []);
+ reportErrorForToken(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError14(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []);
+ reportErrorForToken(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []);
}
}
}
@@ -7200,8 +7231,6 @@
* parser. The convention for this class is for the name of the error code to indicate the problem
* that caused the error to be generated and for the error message to explain what is wrong and,
* when appropriate, how the problem can be corrected.
- *
- * @coverage dart.engine.parser
*/
class ParserErrorCode extends Enum<ParserErrorCode> implements ErrorCode {
static final ParserErrorCode ABSTRACT_CLASS_MEMBER = new ParserErrorCode.con3('ABSTRACT_CLASS_MEMBER', 0, "Members of classes cannot be declared to be 'abstract'");
@@ -7663,32 +7692,32 @@
* structure to another as long as the structures of the corresponding children of a pair of nodes
* are the same.
*/
-class ResolutionCopier implements ASTVisitor<bool> {
+class ResolutionCopier implements AstVisitor<bool> {
/**
* Copy resolution data from one node to another.
*
* @param fromNode the node from which resolution information will be copied
* @param toNode the node to which resolution information will be copied
*/
- static void copyResolutionData(ASTNode fromNode, ASTNode toNode) {
+ static void copyResolutionData(AstNode fromNode, AstNode toNode) {
ResolutionCopier copier = new ResolutionCopier();
- copier.isEqual(fromNode, toNode);
+ copier.isEqualNodes(fromNode, toNode);
}
/**
* The AST node with which the node being visited is to be compared. This is only valid at the
- * beginning of each visit method (until [isEqual] is invoked).
+ * beginning of each visit method (until [isEqualNodes] is invoked).
*/
- ASTNode _toNode;
+ AstNode _toNode;
bool visitAdjacentStrings(AdjacentStrings node) {
AdjacentStrings toNode = this._toNode as AdjacentStrings;
- return isEqual2(node.strings, toNode.strings);
+ return isEqualNodeLists(node.strings, toNode.strings);
}
bool visitAnnotation(Annotation node) {
Annotation toNode = this._toNode as Annotation;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.atSign, toNode.atSign), isEqual(node.name, toNode.name)), isEqual3(node.period, toNode.period)), isEqual(node.constructorName, toNode.constructorName)), isEqual(node.arguments, toNode.arguments))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.atSign, toNode.atSign), isEqualNodes(node.name, toNode.name)), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.constructorName, toNode.constructorName)), isEqualNodes(node.arguments, toNode.arguments))) {
toNode.element = node.element;
return true;
}
@@ -7697,7 +7726,7 @@
bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
ArgumentDefinitionTest toNode = this._toNode as ArgumentDefinitionTest;
- if (javaBooleanAnd(isEqual3(node.question, toNode.question), isEqual(node.identifier, toNode.identifier))) {
+ if (javaBooleanAnd(isEqualTokens(node.question, toNode.question), isEqualNodes(node.identifier, toNode.identifier))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -7707,12 +7736,12 @@
bool visitArgumentList(ArgumentList node) {
ArgumentList toNode = this._toNode as ArgumentList;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.leftParenthesis, toNode.leftParenthesis), isEqual2(node.arguments, toNode.arguments)), isEqual3(node.rightParenthesis, toNode.rightParenthesis));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.leftParenthesis, toNode.leftParenthesis), isEqualNodeLists(node.arguments, toNode.arguments)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis));
}
bool visitAsExpression(AsExpression node) {
AsExpression toNode = this._toNode as AsExpression;
- if (javaBooleanAnd(javaBooleanAnd(isEqual(node.expression, toNode.expression), isEqual3(node.asOperator, toNode.asOperator)), isEqual(node.type, toNode.type))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.expression, toNode.expression), isEqualTokens(node.asOperator, toNode.asOperator)), isEqualNodes(node.type, toNode.type))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -7722,12 +7751,12 @@
bool visitAssertStatement(AssertStatement node) {
AssertStatement toNode = this._toNode as AssertStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.condition, toNode.condition)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.condition, toNode.condition)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitAssignmentExpression(AssignmentExpression node) {
AssignmentExpression toNode = this._toNode as AssignmentExpression;
- if (javaBooleanAnd(javaBooleanAnd(isEqual(node.leftHandSide, toNode.leftHandSide), isEqual3(node.operator, toNode.operator)), isEqual(node.rightHandSide, toNode.rightHandSide))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.leftHandSide, toNode.leftHandSide), isEqualTokens(node.operator, toNode.operator)), isEqualNodes(node.rightHandSide, toNode.rightHandSide))) {
toNode.propagatedElement = node.propagatedElement;
toNode.propagatedType = node.propagatedType;
toNode.staticElement = node.staticElement;
@@ -7739,7 +7768,7 @@
bool visitBinaryExpression(BinaryExpression node) {
BinaryExpression toNode = this._toNode as BinaryExpression;
- if (javaBooleanAnd(javaBooleanAnd(isEqual(node.leftOperand, toNode.leftOperand), isEqual3(node.operator, toNode.operator)), isEqual(node.rightOperand, toNode.rightOperand))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.leftOperand, toNode.leftOperand), isEqualTokens(node.operator, toNode.operator)), isEqualNodes(node.rightOperand, toNode.rightOperand))) {
toNode.propagatedElement = node.propagatedElement;
toNode.propagatedType = node.propagatedType;
toNode.staticElement = node.staticElement;
@@ -7751,17 +7780,17 @@
bool visitBlock(Block node) {
Block toNode = this._toNode as Block;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.leftBracket, toNode.leftBracket), isEqual2(node.statements, toNode.statements)), isEqual3(node.rightBracket, toNode.rightBracket));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.leftBracket, toNode.leftBracket), isEqualNodeLists(node.statements, toNode.statements)), isEqualTokens(node.rightBracket, toNode.rightBracket));
}
bool visitBlockFunctionBody(BlockFunctionBody node) {
BlockFunctionBody toNode = this._toNode as BlockFunctionBody;
- return isEqual(node.block, toNode.block);
+ return isEqualNodes(node.block, toNode.block);
}
bool visitBooleanLiteral(BooleanLiteral node) {
BooleanLiteral toNode = this._toNode as BooleanLiteral;
- if (javaBooleanAnd(isEqual3(node.literal, toNode.literal), identical(node.value, toNode.value))) {
+ if (javaBooleanAnd(isEqualTokens(node.literal, toNode.literal), identical(node.value, toNode.value))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -7771,12 +7800,12 @@
bool visitBreakStatement(BreakStatement node) {
BreakStatement toNode = this._toNode as BreakStatement;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual(node.label, toNode.label)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodes(node.label, toNode.label)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitCascadeExpression(CascadeExpression node) {
CascadeExpression toNode = this._toNode as CascadeExpression;
- if (javaBooleanAnd(isEqual(node.target, toNode.target), isEqual2(node.cascadeSections, toNode.cascadeSections))) {
+ if (javaBooleanAnd(isEqualNodes(node.target, toNode.target), isEqualNodeLists(node.cascadeSections, toNode.cascadeSections))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -7786,32 +7815,32 @@
bool visitCatchClause(CatchClause node) {
CatchClause toNode = this._toNode as CatchClause;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.onKeyword, toNode.onKeyword), isEqual(node.exceptionType, toNode.exceptionType)), isEqual3(node.catchKeyword, toNode.catchKeyword)), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.exceptionParameter, toNode.exceptionParameter)), isEqual3(node.comma, toNode.comma)), isEqual(node.stackTraceParameter, toNode.stackTraceParameter)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual(node.body, toNode.body));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.onKeyword, toNode.onKeyword), isEqualNodes(node.exceptionType, toNode.exceptionType)), isEqualTokens(node.catchKeyword, toNode.catchKeyword)), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.exceptionParameter, toNode.exceptionParameter)), isEqualTokens(node.comma, toNode.comma)), isEqualNodes(node.stackTraceParameter, toNode.stackTraceParameter)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualNodes(node.body, toNode.body));
}
bool visitClassDeclaration(ClassDeclaration node) {
ClassDeclaration toNode = this._toNode as ClassDeclaration;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.abstractKeyword, toNode.abstractKeyword)), isEqual3(node.classKeyword, toNode.classKeyword)), isEqual(node.name, toNode.name)), isEqual(node.typeParameters, toNode.typeParameters)), isEqual(node.extendsClause, toNode.extendsClause)), isEqual(node.withClause, toNode.withClause)), isEqual(node.implementsClause, toNode.implementsClause)), isEqual3(node.leftBracket, toNode.leftBracket)), isEqual2(node.members, toNode.members)), isEqual3(node.rightBracket, toNode.rightBracket));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.abstractKeyword, toNode.abstractKeyword)), isEqualTokens(node.classKeyword, toNode.classKeyword)), isEqualNodes(node.name, toNode.name)), isEqualNodes(node.typeParameters, toNode.typeParameters)), isEqualNodes(node.extendsClause, toNode.extendsClause)), isEqualNodes(node.withClause, toNode.withClause)), isEqualNodes(node.implementsClause, toNode.implementsClause)), isEqualTokens(node.leftBracket, toNode.leftBracket)), isEqualNodeLists(node.members, toNode.members)), isEqualTokens(node.rightBracket, toNode.rightBracket));
}
bool visitClassTypeAlias(ClassTypeAlias node) {
ClassTypeAlias toNode = this._toNode as ClassTypeAlias;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.name, toNode.name)), isEqual(node.typeParameters, toNode.typeParameters)), isEqual3(node.equals, toNode.equals)), isEqual3(node.abstractKeyword, toNode.abstractKeyword)), isEqual(node.superclass, toNode.superclass)), isEqual(node.withClause, toNode.withClause)), isEqual(node.implementsClause, toNode.implementsClause)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.name, toNode.name)), isEqualNodes(node.typeParameters, toNode.typeParameters)), isEqualTokens(node.equals, toNode.equals)), isEqualTokens(node.abstractKeyword, toNode.abstractKeyword)), isEqualNodes(node.superclass, toNode.superclass)), isEqualNodes(node.withClause, toNode.withClause)), isEqualNodes(node.implementsClause, toNode.implementsClause)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitComment(Comment node) {
Comment toNode = this._toNode as Comment;
- return isEqual2(node.references, toNode.references);
+ return isEqualNodeLists(node.references, toNode.references);
}
bool visitCommentReference(CommentReference node) {
CommentReference toNode = this._toNode as CommentReference;
- return javaBooleanAnd(isEqual3(node.newKeyword, toNode.newKeyword), isEqual(node.identifier, toNode.identifier));
+ return javaBooleanAnd(isEqualTokens(node.newKeyword, toNode.newKeyword), isEqualNodes(node.identifier, toNode.identifier));
}
bool visitCompilationUnit(CompilationUnit node) {
CompilationUnit toNode = this._toNode as CompilationUnit;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.beginToken, toNode.beginToken), isEqual(node.scriptTag, toNode.scriptTag)), isEqual2(node.directives, toNode.directives)), isEqual2(node.declarations, toNode.declarations)), isEqual3(node.endToken, toNode.endToken))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.beginToken, toNode.beginToken), isEqualNodes(node.scriptTag, toNode.scriptTag)), isEqualNodeLists(node.directives, toNode.directives)), isEqualNodeLists(node.declarations, toNode.declarations)), isEqualTokens(node.endToken, toNode.endToken))) {
toNode.element = node.element;
return true;
}
@@ -7820,7 +7849,7 @@
bool visitConditionalExpression(ConditionalExpression node) {
ConditionalExpression toNode = this._toNode as ConditionalExpression;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.condition, toNode.condition), isEqual3(node.question, toNode.question)), isEqual(node.thenExpression, toNode.thenExpression)), isEqual3(node.colon, toNode.colon)), isEqual(node.elseExpression, toNode.elseExpression))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.condition, toNode.condition), isEqualTokens(node.question, toNode.question)), isEqualNodes(node.thenExpression, toNode.thenExpression)), isEqualTokens(node.colon, toNode.colon)), isEqualNodes(node.elseExpression, toNode.elseExpression))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -7830,7 +7859,7 @@
bool visitConstructorDeclaration(ConstructorDeclaration node) {
ConstructorDeclaration toNode = this._toNode as ConstructorDeclaration;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.externalKeyword, toNode.externalKeyword)), isEqual3(node.constKeyword, toNode.constKeyword)), isEqual3(node.factoryKeyword, toNode.factoryKeyword)), isEqual(node.returnType, toNode.returnType)), isEqual3(node.period, toNode.period)), isEqual(node.name, toNode.name)), isEqual(node.parameters, toNode.parameters)), isEqual3(node.separator, toNode.separator)), isEqual2(node.initializers, toNode.initializers)), isEqual(node.redirectedConstructor, toNode.redirectedConstructor)), isEqual(node.body, toNode.body))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.externalKeyword, toNode.externalKeyword)), isEqualTokens(node.constKeyword, toNode.constKeyword)), isEqualTokens(node.factoryKeyword, toNode.factoryKeyword)), isEqualNodes(node.returnType, toNode.returnType)), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.name, toNode.name)), isEqualNodes(node.parameters, toNode.parameters)), isEqualTokens(node.separator, toNode.separator)), isEqualNodeLists(node.initializers, toNode.initializers)), isEqualNodes(node.redirectedConstructor, toNode.redirectedConstructor)), isEqualNodes(node.body, toNode.body))) {
toNode.element = node.element;
return true;
}
@@ -7839,12 +7868,12 @@
bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
ConstructorFieldInitializer toNode = this._toNode as ConstructorFieldInitializer;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual3(node.period, toNode.period)), isEqual(node.fieldName, toNode.fieldName)), isEqual3(node.equals, toNode.equals)), isEqual(node.expression, toNode.expression));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.fieldName, toNode.fieldName)), isEqualTokens(node.equals, toNode.equals)), isEqualNodes(node.expression, toNode.expression));
}
bool visitConstructorName(ConstructorName node) {
ConstructorName toNode = this._toNode as ConstructorName;
- if (javaBooleanAnd(javaBooleanAnd(isEqual(node.type, toNode.type), isEqual3(node.period, toNode.period)), isEqual(node.name, toNode.name))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.type, toNode.type), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.name, toNode.name))) {
toNode.staticElement = node.staticElement;
return true;
}
@@ -7853,27 +7882,27 @@
bool visitContinueStatement(ContinueStatement node) {
ContinueStatement toNode = this._toNode as ContinueStatement;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual(node.label, toNode.label)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodes(node.label, toNode.label)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitDeclaredIdentifier(DeclaredIdentifier node) {
DeclaredIdentifier toNode = this._toNode as DeclaredIdentifier;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.type, toNode.type)), isEqual(node.identifier, toNode.identifier));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.type, toNode.type)), isEqualNodes(node.identifier, toNode.identifier));
}
bool visitDefaultFormalParameter(DefaultFormalParameter node) {
DefaultFormalParameter toNode = this._toNode as DefaultFormalParameter;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.parameter, toNode.parameter), identical(node.kind, toNode.kind)), isEqual3(node.separator, toNode.separator)), isEqual(node.defaultValue, toNode.defaultValue));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.parameter, toNode.parameter), identical(node.kind, toNode.kind)), isEqualTokens(node.separator, toNode.separator)), isEqualNodes(node.defaultValue, toNode.defaultValue));
}
bool visitDoStatement(DoStatement node) {
DoStatement toNode = this._toNode as DoStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.doKeyword, toNode.doKeyword), isEqual(node.body, toNode.body)), isEqual3(node.whileKeyword, toNode.whileKeyword)), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.condition, toNode.condition)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.doKeyword, toNode.doKeyword), isEqualNodes(node.body, toNode.body)), isEqualTokens(node.whileKeyword, toNode.whileKeyword)), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.condition, toNode.condition)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitDoubleLiteral(DoubleLiteral node) {
DoubleLiteral toNode = this._toNode as DoubleLiteral;
- if (javaBooleanAnd(isEqual3(node.literal, toNode.literal), node.value == toNode.value)) {
+ if (javaBooleanAnd(isEqualTokens(node.literal, toNode.literal), node.value == toNode.value)) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -7883,17 +7912,17 @@
bool visitEmptyFunctionBody(EmptyFunctionBody node) {
EmptyFunctionBody toNode = this._toNode as EmptyFunctionBody;
- return isEqual3(node.semicolon, toNode.semicolon);
+ return isEqualTokens(node.semicolon, toNode.semicolon);
}
bool visitEmptyStatement(EmptyStatement node) {
EmptyStatement toNode = this._toNode as EmptyStatement;
- return isEqual3(node.semicolon, toNode.semicolon);
+ return isEqualTokens(node.semicolon, toNode.semicolon);
}
bool visitExportDirective(ExportDirective node) {
ExportDirective toNode = this._toNode as ExportDirective;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.uri, toNode.uri)), isEqual2(node.combinators, toNode.combinators)), isEqual3(node.semicolon, toNode.semicolon))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.uri, toNode.uri)), isEqualNodeLists(node.combinators, toNode.combinators)), isEqualTokens(node.semicolon, toNode.semicolon))) {
toNode.element = node.element;
return true;
}
@@ -7902,57 +7931,57 @@
bool visitExpressionFunctionBody(ExpressionFunctionBody node) {
ExpressionFunctionBody toNode = this._toNode as ExpressionFunctionBody;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.functionDefinition, toNode.functionDefinition), isEqual(node.expression, toNode.expression)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.functionDefinition, toNode.functionDefinition), isEqualNodes(node.expression, toNode.expression)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitExpressionStatement(ExpressionStatement node) {
ExpressionStatement toNode = this._toNode as ExpressionStatement;
- return javaBooleanAnd(isEqual(node.expression, toNode.expression), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(isEqualNodes(node.expression, toNode.expression), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitExtendsClause(ExtendsClause node) {
ExtendsClause toNode = this._toNode as ExtendsClause;
- return javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual(node.superclass, toNode.superclass));
+ return javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodes(node.superclass, toNode.superclass));
}
bool visitFieldDeclaration(FieldDeclaration node) {
FieldDeclaration toNode = this._toNode as FieldDeclaration;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.staticKeyword, toNode.staticKeyword)), isEqual(node.fields, toNode.fields)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.staticKeyword, toNode.staticKeyword)), isEqualNodes(node.fields, toNode.fields)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitFieldFormalParameter(FieldFormalParameter node) {
FieldFormalParameter toNode = this._toNode as FieldFormalParameter;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.type, toNode.type)), isEqual3(node.thisToken, toNode.thisToken)), isEqual3(node.period, toNode.period)), isEqual(node.identifier, toNode.identifier));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.type, toNode.type)), isEqualTokens(node.thisToken, toNode.thisToken)), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.identifier, toNode.identifier));
}
bool visitForEachStatement(ForEachStatement node) {
ForEachStatement toNode = this._toNode as ForEachStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.forKeyword, toNode.forKeyword), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.loopVariable, toNode.loopVariable)), isEqual3(node.inKeyword, toNode.inKeyword)), isEqual(node.iterator, toNode.iterator)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual(node.body, toNode.body));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.forKeyword, toNode.forKeyword), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.loopVariable, toNode.loopVariable)), isEqualTokens(node.inKeyword, toNode.inKeyword)), isEqualNodes(node.iterator, toNode.iterator)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualNodes(node.body, toNode.body));
}
bool visitFormalParameterList(FormalParameterList node) {
FormalParameterList toNode = this._toNode as FormalParameterList;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.leftParenthesis, toNode.leftParenthesis), isEqual2(node.parameters, toNode.parameters)), isEqual3(node.leftDelimiter, toNode.leftDelimiter)), isEqual3(node.rightDelimiter, toNode.rightDelimiter)), isEqual3(node.rightParenthesis, toNode.rightParenthesis));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.leftParenthesis, toNode.leftParenthesis), isEqualNodeLists(node.parameters, toNode.parameters)), isEqualTokens(node.leftDelimiter, toNode.leftDelimiter)), isEqualTokens(node.rightDelimiter, toNode.rightDelimiter)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis));
}
bool visitForStatement(ForStatement node) {
ForStatement toNode = this._toNode as ForStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.forKeyword, toNode.forKeyword), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.variables, toNode.variables)), isEqual(node.initialization, toNode.initialization)), isEqual3(node.leftSeparator, toNode.leftSeparator)), isEqual(node.condition, toNode.condition)), isEqual3(node.rightSeparator, toNode.rightSeparator)), isEqual2(node.updaters, toNode.updaters)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual(node.body, toNode.body));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.forKeyword, toNode.forKeyword), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.variables, toNode.variables)), isEqualNodes(node.initialization, toNode.initialization)), isEqualTokens(node.leftSeparator, toNode.leftSeparator)), isEqualNodes(node.condition, toNode.condition)), isEqualTokens(node.rightSeparator, toNode.rightSeparator)), isEqualNodeLists(node.updaters, toNode.updaters)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualNodes(node.body, toNode.body));
}
bool visitFunctionDeclaration(FunctionDeclaration node) {
FunctionDeclaration toNode = this._toNode as FunctionDeclaration;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.externalKeyword, toNode.externalKeyword)), isEqual(node.returnType, toNode.returnType)), isEqual3(node.propertyKeyword, toNode.propertyKeyword)), isEqual(node.name, toNode.name)), isEqual(node.functionExpression, toNode.functionExpression));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.externalKeyword, toNode.externalKeyword)), isEqualNodes(node.returnType, toNode.returnType)), isEqualTokens(node.propertyKeyword, toNode.propertyKeyword)), isEqualNodes(node.name, toNode.name)), isEqualNodes(node.functionExpression, toNode.functionExpression));
}
bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
FunctionDeclarationStatement toNode = this._toNode as FunctionDeclarationStatement;
- return isEqual(node.functionDeclaration, toNode.functionDeclaration);
+ return isEqualNodes(node.functionDeclaration, toNode.functionDeclaration);
}
bool visitFunctionExpression(FunctionExpression node) {
FunctionExpression toNode = this._toNode as FunctionExpression;
- if (javaBooleanAnd(isEqual(node.parameters, toNode.parameters), isEqual(node.body, toNode.body))) {
+ if (javaBooleanAnd(isEqualNodes(node.parameters, toNode.parameters), isEqualNodes(node.body, toNode.body))) {
toNode.element = node.element;
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
@@ -7963,7 +7992,7 @@
bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
FunctionExpressionInvocation toNode = this._toNode as FunctionExpressionInvocation;
- if (javaBooleanAnd(isEqual(node.function, toNode.function), isEqual(node.argumentList, toNode.argumentList))) {
+ if (javaBooleanAnd(isEqualNodes(node.function, toNode.function), isEqualNodes(node.argumentList, toNode.argumentList))) {
toNode.propagatedElement = node.propagatedElement;
toNode.propagatedType = node.propagatedType;
toNode.staticElement = node.staticElement;
@@ -7975,32 +8004,32 @@
bool visitFunctionTypeAlias(FunctionTypeAlias node) {
FunctionTypeAlias toNode = this._toNode as FunctionTypeAlias;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.returnType, toNode.returnType)), isEqual(node.name, toNode.name)), isEqual(node.typeParameters, toNode.typeParameters)), isEqual(node.parameters, toNode.parameters)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.returnType, toNode.returnType)), isEqualNodes(node.name, toNode.name)), isEqualNodes(node.typeParameters, toNode.typeParameters)), isEqualNodes(node.parameters, toNode.parameters)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
FunctionTypedFormalParameter toNode = this._toNode as FunctionTypedFormalParameter;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual(node.returnType, toNode.returnType)), isEqual(node.identifier, toNode.identifier)), isEqual(node.parameters, toNode.parameters));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualNodes(node.returnType, toNode.returnType)), isEqualNodes(node.identifier, toNode.identifier)), isEqualNodes(node.parameters, toNode.parameters));
}
bool visitHideCombinator(HideCombinator node) {
HideCombinator toNode = this._toNode as HideCombinator;
- return javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual2(node.hiddenNames, toNode.hiddenNames));
+ return javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodeLists(node.hiddenNames, toNode.hiddenNames));
}
bool visitIfStatement(IfStatement node) {
IfStatement toNode = this._toNode as IfStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.ifKeyword, toNode.ifKeyword), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.condition, toNode.condition)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual(node.thenStatement, toNode.thenStatement)), isEqual3(node.elseKeyword, toNode.elseKeyword)), isEqual(node.elseStatement, toNode.elseStatement));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.ifKeyword, toNode.ifKeyword), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.condition, toNode.condition)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualNodes(node.thenStatement, toNode.thenStatement)), isEqualTokens(node.elseKeyword, toNode.elseKeyword)), isEqualNodes(node.elseStatement, toNode.elseStatement));
}
bool visitImplementsClause(ImplementsClause node) {
ImplementsClause toNode = this._toNode as ImplementsClause;
- return javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual2(node.interfaces, toNode.interfaces));
+ return javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodeLists(node.interfaces, toNode.interfaces));
}
bool visitImportDirective(ImportDirective node) {
ImportDirective toNode = this._toNode as ImportDirective;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.uri, toNode.uri)), isEqual3(node.asToken, toNode.asToken)), isEqual(node.prefix, toNode.prefix)), isEqual2(node.combinators, toNode.combinators)), isEqual3(node.semicolon, toNode.semicolon))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.uri, toNode.uri)), isEqualTokens(node.asToken, toNode.asToken)), isEqualNodes(node.prefix, toNode.prefix)), isEqualNodeLists(node.combinators, toNode.combinators)), isEqualTokens(node.semicolon, toNode.semicolon))) {
toNode.element = node.element;
return true;
}
@@ -8009,7 +8038,7 @@
bool visitIndexExpression(IndexExpression node) {
IndexExpression toNode = this._toNode as IndexExpression;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.target, toNode.target), isEqual3(node.leftBracket, toNode.leftBracket)), isEqual(node.index, toNode.index)), isEqual3(node.rightBracket, toNode.rightBracket))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.target, toNode.target), isEqualTokens(node.leftBracket, toNode.leftBracket)), isEqualNodes(node.index, toNode.index)), isEqualTokens(node.rightBracket, toNode.rightBracket))) {
toNode.auxiliaryElements = node.auxiliaryElements;
toNode.propagatedElement = node.propagatedElement;
toNode.propagatedType = node.propagatedType;
@@ -8022,7 +8051,7 @@
bool visitInstanceCreationExpression(InstanceCreationExpression node) {
InstanceCreationExpression toNode = this._toNode as InstanceCreationExpression;
- if (javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual(node.constructorName, toNode.constructorName)), isEqual(node.argumentList, toNode.argumentList))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodes(node.constructorName, toNode.constructorName)), isEqualNodes(node.argumentList, toNode.argumentList))) {
toNode.propagatedType = node.propagatedType;
toNode.staticElement = node.staticElement;
toNode.staticType = node.staticType;
@@ -8033,7 +8062,7 @@
bool visitIntegerLiteral(IntegerLiteral node) {
IntegerLiteral toNode = this._toNode as IntegerLiteral;
- if (javaBooleanAnd(isEqual3(node.literal, toNode.literal), identical(node.value, toNode.value))) {
+ if (javaBooleanAnd(isEqualTokens(node.literal, toNode.literal), identical(node.value, toNode.value))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8043,17 +8072,17 @@
bool visitInterpolationExpression(InterpolationExpression node) {
InterpolationExpression toNode = this._toNode as InterpolationExpression;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.leftBracket, toNode.leftBracket), isEqual(node.expression, toNode.expression)), isEqual3(node.rightBracket, toNode.rightBracket));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.leftBracket, toNode.leftBracket), isEqualNodes(node.expression, toNode.expression)), isEqualTokens(node.rightBracket, toNode.rightBracket));
}
bool visitInterpolationString(InterpolationString node) {
InterpolationString toNode = this._toNode as InterpolationString;
- return javaBooleanAnd(isEqual3(node.contents, toNode.contents), node.value == toNode.value);
+ return javaBooleanAnd(isEqualTokens(node.contents, toNode.contents), node.value == toNode.value);
}
bool visitIsExpression(IsExpression node) {
IsExpression toNode = this._toNode as IsExpression;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.expression, toNode.expression), isEqual3(node.isOperator, toNode.isOperator)), isEqual3(node.notOperator, toNode.notOperator)), isEqual(node.type, toNode.type))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.expression, toNode.expression), isEqualTokens(node.isOperator, toNode.isOperator)), isEqualTokens(node.notOperator, toNode.notOperator)), isEqualNodes(node.type, toNode.type))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8063,22 +8092,22 @@
bool visitLabel(Label node) {
Label toNode = this._toNode as Label;
- return javaBooleanAnd(isEqual(node.label, toNode.label), isEqual3(node.colon, toNode.colon));
+ return javaBooleanAnd(isEqualNodes(node.label, toNode.label), isEqualTokens(node.colon, toNode.colon));
}
bool visitLabeledStatement(LabeledStatement node) {
LabeledStatement toNode = this._toNode as LabeledStatement;
- return javaBooleanAnd(isEqual2(node.labels, toNode.labels), isEqual(node.statement, toNode.statement));
+ return javaBooleanAnd(isEqualNodeLists(node.labels, toNode.labels), isEqualNodes(node.statement, toNode.statement));
}
bool visitLibraryDirective(LibraryDirective node) {
LibraryDirective toNode = this._toNode as LibraryDirective;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.libraryToken, toNode.libraryToken)), isEqual(node.name, toNode.name)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.libraryToken, toNode.libraryToken)), isEqualNodes(node.name, toNode.name)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitLibraryIdentifier(LibraryIdentifier node) {
LibraryIdentifier toNode = this._toNode as LibraryIdentifier;
- if (isEqual2(node.components, toNode.components)) {
+ if (isEqualNodeLists(node.components, toNode.components)) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8088,7 +8117,7 @@
bool visitListLiteral(ListLiteral node) {
ListLiteral toNode = this._toNode as ListLiteral;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.constKeyword, toNode.constKeyword), isEqual(node.typeArguments, toNode.typeArguments)), isEqual3(node.leftBracket, toNode.leftBracket)), isEqual2(node.elements, toNode.elements)), isEqual3(node.rightBracket, toNode.rightBracket))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.constKeyword, toNode.constKeyword), isEqualNodes(node.typeArguments, toNode.typeArguments)), isEqualTokens(node.leftBracket, toNode.leftBracket)), isEqualNodeLists(node.elements, toNode.elements)), isEqualTokens(node.rightBracket, toNode.rightBracket))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8098,7 +8127,7 @@
bool visitMapLiteral(MapLiteral node) {
MapLiteral toNode = this._toNode as MapLiteral;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.constKeyword, toNode.constKeyword), isEqual(node.typeArguments, toNode.typeArguments)), isEqual3(node.leftBracket, toNode.leftBracket)), isEqual2(node.entries, toNode.entries)), isEqual3(node.rightBracket, toNode.rightBracket))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.constKeyword, toNode.constKeyword), isEqualNodes(node.typeArguments, toNode.typeArguments)), isEqualTokens(node.leftBracket, toNode.leftBracket)), isEqualNodeLists(node.entries, toNode.entries)), isEqualTokens(node.rightBracket, toNode.rightBracket))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8108,17 +8137,17 @@
bool visitMapLiteralEntry(MapLiteralEntry node) {
MapLiteralEntry toNode = this._toNode as MapLiteralEntry;
- return javaBooleanAnd(javaBooleanAnd(isEqual(node.key, toNode.key), isEqual3(node.separator, toNode.separator)), isEqual(node.value, toNode.value));
+ return javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.key, toNode.key), isEqualTokens(node.separator, toNode.separator)), isEqualNodes(node.value, toNode.value));
}
bool visitMethodDeclaration(MethodDeclaration node) {
MethodDeclaration toNode = this._toNode as MethodDeclaration;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.externalKeyword, toNode.externalKeyword)), isEqual3(node.modifierKeyword, toNode.modifierKeyword)), isEqual(node.returnType, toNode.returnType)), isEqual3(node.propertyKeyword, toNode.propertyKeyword)), isEqual3(node.propertyKeyword, toNode.propertyKeyword)), isEqual(node.name, toNode.name)), isEqual(node.parameters, toNode.parameters)), isEqual(node.body, toNode.body));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.externalKeyword, toNode.externalKeyword)), isEqualTokens(node.modifierKeyword, toNode.modifierKeyword)), isEqualNodes(node.returnType, toNode.returnType)), isEqualTokens(node.propertyKeyword, toNode.propertyKeyword)), isEqualTokens(node.propertyKeyword, toNode.propertyKeyword)), isEqualNodes(node.name, toNode.name)), isEqualNodes(node.parameters, toNode.parameters)), isEqualNodes(node.body, toNode.body));
}
bool visitMethodInvocation(MethodInvocation node) {
MethodInvocation toNode = this._toNode as MethodInvocation;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.target, toNode.target), isEqual3(node.period, toNode.period)), isEqual(node.methodName, toNode.methodName)), isEqual(node.argumentList, toNode.argumentList))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.target, toNode.target), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.methodName, toNode.methodName)), isEqualNodes(node.argumentList, toNode.argumentList))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8128,7 +8157,7 @@
bool visitNamedExpression(NamedExpression node) {
NamedExpression toNode = this._toNode as NamedExpression;
- if (javaBooleanAnd(isEqual(node.name, toNode.name), isEqual(node.expression, toNode.expression))) {
+ if (javaBooleanAnd(isEqualNodes(node.name, toNode.name), isEqualNodes(node.expression, toNode.expression))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8138,17 +8167,17 @@
bool visitNativeClause(NativeClause node) {
NativeClause toNode = this._toNode as NativeClause;
- return javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual(node.name, toNode.name));
+ return javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodes(node.name, toNode.name));
}
bool visitNativeFunctionBody(NativeFunctionBody node) {
NativeFunctionBody toNode = this._toNode as NativeFunctionBody;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.nativeToken, toNode.nativeToken), isEqual(node.stringLiteral, toNode.stringLiteral)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.nativeToken, toNode.nativeToken), isEqualNodes(node.stringLiteral, toNode.stringLiteral)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitNullLiteral(NullLiteral node) {
NullLiteral toNode = this._toNode as NullLiteral;
- if (isEqual3(node.literal, toNode.literal)) {
+ if (isEqualTokens(node.literal, toNode.literal)) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8158,7 +8187,7 @@
bool visitParenthesizedExpression(ParenthesizedExpression node) {
ParenthesizedExpression toNode = this._toNode as ParenthesizedExpression;
- if (javaBooleanAnd(javaBooleanAnd(isEqual3(node.leftParenthesis, toNode.leftParenthesis), isEqual(node.expression, toNode.expression)), isEqual3(node.rightParenthesis, toNode.rightParenthesis))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.leftParenthesis, toNode.leftParenthesis), isEqualNodes(node.expression, toNode.expression)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8168,7 +8197,7 @@
bool visitPartDirective(PartDirective node) {
PartDirective toNode = this._toNode as PartDirective;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.partToken, toNode.partToken)), isEqual(node.uri, toNode.uri)), isEqual3(node.semicolon, toNode.semicolon))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.partToken, toNode.partToken)), isEqualNodes(node.uri, toNode.uri)), isEqualTokens(node.semicolon, toNode.semicolon))) {
toNode.element = node.element;
return true;
}
@@ -8177,7 +8206,7 @@
bool visitPartOfDirective(PartOfDirective node) {
PartOfDirective toNode = this._toNode as PartOfDirective;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.partToken, toNode.partToken)), isEqual3(node.ofToken, toNode.ofToken)), isEqual(node.libraryName, toNode.libraryName)), isEqual3(node.semicolon, toNode.semicolon))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.partToken, toNode.partToken)), isEqualTokens(node.ofToken, toNode.ofToken)), isEqualNodes(node.libraryName, toNode.libraryName)), isEqualTokens(node.semicolon, toNode.semicolon))) {
toNode.element = node.element;
return true;
}
@@ -8186,7 +8215,7 @@
bool visitPostfixExpression(PostfixExpression node) {
PostfixExpression toNode = this._toNode as PostfixExpression;
- if (javaBooleanAnd(isEqual(node.operand, toNode.operand), isEqual3(node.operator, toNode.operator))) {
+ if (javaBooleanAnd(isEqualNodes(node.operand, toNode.operand), isEqualTokens(node.operator, toNode.operator))) {
toNode.propagatedElement = node.propagatedElement;
toNode.propagatedType = node.propagatedType;
toNode.staticElement = node.staticElement;
@@ -8198,7 +8227,7 @@
bool visitPrefixedIdentifier(PrefixedIdentifier node) {
PrefixedIdentifier toNode = this._toNode as PrefixedIdentifier;
- if (javaBooleanAnd(javaBooleanAnd(isEqual(node.prefix, toNode.prefix), isEqual3(node.period, toNode.period)), isEqual(node.identifier, toNode.identifier))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.prefix, toNode.prefix), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.identifier, toNode.identifier))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8208,7 +8237,7 @@
bool visitPrefixExpression(PrefixExpression node) {
PrefixExpression toNode = this._toNode as PrefixExpression;
- if (javaBooleanAnd(isEqual3(node.operator, toNode.operator), isEqual(node.operand, toNode.operand))) {
+ if (javaBooleanAnd(isEqualTokens(node.operator, toNode.operator), isEqualNodes(node.operand, toNode.operand))) {
toNode.propagatedElement = node.propagatedElement;
toNode.propagatedType = node.propagatedType;
toNode.staticElement = node.staticElement;
@@ -8220,7 +8249,7 @@
bool visitPropertyAccess(PropertyAccess node) {
PropertyAccess toNode = this._toNode as PropertyAccess;
- if (javaBooleanAnd(javaBooleanAnd(isEqual(node.target, toNode.target), isEqual3(node.operator, toNode.operator)), isEqual(node.propertyName, toNode.propertyName))) {
+ if (javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.target, toNode.target), isEqualTokens(node.operator, toNode.operator)), isEqualNodes(node.propertyName, toNode.propertyName))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8230,7 +8259,7 @@
bool visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
RedirectingConstructorInvocation toNode = this._toNode as RedirectingConstructorInvocation;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual3(node.period, toNode.period)), isEqual(node.constructorName, toNode.constructorName)), isEqual(node.argumentList, toNode.argumentList))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.constructorName, toNode.constructorName)), isEqualNodes(node.argumentList, toNode.argumentList))) {
toNode.staticElement = node.staticElement;
return true;
}
@@ -8239,7 +8268,7 @@
bool visitRethrowExpression(RethrowExpression node) {
RethrowExpression toNode = this._toNode as RethrowExpression;
- if (isEqual3(node.keyword, toNode.keyword)) {
+ if (isEqualTokens(node.keyword, toNode.keyword)) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8249,27 +8278,27 @@
bool visitReturnStatement(ReturnStatement node) {
ReturnStatement toNode = this._toNode as ReturnStatement;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual(node.expression, toNode.expression)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodes(node.expression, toNode.expression)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitScriptTag(ScriptTag node) {
ScriptTag toNode = this._toNode as ScriptTag;
- return isEqual3(node.scriptTag, toNode.scriptTag);
+ return isEqualTokens(node.scriptTag, toNode.scriptTag);
}
bool visitShowCombinator(ShowCombinator node) {
ShowCombinator toNode = this._toNode as ShowCombinator;
- return javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual2(node.shownNames, toNode.shownNames));
+ return javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodeLists(node.shownNames, toNode.shownNames));
}
bool visitSimpleFormalParameter(SimpleFormalParameter node) {
SimpleFormalParameter toNode = this._toNode as SimpleFormalParameter;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.type, toNode.type)), isEqual(node.identifier, toNode.identifier));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.type, toNode.type)), isEqualNodes(node.identifier, toNode.identifier));
}
bool visitSimpleIdentifier(SimpleIdentifier node) {
SimpleIdentifier toNode = this._toNode as SimpleIdentifier;
- if (isEqual3(node.token, toNode.token)) {
+ if (isEqualTokens(node.token, toNode.token)) {
toNode.staticElement = node.staticElement;
toNode.staticType = node.staticType;
toNode.propagatedElement = node.propagatedElement;
@@ -8282,7 +8311,7 @@
bool visitSimpleStringLiteral(SimpleStringLiteral node) {
SimpleStringLiteral toNode = this._toNode as SimpleStringLiteral;
- if (javaBooleanAnd(isEqual3(node.literal, toNode.literal), identical(node.value, toNode.value))) {
+ if (javaBooleanAnd(isEqualTokens(node.literal, toNode.literal), identical(node.value, toNode.value))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8292,7 +8321,7 @@
bool visitStringInterpolation(StringInterpolation node) {
StringInterpolation toNode = this._toNode as StringInterpolation;
- if (isEqual2(node.elements, toNode.elements)) {
+ if (isEqualNodeLists(node.elements, toNode.elements)) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8302,7 +8331,7 @@
bool visitSuperConstructorInvocation(SuperConstructorInvocation node) {
SuperConstructorInvocation toNode = this._toNode as SuperConstructorInvocation;
- if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual3(node.period, toNode.period)), isEqual(node.constructorName, toNode.constructorName)), isEqual(node.argumentList, toNode.argumentList))) {
+ if (javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualTokens(node.period, toNode.period)), isEqualNodes(node.constructorName, toNode.constructorName)), isEqualNodes(node.argumentList, toNode.argumentList))) {
toNode.staticElement = node.staticElement;
return true;
}
@@ -8311,7 +8340,7 @@
bool visitSuperExpression(SuperExpression node) {
SuperExpression toNode = this._toNode as SuperExpression;
- if (isEqual3(node.keyword, toNode.keyword)) {
+ if (isEqualTokens(node.keyword, toNode.keyword)) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8321,22 +8350,22 @@
bool visitSwitchCase(SwitchCase node) {
SwitchCase toNode = this._toNode as SwitchCase;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual2(node.labels, toNode.labels), isEqual3(node.keyword, toNode.keyword)), isEqual(node.expression, toNode.expression)), isEqual3(node.colon, toNode.colon)), isEqual2(node.statements, toNode.statements));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodeLists(node.labels, toNode.labels), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.expression, toNode.expression)), isEqualTokens(node.colon, toNode.colon)), isEqualNodeLists(node.statements, toNode.statements));
}
bool visitSwitchDefault(SwitchDefault node) {
SwitchDefault toNode = this._toNode as SwitchDefault;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual2(node.labels, toNode.labels), isEqual3(node.keyword, toNode.keyword)), isEqual3(node.colon, toNode.colon)), isEqual2(node.statements, toNode.statements));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodeLists(node.labels, toNode.labels), isEqualTokens(node.keyword, toNode.keyword)), isEqualTokens(node.colon, toNode.colon)), isEqualNodeLists(node.statements, toNode.statements));
}
bool visitSwitchStatement(SwitchStatement node) {
SwitchStatement toNode = this._toNode as SwitchStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.expression, toNode.expression)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual3(node.leftBracket, toNode.leftBracket)), isEqual2(node.members, toNode.members)), isEqual3(node.rightBracket, toNode.rightBracket));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.expression, toNode.expression)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualTokens(node.leftBracket, toNode.leftBracket)), isEqualNodeLists(node.members, toNode.members)), isEqualTokens(node.rightBracket, toNode.rightBracket));
}
bool visitSymbolLiteral(SymbolLiteral node) {
SymbolLiteral toNode = this._toNode as SymbolLiteral;
- if (javaBooleanAnd(isEqual3(node.poundSign, toNode.poundSign), isEqual4(node.components, toNode.components))) {
+ if (javaBooleanAnd(isEqualTokens(node.poundSign, toNode.poundSign), isEqualTokenLists(node.components, toNode.components))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8346,7 +8375,7 @@
bool visitThisExpression(ThisExpression node) {
ThisExpression toNode = this._toNode as ThisExpression;
- if (isEqual3(node.keyword, toNode.keyword)) {
+ if (isEqualTokens(node.keyword, toNode.keyword)) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8356,7 +8385,7 @@
bool visitThrowExpression(ThrowExpression node) {
ThrowExpression toNode = this._toNode as ThrowExpression;
- if (javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual(node.expression, toNode.expression))) {
+ if (javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualNodes(node.expression, toNode.expression))) {
toNode.propagatedType = node.propagatedType;
toNode.staticType = node.staticType;
return true;
@@ -8366,22 +8395,22 @@
bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
TopLevelVariableDeclaration toNode = this._toNode as TopLevelVariableDeclaration;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual(node.variables, toNode.variables)), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualNodes(node.variables, toNode.variables)), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitTryStatement(TryStatement node) {
TryStatement toNode = this._toNode as TryStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.tryKeyword, toNode.tryKeyword), isEqual(node.body, toNode.body)), isEqual2(node.catchClauses, toNode.catchClauses)), isEqual3(node.finallyKeyword, toNode.finallyKeyword)), isEqual(node.finallyBlock, toNode.finallyBlock));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.tryKeyword, toNode.tryKeyword), isEqualNodes(node.body, toNode.body)), isEqualNodeLists(node.catchClauses, toNode.catchClauses)), isEqualTokens(node.finallyKeyword, toNode.finallyKeyword)), isEqualNodes(node.finallyBlock, toNode.finallyBlock));
}
bool visitTypeArgumentList(TypeArgumentList node) {
TypeArgumentList toNode = this._toNode as TypeArgumentList;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.leftBracket, toNode.leftBracket), isEqual2(node.arguments, toNode.arguments)), isEqual3(node.rightBracket, toNode.rightBracket));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.leftBracket, toNode.leftBracket), isEqualNodeLists(node.arguments, toNode.arguments)), isEqualTokens(node.rightBracket, toNode.rightBracket));
}
bool visitTypeName(TypeName node) {
TypeName toNode = this._toNode as TypeName;
- if (javaBooleanAnd(isEqual(node.name, toNode.name), isEqual(node.typeArguments, toNode.typeArguments))) {
+ if (javaBooleanAnd(isEqualNodes(node.name, toNode.name), isEqualNodes(node.typeArguments, toNode.typeArguments))) {
toNode.type = node.type;
return true;
}
@@ -8390,37 +8419,65 @@
bool visitTypeParameter(TypeParameter node) {
TypeParameter toNode = this._toNode as TypeParameter;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual(node.name, toNode.name)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.bound, toNode.bound));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualNodes(node.name, toNode.name)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.bound, toNode.bound));
}
bool visitTypeParameterList(TypeParameterList node) {
TypeParameterList toNode = this._toNode as TypeParameterList;
- return javaBooleanAnd(javaBooleanAnd(isEqual3(node.leftBracket, toNode.leftBracket), isEqual2(node.typeParameters, toNode.typeParameters)), isEqual3(node.rightBracket, toNode.rightBracket));
+ return javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.leftBracket, toNode.leftBracket), isEqualNodeLists(node.typeParameters, toNode.typeParameters)), isEqualTokens(node.rightBracket, toNode.rightBracket));
}
bool visitVariableDeclaration(VariableDeclaration node) {
VariableDeclaration toNode = this._toNode as VariableDeclaration;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual(node.name, toNode.name)), isEqual3(node.equals, toNode.equals)), isEqual(node.initializer, toNode.initializer));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualNodes(node.name, toNode.name)), isEqualTokens(node.equals, toNode.equals)), isEqualNodes(node.initializer, toNode.initializer));
}
bool visitVariableDeclarationList(VariableDeclarationList node) {
VariableDeclarationList toNode = this._toNode as VariableDeclarationList;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual(node.documentationComment, toNode.documentationComment), isEqual2(node.metadata, toNode.metadata)), isEqual3(node.keyword, toNode.keyword)), isEqual(node.type, toNode.type)), isEqual2(node.variables, toNode.variables));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualNodes(node.documentationComment, toNode.documentationComment), isEqualNodeLists(node.metadata, toNode.metadata)), isEqualTokens(node.keyword, toNode.keyword)), isEqualNodes(node.type, toNode.type)), isEqualNodeLists(node.variables, toNode.variables));
}
bool visitVariableDeclarationStatement(VariableDeclarationStatement node) {
VariableDeclarationStatement toNode = this._toNode as VariableDeclarationStatement;
- return javaBooleanAnd(isEqual(node.variables, toNode.variables), isEqual3(node.semicolon, toNode.semicolon));
+ return javaBooleanAnd(isEqualNodes(node.variables, toNode.variables), isEqualTokens(node.semicolon, toNode.semicolon));
}
bool visitWhileStatement(WhileStatement node) {
WhileStatement toNode = this._toNode as WhileStatement;
- return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqual3(node.keyword, toNode.keyword), isEqual3(node.leftParenthesis, toNode.leftParenthesis)), isEqual(node.condition, toNode.condition)), isEqual3(node.rightParenthesis, toNode.rightParenthesis)), isEqual(node.body, toNode.body));
+ return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(isEqualTokens(node.keyword, toNode.keyword), isEqualTokens(node.leftParenthesis, toNode.leftParenthesis)), isEqualNodes(node.condition, toNode.condition)), isEqualTokens(node.rightParenthesis, toNode.rightParenthesis)), isEqualNodes(node.body, toNode.body));
}
bool visitWithClause(WithClause node) {
WithClause toNode = this._toNode as WithClause;
- return javaBooleanAnd(isEqual3(node.withKeyword, toNode.withKeyword), isEqual2(node.mixinTypes, toNode.mixinTypes));
+ return javaBooleanAnd(isEqualTokens(node.withKeyword, toNode.withKeyword), isEqualNodeLists(node.mixinTypes, toNode.mixinTypes));
+ }
+
+ /**
+ * Return `true` if the given lists of AST nodes have the same size and corresponding
+ * elements are equal.
+ *
+ * @param first the first node being compared
+ * @param second the second node being compared
+ * @return `true` if the given AST nodes have the same size and corresponding elements are
+ * equal
+ */
+ bool isEqualNodeLists(NodeList first, NodeList second) {
+ if (first == null) {
+ return second == null;
+ } else if (second == null) {
+ return false;
+ }
+ int size = first.length;
+ if (second.length != size) {
+ return false;
+ }
+ bool equal = true;
+ for (int i = 0; i < size; i++) {
+ if (!isEqualNodes(first[i], second[i])) {
+ equal = false;
+ }
+ }
+ return equal;
}
/**
@@ -8432,7 +8489,7 @@
* @param toNode the node to which resolution information will be copied
* @return `true` if the given AST nodes have the same structure
*/
- bool isEqual(ASTNode fromNode, ASTNode toNode) {
+ bool isEqualNodes(AstNode fromNode, AstNode toNode) {
if (fromNode == null) {
return toNode == null;
} else if (toNode == null) {
@@ -8461,31 +8518,25 @@
}
/**
- * Return `true` if the given lists of AST nodes have the same size and corresponding
+ * Return `true` if the given arrays of tokens have the same length and corresponding
* elements are equal.
*
* @param first the first node being compared
* @param second the second node being compared
- * @return `true` if the given AST nodes have the same size and corresponding elements are
- * equal
+ * @return `true` if the given arrays of tokens have the same length and corresponding
+ * elements are equal
*/
- bool isEqual2(NodeList first, NodeList second) {
- if (first == null) {
- return second == null;
- } else if (second == null) {
+ bool isEqualTokenLists(List<Token> first, List<Token> second) {
+ int length = first.length;
+ if (second.length != length) {
return false;
}
- int size = first.length;
- if (second.length != size) {
- return false;
- }
- bool equal = true;
- for (int i = 0; i < size; i++) {
- if (!isEqual(first[i], second[i])) {
- equal = false;
+ for (int i = 0; i < length; i++) {
+ if (!isEqualTokens(first[i], second[i])) {
+ return false;
}
}
- return equal;
+ return true;
}
/**
@@ -8495,7 +8546,7 @@
* @param second the second node being compared
* @return `true` if the given tokens have the same structure
*/
- bool isEqual3(Token first, Token second) {
+ bool isEqualTokens(Token first, Token second) {
if (first == null) {
return second == null;
} else if (second == null) {
@@ -8503,35 +8554,13 @@
}
return first.lexeme == second.lexeme;
}
-
- /**
- * Return `true` if the given arrays of tokens have the same length and corresponding
- * elements are equal.
- *
- * @param first the first node being compared
- * @param second the second node being compared
- * @return `true` if the given arrays of tokens have the same length and corresponding
- * elements are equal
- */
- bool isEqual4(List<Token> first, List<Token> second) {
- int length = first.length;
- if (second.length != length) {
- return false;
- }
- for (int i = 0; i < length; i++) {
- if (!isEqual3(first[i], second[i])) {
- return false;
- }
- }
- return true;
- }
}
/**
* Instances of the class {link ToFormattedSourceVisitor} write a source representation of a visited
* AST node (and all of it's children) to a writer.
*/
-class ToFormattedSourceVisitor implements ASTVisitor<Object> {
+class ToFormattedSourceVisitor implements AstVisitor<Object> {
static String COMMENTS_KEY = "List of comments before statement";
/**
@@ -8554,60 +8583,60 @@
}
Object visitAdjacentStrings(AdjacentStrings node) {
- visitList5(node.strings, " ");
+ visitNodeListWithSeparator(node.strings, " ");
return null;
}
Object visitAnnotation(Annotation node) {
_writer.print('@');
- visit(node.name);
- visit7(".", node.constructorName);
- visit(node.arguments);
+ visitNode(node.name);
+ visitNodeWithPrefix(".", node.constructorName);
+ visitNode(node.arguments);
return null;
}
Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
_writer.print('?');
- visit(node.identifier);
+ visitNode(node.identifier);
return null;
}
Object visitArgumentList(ArgumentList node) {
_writer.print('(');
- visitList5(node.arguments, ", ");
+ visitNodeListWithSeparator(node.arguments, ", ");
_writer.print(')');
return null;
}
Object visitAsExpression(AsExpression node) {
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(" as ");
- visit(node.type);
+ visitNode(node.type);
return null;
}
Object visitAssertStatement(AssertStatement node) {
_writer.print("assert(");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(");");
return null;
}
Object visitAssignmentExpression(AssignmentExpression node) {
- visit(node.leftHandSide);
+ visitNode(node.leftHandSide);
_writer.print(' ');
_writer.print(node.operator.lexeme);
_writer.print(' ');
- visit(node.rightHandSide);
+ visitNode(node.rightHandSide);
return null;
}
Object visitBinaryExpression(BinaryExpression node) {
- visit(node.leftOperand);
+ visitNode(node.leftOperand);
_writer.print(' ');
_writer.print(node.operator.lexeme);
_writer.print(' ');
- visit(node.rightOperand);
+ visitNode(node.rightOperand);
return null;
}
@@ -8615,7 +8644,7 @@
_writer.print('{');
{
indentInc();
- visitList7("\n", node.statements, "\n");
+ visitNodeListWithSeparatorAndPrefix("\n", node.statements, "\n");
indentDec();
}
nl2();
@@ -8624,7 +8653,7 @@
}
Object visitBlockFunctionBody(BlockFunctionBody node) {
- visit(node.block);
+ visitNode(node.block);
return null;
}
@@ -8635,47 +8664,47 @@
Object visitBreakStatement(BreakStatement node) {
_writer.print("break");
- visit7(" ", node.label);
+ visitNodeWithPrefix(" ", node.label);
_writer.print(";");
return null;
}
Object visitCascadeExpression(CascadeExpression node) {
- visit(node.target);
- visitList(node.cascadeSections);
+ visitNode(node.target);
+ visitNodeList(node.cascadeSections);
return null;
}
Object visitCatchClause(CatchClause node) {
- visit7("on ", node.exceptionType);
+ visitNodeWithPrefix("on ", node.exceptionType);
if (node.catchKeyword != null) {
if (node.exceptionType != null) {
_writer.print(' ');
}
_writer.print("catch (");
- visit(node.exceptionParameter);
- visit7(", ", node.stackTraceParameter);
+ visitNode(node.exceptionParameter);
+ visitNodeWithPrefix(", ", node.stackTraceParameter);
_writer.print(") ");
} else {
_writer.print(" ");
}
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitClassDeclaration(ClassDeclaration node) {
- visit(node.documentationComment);
- visit8(node.abstractKeyword, " ");
+ visitNode(node.documentationComment);
+ visitTokenWithSuffix(node.abstractKeyword, " ");
_writer.print("class ");
- visit(node.name);
- visit(node.typeParameters);
- visit7(" ", node.extendsClause);
- visit7(" ", node.withClause);
- visit7(" ", node.implementsClause);
+ visitNode(node.name);
+ visitNode(node.typeParameters);
+ visitNodeWithPrefix(" ", node.extendsClause);
+ visitNodeWithPrefix(" ", node.withClause);
+ visitNodeWithPrefix(" ", node.implementsClause);
_writer.print(" {");
{
indentInc();
- visitList7("\n", node.members, "\n\n");
+ visitNodeListWithSeparatorAndPrefix("\n", node.members, "\n\n");
indentDec();
}
nl2();
@@ -8685,15 +8714,15 @@
Object visitClassTypeAlias(ClassTypeAlias node) {
_writer.print("typedef ");
- visit(node.name);
- visit(node.typeParameters);
+ visitNode(node.name);
+ visitNode(node.typeParameters);
_writer.print(" = ");
if (node.abstractKeyword != null) {
_writer.print("abstract ");
}
- visit(node.superclass);
- visit7(" ", node.withClause);
- visit7(" ", node.implementsClause);
+ visitNode(node.superclass);
+ visitNodeWithPrefix(" ", node.withClause);
+ visitNodeWithPrefix(" ", node.implementsClause);
_writer.print(";");
return null;
}
@@ -8724,86 +8753,86 @@
Object visitCompilationUnit(CompilationUnit node) {
ScriptTag scriptTag = node.scriptTag;
NodeList<Directive> directives = node.directives;
- visit(scriptTag);
+ visitNode(scriptTag);
// directives
String prefix = scriptTag == null ? "" : " ";
- visitList7(prefix, directives, "\n");
+ visitNodeListWithSeparatorAndPrefix(prefix, directives, "\n");
nl();
// declarations
prefix = scriptTag == null && directives.isEmpty ? "" : "\n";
- visitList7(prefix, node.declarations, "\n\n");
+ visitNodeListWithSeparatorAndPrefix(prefix, node.declarations, "\n\n");
return null;
}
Object visitConditionalExpression(ConditionalExpression node) {
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(" ? ");
- visit(node.thenExpression);
+ visitNode(node.thenExpression);
_writer.print(" : ");
- visit(node.elseExpression);
+ visitNode(node.elseExpression);
return null;
}
Object visitConstructorDeclaration(ConstructorDeclaration node) {
- visit(node.documentationComment);
- visit8(node.externalKeyword, " ");
- visit8(node.constKeyword, " ");
- visit8(node.factoryKeyword, " ");
- visit(node.returnType);
- visit7(".", node.name);
- visit(node.parameters);
- visitList7(" : ", node.initializers, ", ");
- visit7(" = ", node.redirectedConstructor);
+ visitNode(node.documentationComment);
+ visitTokenWithSuffix(node.externalKeyword, " ");
+ visitTokenWithSuffix(node.constKeyword, " ");
+ visitTokenWithSuffix(node.factoryKeyword, " ");
+ visitNode(node.returnType);
+ visitNodeWithPrefix(".", node.name);
+ visitNode(node.parameters);
+ visitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", ");
+ visitNodeWithPrefix(" = ", node.redirectedConstructor);
if (node.body is! EmptyFunctionBody) {
_writer.print(' ');
}
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
- visit8(node.keyword, ".");
- visit(node.fieldName);
+ visitTokenWithSuffix(node.keyword, ".");
+ visitNode(node.fieldName);
_writer.print(" = ");
- visit(node.expression);
+ visitNode(node.expression);
return null;
}
Object visitConstructorName(ConstructorName node) {
- visit(node.type);
- visit7(".", node.name);
+ visitNode(node.type);
+ visitNodeWithPrefix(".", node.name);
return null;
}
Object visitContinueStatement(ContinueStatement node) {
_writer.print("continue");
- visit7(" ", node.label);
+ visitNodeWithPrefix(" ", node.label);
_writer.print(";");
return null;
}
Object visitDeclaredIdentifier(DeclaredIdentifier node) {
- visit8(node.keyword, " ");
- visit6(node.type, " ");
- visit(node.identifier);
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
+ visitNode(node.identifier);
return null;
}
Object visitDefaultFormalParameter(DefaultFormalParameter node) {
- visit(node.parameter);
+ visitNode(node.parameter);
if (node.separator != null) {
_writer.print(" ");
_writer.print(node.separator.lexeme);
- visit7(" ", node.defaultValue);
+ visitNodeWithPrefix(" ", node.defaultValue);
}
return null;
}
Object visitDoStatement(DoStatement node) {
_writer.print("do ");
- visit(node.body);
+ visitNode(node.body);
_writer.print(" while (");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(");");
return null;
}
@@ -8825,15 +8854,15 @@
Object visitExportDirective(ExportDirective node) {
_writer.print("export ");
- visit(node.uri);
- visitList7(" ", node.combinators, " ");
+ visitNode(node.uri);
+ visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
_writer.print(';');
return null;
}
Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
_writer.print("=> ");
- visit(node.expression);
+ visitNode(node.expression);
if (node.semicolon != null) {
_writer.print(';');
}
@@ -8841,31 +8870,31 @@
}
Object visitExpressionStatement(ExpressionStatement node) {
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(';');
return null;
}
Object visitExtendsClause(ExtendsClause node) {
_writer.print("extends ");
- visit(node.superclass);
+ visitNode(node.superclass);
return null;
}
Object visitFieldDeclaration(FieldDeclaration node) {
- visit(node.documentationComment);
- visit8(node.staticKeyword, " ");
- visit(node.fields);
+ visitNode(node.documentationComment);
+ visitTokenWithSuffix(node.staticKeyword, " ");
+ visitNode(node.fields);
_writer.print(";");
return null;
}
Object visitFieldFormalParameter(FieldFormalParameter node) {
- visit8(node.keyword, " ");
- visit6(node.type, " ");
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
_writer.print("this.");
- visit(node.identifier);
- visit(node.parameters);
+ visitNode(node.identifier);
+ visitNode(node.parameters);
return null;
}
@@ -8873,14 +8902,14 @@
DeclaredIdentifier loopVariable = node.loopVariable;
_writer.print("for (");
if (loopVariable == null) {
- visit(node.identifier);
+ visitNode(node.identifier);
} else {
- visit(loopVariable);
+ visitNode(loopVariable);
}
_writer.print(" in ");
- visit(node.iterator);
+ visitNode(node.iterator);
_writer.print(") ");
- visit(node.body);
+ visitNode(node.body);
return null;
}
@@ -8916,89 +8945,89 @@
Expression initialization = node.initialization;
_writer.print("for (");
if (initialization != null) {
- visit(initialization);
+ visitNode(initialization);
} else {
- visit(node.variables);
+ visitNode(node.variables);
}
_writer.print(";");
- visit7(" ", node.condition);
+ visitNodeWithPrefix(" ", node.condition);
_writer.print(";");
- visitList7(" ", node.updaters, ", ");
+ visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", ");
_writer.print(") ");
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitFunctionDeclaration(FunctionDeclaration node) {
- visit6(node.returnType, " ");
- visit8(node.propertyKeyword, " ");
- visit(node.name);
- visit(node.functionExpression);
+ visitNodeWithSuffix(node.returnType, " ");
+ visitTokenWithSuffix(node.propertyKeyword, " ");
+ visitNode(node.name);
+ visitNode(node.functionExpression);
return null;
}
Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
- visit(node.functionDeclaration);
+ visitNode(node.functionDeclaration);
_writer.print(';');
return null;
}
Object visitFunctionExpression(FunctionExpression node) {
- visit(node.parameters);
+ visitNode(node.parameters);
_writer.print(' ');
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
- visit(node.function);
- visit(node.argumentList);
+ visitNode(node.function);
+ visitNode(node.argumentList);
return null;
}
Object visitFunctionTypeAlias(FunctionTypeAlias node) {
_writer.print("typedef ");
- visit6(node.returnType, " ");
- visit(node.name);
- visit(node.typeParameters);
- visit(node.parameters);
+ visitNodeWithSuffix(node.returnType, " ");
+ visitNode(node.name);
+ visitNode(node.typeParameters);
+ visitNode(node.parameters);
_writer.print(";");
return null;
}
Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
- visit6(node.returnType, " ");
- visit(node.identifier);
- visit(node.parameters);
+ visitNodeWithSuffix(node.returnType, " ");
+ visitNode(node.identifier);
+ visitNode(node.parameters);
return null;
}
Object visitHideCombinator(HideCombinator node) {
_writer.print("hide ");
- visitList5(node.hiddenNames, ", ");
+ visitNodeListWithSeparator(node.hiddenNames, ", ");
return null;
}
Object visitIfStatement(IfStatement node) {
_writer.print("if (");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(") ");
- visit(node.thenStatement);
- visit7(" else ", node.elseStatement);
+ visitNode(node.thenStatement);
+ visitNodeWithPrefix(" else ", node.elseStatement);
return null;
}
Object visitImplementsClause(ImplementsClause node) {
_writer.print("implements ");
- visitList5(node.interfaces, ", ");
+ visitNodeListWithSeparator(node.interfaces, ", ");
return null;
}
Object visitImportDirective(ImportDirective node) {
_writer.print("import ");
- visit(node.uri);
- visit7(" as ", node.prefix);
- visitList7(" ", node.combinators, " ");
+ visitNode(node.uri);
+ visitNodeWithPrefix(" as ", node.prefix);
+ visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
_writer.print(';');
return null;
}
@@ -9007,18 +9036,18 @@
if (node.isCascaded) {
_writer.print("..");
} else {
- visit(node.target);
+ visitNode(node.target);
}
_writer.print('[');
- visit(node.index);
+ visitNode(node.index);
_writer.print(']');
return null;
}
Object visitInstanceCreationExpression(InstanceCreationExpression node) {
- visit8(node.keyword, " ");
- visit(node.constructorName);
- visit(node.argumentList);
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNode(node.constructorName);
+ visitNode(node.argumentList);
return null;
}
@@ -9030,11 +9059,11 @@
Object visitInterpolationExpression(InterpolationExpression node) {
if (node.rightBracket != null) {
_writer.print("\${");
- visit(node.expression);
+ visitNode(node.expression);
_writer.print("}");
} else {
_writer.print("\$");
- visit(node.expression);
+ visitNode(node.expression);
}
return null;
}
@@ -9045,31 +9074,31 @@
}
Object visitIsExpression(IsExpression node) {
- visit(node.expression);
+ visitNode(node.expression);
if (node.notOperator == null) {
_writer.print(" is ");
} else {
_writer.print(" is! ");
}
- visit(node.type);
+ visitNode(node.type);
return null;
}
Object visitLabel(Label node) {
- visit(node.label);
+ visitNode(node.label);
_writer.print(":");
return null;
}
Object visitLabeledStatement(LabeledStatement node) {
- visitList6(node.labels, " ", " ");
- visit(node.statement);
+ visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
+ visitNode(node.statement);
return null;
}
Object visitLibraryDirective(LibraryDirective node) {
_writer.print("library ");
- visit(node.name);
+ visitNode(node.name);
_writer.print(';');
nl();
return null;
@@ -9085,17 +9114,17 @@
_writer.print(node.constKeyword.lexeme);
_writer.print(' ');
}
- visit6(node.typeArguments, " ");
+ visitNodeWithSuffix(node.typeArguments, " ");
_writer.print("[");
{
NodeList<Expression> elements = node.elements;
if (elements.length < 2 || elements.toString().length < 60) {
- visitList5(elements, ", ");
+ visitNodeListWithSeparator(elements, ", ");
} else {
String elementIndent = "${_indentString} ";
_writer.print("\n");
_writer.print(elementIndent);
- visitList5(elements, ",\n${elementIndent}");
+ visitNodeListWithSeparator(elements, ",\n${elementIndent}");
}
}
_writer.print("]");
@@ -9107,35 +9136,35 @@
_writer.print(node.constKeyword.lexeme);
_writer.print(' ');
}
- visit6(node.typeArguments, " ");
+ visitNodeWithSuffix(node.typeArguments, " ");
_writer.print("{");
- visitList5(node.entries, ", ");
+ visitNodeListWithSeparator(node.entries, ", ");
_writer.print("}");
return null;
}
Object visitMapLiteralEntry(MapLiteralEntry node) {
- visit(node.key);
+ visitNode(node.key);
_writer.print(" : ");
- visit(node.value);
+ visitNode(node.value);
return null;
}
Object visitMethodDeclaration(MethodDeclaration node) {
- visit(node.documentationComment);
- visit8(node.externalKeyword, " ");
- visit8(node.modifierKeyword, " ");
- visit6(node.returnType, " ");
- visit8(node.propertyKeyword, " ");
- visit8(node.operatorKeyword, " ");
- visit(node.name);
+ visitNode(node.documentationComment);
+ visitTokenWithSuffix(node.externalKeyword, " ");
+ visitTokenWithSuffix(node.modifierKeyword, " ");
+ visitNodeWithSuffix(node.returnType, " ");
+ visitTokenWithSuffix(node.propertyKeyword, " ");
+ visitTokenWithSuffix(node.operatorKeyword, " ");
+ visitNode(node.name);
if (!node.isGetter) {
- visit(node.parameters);
+ visitNode(node.parameters);
}
if (node.body is! EmptyFunctionBody) {
_writer.print(' ');
}
- visit(node.body);
+ visitNode(node.body);
return null;
}
@@ -9143,28 +9172,28 @@
if (node.isCascaded) {
_writer.print("..");
} else {
- visit6(node.target, ".");
+ visitNodeWithSuffix(node.target, ".");
}
- visit(node.methodName);
- visit(node.argumentList);
+ visitNode(node.methodName);
+ visitNode(node.argumentList);
return null;
}
Object visitNamedExpression(NamedExpression node) {
- visit(node.name);
- visit7(" ", node.expression);
+ visitNode(node.name);
+ visitNodeWithPrefix(" ", node.expression);
return null;
}
Object visitNativeClause(NativeClause node) {
_writer.print("native ");
- visit(node.name);
+ visitNode(node.name);
return null;
}
Object visitNativeFunctionBody(NativeFunctionBody node) {
_writer.print("native ");
- visit(node.stringLiteral);
+ visitNode(node.stringLiteral);
_writer.print(';');
return null;
}
@@ -9176,41 +9205,41 @@
Object visitParenthesizedExpression(ParenthesizedExpression node) {
_writer.print('(');
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(')');
return null;
}
Object visitPartDirective(PartDirective node) {
_writer.print("part ");
- visit(node.uri);
+ visitNode(node.uri);
_writer.print(';');
return null;
}
Object visitPartOfDirective(PartOfDirective node) {
_writer.print("part of ");
- visit(node.libraryName);
+ visitNode(node.libraryName);
_writer.print(';');
return null;
}
Object visitPostfixExpression(PostfixExpression node) {
- visit(node.operand);
+ visitNode(node.operand);
_writer.print(node.operator.lexeme);
return null;
}
Object visitPrefixedIdentifier(PrefixedIdentifier node) {
- visit(node.prefix);
+ visitNode(node.prefix);
_writer.print('.');
- visit(node.identifier);
+ visitNode(node.identifier);
return null;
}
Object visitPrefixExpression(PrefixExpression node) {
_writer.print(node.operator.lexeme);
- visit(node.operand);
+ visitNode(node.operand);
return null;
}
@@ -9218,16 +9247,16 @@
if (node.isCascaded) {
_writer.print("..");
} else {
- visit6(node.target, ".");
+ visitNodeWithSuffix(node.target, ".");
}
- visit(node.propertyName);
+ visitNode(node.propertyName);
return null;
}
Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
_writer.print("this");
- visit7(".", node.constructorName);
- visit(node.argumentList);
+ visitNodeWithPrefix(".", node.constructorName);
+ visitNode(node.argumentList);
return null;
}
@@ -9255,14 +9284,14 @@
Object visitShowCombinator(ShowCombinator node) {
_writer.print("show ");
- visitList5(node.shownNames, ", ");
+ visitNodeListWithSeparator(node.shownNames, ", ");
return null;
}
Object visitSimpleFormalParameter(SimpleFormalParameter node) {
- visit8(node.keyword, " ");
- visit6(node.type, " ");
- visit(node.identifier);
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
+ visitNode(node.identifier);
return null;
}
@@ -9277,14 +9306,14 @@
}
Object visitStringInterpolation(StringInterpolation node) {
- visitList(node.elements);
+ visitNodeList(node.elements);
return null;
}
Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
_writer.print("super");
- visit7(".", node.constructorName);
- visit(node.argumentList);
+ visitNodeWithPrefix(".", node.constructorName);
+ visitNode(node.argumentList);
return null;
}
@@ -9294,24 +9323,24 @@
}
Object visitSwitchCase(SwitchCase node) {
- visitList6(node.labels, " ", " ");
+ visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
_writer.print("case ");
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(": ");
{
indentInc();
- visitList5(node.statements, "\n");
+ visitNodeListWithSeparator(node.statements, "\n");
indentDec();
}
return null;
}
Object visitSwitchDefault(SwitchDefault node) {
- visitList6(node.labels, " ", " ");
+ visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
_writer.print("default: ");
{
indentInc();
- visitList5(node.statements, "\n");
+ visitNodeListWithSeparator(node.statements, "\n");
indentDec();
}
return null;
@@ -9319,11 +9348,11 @@
Object visitSwitchStatement(SwitchStatement node) {
_writer.print("switch (");
- visit(node.expression);
+ visitNode(node.expression);
_writer.print(") {");
{
indentInc();
- visitList5(node.members, "\n");
+ visitNodeListWithSeparator(node.members, "\n");
indentDec();
}
nl2();
@@ -9333,7 +9362,7 @@
Object visitSymbolLiteral(SymbolLiteral node) {
_writer.print("#");
- visitList9(node.components, ".");
+ visitTokenListWithSeparator(node.components, ".");
return null;
}
@@ -9344,79 +9373,79 @@
Object visitThrowExpression(ThrowExpression node) {
_writer.print("throw ");
- visit(node.expression);
+ visitNode(node.expression);
return null;
}
Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
- visit6(node.variables, ";");
+ visitNodeWithSuffix(node.variables, ";");
return null;
}
Object visitTryStatement(TryStatement node) {
_writer.print("try ");
- visit(node.body);
- visitList7(" ", node.catchClauses, " ");
- visit7(" finally ", node.finallyBlock);
+ visitNode(node.body);
+ visitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " ");
+ visitNodeWithPrefix(" finally ", node.finallyBlock);
return null;
}
Object visitTypeArgumentList(TypeArgumentList node) {
_writer.print('<');
- visitList5(node.arguments, ", ");
+ visitNodeListWithSeparator(node.arguments, ", ");
_writer.print('>');
return null;
}
Object visitTypeName(TypeName node) {
- visit(node.name);
- visit(node.typeArguments);
+ visitNode(node.name);
+ visitNode(node.typeArguments);
return null;
}
Object visitTypeParameter(TypeParameter node) {
- visit(node.name);
- visit7(" extends ", node.bound);
+ visitNode(node.name);
+ visitNodeWithPrefix(" extends ", node.bound);
return null;
}
Object visitTypeParameterList(TypeParameterList node) {
_writer.print('<');
- visitList5(node.typeParameters, ", ");
+ visitNodeListWithSeparator(node.typeParameters, ", ");
_writer.print('>');
return null;
}
Object visitVariableDeclaration(VariableDeclaration node) {
- visit(node.name);
- visit7(" = ", node.initializer);
+ visitNode(node.name);
+ visitNodeWithPrefix(" = ", node.initializer);
return null;
}
Object visitVariableDeclarationList(VariableDeclarationList node) {
- visit8(node.keyword, " ");
- visit6(node.type, " ");
- visitList5(node.variables, ", ");
+ visitTokenWithSuffix(node.keyword, " ");
+ visitNodeWithSuffix(node.type, " ");
+ visitNodeListWithSeparator(node.variables, ", ");
return null;
}
Object visitVariableDeclarationStatement(VariableDeclarationStatement node) {
- visit(node.variables);
+ visitNode(node.variables);
_writer.print(";");
return null;
}
Object visitWhileStatement(WhileStatement node) {
_writer.print("while (");
- visit(node.condition);
+ visitNode(node.condition);
_writer.print(") ");
- visit(node.body);
+ visitNode(node.body);
return null;
}
Object visitWithClause(WithClause node) {
_writer.print("with ");
- visitList5(node.mixinTypes, ", ");
+ visitNodeListWithSeparator(node.mixinTypes, ", ");
return null;
}
@@ -9460,60 +9489,20 @@
*
* @param node the node to be visited
*/
- void visit(ASTNode node) {
+ void visitNode(AstNode node) {
if (node != null) {
node.accept(this);
}
}
/**
- * Safely visit the given node, printing the suffix after the node if it is non-<code>null</code>.
- *
- * @param suffix the suffix to be printed if there is a node to visit
- * @param node the node to be visited
- */
- void visit6(ASTNode node, String suffix) {
- if (node != null) {
- node.accept(this);
- _writer.print(suffix);
- }
- }
-
- /**
- * Safely visit the given node, printing the prefix before the node if it is non-<code>null</code>
- * .
- *
- * @param prefix the prefix to be printed if there is a node to visit
- * @param node the node to be visited
- */
- void visit7(String prefix, ASTNode node) {
- if (node != null) {
- _writer.print(prefix);
- node.accept(this);
- }
- }
-
- /**
- * Safely visit the given node, printing the suffix after the node if it is non-<code>null</code>.
- *
- * @param suffix the suffix to be printed if there is a node to visit
- * @param node the node to be visited
- */
- void visit8(Token token, String suffix) {
- if (token != null) {
- _writer.print(token.lexeme);
- _writer.print(suffix);
- }
- }
-
- /**
* Print a list of nodes without any separation.
*
* @param nodes the nodes to be printed
* @param separator the separator to be printed between adjacent nodes
*/
- void visitList(NodeList<ASTNode> nodes) {
- visitList5(nodes, "");
+ void visitNodeList(NodeList<AstNode> nodes) {
+ visitNodeListWithSeparator(nodes, "");
}
/**
@@ -9522,19 +9511,8 @@
* @param nodes the nodes to be printed
* @param separator the separator to be printed between adjacent nodes
*/
- void visitList5(NodeList<ASTNode> nodes, String separator) {
- visitList8("", nodes, separator, "");
- }
-
- /**
- * Print a list of nodes, separated by the given separator.
- *
- * @param nodes the nodes to be printed
- * @param separator the separator to be printed between adjacent nodes
- * @param suffix the suffix to be printed if the list is not empty
- */
- void visitList6(NodeList<ASTNode> nodes, String separator, String suffix) {
- visitList8("", nodes, separator, suffix);
+ void visitNodeListWithSeparator(NodeList<AstNode> nodes, String separator) {
+ visitNodeListWithSeparatorPrefixAndSuffix("", nodes, separator, "");
}
/**
@@ -9544,8 +9522,19 @@
* @param nodes the nodes to be printed
* @param separator the separator to be printed between adjacent nodes
*/
- void visitList7(String prefix, NodeList<ASTNode> nodes, String separator) {
- visitList8(prefix, nodes, separator, "");
+ void visitNodeListWithSeparatorAndPrefix(String prefix, NodeList<AstNode> nodes, String separator) {
+ visitNodeListWithSeparatorPrefixAndSuffix(prefix, nodes, separator, "");
+ }
+
+ /**
+ * Print a list of nodes, separated by the given separator.
+ *
+ * @param nodes the nodes to be printed
+ * @param separator the separator to be printed between adjacent nodes
+ * @param suffix the suffix to be printed if the list is not empty
+ */
+ void visitNodeListWithSeparatorAndSuffix(NodeList<AstNode> nodes, String separator, String suffix) {
+ visitNodeListWithSeparatorPrefixAndSuffix("", nodes, separator, suffix);
}
/**
@@ -9556,7 +9545,7 @@
* @param separator the separator to be printed between adjacent nodes
* @param suffix the suffix to be printed if the list is not empty
*/
- void visitList8(String prefix, NodeList<ASTNode> nodes, String separator, String suffix) {
+ void visitNodeListWithSeparatorPrefixAndSuffix(String prefix, NodeList<AstNode> nodes, String separator, String suffix) {
if (nodes != null) {
int size = nodes.length;
if (size != 0) {
@@ -9574,7 +9563,7 @@
indent();
}
}
- ASTNode node = nodes[i];
+ AstNode node = nodes[i];
if (node is Statement) {
printLeadingComments(node);
}
@@ -9587,12 +9576,39 @@
}
/**
+ * Safely visit the given node, printing the prefix before the node if it is non-<code>null</code>
+ * .
+ *
+ * @param prefix the prefix to be printed if there is a node to visit
+ * @param node the node to be visited
+ */
+ void visitNodeWithPrefix(String prefix, AstNode node) {
+ if (node != null) {
+ _writer.print(prefix);
+ node.accept(this);
+ }
+ }
+
+ /**
+ * Safely visit the given node, printing the suffix after the node if it is non-<code>null</code>.
+ *
+ * @param suffix the suffix to be printed if there is a node to visit
+ * @param node the node to be visited
+ */
+ void visitNodeWithSuffix(AstNode node, String suffix) {
+ if (node != null) {
+ node.accept(this);
+ _writer.print(suffix);
+ }
+ }
+
+ /**
* Print a list of tokens, separated by the given separator.
*
* @param tokens the tokens to be printed
* @param separator the separator to be printed between adjacent tokens
*/
- void visitList9(List<Token> tokens, String separator) {
+ void visitTokenListWithSeparator(List<Token> tokens, String separator) {
int size = tokens.length;
for (int i = 0; i < size; i++) {
if ("\n" == separator) {
@@ -9604,4 +9620,17 @@
_writer.print(tokens[i].lexeme);
}
}
+
+ /**
+ * Safely visit the given node, printing the suffix after the node if it is non-<code>null</code>.
+ *
+ * @param suffix the suffix to be printed if there is a node to visit
+ * @param node the node to be visited
+ */
+ void visitTokenWithSuffix(Token token, String suffix) {
+ if (token != null) {
+ _writer.print(token.lexeme);
+ _writer.print(suffix);
+ }
+ }
}
\ No newline at end of file
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 3e6f1aa..10466cb 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -27,8 +27,6 @@
/**
* Instances of the class `AngularCompilationUnitBuilder` build an Angular specific element
* model for a single compilation unit.
- *
- * @coverage dart.engine.resolver
*/
class AngularCompilationUnitBuilder {
static String _NG_COMPONENT = "NgComponent";
@@ -59,13 +57,21 @@
static String _NG_TWO_WAY = "NgTwoWay";
- static Element getElement(ASTNode node, int offset) {
+ static Element getElement(AstNode node, int offset) {
// maybe node is not SimpleStringLiteral
if (node is! SimpleStringLiteral) {
return null;
}
+ SimpleStringLiteral literal = node as SimpleStringLiteral;
+ // maybe has AngularElement
+ {
+ Element element = literal.toolkitElement;
+ if (element is AngularElement) {
+ return element;
+ }
+ }
// prepare enclosing ClassDeclaration
- ClassDeclaration classDeclaration = node.getAncestor(ClassDeclaration);
+ ClassDeclaration classDeclaration = node.getAncestor((node) => node is ClassDeclaration);
if (classDeclaration == null) {
return null;
}
@@ -83,17 +89,17 @@
return toolkitObject;
}
}
+ // try selector
+ if (toolkitObject is AngularHasSelectorElement) {
+ AngularHasSelectorElement hasSelector = toolkitObject;
+ AngularSelectorElement selector = hasSelector.selector;
+ if (isNameCoveredByLiteral(selector, node)) {
+ return selector;
+ }
+ }
// try properties of AngularComponentElement
if (toolkitObject is AngularComponentElement) {
AngularComponentElement component = toolkitObject;
- // try selector
- {
- AngularSelectorElement selector = component.selector;
- if (isNameCoveredByLiteral(selector, node)) {
- return selector;
- }
- }
- // try properties
properties = component.properties;
}
// try properties of AngularDirectiveElement
@@ -129,11 +135,17 @@
static AngularSelectorElement parseSelector(int offset, String text) {
// [attribute]
if (StringUtilities.startsWithChar(text, 0x5B) && StringUtilities.endsWithChar(text, 0x5D)) {
- int nameOffset = offset + "[".length;
+ int nameOffset = offset + 1;
String attributeName = text.substring(1, text.length - 1);
// TODO(scheglov) report warning if there are spaces between [ and identifier
return new HasAttributeSelectorElementImpl(attributeName, nameOffset);
}
+ // .class
+ if (StringUtilities.startsWithChar(text, 0x2E)) {
+ int nameOffset = offset + 1;
+ String className = text.substring(1, text.length);
+ return new AngularHasClassSelectorElementImpl(className, nameOffset);
+ }
// tag[attribute]
if (StringUtilities.endsWithChar(text, 0x5D)) {
int index = StringUtilities.indexOf1(text, 0, 0x5B);
@@ -147,7 +159,7 @@
}
// tag
if (StringUtilities.isTagName(text)) {
- return new IsTagSelectorElementImpl(text, offset);
+ return new AngularTagSelectorElementImpl(text, offset);
}
return null;
}
@@ -183,7 +195,7 @@
* Checks if the name range of the given [Element] is completely covered by the given
* [SimpleStringLiteral].
*/
- static bool isNameCoveredByLiteral(Element element, ASTNode node) {
+ static bool isNameCoveredByLiteral(Element element, AstNode node) {
if (element != null) {
String name = element.name;
if (name != null) {
@@ -198,7 +210,7 @@
/**
* Parses given [SimpleStringLiteral] using [parseSelector].
*/
- static AngularSelectorElement parseSelector2(SimpleStringLiteral literal) {
+ static AngularSelectorElement parseSelectorFromString(SimpleStringLiteral literal) {
int offset = literal.valueOffset;
String text = literal.stringValue;
return parseSelector(offset, text);
@@ -215,6 +227,11 @@
Source _source;
/**
+ * The compilation unit with built Dart element models.
+ */
+ CompilationUnit _unit;
+
+ /**
* The [ClassDeclaration] that is currently being analyzed.
*/
ClassDeclaration _classDeclaration;
@@ -239,20 +256,21 @@
*
* @param errorListener the listener to which errors will be reported.
* @param source the source containing the unit that will be analyzed
+ * @param unit the compilation unit with built Dart element models
*/
- AngularCompilationUnitBuilder(AnalysisErrorListener errorListener, Source source) {
+ AngularCompilationUnitBuilder(AnalysisErrorListener errorListener, Source source, CompilationUnit unit) {
this._errorListener = errorListener;
this._source = source;
+ this._unit = unit;
}
/**
* Builds Angular specific element models and adds them to the existing Dart elements.
- *
- * @param unit the compilation unit with built Dart element models
*/
- void build(CompilationUnit unit) {
+ void build() {
+ parseViews();
// process classes
- for (CompilationUnitMember unitMember in unit.declarations) {
+ for (CompilationUnitMember unitMember in _unit.declarations) {
if (unitMember is ClassDeclaration) {
this._classDeclaration = unitMember;
this._classElement = _classDeclaration.element as ClassElementImpl;
@@ -266,22 +284,22 @@
}
this._annotation = annotation;
// @NgFilter
- if (isAngularAnnotation2(_NG_FILTER)) {
+ if (isAngularAnnotation(annotation, _NG_FILTER)) {
parseNgFilter();
continue;
}
// @NgComponent
- if (isAngularAnnotation2(_NG_COMPONENT)) {
+ if (isAngularAnnotation(annotation, _NG_COMPONENT)) {
parseNgComponent();
continue;
}
// @NgController
- if (isAngularAnnotation2(_NG_CONTROLLER)) {
+ if (isAngularAnnotation(annotation, _NG_CONTROLLER)) {
parseNgController();
continue;
}
// @NgDirective
- if (isAngularAnnotation2(_NG_DIRECTIVE)) {
+ if (isAngularAnnotation(annotation, _NG_DIRECTIVE)) {
parseNgDirective();
continue;
}
@@ -354,11 +372,6 @@
return false;
}
- /**
- * Checks if [annotation] is an annotation with required name.
- */
- bool isAngularAnnotation2(String name) => isAngularAnnotation(_annotation, name);
-
void parseNgComponent() {
bool isValid = true;
// publishAs
@@ -375,7 +388,7 @@
isValid = false;
} else {
SimpleStringLiteral selectorLiteral = getStringLiteral(_SELECTOR);
- selector = parseSelector2(selectorLiteral);
+ selector = parseSelectorFromString(selectorLiteral);
if (selector == null) {
reportErrorForArgument(_SELECTOR, AngularCode.CANNOT_PARSE_SELECTOR, [selectorLiteral]);
isValid = false;
@@ -403,7 +416,8 @@
element.templateUriOffset = templateUriOffset;
element.styleUri = styleUri;
element.styleUriOffset = styleUriOffset;
- element.properties = parseNgComponentProperties(true);
+ element.properties = parseNgComponentProperties();
+ element.scopeProperties = parseScopeProperties();
_classToolkitObjects.add(element);
}
}
@@ -411,12 +425,10 @@
/**
* Parses [AngularPropertyElement]s from [annotation] and [classDeclaration].
*/
- List<AngularPropertyElement> parseNgComponentProperties(bool fromFields) {
+ List<AngularPropertyElement> parseNgComponentProperties() {
List<AngularPropertyElement> properties = [];
parseNgComponentProperties_fromMap(properties);
- if (fromFields) {
- parseNgComponentProperties_fromFields(properties);
- }
+ parseNgComponentProperties_fromFields(properties);
return new List.from(properties);
}
@@ -469,7 +481,7 @@
}
// prepare map literal
if (mapExpression is! MapLiteral) {
- reportError(mapExpression, AngularCode.INVALID_PROPERTY_MAP, []);
+ reportErrorForNode(AngularCode.INVALID_PROPERTY_MAP, mapExpression, []);
return;
}
MapLiteral mapLiteral = mapExpression as MapLiteral;
@@ -478,7 +490,7 @@
// prepare property name
Expression nameExpression = entry.key;
if (nameExpression is! SimpleStringLiteral) {
- reportError(nameExpression, AngularCode.INVALID_PROPERTY_NAME, []);
+ reportErrorForNode(AngularCode.INVALID_PROPERTY_NAME, nameExpression, []);
continue;
}
SimpleStringLiteral nameLiteral = nameExpression as SimpleStringLiteral;
@@ -487,7 +499,7 @@
// prepare field specification
Expression specExpression = entry.value;
if (specExpression is! SimpleStringLiteral) {
- reportError(specExpression, AngularCode.INVALID_PROPERTY_SPEC, []);
+ reportErrorForNode(AngularCode.INVALID_PROPERTY_SPEC, specExpression, []);
continue;
}
SimpleStringLiteral specLiteral = specExpression as SimpleStringLiteral;
@@ -511,7 +523,7 @@
kind = AngularPropertyKind.TWO_WAY;
fieldNameOffset = 3;
} else {
- reportError(specLiteral, AngularCode.INVALID_PROPERTY_KIND, [spec]);
+ reportErrorForNode(AngularCode.INVALID_PROPERTY_KIND, specLiteral, [spec]);
continue;
}
String fieldName = spec.substring(fieldNameOffset);
@@ -519,7 +531,7 @@
// prepare field
PropertyAccessorElement setter = _classElement.type.lookUpSetter(fieldName, _classElement.library);
if (setter == null) {
- reportError2(fieldNameOffset, fieldName.length, AngularCode.INVALID_PROPERTY_FIELD, [fieldName]);
+ reportErrorForOffset(AngularCode.INVALID_PROPERTY_FIELD, fieldNameOffset, fieldName.length, [fieldName]);
continue;
}
FieldElement field = setter.variable as FieldElement;
@@ -546,7 +558,7 @@
isValid = false;
} else {
SimpleStringLiteral selectorLiteral = getStringLiteral(_SELECTOR);
- selector = parseSelector2(selectorLiteral);
+ selector = parseSelectorFromString(selectorLiteral);
if (selector == null) {
reportErrorForArgument(_SELECTOR, AngularCode.CANNOT_PARSE_SELECTOR, [selectorLiteral]);
isValid = false;
@@ -571,7 +583,7 @@
isValid = false;
} else {
SimpleStringLiteral selectorLiteral = getStringLiteral(_SELECTOR);
- selector = parseSelector2(selectorLiteral);
+ selector = parseSelectorFromString(selectorLiteral);
if (selector == null) {
reportErrorForArgument(_SELECTOR, AngularCode.CANNOT_PARSE_SELECTOR, [selectorLiteral]);
isValid = false;
@@ -582,7 +594,7 @@
int offset = _annotation.offset;
AngularDirectiveElementImpl element = new AngularDirectiveElementImpl(offset);
element.selector = selector;
- element.properties = parseNgComponentProperties(false);
+ element.properties = parseNgComponentProperties();
_classToolkitObjects.add(element);
}
}
@@ -602,31 +614,172 @@
}
}
- void reportError(ASTNode node, ErrorCode errorCode, List<Object> arguments) {
- int offset = node.offset;
- int length = node.length;
- reportError2(offset, length, errorCode, arguments);
+ List<AngularScopePropertyElement> parseScopeProperties() {
+ List<AngularScopePropertyElement> properties = [];
+ _classDeclaration.accept(new RecursiveAstVisitor_AngularCompilationUnitBuilder_parseScopeProperties(properties));
+ return new List.from(properties);
}
- void reportError2(int offset, int length, ErrorCode errorCode, List<Object> arguments) {
- _errorListener.onError(new AnalysisError.con2(_source, offset, length, errorCode, arguments));
+ /**
+ * Create [AngularViewElement] for each valid <code>view('template.html')</code> invocation,
+ * where <code>view</code> is <code>ViewFactory</code>.
+ */
+ void parseViews() {
+ List<AngularViewElement> views = [];
+ _unit.accept(new RecursiveAstVisitor_AngularCompilationUnitBuilder_parseViews(views));
+ if (!views.isEmpty) {
+ List<AngularViewElement> viewArray = new List.from(views);
+ (_unit.element as CompilationUnitElementImpl).angularViews = viewArray;
+ }
}
void reportErrorForAnnotation(ErrorCode errorCode, List<Object> arguments) {
- reportError(_annotation, errorCode, arguments);
+ reportErrorForNode(errorCode, _annotation, arguments);
}
void reportErrorForArgument(String argumentName, ErrorCode errorCode, List<Object> arguments) {
Expression argument = getArgument(argumentName);
- reportError(argument, errorCode, arguments);
+ reportErrorForNode(errorCode, argument, arguments);
+ }
+
+ void reportErrorForNode(ErrorCode errorCode, AstNode node, List<Object> arguments) {
+ int offset = node.offset;
+ int length = node.length;
+ reportErrorForOffset(errorCode, offset, length, arguments);
+ }
+
+ void reportErrorForOffset(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
+ _errorListener.onError(new AnalysisError.con2(_source, offset, length, errorCode, arguments));
+ }
+}
+
+class RecursiveAstVisitor_AngularCompilationUnitBuilder_parseScopeProperties extends RecursiveAstVisitor<Object> {
+ List<AngularScopePropertyElement> properties;
+
+ RecursiveAstVisitor_AngularCompilationUnitBuilder_parseScopeProperties(this.properties) : super();
+
+ Object visitAssignmentExpression(AssignmentExpression node) {
+ addProperty(node);
+ return super.visitAssignmentExpression(node);
+ }
+
+ void addProperty(AssignmentExpression node) {
+ // try to find "name" in scope[name]
+ SimpleStringLiteral nameNode = getNameNode(node.leftHandSide);
+ if (nameNode == null) {
+ return;
+ }
+ // prepare unique
+ String name = nameNode.stringValue;
+ if (hasPropertyWithName(name)) {
+ return;
+ }
+ // do add property
+ int nameOffset = nameNode.valueOffset;
+ AngularScopePropertyElement property = new AngularScopePropertyElementImpl(name, nameOffset, node.rightHandSide.bestType);
+ nameNode.toolkitElement = property;
+ properties.add(property);
+ }
+
+ SimpleStringLiteral getNameNode(Expression node) {
+ if (node is IndexExpression) {
+ IndexExpression indexExpression = node;
+ Expression target = indexExpression.target;
+ Expression index = indexExpression.index;
+ if (index is SimpleStringLiteral && isContext(target)) {
+ return index;
+ }
+ }
+ return null;
+ }
+
+ bool hasPropertyWithName(String name) {
+ for (AngularScopePropertyElement property in properties) {
+ if (property.name == name) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ bool isContext(Expression target) {
+ if (target is PrefixedIdentifier) {
+ PrefixedIdentifier prefixed = target;
+ SimpleIdentifier prefix = prefixed.prefix;
+ SimpleIdentifier identifier = prefixed.identifier;
+ return (identifier.name == "context") && isScope(prefix);
+ }
+ return false;
+ }
+
+ bool isScope(Expression target) {
+ if (target != null) {
+ Type2 type = target.bestType;
+ if (type is InterfaceType) {
+ InterfaceType interfaceType = type;
+ return interfaceType.name == "Scope";
+ }
+ }
+ return false;
+ }
+}
+
+class RecursiveAstVisitor_AngularCompilationUnitBuilder_parseViews extends RecursiveAstVisitor<Object> {
+ List<AngularViewElement> views;
+
+ RecursiveAstVisitor_AngularCompilationUnitBuilder_parseViews(this.views) : super();
+
+ Object visitMethodInvocation(MethodInvocation node) {
+ addView(node);
+ return super.visitMethodInvocation(node);
+ }
+
+ void addView(MethodInvocation node) {
+ // only one argument
+ List<Expression> arguments = node.argumentList.arguments;
+ if (arguments.length != 1) {
+ return;
+ }
+ // String literal
+ Expression argument = arguments[0];
+ if (argument is! SimpleStringLiteral) {
+ return;
+ }
+ SimpleStringLiteral literal = argument as SimpleStringLiteral;
+ // just view('template')
+ if (node.realTarget != null) {
+ return;
+ }
+ // should be ViewFactory
+ if (!isViewFactory(node.methodName)) {
+ return;
+ }
+ // add AngularViewElement
+ String templateUri = literal.stringValue;
+ int templateUriOffset = literal.valueOffset;
+ views.add(new AngularViewElementImpl(templateUri, templateUriOffset));
+ }
+
+ bool isViewFactory(Expression target) {
+ if (target is SimpleIdentifier) {
+ SimpleIdentifier identifier = target;
+ Element element = identifier.staticElement;
+ if (element is VariableElement) {
+ VariableElement variable = element;
+ Type2 type = variable.type;
+ if (type is InterfaceType) {
+ InterfaceType interfaceType = type;
+ return interfaceType.name == "ViewFactory";
+ }
+ }
+ }
+ return false;
}
}
/**
* Instances of the class `CompilationUnitBuilder` build an element model for a single
* compilation unit.
- *
- * @coverage dart.engine.resolver
*/
class CompilationUnitBuilder {
/**
@@ -664,10 +817,8 @@
/**
* Instances of the class `ElementBuilder` traverse an AST structure and build the element
* model representing the AST structure.
- *
- * @coverage dart.engine.resolver
*/
-class ElementBuilder extends RecursiveASTVisitor<Object> {
+class ElementBuilder extends RecursiveAstVisitor<Object> {
/**
* The element holder associated with the element that is currently being built.
*/
@@ -749,7 +900,7 @@
_currentHolder = holder;
try {
List<ClassMember> nonFields = new List<ClassMember>();
- node.visitChildren(new UnifyingASTVisitor_ElementBuilder_visitClassDeclaration(this, nonFields));
+ node.visitChildren(new UnifyingAstVisitor_ElementBuilder_visitClassDeclaration(this, nonFields));
buildFieldMap(holder.fieldsWithoutFlushing);
int count = nonFields.length;
for (int i = 0; i < count; i++) {
@@ -828,7 +979,7 @@
_inFunction = wasInFunction;
}
SimpleIdentifier constructorName = node.name;
- ConstructorElementImpl element = new ConstructorElementImpl(constructorName);
+ ConstructorElementImpl element = new ConstructorElementImpl.con1(constructorName);
if (node.factoryKeyword != null) {
element.factory = true;
}
@@ -960,7 +1111,7 @@
element.localVariables = holder.localVariables;
element.parameters = holder.parameters;
if (_inFunction) {
- Block enclosingBlock = node.getAncestor(Block);
+ Block enclosingBlock = node.getAncestor((node) => node is Block);
if (enclosingBlock != null) {
int functionEnd = node.offset + node.length;
int blockEnd = enclosingBlock.offset + enclosingBlock.length;
@@ -1032,7 +1183,7 @@
element.localVariables = holder.localVariables;
element.parameters = holder.parameters;
if (_inFunction) {
- Block enclosingBlock = node.getAncestor(Block);
+ Block enclosingBlock = node.getAncestor((node) => node is Block);
if (enclosingBlock != null) {
int functionEnd = node.offset + node.length;
int blockEnd = enclosingBlock.offset + enclosingBlock.length;
@@ -1242,7 +1393,7 @@
variable = new LocalVariableElementImpl(variableName);
}
element = variable;
- Block enclosingBlock = node.getAncestor(Block);
+ Block enclosingBlock = node.getAncestor((node) => node is Block);
int functionEnd = node.offset + node.length;
int blockEnd = enclosingBlock.offset + enclosingBlock.length;
// TODO(brianwilkerson) This isn't right for variables declared in a for loop.
@@ -1327,7 +1478,7 @@
* @return the [ConstructorElement]s array with the single default constructor element
*/
List<ConstructorElement> createDefaultConstructors(InterfaceTypeImpl interfaceType) {
- ConstructorElementImpl constructor = new ConstructorElementImpl(null);
+ ConstructorElementImpl constructor = new ConstructorElementImpl.con1(null);
constructor.synthetic = true;
constructor.returnType = interfaceType;
FunctionTypeImpl type = new FunctionTypeImpl.con1(constructor);
@@ -1363,7 +1514,7 @@
* @return the body of the function that contains the given parameter
*/
FunctionBody getFunctionBody(FormalParameter node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
while (parent != null) {
if (parent is ConstructorDeclaration) {
return (parent as ConstructorDeclaration).body;
@@ -1402,7 +1553,7 @@
* @param holder the holder that will gather elements that are built while visiting the children
* @param node the node to be visited
*/
- void visit(ElementHolder holder, ASTNode node) {
+ void visit(ElementHolder holder, AstNode node) {
if (node != null) {
ElementHolder previousHolder = _currentHolder;
_currentHolder = holder;
@@ -1420,7 +1571,7 @@
* @param holder the holder that will gather elements that are built while visiting the children
* @param node the node whose children are to be visited
*/
- void visitChildren(ElementHolder holder, ASTNode node) {
+ void visitChildren(ElementHolder holder, AstNode node) {
if (node != null) {
ElementHolder previousHolder = _currentHolder;
_currentHolder = holder;
@@ -1433,12 +1584,12 @@
}
}
-class UnifyingASTVisitor_ElementBuilder_visitClassDeclaration extends UnifyingASTVisitor<Object> {
+class UnifyingAstVisitor_ElementBuilder_visitClassDeclaration extends UnifyingAstVisitor<Object> {
final ElementBuilder ElementBuilder_this;
List<ClassMember> nonFields;
- UnifyingASTVisitor_ElementBuilder_visitClassDeclaration(this.ElementBuilder_this, this.nonFields) : super();
+ UnifyingAstVisitor_ElementBuilder_visitClassDeclaration(this.ElementBuilder_this, this.nonFields) : super();
Object visitConstructorDeclaration(ConstructorDeclaration node) {
nonFields.add(node);
@@ -1450,14 +1601,12 @@
return null;
}
- Object visitNode(ASTNode node) => node.accept(ElementBuilder_this);
+ Object visitNode(AstNode node) => node.accept(ElementBuilder_this);
}
/**
* Instances of the class `ElementHolder` hold on to elements created while traversing an AST
* structure so that they can be accessed when creating their enclosing element.
- *
- * @coverage dart.engine.resolver
*/
class ElementHolder {
List<PropertyAccessorElement> _accessors;
@@ -1855,7 +2004,7 @@
* @return the HTML element that was built
* @throws AnalysisException if the analysis could not be performed
*/
- HtmlElementImpl buildHtmlElement(Source source) => buildHtmlElement2(source, source.modificationStamp, _context.parseHtmlUnit(source));
+ HtmlElementImpl buildHtmlElement(Source source) => buildHtmlElement2(source, _context.getModificationStamp(source), _context.parseHtmlUnit(source));
/**
* Build the HTML element for the given source.
@@ -1924,7 +2073,7 @@
parseUriWithException(scriptSourcePath);
Source scriptSource = _context.sourceFactory.resolveUri(htmlSource, scriptSourcePath);
script.scriptSource = scriptSource;
- if (scriptSource == null || !scriptSource.exists()) {
+ if (!_context.exists(scriptSource)) {
reportValueError(HtmlWarningCode.URI_DOES_NOT_EXIST, scriptAttribute, [scriptSourcePath]);
}
} on URISyntaxException catch (exception) {
@@ -2020,7 +2169,7 @@
* @param length the number of characters to be highlighted
* @param arguments the arguments used to compose the error message
*/
- void reportError(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
+ void reportErrorForOffset(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
_errorListener.onError(new AnalysisError.con2(_htmlElement.source, offset, length, errorCode, arguments));
}
@@ -2036,17 +2185,15 @@
void reportValueError(ErrorCode errorCode, ht.XmlAttributeNode attribute, List<Object> arguments) {
int offset = attribute.valueToken.offset + 1;
int length = attribute.valueToken.length - 2;
- reportError(errorCode, offset, length, arguments);
+ reportErrorForOffset(errorCode, offset, length, arguments);
}
}
/**
* Instances of the class `BestPracticesVerifier` traverse an AST structure looking for
* violations of Dart best practices.
- *
- * @coverage dart.engine.resolver
*/
-class BestPracticesVerifier extends RecursiveASTVisitor<Object> {
+class BestPracticesVerifier extends RecursiveAstVisitor<Object> {
static String _GETTER = "getter";
static String _HASHCODE_GETTER_NAME = "hashCode";
@@ -2183,7 +2330,7 @@
}
Object visitSimpleIdentifier(SimpleIdentifier node) {
- checkForDeprecatedMemberUse2(node);
+ checkForDeprecatedMemberUseAtIdentifier(node);
return super.visitSimpleIdentifier(node);
}
@@ -2221,10 +2368,10 @@
if (rhsType.isDynamic && rhsNameStr == sc.Keyword.DYNAMIC.syntax) {
if (node.notOperator == null) {
// the is case
- _errorReporter.reportError3(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, node, []);
+ _errorReporter.reportError2(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, node, []);
} else {
// the is not case
- _errorReporter.reportError3(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, node, []);
+ _errorReporter.reportError2(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, node, []);
}
return true;
}
@@ -2235,19 +2382,19 @@
if (rhsType.isObject || (expression is NullLiteral && rhsNameStr == _NULL_TYPE_NAME)) {
if (node.notOperator == null) {
// the is case
- _errorReporter.reportError3(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, node, []);
+ _errorReporter.reportError2(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, node, []);
} else {
// the is not case
- _errorReporter.reportError3(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, node, []);
+ _errorReporter.reportError2(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, node, []);
}
return true;
} else if (rhsNameStr == _NULL_TYPE_NAME) {
if (node.notOperator == null) {
// the is case
- _errorReporter.reportError3(HintCode.TYPE_CHECK_IS_NULL, node, []);
+ _errorReporter.reportError2(HintCode.TYPE_CHECK_IS_NULL, node, []);
} else {
// the is not case
- _errorReporter.reportError3(HintCode.TYPE_CHECK_IS_NOT_NULL, node, []);
+ _errorReporter.reportError2(HintCode.TYPE_CHECK_IS_NOT_NULL, node, []);
}
return true;
}
@@ -2264,7 +2411,7 @@
* @return `true` if and only if a hint code is generated on the passed node
* @see HintCode#DEPRECATED_MEMBER_USE
*/
- bool checkForDeprecatedMemberUse(Element element, ASTNode node) {
+ bool checkForDeprecatedMemberUse(Element element, AstNode node) {
if (element != null && element.isDeprecated) {
String displayName = element.displayName;
if (element is ConstructorElement) {
@@ -2276,7 +2423,7 @@
displayName = "${displayName}.${constructorElement.displayName}";
}
}
- _errorReporter.reportError3(HintCode.DEPRECATED_MEMBER_USE, node, [displayName]);
+ _errorReporter.reportError2(HintCode.DEPRECATED_MEMBER_USE, node, [displayName]);
return true;
}
return false;
@@ -2296,11 +2443,11 @@
* @return `true` if and only if a hint code is generated on the passed node
* @see HintCode#DEPRECATED_MEMBER_USE
*/
- bool checkForDeprecatedMemberUse2(SimpleIdentifier identifier) {
+ bool checkForDeprecatedMemberUseAtIdentifier(SimpleIdentifier identifier) {
if (identifier.inDeclarationContext()) {
return false;
}
- ASTNode parent = identifier.parent;
+ AstNode parent = identifier.parent;
if ((parent is ConstructorName && identical(identifier, parent.name)) || (parent is SuperConstructorInvocation && identical(identifier, parent.constructorName)) || parent is HideCombinator) {
return false;
}
@@ -2334,7 +2481,7 @@
if (parenthesizedExpression.parent is MethodInvocation) {
MethodInvocation methodInvocation = parenthesizedExpression.parent as MethodInvocation;
if (_TO_INT_METHOD_NAME == methodInvocation.methodName.name && methodInvocation.argumentList.arguments.isEmpty) {
- _errorReporter.reportError3(HintCode.DIVISION_OPTIMIZATION, methodInvocation, []);
+ _errorReporter.reportError2(HintCode.DIVISION_OPTIMIZATION, methodInvocation, []);
return true;
}
}
@@ -2369,7 +2516,7 @@
// Check the block for a return statement, if not, create the hint
BlockFunctionBody blockFunctionBody = body as BlockFunctionBody;
if (!blockFunctionBody.accept(new ExitDetector())) {
- _errorReporter.reportError3(HintCode.MISSING_RETURN, returnType, [returnTypeType.displayName]);
+ _errorReporter.reportError2(HintCode.MISSING_RETURN, returnType, [returnTypeType.displayName]);
return true;
}
return false;
@@ -2392,7 +2539,7 @@
if (equalsOperatorMethodElement != null) {
PropertyAccessorElement hashCodeElement = classElement.getGetter(_HASHCODE_GETTER_NAME);
if (hashCodeElement == null) {
- _errorReporter.reportError3(HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, node.name, [classElement.displayName]);
+ _errorReporter.reportError2(HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, node.name, [classElement.displayName]);
return true;
}
}
@@ -2445,7 +2592,7 @@
}
if (overriddenAccessor != null) {
String memberType = (executableElement as PropertyAccessorElement).isGetter ? _GETTER : _SETTER;
- _errorReporter.reportError3(HintCode.OVERRIDDING_PRIVATE_MEMBER, node.name, [
+ _errorReporter.reportError2(HintCode.OVERRIDDING_PRIVATE_MEMBER, node.name, [
memberType,
executableElement.displayName,
classElement.displayName]);
@@ -2454,7 +2601,7 @@
} else {
MethodElement overriddenMethod = classElement.getMethod(elementName);
if (overriddenMethod != null) {
- _errorReporter.reportError3(HintCode.OVERRIDDING_PRIVATE_MEMBER, node.name, [
+ _errorReporter.reportError2(HintCode.OVERRIDDING_PRIVATE_MEMBER, node.name, [
_METHOD,
executableElement.displayName,
classElement.displayName]);
@@ -2483,7 +2630,7 @@
// TODO(jwren) After dartbug.com/13732, revisit this, we should be able to remove the
// !(x instanceof TypeParameterType) checks.
if (lhsType != null && rhsType != null && !lhsType.isDynamic && !rhsType.isDynamic && lhsType is! TypeParameterType && rhsType is! TypeParameterType && lhsType.isSubtypeOf(rhsType)) {
- _errorReporter.reportError3(HintCode.UNNECESSARY_CAST, node, []);
+ _errorReporter.reportError2(HintCode.UNNECESSARY_CAST, node, []);
return true;
}
return false;
@@ -2507,7 +2654,7 @@
MethodInvocation methodInvocation = expression as MethodInvocation;
if (identical(methodInvocation.staticType, VoidTypeImpl.instance)) {
SimpleIdentifier methodName = methodInvocation.methodName;
- _errorReporter.reportError3(HintCode.USE_OF_VOID_RESULT, methodName, [methodName.name]);
+ _errorReporter.reportError2(HintCode.USE_OF_VOID_RESULT, methodName, [methodName.name]);
return true;
}
return false;
@@ -2517,10 +2664,8 @@
/**
* Instances of the class `Dart2JSVerifier` traverse an AST structure looking for hints for
* code that will be compiled to JS, such as [HintCode#IS_DOUBLE].
- *
- * @coverage dart.engine.resolver
*/
-class Dart2JSVerifier extends RecursiveASTVisitor<Object> {
+class Dart2JSVerifier extends RecursiveAstVisitor<Object> {
/**
* The error reporter by which errors will be reported.
*/
@@ -2574,9 +2719,9 @@
// } else
if (typeNameStr == _DOUBLE_TYPE_NAME && libraryElement != null && libraryElement.isDartCore) {
if (node.notOperator == null) {
- _errorReporter.reportError3(HintCode.IS_DOUBLE, node, []);
+ _errorReporter.reportError2(HintCode.IS_DOUBLE, node, []);
} else {
- _errorReporter.reportError3(HintCode.IS_NOT_DOUBLE, node, []);
+ _errorReporter.reportError2(HintCode.IS_NOT_DOUBLE, node, []);
}
return true;
}
@@ -2588,10 +2733,8 @@
/**
* Instances of the class `DeadCodeVerifier` traverse an AST structure looking for cases of
* [HintCode#DEAD_CODE].
- *
- * @coverage dart.engine.resolver
*/
-class DeadCodeVerifier extends RecursiveASTVisitor<Object> {
+class DeadCodeVerifier extends RecursiveAstVisitor<Object> {
/**
* The error reporter by which errors will be reported.
*/
@@ -2617,13 +2760,13 @@
if (lhsResult != null) {
if (lhsResult.isTrue && isBarBar) {
// report error on else block: true || !e!
- _errorReporter.reportError3(HintCode.DEAD_CODE, node.rightOperand, []);
+ _errorReporter.reportError2(HintCode.DEAD_CODE, node.rightOperand, []);
// only visit the LHS:
safelyVisit(lhsCondition);
return null;
} else if (lhsResult.isFalse && isAmpAmp) {
// report error on if block: false && !e!
- _errorReporter.reportError3(HintCode.DEAD_CODE, node.rightOperand, []);
+ _errorReporter.reportError2(HintCode.DEAD_CODE, node.rightOperand, []);
// only visit the LHS:
safelyVisit(lhsCondition);
return null;
@@ -2651,7 +2794,7 @@
Statement lastStatement = statements[size - 1];
int offset = nextStatement.offset;
int length = lastStatement.end - offset;
- _errorReporter.reportError5(HintCode.DEAD_CODE, offset, length, []);
+ _errorReporter.reportError4(HintCode.DEAD_CODE, offset, length, []);
return null;
}
}
@@ -2666,12 +2809,12 @@
if (result != null) {
if (result.isTrue) {
// report error on else block: true ? 1 : !2!
- _errorReporter.reportError3(HintCode.DEAD_CODE, node.elseExpression, []);
+ _errorReporter.reportError2(HintCode.DEAD_CODE, node.elseExpression, []);
safelyVisit(node.thenExpression);
return null;
} else {
// report error on if block: false ? !1! : 2
- _errorReporter.reportError3(HintCode.DEAD_CODE, node.thenExpression, []);
+ _errorReporter.reportError2(HintCode.DEAD_CODE, node.thenExpression, []);
safelyVisit(node.elseExpression);
return null;
}
@@ -2690,13 +2833,13 @@
// report error on else block: if(true) {} else {!}
Statement elseStatement = node.elseStatement;
if (elseStatement != null) {
- _errorReporter.reportError3(HintCode.DEAD_CODE, elseStatement, []);
+ _errorReporter.reportError2(HintCode.DEAD_CODE, elseStatement, []);
safelyVisit(node.thenStatement);
return null;
}
} else {
// report error on if block: if (false) {!} else {}
- _errorReporter.reportError3(HintCode.DEAD_CODE, node.thenStatement, []);
+ _errorReporter.reportError2(HintCode.DEAD_CODE, node.thenStatement, []);
safelyVisit(node.elseStatement);
return null;
}
@@ -2730,7 +2873,7 @@
CatchClause lastCatchClause = catchClauses[numOfCatchClauses - 1];
int offset = nextCatchClause.offset;
int length = lastCatchClause.end - offset;
- _errorReporter.reportError5(HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH, offset, length, []);
+ _errorReporter.reportError4(HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH, offset, length, []);
return null;
}
}
@@ -2739,7 +2882,7 @@
CatchClause lastCatchClause = catchClauses[numOfCatchClauses - 1];
int offset = catchClause.offset;
int length = lastCatchClause.end - offset;
- _errorReporter.reportError5(HintCode.DEAD_CODE_ON_CATCH_SUBTYPE, offset, length, [currentType.displayName, type.displayName]);
+ _errorReporter.reportError4(HintCode.DEAD_CODE_ON_CATCH_SUBTYPE, offset, length, [currentType.displayName, type.displayName]);
return null;
}
}
@@ -2756,7 +2899,7 @@
CatchClause lastCatchClause = catchClauses[numOfCatchClauses - 1];
int offset = nextCatchClause.offset;
int length = lastCatchClause.end - offset;
- _errorReporter.reportError5(HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH, offset, length, []);
+ _errorReporter.reportError4(HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH, offset, length, []);
return null;
}
}
@@ -2772,7 +2915,7 @@
if (result != null) {
if (result.isFalse) {
// report error on if block: while (false) {!}
- _errorReporter.reportError3(HintCode.DEAD_CODE, node.body, []);
+ _errorReporter.reportError2(HintCode.DEAD_CODE, node.body, []);
return null;
}
}
@@ -2850,7 +2993,7 @@
*
* @param node the node to be visited
*/
- void safelyVisit(ASTNode node) {
+ void safelyVisit(AstNode node) {
if (node != null) {
node.accept(this);
}
@@ -2862,7 +3005,13 @@
* to terminate by executing a `return` statement, `throw` expression, `rethrow`
* expression, or simple infinite loop such as `while(true)`.
*/
-class ExitDetector extends GeneralizingASTVisitor<bool> {
+class ExitDetector extends GeneralizingAstVisitor<bool> {
+ /**
+ * Set to `true` when a `break` is encountered, and reset to `false` when a
+ * `do`, `while`, `for` or `switch` block is entered.
+ */
+ bool _enclosingBlockContainsBreak = false;
+
bool visitArgumentList(ArgumentList node) => visitExpressions(node.arguments);
bool visitAsExpression(AsExpression node) => node.expression.accept(this);
@@ -2903,7 +3052,10 @@
bool visitBlockFunctionBody(BlockFunctionBody node) => node.block.accept(this);
- bool visitBreakStatement(BreakStatement node) => false;
+ bool visitBreakStatement(BreakStatement node) {
+ _enclosingBlockContainsBreak = true;
+ return false;
+ }
bool visitCascadeExpression(CascadeExpression node) {
Expression target = node.target;
@@ -2931,37 +3083,74 @@
bool visitContinueStatement(ContinueStatement node) => false;
bool visitDoStatement(DoStatement node) {
- Expression conditionExpression = node.condition;
- if (conditionExpression.accept(this)) {
- return true;
- }
- // TODO(jwren) Do we want to take all constant expressions into account?
- if (conditionExpression is BooleanLiteral) {
- BooleanLiteral booleanLiteral = conditionExpression;
- if (booleanLiteral.value) {
- return node.body.accept(this);
+ bool outerBreakValue = _enclosingBlockContainsBreak;
+ _enclosingBlockContainsBreak = false;
+ try {
+ Expression conditionExpression = node.condition;
+ if (conditionExpression.accept(this)) {
+ return true;
}
+ // TODO(jwren) Do we want to take all constant expressions into account?
+ if (conditionExpression is BooleanLiteral) {
+ BooleanLiteral booleanLiteral = conditionExpression;
+ // If do {} while (true), and the body doesn't return or the body doesn't have a break, then
+ // return true.
+ bool blockReturns = node.body.accept(this);
+ if (booleanLiteral.value && (blockReturns || !_enclosingBlockContainsBreak)) {
+ return true;
+ }
+ }
+ return false;
+ } finally {
+ _enclosingBlockContainsBreak = outerBreakValue;
}
- return false;
}
bool visitEmptyStatement(EmptyStatement node) => false;
bool visitExpressionStatement(ExpressionStatement node) => node.expression.accept(this);
- bool visitForEachStatement(ForEachStatement node) => node.iterator.accept(this);
+ bool visitForEachStatement(ForEachStatement node) {
+ bool outerBreakValue = _enclosingBlockContainsBreak;
+ _enclosingBlockContainsBreak = false;
+ try {
+ return node.iterator.accept(this);
+ } finally {
+ _enclosingBlockContainsBreak = outerBreakValue;
+ }
+ }
bool visitForStatement(ForStatement node) {
- if (node.variables != null && visitVariableDeclarations(node.variables.variables)) {
- return true;
+ bool outerBreakValue = _enclosingBlockContainsBreak;
+ _enclosingBlockContainsBreak = false;
+ try {
+ if (node.variables != null && visitVariableDeclarations(node.variables.variables)) {
+ return true;
+ }
+ if (node.initialization != null && node.initialization.accept(this)) {
+ return true;
+ }
+ Expression conditionExpression = node.condition;
+ if (conditionExpression != null && conditionExpression.accept(this)) {
+ return true;
+ }
+ if (visitExpressions(node.updaters)) {
+ return true;
+ }
+ // TODO(jwren) Do we want to take all constant expressions into account?
+ // If for(; true; ) (or for(;;)), and the body doesn't return or the body doesn't have a
+ // break, then return true.
+ bool implicitOrExplictTrue = conditionExpression == null || (conditionExpression is BooleanLiteral && conditionExpression.value);
+ if (implicitOrExplictTrue) {
+ bool blockReturns = node.body.accept(this);
+ if (blockReturns || !_enclosingBlockContainsBreak) {
+ return true;
+ }
+ }
+ return false;
+ } finally {
+ _enclosingBlockContainsBreak = outerBreakValue;
}
- if (node.initialization != null && node.initialization.accept(this)) {
- return true;
- }
- if (node.condition != null && node.condition.accept(this)) {
- return true;
- }
- return visitExpressions(node.updaters);
}
bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => false;
@@ -3057,25 +3246,31 @@
bool visitSwitchDefault(SwitchDefault node) => visitStatements(node.statements);
bool visitSwitchStatement(SwitchStatement node) {
- bool hasDefault = false;
- NodeList<SwitchMember> memberList = node.members;
- List<SwitchMember> members = new List.from(memberList);
- for (int i = 0; i < members.length; i++) {
- SwitchMember switchMember = members[i];
- if (switchMember is SwitchDefault) {
- hasDefault = true;
- // If this is the last member and there are no statements, return false
- if (switchMember.statements.isEmpty && i + 1 == members.length) {
+ bool outerBreakValue = _enclosingBlockContainsBreak;
+ _enclosingBlockContainsBreak = false;
+ try {
+ bool hasDefault = false;
+ NodeList<SwitchMember> memberList = node.members;
+ List<SwitchMember> members = new List.from(memberList);
+ for (int i = 0; i < members.length; i++) {
+ SwitchMember switchMember = members[i];
+ if (switchMember is SwitchDefault) {
+ hasDefault = true;
+ // If this is the last member and there are no statements, return false
+ if (switchMember.statements.isEmpty && i + 1 == members.length) {
+ return false;
+ }
+ }
+ // For switch members with no statements, don't visit the children, otherwise, return false if
+ // no return is found in the children statements
+ if (!switchMember.statements.isEmpty && !switchMember.accept(this)) {
return false;
}
}
- // For switch members with no statements, don't visit the children, otherwise, return false if
- // no return is found in the children statements
- if (!switchMember.statements.isEmpty && !switchMember.accept(this)) {
- return false;
- }
+ return hasDefault;
+ } finally {
+ _enclosingBlockContainsBreak = outerBreakValue;
}
- return hasDefault;
}
bool visitThisExpression(ThisExpression node) => false;
@@ -3116,18 +3311,27 @@
}
bool visitWhileStatement(WhileStatement node) {
- Expression conditionExpression = node.condition;
- if (conditionExpression.accept(this)) {
- return true;
- }
- // TODO(jwren) Do we want to take all constant expressions into account?
- if (conditionExpression is BooleanLiteral) {
- BooleanLiteral booleanLiteral = conditionExpression;
- if (booleanLiteral.value) {
- return node.body.accept(this);
+ bool outerBreakValue = _enclosingBlockContainsBreak;
+ _enclosingBlockContainsBreak = false;
+ try {
+ Expression conditionExpression = node.condition;
+ if (conditionExpression.accept(this)) {
+ return true;
}
+ // TODO(jwren) Do we want to take all constant expressions into account?
+ if (conditionExpression is BooleanLiteral) {
+ BooleanLiteral booleanLiteral = conditionExpression;
+ // If while(true), and the body doesn't return or the body doesn't have a break, then return
+ // true.
+ bool blockReturns = node.body.accept(this);
+ if (booleanLiteral.value && (blockReturns || !_enclosingBlockContainsBreak)) {
+ return true;
+ }
+ }
+ return false;
+ } finally {
+ _enclosingBlockContainsBreak = outerBreakValue;
}
- return false;
}
bool visitExpressions(NodeList<Expression> expressions) {
@@ -3163,7 +3367,6 @@
* generate hints over the set of sources.
*
* @see HintCode
- * @coverage dart.engine.resolver
*/
class HintGenerator {
List<CompilationUnit> _compilationUnits;
@@ -3176,6 +3379,11 @@
bool _enableDart2JSHints = false;
+ /**
+ * The inheritance manager used to find overridden methods.
+ */
+ InheritanceManager _manager;
+
HintGenerator(List<CompilationUnit> compilationUnits, AnalysisContext context, AnalysisErrorListener errorListener) {
this._compilationUnits = compilationUnits;
this._context = context;
@@ -3183,6 +3391,7 @@
LibraryElement library = compilationUnits[0].element.library;
_importsVerifier = new ImportsVerifier(library);
_enableDart2JSHints = context.analysisOptions.dart2jsHint;
+ _manager = new InheritanceManager(compilationUnits[0].element.library);
}
void generateForLibrary() {
@@ -3210,15 +3419,16 @@
void generateForCompilationUnit(CompilationUnit unit, Source source) {
ErrorReporter errorReporter = new ErrorReporter(_errorListener, source);
- _importsVerifier.visitCompilationUnit(unit);
+ unit.accept(_importsVerifier);
// dead code analysis
- new DeadCodeVerifier(errorReporter).visitCompilationUnit(unit);
+ unit.accept(new DeadCodeVerifier(errorReporter));
// dart2js analysis
if (_enableDart2JSHints) {
- new Dart2JSVerifier(errorReporter).visitCompilationUnit(unit);
+ unit.accept(new Dart2JSVerifier(errorReporter));
}
// Dart best practices
- new BestPracticesVerifier(errorReporter).visitCompilationUnit(unit);
+ unit.accept(new BestPracticesVerifier(errorReporter));
+ unit.accept(new OverrideVerifier(_manager, errorReporter));
// Find to-do comments
new ToDoFinder(errorReporter).findIn(unit);
}
@@ -3232,10 +3442,8 @@
*
* While this class does not yet have support for an "Organize Imports" action, this logic built up
* in this class could be used for such an action in the future.
- *
- * @coverage dart.engine.resolver
*/
-class ImportsVerifier extends RecursiveASTVisitor<Object> {
+class ImportsVerifier extends RecursiveAstVisitor<Object> {
/**
* This is set to `true` if the current compilation unit which is being visited is the
* defining compilation unit for the library, its value can be set with
@@ -3317,7 +3525,7 @@
*/
void generateDuplicateImportHints(ErrorReporter errorReporter) {
for (ImportDirective duplicateImport in _duplicateImports) {
- errorReporter.reportError3(HintCode.DUPLICATE_IMPORT, duplicateImport.uri, []);
+ errorReporter.reportError2(HintCode.DUPLICATE_IMPORT, duplicateImport.uri, []);
}
}
@@ -3339,7 +3547,7 @@
continue;
}
}
- errorReporter.reportError3(HintCode.UNUSED_IMPORT, unusedImport.uri, []);
+ errorReporter.reportError2(HintCode.UNUSED_IMPORT, unusedImport.uri, []);
}
}
@@ -3565,10 +3773,81 @@
}
/**
+ * Instances of the class `OverrideVerifier` visit all of the declarations in a compilation
+ * unit to verify that if they have an override annotation it is being used correctly.
+ */
+class OverrideVerifier extends RecursiveAstVisitor<Object> {
+ /**
+ * The inheritance manager used to find overridden methods.
+ */
+ InheritanceManager _manager;
+
+ /**
+ * The error reporter used to report errors.
+ */
+ ErrorReporter _errorReporter;
+
+ /**
+ * Initialize a newly created verifier to look for inappropriate uses of the override annotation.
+ *
+ * @param manager the inheritance manager used to find overridden methods
+ * @param errorReporter the error reporter used to report errors
+ */
+ OverrideVerifier(InheritanceManager manager, ErrorReporter errorReporter) {
+ this._manager = manager;
+ this._errorReporter = errorReporter;
+ }
+
+ Object visitMethodDeclaration(MethodDeclaration node) {
+ ExecutableElement element = node.element;
+ if (isOverride(element)) {
+ if (getOverriddenMember(element) == null) {
+ if (element is MethodElement) {
+ _errorReporter.reportError2(HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD, node.name, []);
+ } else if (element is PropertyAccessorElement) {
+ if (element.isGetter) {
+ _errorReporter.reportError2(HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER, node.name, []);
+ } else {
+ _errorReporter.reportError2(HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER, node.name, []);
+ }
+ }
+ }
+ }
+ return super.visitMethodDeclaration(node);
+ }
+
+ /**
+ * Return the member that overrides the given member.
+ *
+ * @param member the member that overrides the returned member
+ * @return the member that overrides the given member
+ */
+ ExecutableElement getOverriddenMember(ExecutableElement member) {
+ LibraryElement library = member.library;
+ if (library == null) {
+ return null;
+ }
+ ClassElement classElement = member.getAncestor((element) => element is ClassElement);
+ if (classElement == null) {
+ return null;
+ }
+ return _manager.lookupInheritance(classElement, member.name);
+ }
+
+ /**
+ * Return `true` if the given element has an override annotation associated with it.
+ *
+ * @param element the element being tested
+ * @return `true` if the element has an override annotation associated with it
+ */
+ bool isOverride(Element element) => element != null && element.isOverride;
+}
+
+/**
* Instances of the class `PubVerifier` traverse an AST structure looking for deviations from
* pub best practices.
*/
-class PubVerifier extends RecursiveASTVisitor<Object> {
+class PubVerifier extends RecursiveAstVisitor<Object> {
static String _PUBSPEC_YAML = "pubspec.yaml";
/**
@@ -3615,9 +3894,9 @@
if (StringUtilities.startsWith4(fullName, fullNameIndex - 4, 0x2F, 0x6C, 0x69, 0x62)) {
String relativePubspecPath = path.substring(0, pathIndex + 3) + _PUBSPEC_YAML;
Source pubspecSource = _context.sourceFactory.resolveUri(source, relativePubspecPath);
- if (pubspecSource != null && pubspecSource.exists()) {
+ if (_context.exists(pubspecSource)) {
// Files inside the lib directory hierarchy should not reference files outside
- _errorReporter.reportError3(PubSuggestionCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, uriLiteral, []);
+ _errorReporter.reportError2(PubSuggestionCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, uriLiteral, []);
}
return true;
}
@@ -3639,13 +3918,13 @@
*/
bool checkForFileImportOutsideLibReferencesFileInside(StringLiteral uriLiteral, String path) {
if (StringUtilities.startsWith4(path, 0, 0x6C, 0x69, 0x62, 0x2F)) {
- if (checkForFileImportOutsideLibReferencesFileInside2(uriLiteral, path, 0)) {
+ if (checkForFileImportOutsideLibReferencesFileInsideAtIndex(uriLiteral, path, 0)) {
return true;
}
}
int pathIndex = StringUtilities.indexOf5(path, 0, 0x2F, 0x6C, 0x69, 0x62, 0x2F);
while (pathIndex != -1) {
- if (checkForFileImportOutsideLibReferencesFileInside2(uriLiteral, path, pathIndex + 1)) {
+ if (checkForFileImportOutsideLibReferencesFileInsideAtIndex(uriLiteral, path, pathIndex + 1)) {
return true;
}
pathIndex = StringUtilities.indexOf5(path, pathIndex + 4, 0x2F, 0x6C, 0x69, 0x62, 0x2F);
@@ -3653,11 +3932,11 @@
return false;
}
- bool checkForFileImportOutsideLibReferencesFileInside2(StringLiteral uriLiteral, String path, int pathIndex) {
+ bool checkForFileImportOutsideLibReferencesFileInsideAtIndex(StringLiteral uriLiteral, String path, int pathIndex) {
Source source = getSource(uriLiteral);
String relativePubspecPath = path.substring(0, pathIndex) + _PUBSPEC_YAML;
Source pubspecSource = _context.sourceFactory.resolveUri(source, relativePubspecPath);
- if (pubspecSource == null || !pubspecSource.exists()) {
+ if (!_context.exists(pubspecSource)) {
return false;
}
String fullName = getSourceFullName(source);
@@ -3665,7 +3944,7 @@
if (StringUtilities.indexOf5(fullName, 0, 0x2F, 0x6C, 0x69, 0x62, 0x2F) < 0) {
// Files outside the lib directory hierarchy should not reference files inside
// ... use package: url instead
- _errorReporter.reportError3(PubSuggestionCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, uriLiteral, []);
+ _errorReporter.reportError2(PubSuggestionCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, uriLiteral, []);
return true;
}
}
@@ -3683,7 +3962,7 @@
bool checkForPackageImportContainsDotDot(StringLiteral uriLiteral, String path) {
if (StringUtilities.startsWith3(path, 0, 0x2E, 0x2E, 0x2F) || StringUtilities.indexOf4(path, 0, 0x2F, 0x2E, 0x2E, 0x2F) >= 0) {
// Package import should not to contain ".."
- _errorReporter.reportError3(PubSuggestionCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, uriLiteral, []);
+ _errorReporter.reportError2(PubSuggestionCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, uriLiteral, []);
return true;
}
return false;
@@ -3695,9 +3974,9 @@
* @param node the node (not `null`)
* @return the source or `null` if it could not be determined
*/
- Source getSource(ASTNode node) {
+ Source getSource(AstNode node) {
Source source = null;
- CompilationUnit unit = node.getAncestor(CompilationUnit);
+ CompilationUnit unit = node.getAncestor((node) => node is CompilationUnit);
if (unit != null) {
CompilationUnitElement element = unit.element;
if (element != null) {
@@ -3782,7 +4061,7 @@
if (matcher.find()) {
int offset = commentToken.offset + matcher.start() + matcher.group(1).length;
int length = matcher.group(2).length;
- _errorReporter.reportError5(TodoCode.TODO, offset, length, [matcher.group(2)]);
+ _errorReporter.reportError4(TodoCode.TODO, offset, length, [matcher.group(2)]);
}
}
}
@@ -3791,7 +4070,7 @@
* Instances of the class `DeclarationMatcher` determine whether the element model defined by
* a given AST structure matches an existing element model.
*/
-class DeclarationMatcher extends RecursiveASTVisitor<Object> {
+class DeclarationMatcher extends RecursiveAstVisitor<Object> {
/**
* The compilation unit containing the AST nodes being visited.
*/
@@ -3843,7 +4122,7 @@
* @return `true` if the AST structure defines the same elements as those in the given
* element model
*/
- bool matches(ASTNode node, Element element) {
+ bool matches(AstNode node, Element element) {
captureEnclosingElements(element);
gatherElements(element);
try {
@@ -3858,11 +4137,11 @@
SimpleIdentifier exceptionParameter = node.exceptionParameter;
if (exceptionParameter != null) {
List<LocalVariableElement> localVariables = _enclosingExecutable.localVariables;
- LocalVariableElement exceptionElement = find3(localVariables, exceptionParameter);
+ LocalVariableElement exceptionElement = findIdentifier(localVariables, exceptionParameter);
processElement(exceptionElement);
SimpleIdentifier stackTraceParameter = node.stackTraceParameter;
if (stackTraceParameter != null) {
- LocalVariableElement stackTraceElement = find3(localVariables, stackTraceParameter);
+ LocalVariableElement stackTraceElement = findIdentifier(localVariables, stackTraceParameter);
processElement(stackTraceElement);
}
}
@@ -3873,7 +4152,7 @@
ClassElement outerClass = _enclosingClass;
try {
SimpleIdentifier className = node.name;
- _enclosingClass = find3(_enclosingUnit.types, className);
+ _enclosingClass = findIdentifier(_enclosingUnit.types, className);
processElement(_enclosingClass);
if (!hasConstructor(node)) {
ConstructorElement constructor = _enclosingClass.unnamedConstructor;
@@ -3891,7 +4170,7 @@
ClassElement outerClass = _enclosingClass;
try {
SimpleIdentifier className = node.name;
- _enclosingClass = find3(_enclosingUnit.types, className);
+ _enclosingClass = findIdentifier(_enclosingUnit.types, className);
processElement(_enclosingClass);
return super.visitClassTypeAlias(node);
} finally {
@@ -3922,7 +4201,7 @@
Object visitDeclaredIdentifier(DeclaredIdentifier node) {
SimpleIdentifier variableName = node.identifier;
- LocalVariableElement element = find3(_enclosingExecutable.localVariables, variableName);
+ LocalVariableElement element = findIdentifier(_enclosingExecutable.localVariables, variableName);
processElement(element);
return super.visitDeclaredIdentifier(node);
}
@@ -3958,7 +4237,7 @@
String uri = getStringValue(node.uri);
if (uri != null) {
LibraryElement library = _enclosingUnit.library;
- ExportElement exportElement = find5(library.exports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri));
+ ExportElement exportElement = findExport(library.exports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri));
processElement(exportElement);
}
return super.visitExportDirective(node);
@@ -3988,12 +4267,12 @@
sc.Token property = node.propertyKeyword;
if (property == null) {
if (_enclosingExecutable != null) {
- _enclosingExecutable = find3(_enclosingExecutable.functions, functionName);
+ _enclosingExecutable = findIdentifier(_enclosingExecutable.functions, functionName);
} else {
- _enclosingExecutable = find3(_enclosingUnit.functions, functionName);
+ _enclosingExecutable = findIdentifier(_enclosingUnit.functions, functionName);
}
} else {
- PropertyAccessorElement accessor = find3(_enclosingUnit.accessors, functionName);
+ PropertyAccessorElement accessor = findIdentifier(_enclosingUnit.accessors, functionName);
if (identical((property as sc.KeywordToken).keyword, sc.Keyword.SET)) {
accessor = accessor.variable.setter;
}
@@ -4008,7 +4287,7 @@
Object visitFunctionExpression(FunctionExpression node) {
if (node.parent is! FunctionDeclaration) {
- FunctionElement element = find2(_enclosingExecutable.functions, node.beginToken.offset);
+ FunctionElement element = findAtOffset(_enclosingExecutable.functions, node.beginToken.offset);
processElement(element);
}
ExecutableElement outerExecutable = _enclosingExecutable;
@@ -4025,7 +4304,7 @@
FunctionTypeAliasElement outerAlias = _enclosingAlias;
try {
SimpleIdentifier aliasName = node.name;
- _enclosingAlias = find3(_enclosingUnit.functionTypeAliases, aliasName);
+ _enclosingAlias = findIdentifier(_enclosingUnit.functionTypeAliases, aliasName);
processElement(_enclosingAlias);
return super.visitFunctionTypeAlias(node);
} finally {
@@ -4054,7 +4333,7 @@
String uri = getStringValue(node.uri);
if (uri != null) {
LibraryElement library = _enclosingUnit.library;
- ImportElement importElement = find6(library.imports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri), node.prefix);
+ ImportElement importElement = findImport(library.imports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri), node.prefix);
processElement(importElement);
}
return super.visitImportDirective(node);
@@ -4063,7 +4342,7 @@
Object visitLabeledStatement(LabeledStatement node) {
for (Label label in node.labels) {
SimpleIdentifier labelName = label.label;
- LabelElement element = find3(_enclosingExecutable.labels, labelName);
+ LabelElement element = findIdentifier(_enclosingExecutable.labels, labelName);
processElement(element);
}
return super.visitLabeledStatement(node);
@@ -4079,10 +4358,10 @@
nameOfMethod = "unary-";
}
if (property == null) {
- _enclosingExecutable = find4(_enclosingClass.methods, nameOfMethod, methodName.offset);
+ _enclosingExecutable = findWithNameAndOffset(_enclosingClass.methods, nameOfMethod, methodName.offset);
methodName.staticElement = _enclosingExecutable;
} else {
- PropertyAccessorElement accessor = find3(_enclosingClass.accessors, methodName);
+ PropertyAccessorElement accessor = findIdentifier(_enclosingClass.accessors, methodName);
if (identical((property as sc.KeywordToken).keyword, sc.Keyword.SET)) {
accessor = accessor.variable.setter;
methodName.staticElement = accessor;
@@ -4100,7 +4379,7 @@
String uri = getStringValue(node.uri);
if (uri != null) {
Source partSource = _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri);
- CompilationUnitElement element = find(_enclosingUnit.library.parts, partSource);
+ CompilationUnitElement element = findPart(_enclosingUnit.library.parts, partSource);
processElement(element);
}
return super.visitPartDirective(node);
@@ -4126,7 +4405,7 @@
Object visitSwitchCase(SwitchCase node) {
for (Label label in node.labels) {
SimpleIdentifier labelName = label.label;
- LabelElement element = find3(_enclosingExecutable.labels, labelName);
+ LabelElement element = findIdentifier(_enclosingExecutable.labels, labelName);
processElement(element);
}
return super.visitSwitchCase(node);
@@ -4135,7 +4414,7 @@
Object visitSwitchDefault(SwitchDefault node) {
for (Label label in node.labels) {
SimpleIdentifier labelName = label.label;
- LabelElement element = find3(_enclosingExecutable.labels, labelName);
+ LabelElement element = findIdentifier(_enclosingExecutable.labels, labelName);
processElement(element);
}
return super.visitSwitchDefault(node);
@@ -4145,9 +4424,9 @@
SimpleIdentifier parameterName = node.name;
TypeParameterElement element = null;
if (_enclosingClass != null) {
- element = find3(_enclosingClass.typeParameters, parameterName);
+ element = findIdentifier(_enclosingClass.typeParameters, parameterName);
} else if (_enclosingAlias != null) {
- element = find3(_enclosingAlias.typeParameters, parameterName);
+ element = findIdentifier(_enclosingAlias.typeParameters, parameterName);
}
processElement(element);
return super.visitTypeParameter(node);
@@ -4157,13 +4436,13 @@
VariableElement element = null;
SimpleIdentifier variableName = node.name;
if (_enclosingExecutable != null) {
- element = find3(_enclosingExecutable.localVariables, variableName);
+ element = findIdentifier(_enclosingExecutable.localVariables, variableName);
}
if (element == null && _enclosingClass != null) {
- element = find3(_enclosingClass.fields, variableName);
+ element = findIdentifier(_enclosingClass.fields, variableName);
}
if (element == null && _enclosingUnit != null) {
- element = find3(_enclosingUnit.topLevelVariables, variableName);
+ element = findIdentifier(_enclosingUnit.topLevelVariables, variableName);
}
Expression initializer = node.initializer;
if (initializer != null) {
@@ -4226,23 +4505,6 @@
}
/**
- * Return the element for the part with the given source, or `null` if there is no element
- * for the given source.
- *
- * @param parts the elements for the parts
- * @param partSource the source for the part whose element is to be returned
- * @return the element for the part with the given source
- */
- CompilationUnitElement find(List<CompilationUnitElement> parts, Source partSource) {
- for (CompilationUnitElement part in parts) {
- if (part.source == partSource) {
- return part;
- }
- }
- return null;
- }
-
- /**
* Return the element in the given array of elements that was created for the declaration at the
* given offset. This method should only be used when there is no name
*
@@ -4250,35 +4512,7 @@
* @param offset the offset of the name of the element to be returned
* @return the element at the given offset
*/
- Element find2(List<Element> elements, int offset) => find4(elements, "", offset);
-
- /**
- * Return the element in the given array of elements that was created for the declaration with the
- * given name.
- *
- * @param elements the elements of the appropriate kind that exist in the current context
- * @param identifier the name node in the declaration of the element to be returned
- * @return the element created for the declaration with the given name
- */
- Element find3(List<Element> elements, SimpleIdentifier identifier) => find4(elements, identifier.name, identifier.offset);
-
- /**
- * Return the element in the given array of elements that was created for the declaration with the
- * given name at the given offset.
- *
- * @param elements the elements of the appropriate kind that exist in the current context
- * @param name the name of the element to be returned
- * @param offset the offset of the name of the element to be returned
- * @return the element with the given name and offset
- */
- Element find4(List<Element> elements, String name, int offset) {
- for (Element element in elements) {
- if (element.displayName == name && element.nameOffset == offset) {
- return element;
- }
- }
- return null;
- }
+ Element findAtOffset(List<Element> elements, int offset) => findWithNameAndOffset(elements, "", offset);
/**
* Return the export element from the given array whose library has the given source, or
@@ -4289,7 +4523,7 @@
* for
* @return the export element whose library has the given source
*/
- ExportElement find5(List<ExportElement> exports, Source source) {
+ ExportElement findExport(List<ExportElement> exports, Source source) {
for (ExportElement export in exports) {
if (export.exportedLibrary.source == source) {
return export;
@@ -4299,6 +4533,16 @@
}
/**
+ * Return the element in the given array of elements that was created for the declaration with the
+ * given name.
+ *
+ * @param elements the elements of the appropriate kind that exist in the current context
+ * @param identifier the name node in the declaration of the element to be returned
+ * @return the element created for the declaration with the given name
+ */
+ Element findIdentifier(List<Element> elements, SimpleIdentifier identifier) => findWithNameAndOffset(elements, identifier.name, identifier.offset);
+
+ /**
* Return the import element from the given array whose library has the given source and that has
* the given prefix, or `null` if there is no such import.
*
@@ -4308,7 +4552,7 @@
* @param prefix the prefix with which the library was imported
* @return the import element whose library has the given source and prefix
*/
- ImportElement find6(List<ImportElement> imports, Source source, SimpleIdentifier prefix) {
+ ImportElement findImport(List<ImportElement> imports, Source source, SimpleIdentifier prefix) {
for (ImportElement element in imports) {
if (element.importedLibrary.source == source) {
PrefixElement prefixElement = element.prefix;
@@ -4326,6 +4570,41 @@
return null;
}
+ /**
+ * Return the element for the part with the given source, or `null` if there is no element
+ * for the given source.
+ *
+ * @param parts the elements for the parts
+ * @param partSource the source for the part whose element is to be returned
+ * @return the element for the part with the given source
+ */
+ CompilationUnitElement findPart(List<CompilationUnitElement> parts, Source partSource) {
+ for (CompilationUnitElement part in parts) {
+ if (part.source == partSource) {
+ return part;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return the element in the given array of elements that was created for the declaration with the
+ * given name at the given offset.
+ *
+ * @param elements the elements of the appropriate kind that exist in the current context
+ * @param name the name of the element to be returned
+ * @param offset the offset of the name of the element to be returned
+ * @return the element with the given name and offset
+ */
+ Element findWithNameAndOffset(List<Element> elements, String name, int offset) {
+ for (Element element in elements) {
+ if (element.displayName == name && element.nameOffset == offset) {
+ return element;
+ }
+ }
+ return null;
+ }
+
void gatherElements(Element element) {
element.accept(new GeneralizingElementVisitor_DeclarationMatcher_gatherElements(this));
}
@@ -4348,7 +4627,7 @@
if (parameters == null && _enclosingAlias != null) {
parameters = _enclosingAlias.parameters;
}
- return parameters == null ? null : find3(parameters, parameterName);
+ return parameters == null ? null : findIdentifier(parameters, parameterName);
}
/**
@@ -4405,7 +4684,7 @@
* Instances of the class `DeclarationResolver` are used to resolve declarations in an AST
* structure to already built elements.
*/
-class DeclarationResolver extends RecursiveASTVisitor<Object> {
+class DeclarationResolver extends RecursiveAstVisitor<Object> {
/**
* The compilation unit containing the AST nodes being visited.
*/
@@ -4452,10 +4731,10 @@
SimpleIdentifier exceptionParameter = node.exceptionParameter;
if (exceptionParameter != null) {
List<LocalVariableElement> localVariables = _enclosingExecutable.localVariables;
- find8(localVariables, exceptionParameter);
+ findIdentifier(localVariables, exceptionParameter);
SimpleIdentifier stackTraceParameter = node.stackTraceParameter;
if (stackTraceParameter != null) {
- find8(localVariables, stackTraceParameter);
+ findIdentifier(localVariables, stackTraceParameter);
}
}
return super.visitCatchClause(node);
@@ -4465,7 +4744,7 @@
ClassElement outerClass = _enclosingClass;
try {
SimpleIdentifier className = node.name;
- _enclosingClass = find8(_enclosingUnit.types, className);
+ _enclosingClass = findIdentifier(_enclosingUnit.types, className);
return super.visitClassDeclaration(node);
} finally {
_enclosingClass = outerClass;
@@ -4476,7 +4755,7 @@
ClassElement outerClass = _enclosingClass;
try {
SimpleIdentifier className = node.name;
- _enclosingClass = find8(_enclosingUnit.types, className);
+ _enclosingClass = findIdentifier(_enclosingUnit.types, className);
return super.visitClassTypeAlias(node);
} finally {
_enclosingClass = outerClass;
@@ -4502,7 +4781,7 @@
Object visitDeclaredIdentifier(DeclaredIdentifier node) {
SimpleIdentifier variableName = node.identifier;
- find8(_enclosingExecutable.localVariables, variableName);
+ findIdentifier(_enclosingExecutable.localVariables, variableName);
return super.visitDeclaredIdentifier(node);
}
@@ -4535,7 +4814,7 @@
String uri = getStringValue(node.uri);
if (uri != null) {
LibraryElement library = _enclosingUnit.library;
- ExportElement exportElement = find10(library.exports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri));
+ ExportElement exportElement = findExport(library.exports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri));
node.element = exportElement;
}
return super.visitExportDirective(node);
@@ -4564,12 +4843,12 @@
sc.Token property = node.propertyKeyword;
if (property == null) {
if (_enclosingExecutable != null) {
- _enclosingExecutable = find8(_enclosingExecutable.functions, functionName);
+ _enclosingExecutable = findIdentifier(_enclosingExecutable.functions, functionName);
} else {
- _enclosingExecutable = find8(_enclosingUnit.functions, functionName);
+ _enclosingExecutable = findIdentifier(_enclosingUnit.functions, functionName);
}
} else {
- PropertyAccessorElement accessor = find8(_enclosingUnit.accessors, functionName);
+ PropertyAccessorElement accessor = findIdentifier(_enclosingUnit.accessors, functionName);
if (identical((property as sc.KeywordToken).keyword, sc.Keyword.SET)) {
accessor = accessor.variable.setter;
functionName.staticElement = accessor;
@@ -4585,7 +4864,7 @@
Object visitFunctionExpression(FunctionExpression node) {
if (node.parent is! FunctionDeclaration) {
- FunctionElement element = find7(_enclosingExecutable.functions, node.beginToken.offset);
+ FunctionElement element = findAtOffset(_enclosingExecutable.functions, node.beginToken.offset);
node.element = element;
}
ExecutableElement outerExecutable = _enclosingExecutable;
@@ -4601,7 +4880,7 @@
FunctionTypeAliasElement outerAlias = _enclosingAlias;
try {
SimpleIdentifier aliasName = node.name;
- _enclosingAlias = find8(_enclosingUnit.functionTypeAliases, aliasName);
+ _enclosingAlias = findIdentifier(_enclosingUnit.functionTypeAliases, aliasName);
return super.visitFunctionTypeAlias(node);
} finally {
_enclosingAlias = outerAlias;
@@ -4628,7 +4907,7 @@
String uri = getStringValue(node.uri);
if (uri != null) {
LibraryElement library = _enclosingUnit.library;
- ImportElement importElement = find11(library.imports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri), node.prefix);
+ ImportElement importElement = findImport(library.imports, _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri), node.prefix);
node.element = importElement;
}
return super.visitImportDirective(node);
@@ -4637,7 +4916,7 @@
Object visitLabeledStatement(LabeledStatement node) {
for (Label label in node.labels) {
SimpleIdentifier labelName = label.label;
- find8(_enclosingExecutable.labels, labelName);
+ findIdentifier(_enclosingExecutable.labels, labelName);
}
return super.visitLabeledStatement(node);
}
@@ -4657,10 +4936,10 @@
nameOfMethod = "unary-";
}
if (property == null) {
- _enclosingExecutable = find9(_enclosingClass.methods, nameOfMethod, methodName.offset);
+ _enclosingExecutable = findWithNameAndOffset(_enclosingClass.methods, nameOfMethod, methodName.offset);
methodName.staticElement = _enclosingExecutable;
} else {
- PropertyAccessorElement accessor = find8(_enclosingClass.accessors, methodName);
+ PropertyAccessorElement accessor = findIdentifier(_enclosingClass.accessors, methodName);
if (identical((property as sc.KeywordToken).keyword, sc.Keyword.SET)) {
accessor = accessor.variable.setter;
methodName.staticElement = accessor;
@@ -4677,7 +4956,7 @@
String uri = getStringValue(node.uri);
if (uri != null) {
Source partSource = _enclosingUnit.context.sourceFactory.resolveUri(_enclosingUnit.source, uri);
- node.element = find(_enclosingUnit.library.parts, partSource);
+ node.element = findPart(_enclosingUnit.library.parts, partSource);
}
return super.visitPartDirective(node);
}
@@ -4706,7 +4985,7 @@
Object visitSwitchCase(SwitchCase node) {
for (Label label in node.labels) {
SimpleIdentifier labelName = label.label;
- find8(_enclosingExecutable.labels, labelName);
+ findIdentifier(_enclosingExecutable.labels, labelName);
}
return super.visitSwitchCase(node);
}
@@ -4714,7 +4993,7 @@
Object visitSwitchDefault(SwitchDefault node) {
for (Label label in node.labels) {
SimpleIdentifier labelName = label.label;
- find8(_enclosingExecutable.labels, labelName);
+ findIdentifier(_enclosingExecutable.labels, labelName);
}
return super.visitSwitchDefault(node);
}
@@ -4722,9 +5001,9 @@
Object visitTypeParameter(TypeParameter node) {
SimpleIdentifier parameterName = node.name;
if (_enclosingClass != null) {
- find8(_enclosingClass.typeParameters, parameterName);
+ findIdentifier(_enclosingClass.typeParameters, parameterName);
} else if (_enclosingAlias != null) {
- find8(_enclosingAlias.typeParameters, parameterName);
+ findIdentifier(_enclosingAlias.typeParameters, parameterName);
}
return super.visitTypeParameter(node);
}
@@ -4733,13 +5012,13 @@
VariableElement element = null;
SimpleIdentifier variableName = node.name;
if (_enclosingExecutable != null) {
- element = find8(_enclosingExecutable.localVariables, variableName);
+ element = findIdentifier(_enclosingExecutable.localVariables, variableName);
}
if (element == null && _enclosingClass != null) {
- element = find8(_enclosingClass.fields, variableName);
+ element = findIdentifier(_enclosingClass.fields, variableName);
}
if (element == null && _enclosingUnit != null) {
- element = find8(_enclosingUnit.topLevelVariables, variableName);
+ element = findIdentifier(_enclosingUnit.topLevelVariables, variableName);
}
Expression initializer = node.initializer;
if (initializer != null) {
@@ -4758,23 +5037,6 @@
}
/**
- * Return the element for the part with the given source, or `null` if there is no element
- * for the given source.
- *
- * @param parts the elements for the parts
- * @param partSource the source for the part whose element is to be returned
- * @return the element for the part with the given source
- */
- CompilationUnitElement find(List<CompilationUnitElement> parts, Source partSource) {
- for (CompilationUnitElement part in parts) {
- if (part.source == partSource) {
- return part;
- }
- }
- return null;
- }
-
- /**
* Return the element in the given array of elements that was created for the declaration at the
* given offset. This method should only be used when there is no name
*
@@ -4782,39 +5044,7 @@
* @param offset the offset of the name of the element to be returned
* @return the element at the given offset
*/
- Element find7(List<Element> elements, int offset) => find9(elements, "", offset);
-
- /**
- * Return the element in the given array of elements that was created for the declaration with the
- * given name.
- *
- * @param elements the elements of the appropriate kind that exist in the current context
- * @param identifier the name node in the declaration of the element to be returned
- * @return the element created for the declaration with the given name
- */
- Element find8(List<Element> elements, SimpleIdentifier identifier) {
- Element element = find9(elements, identifier.name, identifier.offset);
- identifier.staticElement = element;
- return element;
- }
-
- /**
- * Return the element in the given array of elements that was created for the declaration with the
- * given name at the given offset.
- *
- * @param elements the elements of the appropriate kind that exist in the current context
- * @param name the name of the element to be returned
- * @param offset the offset of the name of the element to be returned
- * @return the element with the given name and offset
- */
- Element find9(List<Element> elements, String name, int offset) {
- for (Element element in elements) {
- if (element.displayName == name && element.nameOffset == offset) {
- return element;
- }
- }
- return null;
- }
+ Element findAtOffset(List<Element> elements, int offset) => findWithNameAndOffset(elements, "", offset);
/**
* Return the export element from the given array whose library has the given source, or
@@ -4825,7 +5055,7 @@
* for
* @return the export element whose library has the given source
*/
- ExportElement find10(List<ExportElement> exports, Source source) {
+ ExportElement findExport(List<ExportElement> exports, Source source) {
for (ExportElement export in exports) {
if (export.exportedLibrary.source == source) {
return export;
@@ -4835,6 +5065,20 @@
}
/**
+ * Return the element in the given array of elements that was created for the declaration with the
+ * given name.
+ *
+ * @param elements the elements of the appropriate kind that exist in the current context
+ * @param identifier the name node in the declaration of the element to be returned
+ * @return the element created for the declaration with the given name
+ */
+ Element findIdentifier(List<Element> elements, SimpleIdentifier identifier) {
+ Element element = findWithNameAndOffset(elements, identifier.name, identifier.offset);
+ identifier.staticElement = element;
+ return element;
+ }
+
+ /**
* Return the import element from the given array whose library has the given source and that has
* the given prefix, or `null` if there is no such import.
*
@@ -4844,7 +5088,7 @@
* @param prefix the prefix with which the library was imported
* @return the import element whose library has the given source and prefix
*/
- ImportElement find11(List<ImportElement> imports, Source source, SimpleIdentifier prefix) {
+ ImportElement findImport(List<ImportElement> imports, Source source, SimpleIdentifier prefix) {
for (ImportElement element in imports) {
if (element.importedLibrary.source == source) {
PrefixElement prefixElement = element.prefix;
@@ -4863,6 +5107,41 @@
}
/**
+ * Return the element for the part with the given source, or `null` if there is no element
+ * for the given source.
+ *
+ * @param parts the elements for the parts
+ * @param partSource the source for the part whose element is to be returned
+ * @return the element for the part with the given source
+ */
+ CompilationUnitElement findPart(List<CompilationUnitElement> parts, Source partSource) {
+ for (CompilationUnitElement part in parts) {
+ if (part.source == partSource) {
+ return part;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return the element in the given array of elements that was created for the declaration with the
+ * given name at the given offset.
+ *
+ * @param elements the elements of the appropriate kind that exist in the current context
+ * @param name the name of the element to be returned
+ * @param offset the offset of the name of the element to be returned
+ * @return the element with the given name and offset
+ */
+ Element findWithNameAndOffset(List<Element> elements, String name, int offset) {
+ for (Element element in elements) {
+ if (element.displayName == name && element.nameOffset == offset) {
+ return element;
+ }
+ }
+ return null;
+ }
+
+ /**
* Search the most closely enclosing list of parameters for a parameter with the given name.
*
* @param node the node defining the parameter with the given name
@@ -4880,13 +5159,13 @@
if (parameters == null && _enclosingAlias != null) {
parameters = _enclosingAlias.parameters;
}
- ParameterElement element = parameters == null ? null : find8(parameters, parameterName);
+ ParameterElement element = parameters == null ? null : findIdentifier(parameters, parameterName);
if (element == null) {
PrintStringWriter writer = new PrintStringWriter();
writer.println("Invalid state found in the Analysis Engine:");
writer.println("DeclarationResolver.getElementForParameter() is visiting a parameter that does not appear to be in a method or function.");
writer.println("Ancestors:");
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
while (parent != null) {
writer.println(parent.runtimeType.toString());
writer.println("---------");
@@ -4919,7 +5198,6 @@
* <ol>
* * Every [SimpleIdentifier] should be resolved to the element to which it refers.
* Specifically:
- *
* * An identifier within the declaration of that name should resolve to the element being
* declared.
* * An identifier denoting a prefix should resolve to the element representing the import that
@@ -4934,7 +5212,6 @@
* element representing the method or function (a [ExecutableElement]).
* * An identifier denoting a label should resolve to the element representing the label (a
* [LabelElement]).
- *
* The identifiers within directives are exceptions to this rule and are covered below.
* * Every node containing a token representing an operator that can be overridden (
* [BinaryExpression], [PrefixExpression], [PostfixExpression]) should resolve to
@@ -4963,46 +5240,47 @@
* anything. This includes such things as references to undeclared variables (which is an error) and
* names in hide and show combinators that are not defined in the imported library (which is not an
* error).
- *
- * @coverage dart.engine.resolver
*/
-class ElementResolver extends SimpleASTVisitor<Object> {
+class ElementResolver extends SimpleAstVisitor<Object> {
/**
* Checks if the given expression is the reference to the type, if it is then the
* [ClassElement] is returned, otherwise `null` is returned.
*
- * @param expr the expression to evaluate
+ * @param expression the expression to evaluate
* @return the [ClassElement] if the given expression is the reference to the type, and
* `null` otherwise
*/
- static ClassElementImpl getTypeReference(Expression expr) {
- if (expr is Identifier) {
- Identifier identifier = expr;
- if (identifier.staticElement is ClassElementImpl) {
- return identifier.staticElement as ClassElementImpl;
+ static ClassElementImpl getTypeReference(Expression expression) {
+ if (expression is Identifier) {
+ Element staticElement = expression.staticElement;
+ if (staticElement is ClassElementImpl) {
+ return staticElement;
}
}
return null;
}
/**
+ * Return `true` if the given identifier is the return type of a constructor declaration.
+ *
* @return `true` if the given identifier is the return type of a constructor declaration.
*/
- static bool isConstructorReturnType(SimpleIdentifier node) {
- ASTNode parent = node.parent;
+ static bool isConstructorReturnType(SimpleIdentifier identifier) {
+ AstNode parent = identifier.parent;
if (parent is ConstructorDeclaration) {
- ConstructorDeclaration constructor = parent;
- return identical(constructor.returnType, node);
+ return identical(parent.returnType, identifier);
}
return false;
}
/**
+ * Return `true` if the given identifier is the return type of a factory constructor.
+ *
* @return `true` if the given identifier is the return type of a factory constructor
* declaration.
*/
static bool isFactoryConstructorReturnType(SimpleIdentifier node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is ConstructorDeclaration) {
ConstructorDeclaration constructor = parent;
return identical(constructor.returnType, node) && constructor.factoryKeyword != null;
@@ -5011,13 +5289,13 @@
}
/**
- * Checks if the given 'super' expression is used in the valid context.
+ * Return `true` if the given 'super' expression is used in a valid context.
*
* @param node the 'super' expression to analyze
- * @return `true` if the given 'super' expression is in the valid context
+ * @return `true` if the 'super' expression is in a valid context
*/
static bool isSuperInValidContext(SuperExpression node) {
- for (ASTNode n = node; n != null; n = n.parent) {
+ for (AstNode n = node; n != null; n = n.parent) {
if (n is CompilationUnit) {
return false;
}
@@ -5113,22 +5391,10 @@
Type2 propagatedType = getPropagatedType(leftHandSide);
MethodElement propagatedMethod = lookUpMethod(leftHandSide, propagatedType, methodName);
node.propagatedElement = propagatedMethod;
- bool shouldReportMissingMember_static = shouldReportMissingMember(staticType, staticMethod);
- bool shouldReportMissingMember_propagated = !shouldReportMissingMember_static && _enableHints ? shouldReportMissingMember(propagatedType, propagatedMethod) : false;
- //
- // If we are about to generate the hint (propagated version of this warning), then check
- // that the member is not in a subtype of the propagated type.
- //
- if (shouldReportMissingMember_propagated) {
- if (memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
- shouldReportMissingMember_propagated = false;
- }
- }
- if (shouldReportMissingMember_static || shouldReportMissingMember_propagated) {
- ErrorCode errorCode = (shouldReportMissingMember_static ? StaticTypeWarningCode.UNDEFINED_METHOD : HintCode.UNDEFINED_METHOD) as ErrorCode;
- _resolver.reportErrorProxyConditionalAnalysisError3(shouldReportMissingMember_static ? staticType.element : propagatedType.element, errorCode, operator, [
- methodName,
- shouldReportMissingMember_static ? staticType.displayName : propagatedType.displayName]);
+ if (shouldReportMissingMember(staticType, staticMethod)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(staticType.element, StaticTypeWarningCode.UNDEFINED_METHOD, operator, [methodName, staticType.displayName]);
+ } else if (_enableHints && shouldReportMissingMember(propagatedType, propagatedMethod) && !memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(propagatedType.element, HintCode.UNDEFINED_METHOD, operator, [methodName, propagatedType.displayName]);
}
}
}
@@ -5147,22 +5413,10 @@
Type2 propagatedType = getPropagatedType(leftOperand);
MethodElement propagatedMethod = lookUpMethod(leftOperand, propagatedType, methodName);
node.propagatedElement = propagatedMethod;
- bool shouldReportMissingMember_static = shouldReportMissingMember(staticType, staticMethod);
- bool shouldReportMissingMember_propagated = !shouldReportMissingMember_static && _enableHints ? shouldReportMissingMember(propagatedType, propagatedMethod) : false;
- //
- // If we are about to generate the hint (propagated version of this warning), then check
- // that the member is not in a subtype of the propagated type.
- //
- if (shouldReportMissingMember_propagated) {
- if (memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
- shouldReportMissingMember_propagated = false;
- }
- }
- if (shouldReportMissingMember_static || shouldReportMissingMember_propagated) {
- ErrorCode errorCode = (shouldReportMissingMember_static ? StaticTypeWarningCode.UNDEFINED_OPERATOR : HintCode.UNDEFINED_OPERATOR) as ErrorCode;
- _resolver.reportErrorProxyConditionalAnalysisError3(shouldReportMissingMember_static ? staticType.element : propagatedType.element, errorCode, operator, [
- methodName,
- shouldReportMissingMember_static ? staticType.displayName : propagatedType.displayName]);
+ if (shouldReportMissingMember(staticType, staticMethod)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(staticType.element, StaticTypeWarningCode.UNDEFINED_OPERATOR, operator, [methodName, staticType.displayName]);
+ } else if (_enableHints && shouldReportMissingMember(propagatedType, propagatedMethod) && !memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(propagatedType.element, HintCode.UNDEFINED_OPERATOR, operator, [methodName, propagatedType.displayName]);
}
}
}
@@ -5170,11 +5424,7 @@
}
Object visitBreakStatement(BreakStatement node) {
- SimpleIdentifier labelNode = node.label;
- LabelElementImpl labelElement = lookupLabel(node, labelNode);
- if (labelElement != null && labelElement.isOnSwitchMember) {
- _resolver.reportError9(ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER, labelNode, []);
- }
+ lookupLabel(node, node.label);
return null;
}
@@ -5275,17 +5525,18 @@
ConstructorElement element = node.element;
if (element is ConstructorElementImpl) {
ConstructorElementImpl constructorElement = element;
- // set redirected factory constructor
ConstructorName redirectedNode = node.redirectedConstructor;
if (redirectedNode != null) {
+ // set redirected factory constructor
ConstructorElement redirectedElement = redirectedNode.staticElement;
constructorElement.redirectedConstructor = redirectedElement;
- }
- // set redirected generate constructor
- for (ConstructorInitializer initializer in node.initializers) {
- if (initializer is RedirectingConstructorInvocation) {
- ConstructorElement redirectedElement = initializer.staticElement;
- constructorElement.redirectedConstructor = redirectedElement;
+ } else {
+ // set redirected generative constructor
+ for (ConstructorInitializer initializer in node.initializers) {
+ if (initializer is RedirectingConstructorInvocation) {
+ ConstructorElement redirectedElement = initializer.staticElement;
+ constructorElement.redirectedConstructor = redirectedElement;
+ }
}
}
setMetadata(constructorElement, node);
@@ -5298,11 +5549,6 @@
ClassElement enclosingClass = _resolver.enclosingClass;
FieldElement fieldElement = enclosingClass.getField(fieldName.name);
fieldName.staticElement = fieldElement;
- if (fieldElement == null || fieldElement.isSynthetic) {
- _resolver.reportError9(CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
- } else if (fieldElement.isStatic) {
- _resolver.reportError9(CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD, node, [fieldName]);
- }
return null;
}
@@ -5312,13 +5558,16 @@
return null;
} else if (type is! InterfaceType) {
// TODO(brianwilkerson) Report these errors.
- ASTNode parent = node.parent;
- if (parent is InstanceCreationExpression) {
- if (parent.isConst) {
- } else {
- }
- } else {
- }
+ // ASTNode parent = node.getParent();
+ // if (parent instanceof InstanceCreationExpression) {
+ // if (((InstanceCreationExpression) parent).isConst()) {
+ // // CompileTimeErrorCode.CONST_WITH_NON_TYPE
+ // } else {
+ // // StaticWarningCode.NEW_WITH_NON_TYPE
+ // }
+ // } else {
+ // // This is part of a redirecting factory constructor; not sure which error code to use
+ // }
return null;
}
// look up ConstructorElement
@@ -5336,11 +5585,7 @@
}
Object visitContinueStatement(ContinueStatement node) {
- SimpleIdentifier labelNode = node.label;
- LabelElementImpl labelElement = lookupLabel(node, labelNode);
- if (labelElement != null && labelElement.isOnSwitchStatement) {
- _resolver.reportError9(ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH, labelNode, []);
- }
+ lookupLabel(node, node.label);
return null;
}
@@ -5362,39 +5607,7 @@
}
Object visitFieldFormalParameter(FieldFormalParameter node) {
- String fieldName = node.identifier.name;
- ClassElement classElement = _resolver.enclosingClass;
- if (classElement != null) {
- FieldElement fieldElement = classElement.getField(fieldName);
- if (fieldElement == null || fieldElement.isSynthetic) {
- _resolver.reportError9(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
- } else {
- ParameterElement parameterElement = node.element;
- if (parameterElement is FieldFormalParameterElementImpl) {
- FieldFormalParameterElementImpl fieldFormal = parameterElement;
- Type2 declaredType = fieldFormal.type;
- Type2 fieldType = fieldElement.type;
- if (fieldElement.isSynthetic) {
- _resolver.reportError9(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
- } else if (fieldElement.isStatic) {
- _resolver.reportError9(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, node, [fieldName]);
- } else if (declaredType != null && fieldType != null && !declaredType.isAssignableTo(fieldType)) {
- _resolver.reportError9(StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, node, [declaredType.displayName, fieldType.displayName]);
- }
- } else {
- if (fieldElement.isSynthetic) {
- _resolver.reportError9(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
- } else if (fieldElement.isStatic) {
- _resolver.reportError9(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, node, [fieldName]);
- }
- }
- }
- }
- // else {
- // // TODO(jwren) Report error, constructor initializer variable is a top level element
- // // (Either here or in ErrorVerifier#checkForAllFinalInitializedErrorCodes)
- // }
- setMetadata2(node.element, node);
+ setMetadataForParameter(node.element, node);
return super.visitFieldFormalParameter(node);
}
@@ -5410,7 +5623,7 @@
FunctionExpression functionExpression = expression;
ExecutableElement functionElement = functionExpression.element;
ArgumentList argumentList = node.argumentList;
- List<ParameterElement> parameters = resolveArgumentsToParameters(false, argumentList, functionElement);
+ List<ParameterElement> parameters = resolveArgumentsToFunction(false, argumentList, functionElement);
if (parameters != null) {
argumentList.correspondingStaticParameters = parameters;
}
@@ -5424,7 +5637,7 @@
}
Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
- setMetadata2(node.element, node);
+ setMetadataForParameter(node.element, node);
return null;
}
@@ -5502,7 +5715,7 @@
ConstructorElement invokedConstructor = node.constructorName.staticElement;
node.staticElement = invokedConstructor;
ArgumentList argumentList = node.argumentList;
- List<ParameterElement> parameters = resolveArgumentsToParameters(node.isConst, argumentList, invokedConstructor);
+ List<ParameterElement> parameters = resolveArgumentsToFunction(node.isConst, argumentList, invokedConstructor);
if (parameters != null) {
argumentList.correspondingStaticParameters = parameters;
}
@@ -5539,7 +5752,7 @@
Element staticElement;
Element propagatedElement;
if (target == null) {
- staticElement = resolveInvokedElement2(methodName);
+ staticElement = resolveInvokedElement(methodName);
propagatedElement = null;
} else {
Type2 staticType = getStaticType(target);
@@ -5552,8 +5765,8 @@
if (typeReference != null) {
staticElement = propagatedElement = resolveElement(typeReference, methodName);
} else {
- staticElement = resolveInvokedElement(target, staticType, methodName);
- propagatedElement = resolveInvokedElement(target, getPropagatedType(target), methodName);
+ staticElement = resolveInvokedElementWithTarget(target, staticType, methodName);
+ propagatedElement = resolveInvokedElementWithTarget(target, getPropagatedType(target), methodName);
}
}
staticElement = convertSetterToGetter(staticElement);
@@ -5611,9 +5824,9 @@
return null;
}
if (identical(errorCode, StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION)) {
- _resolver.reportError9(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION, methodName, [methodName.name]);
+ _resolver.reportErrorForNode(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION, methodName, [methodName.name]);
} else if (identical(errorCode, CompileTimeErrorCode.UNDEFINED_FUNCTION)) {
- _resolver.reportError9(CompileTimeErrorCode.UNDEFINED_FUNCTION, methodName, [methodName.name]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.UNDEFINED_FUNCTION, methodName, [methodName.name]);
} else if (identical(errorCode, StaticTypeWarningCode.UNDEFINED_METHOD)) {
String targetTypeName;
if (target == null) {
@@ -5649,7 +5862,7 @@
// The error code will never be generated via type propagation
Type2 targetType = getStaticType(target);
String targetTypeName = targetType == null ? null : targetType.name;
- _resolver.reportError9(StaticTypeWarningCode.UNDEFINED_SUPER_METHOD, methodName, [methodName.name, targetTypeName]);
+ _resolver.reportErrorForNode(StaticTypeWarningCode.UNDEFINED_SUPER_METHOD, methodName, [methodName.name, targetTypeName]);
}
return null;
}
@@ -5673,22 +5886,10 @@
Type2 propagatedType = getPropagatedType(operand);
MethodElement propagatedMethod = lookUpMethod(operand, propagatedType, methodName);
node.propagatedElement = propagatedMethod;
- bool shouldReportMissingMember_static = shouldReportMissingMember(staticType, staticMethod);
- bool shouldReportMissingMember_propagated = !shouldReportMissingMember_static && _enableHints ? shouldReportMissingMember(propagatedType, propagatedMethod) : false;
- //
- // If we are about to generate the hint (propagated version of this warning), then check
- // that the member is not in a subtype of the propagated type.
- //
- if (shouldReportMissingMember_propagated) {
- if (memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
- shouldReportMissingMember_propagated = false;
- }
- }
- if (shouldReportMissingMember_static || shouldReportMissingMember_propagated) {
- ErrorCode errorCode = (shouldReportMissingMember_static ? StaticTypeWarningCode.UNDEFINED_OPERATOR : HintCode.UNDEFINED_OPERATOR) as ErrorCode;
- _resolver.reportErrorProxyConditionalAnalysisError3(shouldReportMissingMember_static ? staticType.element : propagatedType.element, errorCode, node.operator, [
- methodName,
- shouldReportMissingMember_static ? staticType.displayName : propagatedType.displayName]);
+ if (shouldReportMissingMember(staticType, staticMethod)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(staticType.element, StaticTypeWarningCode.UNDEFINED_OPERATOR, node.operator, [methodName, staticType.displayName]);
+ } else if (_enableHints && shouldReportMissingMember(propagatedType, propagatedMethod) && !memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(propagatedType.element, HintCode.UNDEFINED_OPERATOR, node.operator, [methodName, propagatedType.displayName]);
}
return null;
}
@@ -5707,13 +5908,13 @@
}
if (element == null) {
if (identifier.inSetterContext()) {
- _resolver.reportError9(StaticWarningCode.UNDEFINED_SETTER, identifier, [identifier.name, prefixElement.name]);
+ _resolver.reportErrorForNode(StaticWarningCode.UNDEFINED_SETTER, identifier, [identifier.name, prefixElement.name]);
} else if (node.parent is Annotation) {
Annotation annotation = node.parent as Annotation;
- _resolver.reportError9(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
return null;
} else {
- _resolver.reportError9(StaticWarningCode.UNDEFINED_GETTER, identifier, [identifier.name, prefixElement.name]);
+ _resolver.reportErrorForNode(StaticWarningCode.UNDEFINED_GETTER, identifier, [identifier.name, prefixElement.name]);
}
return null;
}
@@ -5762,22 +5963,10 @@
Type2 propagatedType = getPropagatedType(operand);
MethodElement propagatedMethod = lookUpMethod(operand, propagatedType, methodName);
node.propagatedElement = propagatedMethod;
- bool shouldReportMissingMember_static = shouldReportMissingMember(staticType, staticMethod);
- bool shouldReportMissingMember_propagated = !shouldReportMissingMember_static && _enableHints ? shouldReportMissingMember(propagatedType, propagatedMethod) : false;
- //
- // If we are about to generate the hint (propagated version of this warning), then check
- // that the member is not in a subtype of the propagated type.
- //
- if (shouldReportMissingMember_propagated) {
- if (memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
- shouldReportMissingMember_propagated = false;
- }
- }
- if (shouldReportMissingMember_static || shouldReportMissingMember_propagated) {
- ErrorCode errorCode = (shouldReportMissingMember_static ? StaticTypeWarningCode.UNDEFINED_OPERATOR : HintCode.UNDEFINED_OPERATOR) as ErrorCode;
- _resolver.reportErrorProxyConditionalAnalysisError3(shouldReportMissingMember_static ? staticType.element : propagatedType.element, errorCode, operator, [
- methodName,
- shouldReportMissingMember_static ? staticType.displayName : propagatedType.displayName]);
+ if (shouldReportMissingMember(staticType, staticMethod)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(staticType.element, StaticTypeWarningCode.UNDEFINED_OPERATOR, operator, [methodName, staticType.displayName]);
+ } else if (_enableHints && shouldReportMissingMember(propagatedType, propagatedMethod) && !memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
+ _resolver.reportErrorProxyConditionalAnalysisError3(propagatedType.element, HintCode.UNDEFINED_OPERATOR, operator, [methodName, propagatedType.displayName]);
}
}
return null;
@@ -5815,7 +6004,7 @@
}
node.staticElement = element;
ArgumentList argumentList = node.argumentList;
- List<ParameterElement> parameters = resolveArgumentsToParameters(false, argumentList, element);
+ List<ParameterElement> parameters = resolveArgumentsToFunction(false, argumentList, element);
if (parameters != null) {
argumentList.correspondingStaticParameters = parameters;
}
@@ -5823,7 +6012,7 @@
}
Object visitSimpleFormalParameter(SimpleFormalParameter node) {
- setMetadata2(node.element, node);
+ setMetadataForParameter(node.element, node);
return null;
}
@@ -5855,17 +6044,17 @@
Element element = resolveSimpleIdentifier(node);
ClassElement enclosingClass = _resolver.enclosingClass;
if (isFactoryConstructorReturnType(node) && element != enclosingClass) {
- _resolver.reportError9(CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS, node, []);
} else if (isConstructorReturnType(node) && element != enclosingClass) {
- _resolver.reportError9(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node, []);
element = null;
} else if (element == null || (element is PrefixElement && !isValidAsPrefix(node))) {
// TODO(brianwilkerson) Recover from this error.
if (isConstructorReturnType(node)) {
- _resolver.reportError9(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node, []);
} else if (node.parent is Annotation) {
Annotation annotation = node.parent as Annotation;
- _resolver.reportError9(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
} else {
_resolver.reportErrorProxyConditionalAnalysisError(_resolver.enclosingClass, StaticWarningCode.UNDEFINED_IDENTIFIER, node, [node.name]);
}
@@ -5902,14 +6091,14 @@
ConstructorElement element = superType.lookUpConstructor(superName, _definingLibrary);
if (element == null) {
if (name != null) {
- _resolver.reportError9(CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, node, [superType.displayName, name]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, node, [superType.displayName, name]);
} else {
- _resolver.reportError9(CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, node, [superType.displayName]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, node, [superType.displayName]);
}
return null;
} else {
if (element.isFactory) {
- _resolver.reportError9(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, node, [element]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, node, [element]);
}
}
if (name != null) {
@@ -5917,7 +6106,7 @@
}
node.staticElement = element;
ArgumentList argumentList = node.argumentList;
- List<ParameterElement> parameters = resolveArgumentsToParameters(isInConstConstructor, argumentList, element);
+ List<ParameterElement> parameters = resolveArgumentsToFunction(isInConstConstructor, argumentList, element);
if (parameters != null) {
argumentList.correspondingStaticParameters = parameters;
}
@@ -5926,7 +6115,7 @@
Object visitSuperExpression(SuperExpression node) {
if (!isSuperInValidContext(node)) {
- _resolver.reportError9(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, node, []);
}
return super.visitSuperExpression(node);
}
@@ -6054,16 +6243,7 @@
*/
bool checkForUndefinedIndexOperator(IndexExpression node, Expression target, String methodName, MethodElement staticMethod, MethodElement propagatedMethod, Type2 staticType, Type2 propagatedType) {
bool shouldReportMissingMember_static = shouldReportMissingMember(staticType, staticMethod);
- bool shouldReportMissingMember_propagated = !shouldReportMissingMember_static && _enableHints ? shouldReportMissingMember(propagatedType, propagatedMethod) : false;
- //
- // If we are about to generate the hint (propagated version of this warning), then check
- // that the member is not in a subtype of the propagated type.
- //
- if (shouldReportMissingMember_propagated) {
- if (memberFoundInSubclass(propagatedType.element, methodName, true, false)) {
- shouldReportMissingMember_propagated = false;
- }
- }
+ bool shouldReportMissingMember_propagated = !shouldReportMissingMember_static && _enableHints && shouldReportMissingMember(propagatedType, propagatedMethod) && !memberFoundInSubclass(propagatedType.element, methodName, true, false);
if (shouldReportMissingMember_static || shouldReportMissingMember_propagated) {
sc.Token leftBracket = node.leftBracket;
sc.Token rightBracket = node.rightBracket;
@@ -6104,30 +6284,30 @@
if (getterReturnType is InterfaceType) {
MethodElement callMethod = getterReturnType.lookUpMethod(CALL_METHOD_NAME, _definingLibrary);
if (callMethod != null) {
- return resolveArgumentsToParameters(false, argumentList, callMethod);
+ return resolveArgumentsToFunction(false, argumentList, callMethod);
}
} else if (getterReturnType is FunctionType) {
Element functionElement = getterReturnType.element;
if (functionElement is ExecutableElement) {
- return resolveArgumentsToParameters(false, argumentList, functionElement);
+ return resolveArgumentsToFunction(false, argumentList, functionElement);
}
}
}
} else if (element is ExecutableElement) {
- return resolveArgumentsToParameters(false, argumentList, element);
+ return resolveArgumentsToFunction(false, argumentList, element);
} else if (element is VariableElement) {
VariableElement variable = element;
Type2 type = _promoteManager.getStaticType(variable);
if (type is FunctionType) {
FunctionType functionType = type;
List<ParameterElement> parameters = functionType.parameters;
- return resolveArgumentsToParameters2(false, argumentList, parameters);
+ return resolveArgumentsToParameters(false, argumentList, parameters);
} else if (type is InterfaceType) {
// "call" invocation
MethodElement callMethod = type.lookUpMethod(CALL_METHOD_NAME, _definingLibrary);
if (callMethod != null) {
List<ParameterElement> parameters = callMethod.parameters;
- return resolveArgumentsToParameters2(false, argumentList, parameters);
+ return resolveArgumentsToParameters(false, argumentList, parameters);
}
}
}
@@ -6287,16 +6467,14 @@
/**
* Return `true` if the given node can validly be resolved to a prefix:
- *
* * it is the prefix in an import directive, or
* * it is the prefix in a prefixed identifier.
*
- *
* @param node the node being tested
* @return `true` if the given node is the prefix in an import directive
*/
bool isValidAsPrefix(SimpleIdentifier node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is ImportDirective) {
return identical(parent.prefix, node);
} else if (parent is PrefixedIdentifier) {
@@ -6465,7 +6643,7 @@
* @param labelNode the node representing the label being looked up
* @return the element corresponding to the given label node in the current scope
*/
- LabelElementImpl lookupLabel(ASTNode parentNode, SimpleIdentifier labelNode) {
+ LabelElementImpl lookupLabel(AstNode parentNode, SimpleIdentifier labelNode) {
LabelScope labelScope = _resolver.labelScope;
LabelElementImpl labelElement = null;
if (labelNode == null) {
@@ -6482,20 +6660,20 @@
}
} else {
if (labelScope == null) {
- _resolver.reportError9(CompileTimeErrorCode.LABEL_UNDEFINED, labelNode, [labelNode.name]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.LABEL_UNDEFINED, labelNode, [labelNode.name]);
} else {
labelElement = labelScope.lookup(labelNode) as LabelElementImpl;
if (labelElement == null) {
- _resolver.reportError9(CompileTimeErrorCode.LABEL_UNDEFINED, labelNode, [labelNode.name]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.LABEL_UNDEFINED, labelNode, [labelNode.name]);
} else {
labelNode.staticElement = labelElement;
}
}
}
if (labelElement != null) {
- ExecutableElement labelContainer = labelElement.getAncestor(ExecutableElement);
+ ExecutableElement labelContainer = labelElement.getAncestor((element) => element is ExecutableElement);
if (labelContainer != _resolver.enclosingFunction) {
- _resolver.reportError9(CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE, labelNode, [labelNode.name]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE, labelNode, [labelNode.name]);
labelElement = null;
}
}
@@ -6708,12 +6886,13 @@
return sc.TokenType.STAR;
} else if (operator == sc.TokenType.TILDE_SLASH_EQ) {
return sc.TokenType.TILDE_SLASH;
+ } else {
+ // Internal error: Unmapped assignment operator.
+ AnalysisEngine.instance.logger.logError("Failed to map ${operator.lexeme} to it's corresponding operator");
+ return operator;
}
break;
}
- // Internal error: Unmapped assignment operator.
- AnalysisEngine.instance.logger.logError("Failed to map ${operator.lexeme} to it's corresponding operator");
- return operator;
}
void resolveAnnotationConstructorInvocationArguments(Annotation annotation, ConstructorElement constructor) {
@@ -6723,7 +6902,7 @@
return;
}
// resolve arguments to parameters
- List<ParameterElement> parameters = resolveArgumentsToParameters(true, argumentList, constructor);
+ List<ParameterElement> parameters = resolveArgumentsToFunction(true, argumentList, constructor);
if (parameters != null) {
argumentList.correspondingStaticParameters = parameters;
}
@@ -6820,7 +6999,7 @@
}
// we need constructor
if (constructor == null) {
- _resolver.reportError9(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
return;
}
// record element
@@ -6832,13 +7011,13 @@
void resolveAnnotationElementGetter(Annotation annotation, PropertyAccessorElement accessorElement) {
// accessor should be synthetic
if (!accessorElement.isSynthetic) {
- _resolver.reportError9(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
return;
}
// variable should be constant
VariableElement variableElement = accessorElement.variable;
if (!variableElement.isConst) {
- _resolver.reportError9(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
}
// OK
return;
@@ -6855,12 +7034,12 @@
* @param executableElement the element that will be invoked with the arguments
* @return the parameters that correspond to the arguments
*/
- List<ParameterElement> resolveArgumentsToParameters(bool reportError, ArgumentList argumentList, ExecutableElement executableElement) {
+ List<ParameterElement> resolveArgumentsToFunction(bool reportError, ArgumentList argumentList, ExecutableElement executableElement) {
if (executableElement == null) {
return null;
}
List<ParameterElement> parameters = executableElement.parameters;
- return resolveArgumentsToParameters2(reportError, argumentList, parameters);
+ return resolveArgumentsToParameters(reportError, argumentList, parameters);
}
/**
@@ -6874,7 +7053,7 @@
* @param parameters the of the function that will be invoked with the arguments
* @return the parameters that correspond to the arguments
*/
- List<ParameterElement> resolveArgumentsToParameters2(bool reportError, ArgumentList argumentList, List<ParameterElement> parameters) {
+ List<ParameterElement> resolveArgumentsToParameters(bool reportError, ArgumentList argumentList, List<ParameterElement> parameters) {
List<ParameterElement> requiredParameters = new List<ParameterElement>();
List<ParameterElement> positionalParameters = new List<ParameterElement>();
Map<String, ParameterElement> namedParameters = new Map<String, ParameterElement>();
@@ -6905,13 +7084,13 @@
ParameterElement element = namedParameters[name];
if (element == null) {
ErrorCode errorCode = (reportError ? CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER : StaticWarningCode.UNDEFINED_NAMED_PARAMETER) as ErrorCode;
- _resolver.reportError9(errorCode, nameNode, [name]);
+ _resolver.reportErrorForNode(errorCode, nameNode, [name]);
} else {
resolvedParameters[i] = element;
nameNode.staticElement = element;
}
if (!usedNames.add(name)) {
- _resolver.reportError9(CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT, nameNode, [name]);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT, nameNode, [name]);
}
} else {
positionalArgumentCount++;
@@ -6922,10 +7101,10 @@
}
if (positionalArgumentCount < requiredParameters.length) {
ErrorCode errorCode = (reportError ? CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS : StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS) as ErrorCode;
- _resolver.reportError9(errorCode, argumentList, [requiredParameters.length, positionalArgumentCount]);
+ _resolver.reportErrorForNode(errorCode, argumentList, [requiredParameters.length, positionalArgumentCount]);
} else if (positionalArgumentCount > unnamedParameterCount) {
ErrorCode errorCode = (reportError ? CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS : StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS) as ErrorCode;
- _resolver.reportError9(errorCode, argumentList, [unnamedParameterCount, positionalArgumentCount]);
+ _resolver.reportErrorForNode(errorCode, argumentList, [unnamedParameterCount, positionalArgumentCount]);
}
return resolvedParameters;
}
@@ -6985,6 +7164,41 @@
}
/**
+ * Given an invocation of the form 'm(a1, ..., an)', resolve 'm' to the element being invoked. If
+ * the returned element is a method, then the method will be invoked. If the returned element is a
+ * getter, the getter will be invoked without arguments and the result of that invocation will
+ * then be invoked with the arguments.
+ *
+ * @param methodName the name of the method being invoked ('m')
+ * @return the element being invoked
+ */
+ Element resolveInvokedElement(SimpleIdentifier methodName) {
+ //
+ // Look first in the lexical scope.
+ //
+ Element element = _resolver.nameScope.lookup(methodName, _definingLibrary);
+ if (element == null) {
+ //
+ // If it isn't defined in the lexical scope, and the invocation is within a class, then look
+ // in the inheritance scope.
+ //
+ ClassElement enclosingClass = _resolver.enclosingClass;
+ if (enclosingClass != null) {
+ InterfaceType enclosingType = enclosingClass.type;
+ element = lookUpMethod(null, enclosingType, methodName.name);
+ if (element == null) {
+ //
+ // If there's no method, then it's possible that 'm' is a getter that returns a function.
+ //
+ element = lookUpGetter(null, enclosingType, methodName.name);
+ }
+ }
+ }
+ // TODO(brianwilkerson) Report this error.
+ return element;
+ }
+
+ /**
* Given an invocation of the form 'e.m(a1, ..., an)', resolve 'e.m' to the element being invoked.
* If the returned element is a method, then the method will be invoked. If the returned element
* is a getter, the getter will be invoked without arguments and the result of that invocation
@@ -6995,7 +7209,7 @@
* @param methodName the name of the method being invoked ('m')
* @return the element being invoked
*/
- Element resolveInvokedElement(Expression target, Type2 targetType, SimpleIdentifier methodName) {
+ Element resolveInvokedElementWithTarget(Expression target, Type2 targetType, SimpleIdentifier methodName) {
if (targetType is InterfaceType) {
InterfaceType classType = targetType;
Element element = lookUpMethod(target, classType, methodName.name);
@@ -7028,41 +7242,6 @@
}
/**
- * Given an invocation of the form 'm(a1, ..., an)', resolve 'm' to the element being invoked. If
- * the returned element is a method, then the method will be invoked. If the returned element is a
- * getter, the getter will be invoked without arguments and the result of that invocation will
- * then be invoked with the arguments.
- *
- * @param methodName the name of the method being invoked ('m')
- * @return the element being invoked
- */
- Element resolveInvokedElement2(SimpleIdentifier methodName) {
- //
- // Look first in the lexical scope.
- //
- Element element = _resolver.nameScope.lookup(methodName, _definingLibrary);
- if (element == null) {
- //
- // If it isn't defined in the lexical scope, and the invocation is within a class, then look
- // in the inheritance scope.
- //
- ClassElement enclosingClass = _resolver.enclosingClass;
- if (enclosingClass != null) {
- InterfaceType enclosingType = enclosingClass.type;
- element = lookUpMethod(null, enclosingType, methodName.name);
- if (element == null) {
- //
- // If there's no method, then it's possible that 'm' is a getter that returns a function.
- //
- element = lookUpGetter(null, enclosingType, methodName.name);
- }
- }
- }
- // TODO(brianwilkerson) Report this error.
- return element;
- }
-
- /**
* Given that we are accessing a property of the given type with the given name, return the
* element that represents the property.
*
@@ -7125,12 +7304,12 @@
if (staticType.isVoid) {
if (propertyName.inSetterContext()) {
ErrorCode errorCode = (shouldReportMissingMember_static ? StaticTypeWarningCode.UNDEFINED_SETTER : HintCode.UNDEFINED_SETTER) as ErrorCode;
- _resolver.reportError9(errorCode, propertyName, [propertyName.name, staticType.displayName]);
+ _resolver.reportErrorForNode(errorCode, propertyName, [propertyName.name, staticType.displayName]);
} else if (propertyName.inGetterContext()) {
ErrorCode errorCode = (shouldReportMissingMember_static ? StaticTypeWarningCode.UNDEFINED_GETTER : HintCode.UNDEFINED_GETTER) as ErrorCode;
- _resolver.reportError9(errorCode, propertyName, [propertyName.name, staticType.displayName]);
+ _resolver.reportErrorForNode(errorCode, propertyName, [propertyName.name, staticType.displayName]);
} else {
- _resolver.reportError9(StaticWarningCode.UNDEFINED_IDENTIFIER, propertyName, [propertyName.name]);
+ _resolver.reportErrorForNode(StaticWarningCode.UNDEFINED_IDENTIFIER, propertyName, [propertyName.name]);
}
}
Element staticOrPropagatedEnclosingElt = shouldReportMissingMember_static ? staticType.element : propagatedType.element;
@@ -7270,7 +7449,7 @@
* @param element the element to which the node has been resolved
* @param node the node that can have annotations associated with it
*/
- void setMetadata2(Element element, NormalFormalParameter node) {
+ void setMetadataForParameter(Element element, NormalFormalParameter node) {
if (element is! ElementImpl) {
return;
}
@@ -7316,7 +7495,7 @@
*/
ElementResolver_SyntheticIdentifier(this.name);
- accept(ASTVisitor visitor) => null;
+ accept(AstVisitor visitor) => null;
sc.Token get beginToken => null;
@@ -7330,7 +7509,7 @@
Element get staticElement => null;
- void visitChildren(ASTVisitor visitor) {
+ void visitChildren(AstVisitor visitor) {
}
}
@@ -7383,8 +7562,8 @@
* @param node the root of the AST structure to be resolved
* @throws AnalysisException if the node could not be resolved
*/
- void resolve(ASTNode node) {
- ASTNode rootNode = findResolutionRoot(node);
+ void resolve(AstNode node) {
+ AstNode rootNode = findResolutionRoot(node);
Scope scope = ScopeBuilder.scopeFor(rootNode, _errorListener);
if (elementModelChanged(rootNode.parent)) {
throw new AnalysisException.con1("Cannot resolve node: element model changed");
@@ -7402,7 +7581,7 @@
* @param node the node being tested
* @return `true` if the given node can be resolved independently of any other nodes
*/
- bool canBeResolved(ASTNode node) => node is ClassDeclaration || node is ClassTypeAlias || node is CompilationUnit || node is ConstructorDeclaration || node is FunctionDeclaration || node is FunctionTypeAlias || node is MethodDeclaration;
+ bool canBeResolved(AstNode node) => node is ClassDeclaration || node is ClassTypeAlias || node is CompilationUnit || node is ConstructorDeclaration || node is FunctionDeclaration || node is FunctionTypeAlias || node is MethodDeclaration;
/**
* Return `true` if the portion of the element model defined by the given node has changed.
@@ -7411,7 +7590,7 @@
* @return `true` if the element model defined by the given node has changed
* @throws AnalysisException if the correctness of the element model cannot be determined
*/
- bool elementModelChanged(ASTNode node) {
+ bool elementModelChanged(AstNode node) {
Element element = getElement(node);
if (element == null) {
throw new AnalysisException.con1("Cannot resolve node: a ${node.runtimeType.toString()} does not define an element");
@@ -7428,9 +7607,9 @@
* @return the smallest AST node that can be resolved independently of any other nodes
* @throws AnalysisException if there is no such node
*/
- ASTNode findResolutionRoot(ASTNode node) {
- ASTNode result = node;
- ASTNode parent = result.parent;
+ AstNode findResolutionRoot(AstNode node) {
+ AstNode result = node;
+ AstNode parent = result.parent;
while (parent != null && !canBeResolved(parent)) {
result = parent;
parent = result.parent;
@@ -7448,7 +7627,7 @@
* @param node the node defining the element to be returned
* @return the element defined by the given node
*/
- Element getElement(ASTNode node) {
+ Element getElement(AstNode node) {
if (node is Declaration) {
return node.element;
} else if (node is CompilationUnit) {
@@ -7457,7 +7636,7 @@
return null;
}
- void resolveReferences(ASTNode node, Scope scope) {
+ void resolveReferences(AstNode node, Scope scope) {
ResolverVisitor visitor = new ResolverVisitor.con3(_definingLibrary, _source, _typeProvider, scope, _errorListener);
node.accept(visitor);
for (ProxyConditionalAnalysisError conditionalCode in visitor.proxyConditionalAnalysisErrors) {
@@ -7467,12 +7646,12 @@
}
}
- void resolveTypes(ASTNode node, Scope scope) {
+ void resolveTypes(AstNode node, Scope scope) {
TypeResolverVisitor visitor = new TypeResolverVisitor.con3(_definingLibrary, _source, _typeProvider, scope, _errorListener);
node.accept(visitor);
}
- void resolveVariables(ASTNode node, Scope scope) {
+ void resolveVariables(AstNode node, Scope scope) {
VariableResolverVisitor visitor = new VariableResolverVisitor.con2(_definingLibrary, _source, _typeProvider, scope, _errorListener);
node.accept(visitor);
}
@@ -7481,11 +7660,152 @@
/**
* Instances of the class `InheritanceManager` manage the knowledge of where class members
* (methods, getters & setters) are inherited from.
- *
- * @coverage dart.engine.resolver
*/
class InheritanceManager {
/**
+ * Given some array of [ExecutableElement]s, this method creates a synthetic element as
+ * described in the Superinterfaces section of Inheritance and Overriding.
+ *
+ * TODO (jwren) Copy contents from the Spec into this javadoc.
+ *
+ * TODO (jwren) Associate a propagated type to the synthetic method element using least upper
+ * bound calls
+ */
+ static ExecutableElement computeMergedExecutableElement(List<ExecutableElement> elementArrayToMerge) {
+ int h = getNumOfPositionalParameters(elementArrayToMerge[0]);
+ int r = getNumOfRequiredParameters(elementArrayToMerge[0]);
+ Set<String> namedParametersList = new Set<String>();
+ for (int i = 1; i < elementArrayToMerge.length; i++) {
+ ExecutableElement element = elementArrayToMerge[i];
+ int numOfPositionalParams = getNumOfPositionalParameters(element);
+ if (h < numOfPositionalParams) {
+ h = numOfPositionalParams;
+ }
+ int numOfRequiredParams = getNumOfRequiredParameters(element);
+ if (r > numOfRequiredParams) {
+ r = numOfRequiredParams;
+ }
+ namedParametersList.addAll(getNamedParameterNames(element));
+ }
+ if (r > h) {
+ return null;
+ }
+ return createSyntheticExecutableElement(elementArrayToMerge, elementArrayToMerge[0].displayName, r, h - r, new List.from(namedParametersList));
+ }
+
+ /**
+ * Used by [computeMergedExecutableElement] to actually create the
+ * synthetic element.
+ *
+ * @param elementArrayToMerge the array used to create the synthetic element
+ * @param name the name of the method, getter or setter
+ * @param numOfRequiredParameters the number of required parameters
+ * @param numOfPositionalParameters the number of positional parameters
+ * @param namedParameters the list of [String]s that are the named parameters
+ * @return the created synthetic element
+ */
+ static ExecutableElement createSyntheticExecutableElement(List<ExecutableElement> elementArrayToMerge, String name, int numOfRequiredParameters, int numOfPositionalParameters, List<String> namedParameters) {
+ DynamicTypeImpl dynamicType = DynamicTypeImpl.instance;
+ SimpleIdentifier nameIdentifier = new SimpleIdentifier(new sc.StringToken(sc.TokenType.IDENTIFIER, name, 0));
+ ExecutableElementImpl executable;
+ if (elementArrayToMerge[0] is MethodElement) {
+ MultiplyInheritedMethodElementImpl unionedMethod = new MultiplyInheritedMethodElementImpl(nameIdentifier);
+ unionedMethod.inheritedElements = elementArrayToMerge;
+ executable = unionedMethod;
+ } else {
+ MultiplyInheritedPropertyAccessorElementImpl unionedPropertyAccessor = new MultiplyInheritedPropertyAccessorElementImpl(nameIdentifier);
+ unionedPropertyAccessor.getter = (elementArrayToMerge[0] as PropertyAccessorElement).isGetter;
+ unionedPropertyAccessor.setter = (elementArrayToMerge[0] as PropertyAccessorElement).isSetter;
+ unionedPropertyAccessor.inheritedElements = elementArrayToMerge;
+ executable = unionedPropertyAccessor;
+ }
+ int numOfParameters = numOfRequiredParameters + numOfPositionalParameters + namedParameters.length;
+ List<ParameterElement> parameters = new List<ParameterElement>(numOfParameters);
+ int i = 0;
+ for (int j = 0; j < numOfRequiredParameters; j++, i++) {
+ ParameterElementImpl parameter = new ParameterElementImpl.con2("", 0);
+ parameter.type = dynamicType;
+ parameter.parameterKind = ParameterKind.REQUIRED;
+ parameters[i] = parameter;
+ }
+ for (int k = 0; k < numOfPositionalParameters; k++, i++) {
+ ParameterElementImpl parameter = new ParameterElementImpl.con2("", 0);
+ parameter.type = dynamicType;
+ parameter.parameterKind = ParameterKind.POSITIONAL;
+ parameters[i] = parameter;
+ }
+ for (int m = 0; m < namedParameters.length; m++, i++) {
+ ParameterElementImpl parameter = new ParameterElementImpl.con2(namedParameters[m], 0);
+ parameter.type = dynamicType;
+ parameter.parameterKind = ParameterKind.NAMED;
+ parameters[i] = parameter;
+ }
+ executable.returnType = dynamicType;
+ executable.parameters = parameters;
+ FunctionTypeImpl methodType = new FunctionTypeImpl.con1(executable);
+ executable.type = methodType;
+ return executable;
+ }
+
+ /**
+ * Given some [ExecutableElement], return the list of named parameters.
+ */
+ static List<String> getNamedParameterNames(ExecutableElement executableElement) {
+ List<String> namedParameterNames = new List<String>();
+ List<ParameterElement> parameters = executableElement.parameters;
+ for (int i = 0; i < parameters.length; i++) {
+ ParameterElement parameterElement = parameters[i];
+ if (identical(parameterElement.parameterKind, ParameterKind.NAMED)) {
+ namedParameterNames.add(parameterElement.name);
+ }
+ }
+ return namedParameterNames;
+ }
+
+ /**
+ * Given some [ExecutableElement] return the number of parameters of the specified kind.
+ */
+ static int getNumOfParameters(ExecutableElement executableElement, ParameterKind parameterKind) {
+ int parameterCount = 0;
+ List<ParameterElement> parameters = executableElement.parameters;
+ for (int i = 0; i < parameters.length; i++) {
+ ParameterElement parameterElement = parameters[i];
+ if (identical(parameterElement.parameterKind, parameterKind)) {
+ parameterCount++;
+ }
+ }
+ return parameterCount;
+ }
+
+ /**
+ * Given some [ExecutableElement] return the number of positional parameters.
+ *
+ * Note: by positional we mean [ParameterKind#REQUIRED] or [ParameterKind#POSITIONAL].
+ */
+ static int getNumOfPositionalParameters(ExecutableElement executableElement) => getNumOfParameters(executableElement, ParameterKind.REQUIRED) + getNumOfParameters(executableElement, ParameterKind.POSITIONAL);
+
+ /**
+ * Given some [ExecutableElement] return the number of required parameters.
+ */
+ static int getNumOfRequiredParameters(ExecutableElement executableElement) => getNumOfParameters(executableElement, ParameterKind.REQUIRED);
+
+ /**
+ * Given some [ExecutableElement] returns `true` if it is an abstract member of a
+ * class.
+ *
+ * @param executableElement some [ExecutableElement] to evaluate
+ * @return `true` if the given element is an abstract member of a class
+ */
+ static bool isAbstract(ExecutableElement executableElement) {
+ if (executableElement is MethodElement) {
+ return executableElement.isAbstract;
+ } else if (executableElement is PropertyAccessorElement) {
+ return executableElement.isAbstract;
+ }
+ return false;
+ }
+
+ /**
* The [LibraryElement] that is managed by this manager.
*/
LibraryElement _library;
@@ -7678,29 +7998,68 @@
}
if (superclassElt != null) {
if (!visitedClasses.contains(superclassElt)) {
- visitedClasses.add(classElt);
- resultMap = new MemberMap.con2(computeClassChainLookupMap(superclassElt, visitedClasses));
+ visitedClasses.add(superclassElt);
+ try {
+ resultMap = new MemberMap.con2(computeClassChainLookupMap(superclassElt, visitedClasses));
+ //
+ // Substitute the super types down the hierarchy.
+ //
+ substituteTypeParametersDownHierarchy(supertype, resultMap);
+ //
+ // Include the members from the superclass in the resultMap.
+ //
+ recordMapWithClassMembers(resultMap, supertype, false);
+ } finally {
+ visitedClasses.remove(superclassElt);
+ }
} else {
// This case happens only when the superclass was previously visited and not in the lookup,
// meaning this is meant to shorten the compute for recursive cases.
_classLookup[superclassElt] = resultMap;
return resultMap;
}
- //
- // Substitute the supertypes down the hierarchy
- //
- substituteTypeParametersDownHierarchy(supertype, resultMap);
- //
- // Include the members from the superclass in the resultMap
- //
- recordMapWithClassMembers(resultMap, supertype);
}
//
// Include the members from the mixins in the resultMap
//
List<InterfaceType> mixins = classElt.mixins;
for (int i = mixins.length - 1; i >= 0; i--) {
- recordMapWithClassMembers(resultMap, mixins[i]);
+ ClassElement mixinElement = mixins[i].element;
+ if (mixinElement != null) {
+ if (!visitedClasses.contains(mixinElement)) {
+ visitedClasses.add(mixinElement);
+ try {
+ MemberMap map = new MemberMap.con2(computeClassChainLookupMap(mixinElement, visitedClasses));
+ //
+ // Substitute the super types down the hierarchy.
+ //
+ substituteTypeParametersDownHierarchy(mixins[i], map);
+ //
+ // Include the members from the superclass in the resultMap.
+ //
+ recordMapWithClassMembers(map, mixins[i], false);
+ //
+ // Add the members from map into result map.
+ //
+ for (int j = 0; j < map.size; j++) {
+ String key = map.getKey(j);
+ ExecutableElement value = map.getValue(j);
+ if (key != null) {
+ if (resultMap.get(key) == null || (resultMap.get(key) != null && !isAbstract(value))) {
+ resultMap.put(key, value);
+ }
+ }
+ }
+ } finally {
+ visitedClasses.remove(mixinElement);
+ }
+ } else {
+ // This case happens only when the superclass was previously visited and not in the lookup,
+ // meaning this is meant to shorten the compute for recursive cases.
+ _classLookup[mixinElement] = resultMap;
+ return resultMap;
+ }
+ }
}
_classLookup[classElt] = resultMap;
return resultMap;
@@ -7790,24 +8149,26 @@
List<InterfaceType> interfaces = classElt.interfaces;
// Recursively collect the list of mappings from all of the interface types
List<MemberMap> lookupMaps = new List<MemberMap>();
+ //
// Superclass element
+ //
if (superclassElement != null) {
if (!visitedInterfaces.contains(superclassElement)) {
try {
visitedInterfaces.add(superclassElement);
//
- // Recursively compute the map for the supertype.
+ // Recursively compute the map for the super type.
//
MemberMap map = computeInterfaceLookupMap(superclassElement, visitedInterfaces);
map = new MemberMap.con2(map);
//
- // Substitute the supertypes down the hierarchy
+ // Substitute the super type down the hierarchy.
//
substituteTypeParametersDownHierarchy(supertype, map);
//
- // Add any members from the supertype into the map as well.
+ // Add any members from the super type into the map as well.
//
- recordMapWithClassMembers(map, supertype);
+ recordMapWithClassMembers(map, supertype, true);
lookupMaps.add(map);
} finally {
visitedInterfaces.remove(superclassElement);
@@ -7822,13 +8183,47 @@
}
}
}
+ //
// Mixin elements
- for (InterfaceType mixinType in mixins) {
- MemberMap mapWithMixinMembers = new MemberMap();
- recordMapWithClassMembers(mapWithMixinMembers, mixinType);
- lookupMaps.add(mapWithMixinMembers);
+ //
+ for (int i = mixins.length - 1; i >= 0; i--) {
+ InterfaceType mixinType = mixins[i];
+ ClassElement mixinElement = mixinType.element;
+ if (mixinElement != null) {
+ if (!visitedInterfaces.contains(mixinElement)) {
+ try {
+ visitedInterfaces.add(mixinElement);
+ //
+ // Recursively compute the map for the mixin.
+ //
+ MemberMap map = computeInterfaceLookupMap(mixinElement, visitedInterfaces);
+ map = new MemberMap.con2(map);
+ //
+ // Substitute the mixin type down the hierarchy.
+ //
+ substituteTypeParametersDownHierarchy(mixinType, map);
+ //
+ // Add any members from the mixin type into the map as well.
+ //
+ recordMapWithClassMembers(map, mixinType, true);
+ lookupMaps.add(map);
+ } finally {
+ visitedInterfaces.remove(mixinElement);
+ }
+ } else {
+ MemberMap map = _interfaceLookup[classElt];
+ if (map != null) {
+ lookupMaps.add(map);
+ } else {
+ _interfaceLookup[mixinElement] = resultMap;
+ return resultMap;
+ }
+ }
+ }
}
+ //
// Interface elements
+ //
for (InterfaceType interfaceType in interfaces) {
ClassElement interfaceElement = interfaceType.element;
if (interfaceElement != null) {
@@ -7847,7 +8242,7 @@
//
// And add any members from the interface into the map as well.
//
- recordMapWithClassMembers(map, interfaceType);
+ recordMapWithClassMembers(map, interfaceType, true);
lookupMaps.add(map);
} finally {
visitedInterfaces.remove(interfaceElement);
@@ -7868,37 +8263,75 @@
return resultMap;
}
//
- // Union all of the maps together, grouping the ExecutableElements into sets.
+ // Union all of the lookupMaps together into unionMap, grouping the ExecutableElements into a
+ // list where none of the elements are equal where equality is determined by having equal
+ // function types. (We also take note too of the kind of the element: ()->int and () -> int may
+ // not be equal if one is a getter and the other is a method.)
//
- Map<String, Set<ExecutableElement>> unionMap = new Map<String, Set<ExecutableElement>>();
+ Map<String, List<ExecutableElement>> unionMap = new Map<String, List<ExecutableElement>>();
for (MemberMap lookupMap in lookupMaps) {
- for (int i = 0; i < lookupMap.size; i++) {
+ int lookupMapSize = lookupMap.size;
+ for (int i = 0; i < lookupMapSize; i++) {
+ // Get the string key, if null, break.
String key = lookupMap.getKey(i);
if (key == null) {
break;
}
- Set<ExecutableElement> set = unionMap[key];
- if (set == null) {
- set = new Set<ExecutableElement>();
- unionMap[key] = set;
+ // Get the list value out of the unionMap
+ List<ExecutableElement> list = unionMap[key];
+ // If we haven't created such a map for this key yet, do create it and put the list entry
+ // into the unionMap.
+ if (list == null) {
+ list = new List<ExecutableElement>();
+ unionMap[key] = list;
}
- set.add(lookupMap.getValue(i));
+ // Fetch the entry out of this lookupMap
+ ExecutableElement newExecutableElementEntry = lookupMap.getValue(i);
+ if (list.isEmpty) {
+ // If the list is empty, just the new value
+ list.add(newExecutableElementEntry);
+ } else {
+ // Otherwise, only add the newExecutableElementEntry if it isn't already in the list, this
+ // covers situation where a class inherits two methods (or two getters) that are
+ // identical.
+ bool alreadyInList = false;
+ bool isMethod1 = newExecutableElementEntry is MethodElement;
+ for (ExecutableElement executableElementInList in list) {
+ bool isMethod2 = executableElementInList is MethodElement;
+ if (identical(isMethod1, isMethod2) && executableElementInList.type == newExecutableElementEntry.type) {
+ alreadyInList = true;
+ break;
+ }
+ }
+ if (!alreadyInList) {
+ list.add(newExecutableElementEntry);
+ }
+ }
}
}
//
- // Loop through the entries in the union map, adding them to the resultMap appropriately.
+ // Loop through the entries in the unionMap, adding them to the resultMap appropriately.
//
- for (MapEntry<String, Set<ExecutableElement>> entry in getMapEntrySet(unionMap)) {
+ for (MapEntry<String, List<ExecutableElement>> entry in getMapEntrySet(unionMap)) {
String key = entry.getKey();
- Set<ExecutableElement> set = entry.getValue();
- int numOfEltsWithMatchingNames = set.length;
+ List<ExecutableElement> list = entry.getValue();
+ int numOfEltsWithMatchingNames = list.length;
if (numOfEltsWithMatchingNames == 1) {
- resultMap.put(key, new JavaIterator(set).next());
+ //
+ // Example: class A inherits only 1 method named 'm'. Since it is the only such method, it
+ // is inherited.
+ // Another example: class A inherits 2 methods named 'm' from 2 different interfaces, but
+ // they both have the same signature, so it is the method inherited.
+ //
+ resultMap.put(key, list[0]);
} else {
+ //
+ // Then numOfEltsWithMatchingNames > 1, check for the warning cases.
+ //
bool allMethods = true;
bool allSetters = true;
bool allGetters = true;
- for (ExecutableElement executableElement in set) {
+ for (ExecutableElement executableElement in list) {
if (executableElement is PropertyAccessorElement) {
allMethods = false;
if (executableElement.isSetter) {
@@ -7911,14 +8344,20 @@
allSetters = false;
}
}
+ //
+ // If there isn't a mixture of methods with getters, then continue, otherwise create a
+ // warning.
+ //
if (allMethods || allGetters || allSetters) {
+ //
// Compute the element whose type is the subtype of all of the other types.
- List<ExecutableElement> elements = new List.from(set);
+ //
+ List<ExecutableElement> elements = new List.from(list);
List<FunctionType> executableElementTypes = new List<FunctionType>(numOfEltsWithMatchingNames);
for (int i = 0; i < numOfEltsWithMatchingNames; i++) {
executableElementTypes[i] = elements[i].type;
}
- bool foundSubtypeOfAllTypes = false;
+ List<int> subtypesOfAllOtherTypesIndexes = new List<int>();
for (int i = 0; i < numOfEltsWithMatchingNames; i++) {
FunctionType subtype = executableElementTypes[i];
if (subtype == null) {
@@ -7934,19 +8373,49 @@
}
}
if (subtypeOfAllTypes) {
- foundSubtypeOfAllTypes = true;
- resultMap.put(key, elements[i]);
- break;
+ subtypesOfAllOtherTypesIndexes.add(i);
}
}
- if (!foundSubtypeOfAllTypes) {
- reportError(classElt, classElt.nameOffset, classElt.displayName.length, StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE, [key]);
+ //
+ // The following is split into three cases determined by the number of elements in subtypesOfAllOtherTypes
+ //
+ if (subtypesOfAllOtherTypesIndexes.length == 1) {
+ //
+ // Example: class A inherited only 2 method named 'm'. One has the function type
+ // '() -> dynamic' and one has the function type '([int]) -> dynamic'. Since the second
+ // method is a subtype of all the others, it is the inherited method.
+ // Tests: InheritanceManagerTest.test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_*
+ //
+ resultMap.put(key, elements[subtypesOfAllOtherTypesIndexes[0]]);
+ } else {
+ if (subtypesOfAllOtherTypesIndexes.isEmpty) {
+ //
+ // Example: class A inherited only 2 method named 'm'. One has the function type
+ // '() -> int' and one has the function type '() -> String'. Since neither is a subtype
+ // of the other, we create a warning, and have this class inherit nothing.
+ //
+ String firstTwoFuntionTypesStr = "${executableElementTypes[0].toString()}, ${executableElementTypes[1].toString()}";
+ reportError(classElt, classElt.nameOffset, classElt.displayName.length, StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE, [key, firstTwoFuntionTypesStr]);
+ } else {
+ //
+ // Example: class A inherits 2 methods named 'm'. One has the function type
+ // '(int) -> dynamic' and one has the function type '(num) -> dynamic'. Since they are
+ // both a subtype of the other, a synthetic function '(dynamic) -> dynamic' is
+ // inherited.
+ // Tests: test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_*
+ //
+ List<ExecutableElement> elementArrayToMerge = new List<ExecutableElement>(subtypesOfAllOtherTypesIndexes.length);
+ for (int i = 0; i < elementArrayToMerge.length; i++) {
+ elementArrayToMerge[i] = elements[subtypesOfAllOtherTypesIndexes[i]];
+ }
+ ExecutableElement mergedExecutableElement = computeMergedExecutableElement(elementArrayToMerge);
+ if (mergedExecutableElement != null) {
+ resultMap.put(key, mergedExecutableElement);
+ }
+ }
}
} else {
- if (!allMethods && !allGetters) {
- reportError(classElt, classElt.nameOffset, classElt.displayName.length, StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD, [key]);
- }
- resultMap.remove(entry.getKey());
+ reportError(classElt, classElt.nameOffset, classElt.displayName.length, StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD, [key]);
}
}
}
@@ -7986,17 +8455,18 @@
* @param map some non-`null` map to put the methods and accessors from the passed
* [ClassElement] into
* @param type the type that will be recorded into the passed map
+ * @param doIncludeAbstract `true` if abstract members will be put into the map
*/
- void recordMapWithClassMembers(MemberMap map, InterfaceType type) {
+ void recordMapWithClassMembers(MemberMap map, InterfaceType type, bool doIncludeAbstract) {
List<MethodElement> methods = type.methods;
for (MethodElement method in methods) {
- if (method.isAccessibleIn(_library) && !method.isStatic) {
+ if (method.isAccessibleIn(_library) && !method.isStatic && (doIncludeAbstract || !method.isAbstract)) {
map.put(method.name, method);
}
}
List<PropertyAccessorElement> accessors = type.accessors;
for (PropertyAccessorElement accessor in accessors) {
- if (accessor.isAccessibleIn(_library) && !accessor.isStatic) {
+ if (accessor.isAccessibleIn(_library) && !accessor.isStatic && (doIncludeAbstract || !accessor.isAbstract)) {
map.put(accessor.name, accessor);
}
}
@@ -8047,8 +8517,6 @@
* Instances of the class `Library` represent the data about a single library during the
* resolution of some (possibly different) library. They are not intended to be used except during
* the resolution process.
- *
- * @coverage dart.engine.resolver
*/
class Library {
/**
@@ -8292,7 +8760,7 @@
try {
parseUriWithException(uriContent);
Source source = _analysisContext.sourceFactory.resolveUri(librarySource, uriContent);
- if (source == null || !source.exists()) {
+ if (!_analysisContext.exists(source)) {
_errorListener.onError(new AnalysisError.con2(librarySource, uriLiteral.offset, uriLiteral.length, CompileTimeErrorCode.URI_DOES_NOT_EXIST, [uriContent]));
}
return source;
@@ -8354,8 +8822,6 @@
/**
* Instances of the class `LibraryElementBuilder` build an element model for a single library.
- *
- * @coverage dart.engine.resolver
*/
class LibraryElementBuilder {
/**
@@ -8371,7 +8837,7 @@
/**
* The name of the function used as an entry point.
*/
- static String _ENTRY_POINT_NAME = "main";
+ static String ENTRY_POINT_NAME = "main";
/**
* Initialize a newly created library element builder.
@@ -8417,7 +8883,7 @@
PartDirective partDirective = directive;
StringLiteral partUri = partDirective.uri;
Source partSource = library.getSource(partDirective);
- if (partSource != null && partSource.exists()) {
+ if (_analysisContext.exists(partSource)) {
hasPartDirective = true;
CompilationUnitElementImpl part = builder.buildCompilationUnit(partSource, library.getAST(partSource));
part.uri = library.getUri(partDirective);
@@ -8493,7 +8959,7 @@
*/
FunctionElement findEntryPoint(CompilationUnitElementImpl element) {
for (FunctionElement function in element.functions) {
- if (function.name == _ENTRY_POINT_NAME) {
+ if (function.name == ENTRY_POINT_NAME) {
return function;
}
}
@@ -8555,8 +9021,6 @@
/**
* Instances of the class `LibraryResolver` are used to resolve one or more mutually dependent
* libraries within a single context.
- *
- * @coverage dart.engine.resolver
*/
class LibraryResolver {
/**
@@ -8641,7 +9105,7 @@
//
// Create the objects representing the library being resolved and the core library.
//
- Library targetLibrary = createLibrary2(librarySource, modificationStamp, unit);
+ Library targetLibrary = createLibraryWithUnit(librarySource, modificationStamp, unit);
_coreLibrary = _libraryMap[_coreLibrarySource];
if (_coreLibrary == null) {
// This will be true unless the library being analyzed is the core library.
@@ -8651,7 +9115,7 @@
//
// Compute the set of libraries that need to be resolved together.
//
- computeLibraryDependencies2(targetLibrary, unit);
+ computeEmbeddedLibraryDependencies(targetLibrary, unit);
_librariesInCycles = computeLibrariesInCycles(targetLibrary);
//
// Build the element models representing the libraries being resolved. This is done in three
@@ -8955,6 +9419,13 @@
LibraryElementImpl libraryElement = library.libraryElement;
libraryElement.imports = new List.from(imports);
libraryElement.exports = new List.from(exports);
+ if (libraryElement.entryPoint == null) {
+ Namespace namespace = new NamespaceBuilder().createExportNamespace2(libraryElement);
+ Element element = namespace.get(LibraryElementBuilder.ENTRY_POINT_NAME);
+ if (element is FunctionElement) {
+ libraryElement.entryPoint = element;
+ }
+ }
}
}
@@ -9009,6 +9480,33 @@
}
/**
+ * Recursively traverse the libraries reachable from the given library, creating instances of the
+ * class [Library] to represent them, and record the references in the library objects.
+ *
+ * @param library the library to be processed to find libraries that have not yet been traversed
+ * @throws AnalysisException if some portion of the library graph could not be traversed
+ */
+ void computeEmbeddedLibraryDependencies(Library library, CompilationUnit unit) {
+ Source librarySource = library.librarySource;
+ Set<Source> exportedSources = new Set<Source>();
+ Set<Source> importedSources = new Set<Source>();
+ for (Directive directive in unit.directives) {
+ if (directive is ExportDirective) {
+ Source exportSource = resolveSource(librarySource, directive);
+ if (exportSource != null) {
+ exportedSources.add(exportSource);
+ }
+ } else if (directive is ImportDirective) {
+ Source importSource = resolveSource(librarySource, directive);
+ if (importSource != null) {
+ importedSources.add(importSource);
+ }
+ }
+ }
+ computeLibraryDependenciesFromDirectives(library, new List.from(importedSources), new List.from(exportedSources));
+ }
+
+ /**
* Return a collection containing all of the libraries reachable from the given library that are
* contained in a cycle that includes the given library.
*
@@ -9032,34 +9530,7 @@
*/
void computeLibraryDependencies(Library library) {
Source librarySource = library.librarySource;
- computeLibraryDependencies3(library, analysisContext.computeImportedLibraries(librarySource), analysisContext.computeExportedLibraries(librarySource));
- }
-
- /**
- * Recursively traverse the libraries reachable from the given library, creating instances of the
- * class [Library] to represent them, and record the references in the library objects.
- *
- * @param library the library to be processed to find libraries that have not yet been traversed
- * @throws AnalysisException if some portion of the library graph could not be traversed
- */
- void computeLibraryDependencies2(Library library, CompilationUnit unit) {
- Source librarySource = library.librarySource;
- Set<Source> exportedSources = new Set<Source>();
- Set<Source> importedSources = new Set<Source>();
- for (Directive directive in unit.directives) {
- if (directive is ExportDirective) {
- Source exportSource = resolveSource(librarySource, directive);
- if (exportSource != null) {
- exportedSources.add(exportSource);
- }
- } else if (directive is ImportDirective) {
- Source importSource = resolveSource(librarySource, directive);
- if (importSource != null) {
- importedSources.add(importSource);
- }
- }
- }
- computeLibraryDependencies3(library, new List.from(importedSources), new List.from(exportedSources));
+ computeLibraryDependenciesFromDirectives(library, analysisContext.computeImportedLibraries(librarySource), analysisContext.computeExportedLibraries(librarySource));
}
/**
@@ -9071,7 +9542,7 @@
* @param exportedSources an array containing the sources that are exported from the given library
* @throws AnalysisException if some portion of the library graph could not be traversed
*/
- void computeLibraryDependencies3(Library library, List<Source> importedSources, List<Source> exportedSources) {
+ void computeLibraryDependenciesFromDirectives(Library library, List<Source> importedSources, List<Source> exportedSources) {
List<Library> importedLibraries = new List<Library>();
bool explicitlyImportsCore = false;
for (Source importedSource in importedSources) {
@@ -9126,7 +9597,23 @@
*/
Library createLibrary(Source librarySource) {
Library library = new Library(analysisContext, _errorListener, librarySource);
- library.definingCompilationUnit;
+ _libraryMap[librarySource] = library;
+ return library;
+ }
+
+ /**
+ * Create an object to represent the information about the library defined by the compilation unit
+ * with the given source. Return the library object that was created, or `null` if the
+ * source is not valid.
+ *
+ * @param librarySource the source of the library's defining compilation unit
+ * @return the library object that was created
+ */
+ Library createLibraryOrNull(Source librarySource) {
+ if (!analysisContext.exists(librarySource)) {
+ return null;
+ }
+ Library library = new Library(analysisContext, _errorListener, librarySource);
_libraryMap[librarySource] = library;
return library;
}
@@ -9142,7 +9629,7 @@
* @return the library object that was created
* @throws AnalysisException if the library source is not valid
*/
- Library createLibrary2(Source librarySource, int modificationStamp, CompilationUnit unit) {
+ Library createLibraryWithUnit(Source librarySource, int modificationStamp, CompilationUnit unit) {
Library library = new Library(analysisContext, _errorListener, librarySource);
library.setDefiningCompilationUnit(modificationStamp, unit);
_libraryMap[librarySource] = library;
@@ -9150,23 +9637,6 @@
}
/**
- * Create an object to represent the information about the library defined by the compilation unit
- * with the given source. Return the library object that was created, or `null` if the
- * source is not valid.
- *
- * @param librarySource the source of the library's defining compilation unit
- * @return the library object that was created
- */
- Library createLibraryOrNull(Source librarySource) {
- if (!librarySource.exists()) {
- return null;
- }
- Library library = new Library(analysisContext, _errorListener, librarySource);
- _libraryMap[librarySource] = library;
- return library;
- }
-
- /**
* Return an array containing the lexical identifiers associated with the nodes in the given list.
*
* @param names the AST nodes representing the identifiers
@@ -9214,7 +9684,7 @@
*/
void resolveReferencesAndTypes() {
for (Library library in _librariesInCycles) {
- resolveReferencesAndTypes2(library);
+ resolveReferencesAndTypesInLibrary(library);
}
}
@@ -9225,7 +9695,7 @@
* @throws AnalysisException if any of the identifiers could not be resolved or if the types in
* the library cannot be analyzed
*/
- void resolveReferencesAndTypes2(Library library) {
+ void resolveReferencesAndTypesInLibrary(Library library) {
TimeCounter_TimeCounterHandle timeCounter = PerformanceStatistics.resolve.start();
try {
for (Source source in library.compilationUnitSources) {
@@ -9247,7 +9717,7 @@
try {
for (Source source in library.compilationUnitSources) {
CompilationUnit ast = library.getAST(source);
- new AngularCompilationUnitBuilder(_errorListener, source).build(ast);
+ new AngularCompilationUnitBuilder(_errorListener, source, ast).build();
}
} finally {
timeCounter.stop();
@@ -9404,9 +9874,9 @@
}
/**
- * Given some String key, this method replaces the associated key and value pair with `null`
- * . The size is not decremented with this call, instead it is expected that the users check for
- * `null`.
+ * Given some [String] key, this method replaces the associated key and value pair with
+ * `null`. The size is not decremented with this call, instead it is expected that the users
+ * check for `null`.
*
* @param key the key of the key/value pair to remove from the map
*/
@@ -9450,14 +9920,6 @@
*/
class ProxyConditionalAnalysisError {
/**
- * Return `true` if the given element represents a class that has the proxy annotation.
- *
- * @param element the class being tested
- * @return `true` if the given element represents a class that has the proxy annotation
- */
- static bool classHasProxyAnnotation(Element element) => (element is ClassElement) && element.isProxy;
-
- /**
* The enclosing [ClassElement], this is what will determine if the error code should, or
* should not, be generated on the source.
*/
@@ -9469,8 +9931,8 @@
final AnalysisError analysisError;
/**
- * Instantiate a new ProxyConditionalErrorCode with some enclosing element and the conditional
- * analysis error.
+ * Instantiate a new [ProxyConditionalAnalysisError] with some enclosing element and the
+ * conditional analysis error.
*
* @param enclosingElement the enclosing element
* @param analysisError the conditional analysis error
@@ -9484,14 +9946,17 @@
*
* @return `true` iff the enclosing class has the proxy annotation
*/
- bool shouldIncludeErrorCode() => !classHasProxyAnnotation(_enclosingElement);
+ bool shouldIncludeErrorCode() {
+ if (_enclosingElement is ClassElement) {
+ return !(_enclosingElement as ClassElement).isOrInheritsProxy;
+ }
+ return true;
+ }
}
/**
* Instances of the class `ResolverVisitor` are used to resolve the nodes within a single
* compilation unit.
- *
- * @coverage dart.engine.resolver
*/
class ResolverVisitor extends ScopedVisitor {
/**
@@ -10011,7 +10476,7 @@
return null;
}
- Object visitNode(ASTNode node) {
+ Object visitNode(AstNode node) {
node.visitChildren(this);
node.accept(_elementResolver);
node.accept(_typeAnalyzer);
@@ -10259,7 +10724,7 @@
* @param node the node specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportErrorProxyConditionalAnalysisError(Element enclosingElement, ErrorCode errorCode, ASTNode node, List<Object> arguments) {
+ void reportErrorProxyConditionalAnalysisError(Element enclosingElement, ErrorCode errorCode, AstNode node, List<Object> arguments) {
_proxyConditionalAnalysisErrors.add(new ProxyConditionalAnalysisError(enclosingElement, new AnalysisError.con2(source, node.offset, node.length, errorCode, arguments)));
}
@@ -10348,7 +10813,7 @@
* If the variable <i>v</i> is accessed by a closure in <i>s<sub>1</sub></i> then the variable
* <i>v</i> is not potentially mutated anywhere in the scope of <i>v</i>.
*/
- void clearTypePromotionsIfAccessedInClosureAndProtentiallyMutated(ASTNode target) {
+ void clearTypePromotionsIfAccessedInClosureAndProtentiallyMutated(AstNode target) {
for (Element element in _promoteManager.promotedElements) {
if ((element as VariableElementImpl).isPotentiallyMutatedInScope) {
if (isVariableAccessedInClosure(element, target)) {
@@ -10364,7 +10829,7 @@
*
* <i>v</i> is not potentially mutated in <i>s<sub>1</sub></i> or within a closure.
*/
- void clearTypePromotionsIfPotentiallyMutatedIn(ASTNode target) {
+ void clearTypePromotionsIfPotentiallyMutatedIn(AstNode target) {
for (Element element in _promoteManager.promotedElements) {
if (isVariablePotentiallyMutatedIn(element, target)) {
_promoteManager.setType(element, null);
@@ -10514,30 +10979,30 @@
/**
* Return `true` if the given variable is accessed within a closure in the given
- * [ASTNode] and also mutated somewhere in variable scope. This information is only
+ * [AstNode] and also mutated somewhere in variable scope. This information is only
* available for local variables (including parameters).
*
* @param variable the variable to check
- * @param target the [ASTNode] to check within
+ * @param target the [AstNode] to check within
* @return `true` if this variable is potentially mutated somewhere in the given ASTNode
*/
- bool isVariableAccessedInClosure(Element variable, ASTNode target) {
+ bool isVariableAccessedInClosure(Element variable, AstNode target) {
List<bool> result = [false];
- target.accept(new RecursiveASTVisitor_ResolverVisitor_isVariableAccessedInClosure(result, variable));
+ target.accept(new RecursiveAstVisitor_ResolverVisitor_isVariableAccessedInClosure(result, variable));
return result[0];
}
/**
* Return `true` if the given variable is potentially mutated somewhere in the given
- * [ASTNode]. This information is only available for local variables (including parameters).
+ * [AstNode]. This information is only available for local variables (including parameters).
*
* @param variable the variable to check
- * @param target the [ASTNode] to check within
+ * @param target the [AstNode] to check within
* @return `true` if this variable is potentially mutated somewhere in the given ASTNode
*/
- bool isVariablePotentiallyMutatedIn(Element variable, ASTNode target) {
+ bool isVariablePotentiallyMutatedIn(Element variable, AstNode target) {
List<bool> result = [false];
- target.accept(new RecursiveASTVisitor_ResolverVisitor_isVariablePotentiallyMutatedIn(result, variable));
+ target.accept(new RecursiveAstVisitor_ResolverVisitor_isVariablePotentiallyMutatedIn(result, variable));
return result[0];
}
@@ -10700,12 +11165,12 @@
set enclosingClass_J2DAccessor(__v) => _enclosingClass = __v;
}
-class RecursiveASTVisitor_ResolverVisitor_isVariableAccessedInClosure extends RecursiveASTVisitor<Object> {
+class RecursiveAstVisitor_ResolverVisitor_isVariableAccessedInClosure extends RecursiveAstVisitor<Object> {
List<bool> result;
Element variable;
- RecursiveASTVisitor_ResolverVisitor_isVariableAccessedInClosure(this.result, this.variable) : super();
+ RecursiveAstVisitor_ResolverVisitor_isVariableAccessedInClosure(this.result, this.variable) : super();
bool _inClosure = false;
@@ -10730,12 +11195,12 @@
}
}
-class RecursiveASTVisitor_ResolverVisitor_isVariablePotentiallyMutatedIn extends RecursiveASTVisitor<Object> {
+class RecursiveAstVisitor_ResolverVisitor_isVariablePotentiallyMutatedIn extends RecursiveAstVisitor<Object> {
List<bool> result;
Element variable;
- RecursiveASTVisitor_ResolverVisitor_isVariablePotentiallyMutatedIn(this.result, this.variable) : super();
+ RecursiveAstVisitor_ResolverVisitor_isVariablePotentiallyMutatedIn(this.result, this.variable) : super();
Object visitSimpleIdentifier(SimpleIdentifier node) {
if (result[0]) {
@@ -10753,10 +11218,8 @@
/**
* The abstract class `ScopedVisitor` maintains name and label scopes as an AST structure is
* being visited.
- *
- * @coverage dart.engine.resolver
*/
-abstract class ScopedVisitor extends UnifyingASTVisitor<Object> {
+abstract class ScopedVisitor extends UnifyingAstVisitor<Object> {
/**
* The element for the library containing the compilation unit being visited.
*/
@@ -11159,7 +11622,7 @@
* @param node the node specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError9(ErrorCode errorCode, ASTNode node, List<Object> arguments) {
+ void reportErrorForNode(ErrorCode errorCode, AstNode node, List<Object> arguments) {
_errorListener.onError(new AnalysisError.con2(source, node.offset, node.length, errorCode, arguments));
}
@@ -11171,7 +11634,7 @@
* @param length the length of the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError10(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
+ void reportErrorForOffset(ErrorCode errorCode, int offset, int length, List<Object> arguments) {
_errorListener.onError(new AnalysisError.con2(source, offset, length, errorCode, arguments));
}
@@ -11182,7 +11645,7 @@
* @param token the token specifying the location of the error
* @param arguments the arguments to the error, used to compose the error message
*/
- void reportError11(ErrorCode errorCode, sc.Token token, List<Object> arguments) {
+ void reportErrorForToken(ErrorCode errorCode, sc.Token token, List<Object> arguments) {
_errorListener.onError(new AnalysisError.con2(source, token.offset, token.length, errorCode, arguments));
}
@@ -11191,7 +11654,7 @@
*
* @param node the node to be visited
*/
- void safelyVisit(ASTNode node) {
+ void safelyVisit(AstNode node) {
if (node != null) {
node.accept(this);
}
@@ -11305,10 +11768,8 @@
* * Every element that refers to types should be fully populated.
* * Every node representing an expression should be resolved to the Type of the expression.
* </ol>
- *
- * @coverage dart.engine.resolver
*/
-class StaticTypeAnalyzer extends SimpleASTVisitor<Object> {
+class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
/**
* Create a table mapping HTML tag names to the names of the classes (in 'dart:html') that
* implement those tags.
@@ -11469,7 +11930,7 @@
* The static type of a cast expression <i>e as T</i> is <i>T</i>.</blockquote>
*/
Object visitAsExpression(AsExpression node) {
- recordStaticType(node, getType2(node.type));
+ recordStaticType(node, getType(node.type));
return null;
}
@@ -11522,7 +11983,7 @@
Type2 propagatedType = rightHandSide.propagatedType;
if (propagatedType != null) {
if (propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
overrideType = propagatedType;
}
@@ -11535,7 +11996,7 @@
if (propagatedMethodElement != staticMethodElement) {
Type2 propagatedType = computeStaticReturnType(propagatedMethodElement);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
}
}
@@ -11588,7 +12049,7 @@
if (propagatedMethodElement != staticMethodElement) {
Type2 propagatedType = computeStaticReturnType(propagatedMethodElement);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
}
return null;
@@ -11610,7 +12071,7 @@
*/
Object visitCascadeExpression(CascadeExpression node) {
recordStaticType(node, getStaticType(node.target));
- recordPropagatedType2(node, node.target.propagatedType);
+ recordPropagatedType(node, node.target.propagatedType);
return null;
}
@@ -11650,7 +12111,7 @@
}
Type2 propagatedType = propagatedThenType.getLeastUpperBound(propagatedElseType);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
}
return null;
@@ -11668,8 +12129,8 @@
Object visitFunctionDeclaration(FunctionDeclaration node) {
FunctionExpression function = node.functionExpression;
ExecutableElementImpl functionElement = node.element as ExecutableElementImpl;
- functionElement.returnType = computeStaticReturnType2(node);
- recordPropagatedType(functionElement, function.body);
+ functionElement.returnType = computeStaticReturnTypeOfFunctionDeclaration(node);
+ recordPropagatedTypeOfFunction(functionElement, function.body);
recordStaticType(function, functionElement.type);
return null;
}
@@ -11710,8 +12171,8 @@
return null;
}
ExecutableElementImpl functionElement = node.element as ExecutableElementImpl;
- functionElement.returnType = computeStaticReturnType3(node);
- recordPropagatedType(functionElement, node.body);
+ functionElement.returnType = computeStaticReturnTypeOfFunctionExpression(node);
+ recordPropagatedTypeOfFunction(functionElement, node.body);
recordStaticType(node, node.element.type);
return null;
}
@@ -11736,19 +12197,19 @@
// Record propagated return type of the static element.
Type2 staticPropagatedType = computePropagatedReturnType(staticMethodElement);
if (staticPropagatedType != null && (staticStaticType == null || staticPropagatedType.isMoreSpecificThan(staticStaticType))) {
- recordPropagatedType2(node, staticPropagatedType);
+ recordPropagatedType(node, staticPropagatedType);
}
ExecutableElement propagatedMethodElement = node.propagatedElement;
if (propagatedMethodElement != staticMethodElement) {
// Record static return type of the propagated element.
Type2 propagatedStaticType = computeStaticReturnType(propagatedMethodElement);
if (propagatedStaticType != null && (staticStaticType == null || propagatedStaticType.isMoreSpecificThan(staticStaticType)) && (staticPropagatedType == null || propagatedStaticType.isMoreSpecificThan(staticPropagatedType))) {
- recordPropagatedType2(node, propagatedStaticType);
+ recordPropagatedType(node, propagatedStaticType);
}
// Record propagated return type of the propagated element.
Type2 propagatedPropagatedType = computePropagatedReturnType(propagatedMethodElement);
if (propagatedPropagatedType != null && (staticStaticType == null || propagatedPropagatedType.isMoreSpecificThan(staticStaticType)) && (staticPropagatedType == null || propagatedPropagatedType.isMoreSpecificThan(staticPropagatedType)) && (propagatedStaticType == null || propagatedPropagatedType.isMoreSpecificThan(propagatedStaticType))) {
- recordPropagatedType2(node, propagatedPropagatedType);
+ recordPropagatedType(node, propagatedPropagatedType);
}
}
return null;
@@ -11768,7 +12229,7 @@
if (propagatedMethodElement != staticMethodElement) {
Type2 propagatedType = computeArgumentType(propagatedMethodElement);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
}
} else {
@@ -11779,7 +12240,7 @@
if (propagatedMethodElement != staticMethodElement) {
Type2 propagatedType = computeStaticReturnType(propagatedMethodElement);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
}
}
@@ -11803,14 +12264,14 @@
if (isHtmlLibrary(library)) {
String constructorName = element.name;
if ("tag" == constructorName) {
- Type2 returnType = getFirstArgumentAsType2(library, node.argumentList, _HTML_ELEMENT_TO_CLASS_MAP);
+ Type2 returnType = getFirstArgumentAsTypeWithMap(library, node.argumentList, _HTML_ELEMENT_TO_CLASS_MAP);
if (returnType != null) {
- recordPropagatedType2(node, returnType);
+ recordPropagatedType(node, returnType);
}
} else {
Type2 returnType = getElementNameAsType(library, constructorName, _HTML_ELEMENT_TO_CLASS_MAP);
if (returnType != null) {
- recordPropagatedType2(node, returnType);
+ recordPropagatedType(node, returnType);
}
}
}
@@ -11853,7 +12314,7 @@
NodeList<TypeName> arguments = typeArguments.arguments;
if (arguments != null && arguments.length == 1) {
TypeName argumentTypeName = arguments[0];
- Type2 argumentType = getType2(argumentTypeName);
+ Type2 argumentType = getType(argumentTypeName);
if (argumentType != null) {
staticType = argumentType;
}
@@ -11876,7 +12337,7 @@
}
}
if (propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, _typeProvider.listType.substitute4(<Type2> [propagatedType]));
+ recordPropagatedType(node, _typeProvider.listType.substitute4(<Type2> [propagatedType]));
}
}
return null;
@@ -11902,12 +12363,12 @@
NodeList<TypeName> arguments = typeArguments.arguments;
if (arguments != null && arguments.length == 2) {
TypeName entryKeyTypeName = arguments[0];
- Type2 entryKeyType = getType2(entryKeyTypeName);
+ Type2 entryKeyType = getType(entryKeyTypeName);
if (entryKeyType != null) {
staticKeyType = entryKeyType;
}
TypeName entryValueTypeName = arguments[1];
- Type2 entryValueType = getType2(entryValueTypeName);
+ Type2 entryValueType = getType(entryValueTypeName);
if (entryValueType != null) {
staticValueType = entryValueType;
}
@@ -11950,7 +12411,7 @@
if (!betterValue) {
propagatedValueType = staticValueType;
}
- recordPropagatedType2(node, _typeProvider.mapType.substitute4(<Type2> [propagatedKeyType, propagatedValueType]));
+ recordPropagatedType(node, _typeProvider.mapType.substitute4(<Type2> [propagatedKeyType, propagatedValueType]));
}
}
return null;
@@ -12002,7 +12463,7 @@
recordStaticType(methodNameNode, staticType);
Type2 propagatedType = _overrideManager.getType(variable);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(methodNameNode, propagatedType);
+ recordPropagatedType(methodNameNode, propagatedType);
}
}
// Record static return type of the static element.
@@ -12011,7 +12472,7 @@
// Record propagated return type of the static element.
Type2 staticPropagatedType = computePropagatedReturnType(staticMethodElement);
if (staticPropagatedType != null && (staticStaticType == null || staticPropagatedType.isMoreSpecificThan(staticStaticType))) {
- recordPropagatedType2(node, staticPropagatedType);
+ recordPropagatedType(node, staticPropagatedType);
}
String methodName = methodNameNode.name;
// Future.then(closure) return type is:
@@ -12039,7 +12500,7 @@
newFutureType.typeArguments = <Type2> [returnType];
}
// set the 'then' invocation type
- recordPropagatedType2(node, newFutureType);
+ recordPropagatedType(node, newFutureType);
return null;
}
}
@@ -12055,7 +12516,7 @@
if (isHtmlLibrary(library)) {
Type2 returnType = getFirstArgumentAsType(library, node.argumentList);
if (returnType != null) {
- recordPropagatedType2(node, returnType);
+ recordPropagatedType(node, returnType);
}
}
}
@@ -12069,7 +12530,7 @@
if (isHtmlLibrary(library)) {
Type2 returnType = getFirstArgumentAsQuery(library, node.argumentList);
if (returnType != null) {
- recordPropagatedType2(node, returnType);
+ recordPropagatedType(node, returnType);
}
}
}
@@ -12080,7 +12541,7 @@
if (isHtmlLibrary(library)) {
Type2 returnType = getFirstArgumentAsQuery(library, node.argumentList);
if (returnType != null) {
- recordPropagatedType2(node, returnType);
+ recordPropagatedType(node, returnType);
}
}
}
@@ -12093,14 +12554,14 @@
if (isHtmlLibrary(library)) {
Type2 returnType = getFirstArgumentAsQuery(library, node.argumentList);
if (returnType != null) {
- recordPropagatedType2(node, returnType);
+ recordPropagatedType(node, returnType);
}
}
}
} else if (methodName == "JS") {
Type2 returnType = getFirstArgumentAsType(_typeProvider.objectType.element.library, node.argumentList);
if (returnType != null) {
- recordPropagatedType2(node, returnType);
+ recordPropagatedType(node, returnType);
}
} else {
Element propagatedElement = methodNameNode.propagatedElement;
@@ -12108,12 +12569,12 @@
// Record static return type of the propagated element.
Type2 propagatedStaticType = computeStaticReturnType(propagatedElement);
if (propagatedStaticType != null && (staticStaticType == null || propagatedStaticType.isMoreSpecificThan(staticStaticType)) && (staticPropagatedType == null || propagatedStaticType.isMoreSpecificThan(staticPropagatedType))) {
- recordPropagatedType2(node, propagatedStaticType);
+ recordPropagatedType(node, propagatedStaticType);
}
// Record propagated return type of the propagated element.
Type2 propagatedPropagatedType = computePropagatedReturnType(propagatedElement);
if (propagatedPropagatedType != null && (staticStaticType == null || propagatedPropagatedType.isMoreSpecificThan(staticStaticType)) && (staticPropagatedType == null || propagatedPropagatedType.isMoreSpecificThan(staticPropagatedType)) && (propagatedStaticType == null || propagatedPropagatedType.isMoreSpecificThan(propagatedStaticType))) {
- recordPropagatedType2(node, propagatedPropagatedType);
+ recordPropagatedType(node, propagatedPropagatedType);
}
}
}
@@ -12123,7 +12584,7 @@
Object visitNamedExpression(NamedExpression node) {
Expression expression = node.expression;
recordStaticType(node, getStaticType(expression));
- recordPropagatedType2(node, expression.propagatedType);
+ recordPropagatedType(node, expression.propagatedType);
return null;
}
@@ -12139,7 +12600,7 @@
Object visitParenthesizedExpression(ParenthesizedExpression node) {
Expression expression = node.expression;
recordStaticType(node, getStaticType(expression));
- recordPropagatedType2(node, expression.propagatedType);
+ recordPropagatedType(node, expression.propagatedType);
return null;
}
@@ -12180,7 +12641,7 @@
}
}
recordStaticType(node, staticType);
- recordPropagatedType2(node, operand.propagatedType);
+ recordPropagatedType(node, operand.propagatedType);
return null;
}
@@ -12206,7 +12667,7 @@
} else if (staticElement is MethodElement) {
staticType = staticElement.type;
} else if (staticElement is PropertyAccessorElement) {
- staticType = getType(staticElement, node.prefix.staticType);
+ staticType = getTypeOfProperty(staticElement, node.prefix.staticType);
} else if (staticElement is ExecutableElement) {
staticType = staticElement.type;
} else if (staticElement is TypeParameterElement) {
@@ -12229,7 +12690,7 @@
} else if (propagatedElement is MethodElement) {
propagatedType = propagatedElement.type;
} else if (propagatedElement is PropertyAccessorElement) {
- propagatedType = getType(propagatedElement, node.prefix.staticType);
+ propagatedType = getTypeOfProperty(propagatedElement, node.prefix.staticType);
} else if (propagatedElement is ExecutableElement) {
propagatedType = propagatedElement.type;
} else if (propagatedElement is TypeParameterElement) {
@@ -12242,8 +12703,8 @@
propagatedType = overriddenType;
}
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(prefixedIdentifier, propagatedType);
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(prefixedIdentifier, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
return null;
}
@@ -12272,7 +12733,7 @@
if (propagatedMethodElement != staticMethodElement) {
Type2 propagatedType = computeStaticReturnType(propagatedMethodElement);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
}
}
@@ -12283,7 +12744,6 @@
* The Dart Language Specification, 12.13: <blockquote> Property extraction allows for a member of
* an object to be concisely extracted from the object. If <i>o</i> is an object, and if <i>m</i>
* is the name of a method member of <i>o</i>, then
- *
* * <i>o.m</i> is defined to be equivalent to: <i>(r<sub>1</sub>, …, r<sub>n</sub>,
* {p<sub>1</sub> : d<sub>1</sub>, …, p<sub>k</sub> : d<sub>k</sub>}){return
* o.m(r<sub>1</sub>, …, r<sub>n</sub>, p<sub>1</sub>: p<sub>1</sub>, …,
@@ -12296,7 +12756,6 @@
* <i>r<sub>1</sub>, …, r<sub>n</sub></i>, and optional positional parameters
* <i>p<sub>1</sub> … p<sub>k</sub></i> with defaults <i>d<sub>1</sub>, …,
* d<sub>k</sub></i>.
- *
* Otherwise, if <i>m</i> is the name of a getter member of <i>o</i> (declared implicitly or
* explicitly) then <i>o.m</i> evaluates to the result of invoking the getter. </blockquote>
*
@@ -12330,7 +12789,7 @@
staticType = staticElement.type;
} else if (staticElement is PropertyAccessorElement) {
Expression realTarget = node.realTarget;
- staticType = getType(staticElement, realTarget != null ? getStaticType(realTarget) : null);
+ staticType = getTypeOfProperty(staticElement, realTarget != null ? getStaticType(realTarget) : null);
} else {
}
recordStaticType(propertyName, staticType);
@@ -12341,12 +12800,12 @@
propagatedType = propagatedElement.type;
} else if (propagatedElement is PropertyAccessorElement) {
Expression realTarget = node.realTarget;
- propagatedType = getType(propagatedElement, realTarget != null ? realTarget.bestType : null);
+ propagatedType = getTypeOfProperty(propagatedElement, realTarget != null ? realTarget.bestType : null);
} else {
}
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(propertyName, propagatedType);
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(propertyName, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
return null;
}
@@ -12367,7 +12826,6 @@
* Let <i>d</i> be the innermost declaration in the enclosing lexical scope whose name is
* <i>id</i>. If no such declaration exists in the lexical scope, let <i>d</i> be the declaration
* of the inherited member named <i>id</i> if it exists.
- *
* * If <i>d</i> is a class or type alias <i>T</i>, the value of <i>e</i> is the unique instance
* of class `Type` reifying <i>T</i>.
* * If <i>d</i> is a type parameter <i>T</i>, then the value of <i>e</i> is the value of the
@@ -12375,7 +12833,6 @@
* that created the current binding of this. We are assured that this is well defined, because if
* we were in a static member the reference to <i>T</i> would be a compile-time error.
* * If <i>d</i> is a library variable then:
- *
* * If <i>d</i> is of one of the forms <i>var v = e<sub>i</sub>;</i>, <i>T v =
* e<sub>i</sub>;</i>, <i>final v = e<sub>i</sub>;</i>, <i>final T v = e<sub>i</sub>;</i>, and no
* value has yet been stored into <i>v</i> then the initializer expression <i>e<sub>i</sub></i> is
@@ -12386,7 +12843,6 @@
* * If <i>d</i> is of one of the forms <i>const v = e;</i> or <i>const T v = e;</i> the result
* of the getter is the value of the compile time constant <i>e</i>. Otherwise
* * <i>e</i> evaluates to the current binding of <i>id</i>.
- *
* * If <i>d</i> is a local variable or formal parameter then <i>e</i> evaluates to the current
* binding of <i>id</i>.
* * If <i>d</i> is a static method, top level function or local function then <i>e</i>
@@ -12399,7 +12855,6 @@
* method, getter, or setter) or variable initializer, evaluation of e causes a NoSuchMethodError
* to be thrown.
* * Otherwise <i>e</i> is equivalent to the property extraction <i>this.id</i>.
- *
* </blockquote>
*/
Object visitSimpleIdentifier(SimpleIdentifier node) {
@@ -12420,7 +12875,7 @@
} else if (element is MethodElement) {
staticType = element.type;
} else if (element is PropertyAccessorElement) {
- staticType = getType(element, null);
+ staticType = getTypeOfProperty(element, null);
} else if (element is ExecutableElement) {
staticType = element.type;
} else if (element is TypeParameterElement) {
@@ -12439,7 +12894,7 @@
// to get another candidate for the propagated type.
Type2 propagatedType = _overrideManager.getType(element);
if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
- recordPropagatedType2(node, propagatedType);
+ recordPropagatedType(node, propagatedType);
}
return null;
}
@@ -12505,7 +12960,7 @@
if (initializer != null) {
Type2 rightType = initializer.bestType;
SimpleIdentifier name = node.name;
- recordPropagatedType2(name, rightType);
+ recordPropagatedType(name, rightType);
VariableElement element = name.staticElement as VariableElement;
if (element != null) {
_resolver.override2(element, rightType);
@@ -12551,14 +13006,14 @@
* @param body the boy of the function whose propagated return type is to be computed
* @return the propagated return type that was computed
*/
- Type2 computePropagatedReturnType2(FunctionBody body) {
+ Type2 computePropagatedReturnTypeOfFunction(FunctionBody body) {
if (body is ExpressionFunctionBody) {
ExpressionFunctionBody expressionBody = body;
return expressionBody.expression.bestType;
}
if (body is BlockFunctionBody) {
List<Type2> result = [null];
- body.accept(new GeneralizingASTVisitor_StaticTypeAnalyzer_computePropagatedReturnType2(result));
+ body.accept(new GeneralizingAstVisitor_StaticTypeAnalyzer_computePropagatedReturnTypeOfFunction(result));
return result[0];
}
return null;
@@ -12620,7 +13075,7 @@
* @param node the function expression whose static return type is to be computed
* @return the static return type that was computed
*/
- Type2 computeStaticReturnType2(FunctionDeclaration node) {
+ Type2 computeStaticReturnTypeOfFunctionDeclaration(FunctionDeclaration node) {
TypeName returnType = node.returnType;
if (returnType == null) {
return _dynamicType;
@@ -12636,7 +13091,7 @@
* @param node the function expression whose return type is to be computed
* @return the return type that was computed
*/
- Type2 computeStaticReturnType3(FunctionExpression node) {
+ Type2 computeStaticReturnTypeOfFunctionExpression(FunctionExpression node) {
FunctionBody body = node.body;
if (body is ExpressionFunctionBody) {
return getStaticType(body.expression);
@@ -12729,7 +13184,7 @@
* @param argumentList the list of arguments from which a type is to be extracted
* @return the type specified by the first argument in the argument list
*/
- Type2 getFirstArgumentAsType(LibraryElement library, ArgumentList argumentList) => getFirstArgumentAsType2(library, argumentList, null);
+ Type2 getFirstArgumentAsType(LibraryElement library, ArgumentList argumentList) => getFirstArgumentAsTypeWithMap(library, argumentList, null);
/**
* If the given argument list contains at least one argument, and if the argument is a simple
@@ -12741,7 +13196,7 @@
* @param nameMap an optional map used to map the element name to a type name
* @return the type specified by the first argument in the argument list
*/
- Type2 getFirstArgumentAsType2(LibraryElement library, ArgumentList argumentList, Map<String, String> nameMap) => getElementNameAsType(library, getFirstArgumentAsString(argumentList), nameMap);
+ Type2 getFirstArgumentAsTypeWithMap(LibraryElement library, ArgumentList argumentList, Map<String, String> nameMap) => getElementNameAsType(library, getFirstArgumentAsString(argumentList), nameMap);
/**
* Return the static type of the given expression.
@@ -12759,6 +13214,21 @@
}
/**
+ * Return the type represented by the given type name.
+ *
+ * @param typeName the type name representing the type to be returned
+ * @return the type represented by the type name
+ */
+ Type2 getType(TypeName typeName) {
+ Type2 type = typeName.type;
+ if (type == null) {
+ //TODO(brianwilkerson) Determine the conditions for which the type is null.
+ return _dynamicType;
+ }
+ return type;
+ }
+
+ /**
* Return the type that should be recorded for a node that resolved to the given accessor.
*
* @param accessor the accessor that the node resolved to
@@ -12768,7 +13238,7 @@
* specific type information
* @return the type that should be recorded for a node that resolved to the given accessor
*/
- Type2 getType(PropertyAccessorElement accessor, Type2 context) {
+ Type2 getTypeOfProperty(PropertyAccessorElement accessor, Type2 context) {
FunctionType functionType = accessor.type;
if (functionType == null) {
// TODO(brianwilkerson) Report this internal error. This happens when we are analyzing a
@@ -12810,21 +13280,6 @@
}
/**
- * Return the type represented by the given type name.
- *
- * @param typeName the type name representing the type to be returned
- * @return the type represented by the type name
- */
- Type2 getType2(TypeName typeName) {
- Type2 type = typeName.type;
- if (type == null) {
- //TODO(brianwilkerson) Determine the conditions for which the type is null.
- return _dynamicType;
- }
- return type;
- }
-
- /**
* Return `true` if the given [Type] is the `Future` form the 'dart:async'
* library.
*/
@@ -12853,11 +13308,23 @@
* @return `true` if the given node is not a type literal
*/
bool isNotTypeLiteral(Identifier node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
return parent is TypeName || (parent is PrefixedIdentifier && (parent.parent is TypeName || identical(parent.prefix, node))) || (parent is PropertyAccess && identical(parent.target, node)) || (parent is MethodInvocation && identical(node, parent.target));
}
/**
+ * Record that the propagated type of the given node is the given type.
+ *
+ * @param expression the node whose type is to be recorded
+ * @param type the propagated type of the node
+ */
+ void recordPropagatedType(Expression expression, Type2 type) {
+ if (type != null && !type.isDynamic) {
+ expression.propagatedType = type;
+ }
+ }
+
+ /**
* Given a function element and its body, compute and record the propagated return type of the
* function.
*
@@ -12866,8 +13333,8 @@
* @return the propagated return type that was computed, may be `null` if it is not more
* specific than the static return type.
*/
- void recordPropagatedType(ExecutableElement functionElement, FunctionBody body) {
- Type2 propagatedReturnType = computePropagatedReturnType2(body);
+ void recordPropagatedTypeOfFunction(ExecutableElement functionElement, FunctionBody body) {
+ Type2 propagatedReturnType = computePropagatedReturnTypeOfFunction(body);
if (propagatedReturnType == null) {
return;
}
@@ -12885,18 +13352,6 @@
}
/**
- * Record that the propagated type of the given node is the given type.
- *
- * @param expression the node whose type is to be recorded
- * @param type the propagated type of the node
- */
- void recordPropagatedType2(Expression expression, Type2 type) {
- if (type != null && !type.isDynamic) {
- expression.propagatedType = type;
- }
- }
-
- /**
* Record that the static type of the given node is the given type.
*
* @param expression the node whose type is to be recorded
@@ -12948,10 +13403,10 @@
set thisType_J2DAccessor(__v) => _thisType = __v;
}
-class GeneralizingASTVisitor_StaticTypeAnalyzer_computePropagatedReturnType2 extends GeneralizingASTVisitor<Object> {
+class GeneralizingAstVisitor_StaticTypeAnalyzer_computePropagatedReturnTypeOfFunction extends GeneralizingAstVisitor<Object> {
List<Type2> result;
- GeneralizingASTVisitor_StaticTypeAnalyzer_computePropagatedReturnType2(this.result) : super();
+ GeneralizingAstVisitor_StaticTypeAnalyzer_computePropagatedReturnTypeOfFunction(this.result) : super();
Object visitExpression(Expression node) => null;
@@ -13001,7 +13456,7 @@
computeSubtypesInLibrary(classElement.library);
// use the subtypeMap to compute the set of all subtypes and subtype's subtypes
Set<ClassElement> allSubtypes = new Set<ClassElement>();
- computeAllSubtypes2(classElement, new Set<ClassElement>(), allSubtypes);
+ safelyComputeAllSubtypes(classElement, new Set<ClassElement>(), allSubtypes);
return allSubtypes;
}
@@ -13016,29 +13471,6 @@
}
/**
- * Given some [ClassElement] and a [HashSet<ClassElement>], this method recursively
- * adds all of the subtypes of the [ClassElement] to the passed array.
- *
- * @param classElement the type to compute the set of subtypes of
- * @param visitedClasses the set of class elements that this method has already recursively seen
- * @param allSubtypes the computed set of subtypes of the passed class element
- */
- void computeAllSubtypes2(ClassElement classElement, Set<ClassElement> visitedClasses, Set<ClassElement> allSubtypes) {
- if (!visitedClasses.add(classElement)) {
- // if this class has already been called on this class element
- return;
- }
- Set<ClassElement> subtypes = _subtypeMap[classElement];
- if (subtypes == null) {
- return;
- }
- for (ClassElement subtype in subtypes) {
- computeAllSubtypes2(subtype, visitedClasses, allSubtypes);
- }
- allSubtypes.addAll(subtypes);
- }
-
- /**
* Given some [ClassElement], this method adds all of the pairs combinations of itself and
* all of its supertypes to the [subtypeMap] map.
*
@@ -13124,6 +13556,29 @@
}
subtypes.add(subtypeElement);
}
+
+ /**
+ * Given some [ClassElement] and a [HashSet<ClassElement>], this method recursively
+ * adds all of the subtypes of the [ClassElement] to the passed array.
+ *
+ * @param classElement the type to compute the set of subtypes of
+ * @param visitedClasses the set of class elements that this method has already recursively seen
+ * @param allSubtypes the computed set of subtypes of the passed class element
+ */
+ void safelyComputeAllSubtypes(ClassElement classElement, Set<ClassElement> visitedClasses, Set<ClassElement> allSubtypes) {
+ if (!visitedClasses.add(classElement)) {
+ // if this class has already been called on this class element
+ return;
+ }
+ Set<ClassElement> subtypes = _subtypeMap[classElement];
+ if (subtypes == null) {
+ return;
+ }
+ for (ClassElement subtype in subtypes) {
+ safelyComputeAllSubtypes(subtype, visitedClasses, allSubtypes);
+ }
+ allSubtypes.addAll(subtypes);
+ }
}
/**
@@ -13453,8 +13908,6 @@
/**
* The interface `TypeProvider` defines the behavior of objects that provide access to types
* defined by the language.
- *
- * @coverage dart.engine.resolver
*/
abstract class TypeProvider {
/**
@@ -13573,8 +14026,6 @@
/**
* Instances of the class `TypeProviderImpl` provide access to types defined by the language
* by looking for those types in the element model for the core library.
- *
- * @coverage dart.engine.resolver
*/
class TypeProviderImpl implements TypeProvider {
/**
@@ -13746,8 +14197,6 @@
* the elements in the element model. This includes the types of superclasses, mixins, interfaces,
* fields, methods, parameters, and local variables. As a side-effect, this also finishes building
* the type hierarchy.
- *
- * @coverage dart.engine.resolver
*/
class TypeResolverVisitor extends ScopedVisitor {
/**
@@ -13762,7 +14211,7 @@
* @return `true` if given [TypeName] is used as a type annotation.
*/
static bool isTypeAnnotation(TypeName node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is VariableDeclarationList) {
return identical(parent.type, node);
}
@@ -13835,7 +14284,7 @@
if (exceptionTypeName == null) {
exceptionType = typeProvider.dynamicType;
} else {
- exceptionType = getType3(exceptionTypeName);
+ exceptionType = getType(exceptionTypeName);
}
recordType(exception, exceptionType);
Element element = exception.staticElement;
@@ -13888,6 +14337,24 @@
}
if (classElement != null && superclassType != null) {
classElement.supertype = superclassType;
+ ClassElement superclassElement = superclassType.element;
+ if (superclassElement != null) {
+ List<ConstructorElement> constructors = superclassElement.constructors;
+ int count = constructors.length;
+ if (count > 0) {
+ List<Type2> parameterTypes = TypeParameterTypeImpl.getTypes(superclassType.typeParameters);
+ List<Type2> argumentTypes = getArgumentTypes(node.superclass.typeArguments, parameterTypes);
+ InterfaceType classType = classElement.type;
+ List<ConstructorElement> implicitConstructors = new List<ConstructorElement>();
+ for (int i = 0; i < count; i++) {
+ ConstructorElement explicitConstructor = constructors[i];
+ if (!explicitConstructor.isFactory) {
+ implicitConstructors.add(createImplicitContructor(classType, explicitConstructor, parameterTypes, argumentTypes));
+ }
+ }
+ classElement.constructors = new List.from(implicitConstructors);
+ }
+ }
}
resolve(classElement, node.withClause, node.implementsClause);
return null;
@@ -13911,7 +14378,7 @@
if (typeName == null) {
declaredType = _dynamicType;
} else {
- declaredType = getType3(typeName);
+ declaredType = getType(typeName);
}
LocalVariableElementImpl element = node.element as LocalVariableElementImpl;
element.type = declaredType;
@@ -13936,7 +14403,7 @@
}
}
} else {
- type = getType3(typeName);
+ type = getType(typeName);
}
parameter.type = type;
} else {
@@ -13952,7 +14419,7 @@
ExecutableElementImpl element = node.element as ExecutableElementImpl;
element.returnType = computeReturnType(node.returnType);
FunctionTypeImpl type = new FunctionTypeImpl.con1(element);
- ClassElement definingClass = element.getAncestor(ClassElement);
+ ClassElement definingClass = element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
type.typeArguments = definingClass.type.typeArguments;
}
@@ -13982,7 +14449,7 @@
ExecutableElementImpl element = node.element as ExecutableElementImpl;
element.returnType = computeReturnType(node.returnType);
FunctionTypeImpl type = new FunctionTypeImpl.con1(element);
- ClassElement definingClass = element.getAncestor(ClassElement);
+ ClassElement definingClass = element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
type.typeArguments = definingClass.type.typeArguments;
}
@@ -14009,7 +14476,7 @@
if (typeName == null) {
declaredType = _dynamicType;
} else {
- declaredType = getType3(typeName);
+ declaredType = getType(typeName);
}
Element element = node.identifier.staticElement;
if (element is ParameterElement) {
@@ -14055,7 +14522,7 @@
// If not, the look to see whether we might have created the wrong AST structure for a
// constructor name. If so, fix the AST structure and then proceed.
//
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (typeName is PrefixedIdentifier && parent is ConstructorName && argumentList == null) {
ConstructorName name = parent;
if (name.name == null) {
@@ -14066,10 +14533,10 @@
if (parent.parent is InstanceCreationExpression && (parent.parent as InstanceCreationExpression).isConst) {
// If, if this is a const expression, then generate a
// CompileTimeErrorCode.CONST_WITH_NON_TYPE error.
- reportError9(CompileTimeErrorCode.CONST_WITH_NON_TYPE, prefixedIdentifier.identifier, [prefixedIdentifier.identifier.name]);
+ reportErrorForNode(CompileTimeErrorCode.CONST_WITH_NON_TYPE, prefixedIdentifier.identifier, [prefixedIdentifier.identifier.name]);
} else {
// Else, if this expression is a new expression, report a NEW_WITH_NON_TYPE warning.
- reportError9(StaticWarningCode.NEW_WITH_NON_TYPE, prefixedIdentifier.identifier, [prefixedIdentifier.identifier.name]);
+ reportErrorForNode(StaticWarningCode.NEW_WITH_NON_TYPE, prefixedIdentifier.identifier, [prefixedIdentifier.identifier.name]);
}
setElement(prefix, element);
return null;
@@ -14095,14 +14562,14 @@
InstanceCreationExpression creation = node.parent.parent as InstanceCreationExpression;
if (creation.isConst) {
if (element == null) {
- reportError9(CompileTimeErrorCode.UNDEFINED_CLASS, typeNameSimple, [typeName]);
+ reportErrorForNode(CompileTimeErrorCode.UNDEFINED_CLASS, typeNameSimple, [typeName]);
} else {
- reportError9(CompileTimeErrorCode.CONST_WITH_NON_TYPE, typeNameSimple, [typeName]);
+ reportErrorForNode(CompileTimeErrorCode.CONST_WITH_NON_TYPE, typeNameSimple, [typeName]);
}
elementValid = false;
} else {
if (element != null) {
- reportError9(StaticWarningCode.NEW_WITH_NON_TYPE, typeNameSimple, [typeName]);
+ reportErrorForNode(StaticWarningCode.NEW_WITH_NON_TYPE, typeNameSimple, [typeName]);
elementValid = false;
}
}
@@ -14115,22 +14582,22 @@
SimpleIdentifier typeNameSimple = getTypeSimpleIdentifier(typeName);
RedirectingConstructorKind redirectingConstructorKind;
if (isBuiltInIdentifier(node) && isTypeAnnotation(node)) {
- reportError9(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE, typeName, [typeName.name]);
+ reportErrorForNode(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE, typeName, [typeName.name]);
} else if (typeNameSimple.name == "boolean") {
- reportError9(StaticWarningCode.UNDEFINED_CLASS_BOOLEAN, typeNameSimple, []);
+ reportErrorForNode(StaticWarningCode.UNDEFINED_CLASS_BOOLEAN, typeNameSimple, []);
} else if (isTypeNameInCatchClause(node)) {
- reportError9(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, typeName, [typeName.name]);
} else if (isTypeNameInAsExpression(node)) {
- reportError9(StaticWarningCode.CAST_TO_NON_TYPE, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.CAST_TO_NON_TYPE, typeName, [typeName.name]);
} else if (isTypeNameInIsExpression(node)) {
- reportError9(StaticWarningCode.TYPE_TEST_NON_TYPE, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.TYPE_TEST_NON_TYPE, typeName, [typeName.name]);
} else if ((redirectingConstructorKind = getRedirectingConstructorKind(node)) != null) {
ErrorCode errorCode = (identical(redirectingConstructorKind, RedirectingConstructorKind.CONST) ? CompileTimeErrorCode.REDIRECT_TO_NON_CLASS : StaticWarningCode.REDIRECT_TO_NON_CLASS) as ErrorCode;
- reportError9(errorCode, typeName, [typeName.name]);
+ reportErrorForNode(errorCode, typeName, [typeName.name]);
} else if (isTypeNameInTypeArgumentList(node)) {
- reportError9(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, typeName, [typeName.name]);
+ reportErrorForNode(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, typeName, [typeName.name]);
} else {
- reportError9(StaticWarningCode.UNDEFINED_CLASS, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.UNDEFINED_CLASS, typeName, [typeName.name]);
}
elementValid = false;
}
@@ -14158,7 +14625,7 @@
}
} else if (element is MultiplyDefinedElement) {
List<Element> elements = (element as MultiplyDefinedElement).conflictingElements;
- type = getType(elements);
+ type = getTypeWhenMultiplyDefined(elements);
if (type != null) {
node.type = type;
}
@@ -14166,24 +14633,24 @@
// The name does not represent a type.
RedirectingConstructorKind redirectingConstructorKind;
if (isTypeNameInCatchClause(node)) {
- reportError9(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, typeName, [typeName.name]);
} else if (isTypeNameInAsExpression(node)) {
- reportError9(StaticWarningCode.CAST_TO_NON_TYPE, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.CAST_TO_NON_TYPE, typeName, [typeName.name]);
} else if (isTypeNameInIsExpression(node)) {
- reportError9(StaticWarningCode.TYPE_TEST_NON_TYPE, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.TYPE_TEST_NON_TYPE, typeName, [typeName.name]);
} else if ((redirectingConstructorKind = getRedirectingConstructorKind(node)) != null) {
ErrorCode errorCode = (identical(redirectingConstructorKind, RedirectingConstructorKind.CONST) ? CompileTimeErrorCode.REDIRECT_TO_NON_CLASS : StaticWarningCode.REDIRECT_TO_NON_CLASS) as ErrorCode;
- reportError9(errorCode, typeName, [typeName.name]);
+ reportErrorForNode(errorCode, typeName, [typeName.name]);
} else if (isTypeNameInTypeArgumentList(node)) {
- reportError9(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, typeName, [typeName.name]);
+ reportErrorForNode(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, typeName, [typeName.name]);
} else {
- ASTNode parent = typeName.parent;
+ AstNode parent = typeName.parent;
while (parent is TypeName) {
parent = parent.parent;
}
if (parent is ExtendsClause || parent is ImplementsClause || parent is WithClause || parent is ClassTypeAlias) {
} else {
- reportError9(StaticWarningCode.NOT_A_TYPE, typeName, [typeName.name]);
+ reportErrorForNode(StaticWarningCode.NOT_A_TYPE, typeName, [typeName.name]);
}
}
setElement(typeName, this._dynamicType.element);
@@ -14199,13 +14666,13 @@
int count = Math.min(argumentCount, parameterCount);
List<Type2> typeArguments = new List<Type2>();
for (int i = 0; i < count; i++) {
- Type2 argumentType = getType3(arguments[i]);
+ Type2 argumentType = getType(arguments[i]);
if (argumentType != null) {
typeArguments.add(argumentType);
}
}
if (argumentCount != parameterCount) {
- reportError9(getInvalidTypeParametersErrorCode(node), node, [typeName.name, parameterCount, argumentCount]);
+ reportErrorForNode(getInvalidTypeParametersErrorCode(node), node, [typeName.name, parameterCount, argumentCount]);
}
argumentCount = typeArguments.length;
if (argumentCount < parameterCount) {
@@ -14265,7 +14732,7 @@
if (typeName == null) {
declaredType = _dynamicType;
} else {
- declaredType = getType3(typeName);
+ declaredType = getType(typeName);
}
Element element = node.name.staticElement;
if (element is VariableElement) {
@@ -14275,7 +14742,7 @@
PropertyAccessorElementImpl getter = variableElement.getter as PropertyAccessorElementImpl;
getter.returnType = declaredType;
FunctionTypeImpl getterType = new FunctionTypeImpl.con1(getter);
- ClassElement definingClass = element.getAncestor(ClassElement);
+ ClassElement definingClass = element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
getterType.typeArguments = definingClass.type.typeArguments;
}
@@ -14305,7 +14772,7 @@
// parameters can be correctly resolved.
//
List<ClassMember> nonFields = new List<ClassMember>();
- node.visitChildren(new UnifyingASTVisitor_TypeResolverVisitor_visitClassDeclarationInScope(this, nonFields));
+ node.visitChildren(new UnifyingAstVisitor_TypeResolverVisitor_visitClassDeclarationInScope(this, nonFields));
int count = nonFields.length;
for (int i = 0; i < count; i++) {
nonFields[i].accept(this);
@@ -14328,6 +14795,73 @@
}
/**
+ * Create an implicit constructor that is copied from the given constructor, but that is in the
+ * given class.
+ *
+ * @param classType the class in which the implicit constructor is defined
+ * @param explicitConstructor the constructor on which the implicit constructor is modeled
+ * @param parameterTypes the types to be replaced when creating parameters
+ * @param argumentTypes the types with which the parameters are to be replaced
+ * @return the implicit constructor that was created
+ */
+ ConstructorElement createImplicitContructor(InterfaceType classType, ConstructorElement explicitConstructor, List<Type2> parameterTypes, List<Type2> argumentTypes) {
+ ConstructorElementImpl implicitConstructor = new ConstructorElementImpl.con2(explicitConstructor.name, -1);
+ implicitConstructor.synthetic = true;
+ implicitConstructor.redirectedConstructor = explicitConstructor;
+ implicitConstructor.const2 = explicitConstructor.isConst;
+ implicitConstructor.returnType = classType;
+ List<ParameterElement> explicitParameters = explicitConstructor.parameters;
+ int count = explicitParameters.length;
+ if (count > 0) {
+ List<ParameterElement> implicitParameters = new List<ParameterElement>(count);
+ for (int i = 0; i < count; i++) {
+ ParameterElement explicitParameter = explicitParameters[i];
+ ParameterElementImpl implicitParameter = new ParameterElementImpl.con2(explicitParameter.name, -1);
+ implicitParameter.const3 = explicitParameter.isConst;
+ implicitParameter.final2 = explicitParameter.isFinal;
+ implicitParameter.parameterKind = explicitParameter.parameterKind;
+ implicitParameter.synthetic = true;
+ implicitParameter.type = explicitParameter.type.substitute2(argumentTypes, parameterTypes);
+ implicitParameters[i] = implicitParameter;
+ }
+ implicitConstructor.parameters = implicitParameters;
+ }
+ FunctionTypeImpl type = new FunctionTypeImpl.con1(implicitConstructor);
+ type.typeArguments = classType.typeArguments;
+ implicitConstructor.type = type;
+ return implicitConstructor;
+ }
+
+ /**
+ * Return an array of argument types that corresponds to the array of parameter types and that are
+ * derived from the given list of type arguments.
+ *
+ * @param typeArguments the type arguments from which the types will be taken
+ * @param parameterTypes the parameter types that must be matched by the type arguments
+ * @return the argument types that correspond to the parameter types
+ */
+ List<Type2> getArgumentTypes(TypeArgumentList typeArguments, List<Type2> parameterTypes) {
+ DynamicTypeImpl dynamic = DynamicTypeImpl.instance;
+ int parameterCount = parameterTypes.length;
+ List<Type2> types = new List<Type2>(parameterCount);
+ if (typeArguments == null) {
+ for (int i = 0; i < parameterCount; i++) {
+ types[i] = dynamic;
+ }
+ } else {
+ NodeList<TypeName> arguments = typeArguments.arguments;
+ int argumentCount = Math.min(arguments.length, parameterCount);
+ for (int i = 0; i < argumentCount; i++) {
+ types[i] = arguments[i].type;
+ }
+ for (int i = argumentCount; i < parameterCount; i++) {
+ types[i] = dynamic;
+ }
+ }
+ return types;
+ }
+
+ /**
* Return the class element that represents the class whose name was provided.
*
* @param identifier the name from the declaration of a class
@@ -14378,7 +14912,7 @@
* were provided
*/
ErrorCode getInvalidTypeParametersErrorCode(TypeName node) {
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is ConstructorName) {
parent = parent.parent;
if (parent is InstanceCreationExpression) {
@@ -14400,7 +14934,7 @@
* redirected constructor, or `null` otherwise
*/
RedirectingConstructorKind getRedirectingConstructorKind(TypeName typeName) {
- ASTNode parent = typeName.parent;
+ AstNode parent = typeName.parent;
if (parent is ConstructorName) {
ConstructorName constructorName = parent as ConstructorName;
parent = constructorName.parent;
@@ -14418,32 +14952,12 @@
}
/**
- * Given the multiple elements to which a single name could potentially be resolved, return the
- * single interface type that should be used, or `null` if there is no clear choice.
- *
- * @param elements the elements to which a single name could potentially be resolved
- * @return the single interface type that should be used for the type name
- */
- InterfaceType getType(List<Element> elements) {
- InterfaceType type = null;
- for (Element element in elements) {
- if (element is ClassElement) {
- if (type != null) {
- return null;
- }
- type = element.type;
- }
- }
- return type;
- }
-
- /**
* Return the type represented by the given type name.
*
* @param typeName the type name representing the type to be returned
* @return the type represented by the type name
*/
- Type2 getType3(TypeName typeName) {
+ Type2 getType(TypeName typeName) {
Type2 type = typeName.type;
if (type == null) {
return _dynamicType;
@@ -14481,13 +14995,33 @@
}
/**
+ * Given the multiple elements to which a single name could potentially be resolved, return the
+ * single interface type that should be used, or `null` if there is no clear choice.
+ *
+ * @param elements the elements to which a single name could potentially be resolved
+ * @return the single interface type that should be used for the type name
+ */
+ InterfaceType getTypeWhenMultiplyDefined(List<Element> elements) {
+ InterfaceType type = null;
+ for (Element element in elements) {
+ if (element is ClassElement) {
+ if (type != null) {
+ return null;
+ }
+ type = element.type;
+ }
+ }
+ return type;
+ }
+
+ /**
* Checks if the given type name is used as the type in an as expression.
*
* @param typeName the type name to analyzer
* @return `true` if the given type name is used as the type in an as expression
*/
bool isTypeNameInAsExpression(TypeName typeName) {
- ASTNode parent = typeName.parent;
+ AstNode parent = typeName.parent;
if (parent is AsExpression) {
AsExpression asExpression = parent;
return identical(asExpression.type, typeName);
@@ -14502,7 +15036,7 @@
* @return `true` if the given type name is used as the exception type in a catch clause
*/
bool isTypeNameInCatchClause(TypeName typeName) {
- ASTNode parent = typeName.parent;
+ AstNode parent = typeName.parent;
if (parent is CatchClause) {
CatchClause catchClause = parent;
return identical(catchClause.exceptionType, typeName);
@@ -14518,7 +15052,7 @@
* expression
*/
bool isTypeNameInInstanceCreationExpression(TypeName typeName) {
- ASTNode parent = typeName.parent;
+ AstNode parent = typeName.parent;
if (parent is ConstructorName && parent.parent is InstanceCreationExpression) {
ConstructorName constructorName = parent;
return constructorName != null && identical(constructorName.type, typeName);
@@ -14533,7 +15067,7 @@
* @return `true` if the given type name is used as the type in an is expression
*/
bool isTypeNameInIsExpression(TypeName typeName) {
- ASTNode parent = typeName.parent;
+ AstNode parent = typeName.parent;
if (parent is IsExpression) {
IsExpression isExpression = parent;
return identical(isExpression.type, typeName);
@@ -14603,7 +15137,7 @@
Element element2 = identifier2.staticElement;
if (element != null && element == element2) {
detectedRepeatOnIndex[j] = true;
- reportError9(CompileTimeErrorCode.IMPLEMENTS_REPEATED, typeName2, [name2]);
+ reportErrorForNode(CompileTimeErrorCode.IMPLEMENTS_REPEATED, typeName2, [name2]);
}
}
}
@@ -14628,9 +15162,9 @@
// If the type is not an InterfaceType, then visitTypeName() sets the type to be a DynamicTypeImpl
Identifier name = typeName.name;
if (name.name == sc.Keyword.DYNAMIC.syntax) {
- reportError9(dynamicTypeError, name, [name.name]);
+ reportErrorForNode(dynamicTypeError, name, [name.name]);
} else {
- reportError9(nonTypeError, name, [name.name]);
+ reportErrorForNode(nonTypeError, name, [name.name]);
}
return null;
}
@@ -14686,14 +15220,14 @@
aliasElement.shareParameters(parameters);
aliasElement.returnType = computeReturnType(returnType);
FunctionTypeImpl type = new FunctionTypeImpl.con2(aliasElement);
- ClassElement definingClass = element.getAncestor(ClassElement);
+ ClassElement definingClass = element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
aliasElement.shareTypeParameters(definingClass.typeParameters);
type.typeArguments = definingClass.type.typeArguments;
} else {
- FunctionTypeAliasElement alias = element.getAncestor(FunctionTypeAliasElement);
+ FunctionTypeAliasElement alias = element.getAncestor((element) => element is FunctionTypeAliasElement);
while (alias != null && alias.isSynthetic) {
- alias = alias.getAncestor(FunctionTypeAliasElement);
+ alias = alias.getAncestor((element) => element is FunctionTypeAliasElement);
}
if (alias != null) {
aliasElement.typeParameters = alias.typeParameters;
@@ -14719,12 +15253,12 @@
RedirectingConstructorKind(String name, int ordinal) : super(name, ordinal);
}
-class UnifyingASTVisitor_TypeResolverVisitor_visitClassDeclarationInScope extends UnifyingASTVisitor<Object> {
+class UnifyingAstVisitor_TypeResolverVisitor_visitClassDeclarationInScope extends UnifyingAstVisitor<Object> {
final TypeResolverVisitor TypeResolverVisitor_this;
List<ClassMember> nonFields;
- UnifyingASTVisitor_TypeResolverVisitor_visitClassDeclarationInScope(this.TypeResolverVisitor_this, this.nonFields) : super();
+ UnifyingAstVisitor_TypeResolverVisitor_visitClassDeclarationInScope(this.TypeResolverVisitor_this, this.nonFields) : super();
Object visitConstructorDeclaration(ConstructorDeclaration node) {
nonFields.add(node);
@@ -14736,14 +15270,12 @@
return null;
}
- Object visitNode(ASTNode node) => node.accept(TypeResolverVisitor_this);
+ Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this);
}
/**
* Instances of the class `VariableResolverVisitor` are used to resolve
* [SimpleIdentifier]s to local variables and formal parameters.
- *
- * @coverage dart.engine.resolver
*/
class VariableResolverVisitor extends ScopedVisitor {
/**
@@ -14803,7 +15335,7 @@
return null;
}
// Ignore if qualified.
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is PrefixedIdentifier && identical(parent.identifier, node)) {
return null;
}
@@ -14852,8 +15384,6 @@
/**
* Instances of the class `ClassScope` implement the scope defined by a class.
- *
- * @coverage dart.engine.resolver
*/
class ClassScope extends EnclosedScope {
/**
@@ -14908,8 +15438,6 @@
/**
* Instances of the class `EnclosedScope` implement a scope that is lexically enclosed in
* another scope.
- *
- * @coverage dart.engine.resolver
*/
class EnclosedScope extends Scope {
/**
@@ -14975,8 +15503,6 @@
/**
* Instances of the class `FunctionScope` implement the scope defined by a function.
- *
- * @coverage dart.engine.resolver
*/
class FunctionScope extends EnclosedScope {
ExecutableElement _functionElement;
@@ -15019,8 +15545,6 @@
/**
* Instances of the class `FunctionTypeScope` implement the scope defined by a function type
* alias.
- *
- * @coverage dart.engine.resolver
*/
class FunctionTypeScope extends EnclosedScope {
FunctionTypeAliasElement _typeElement;
@@ -15068,8 +15592,6 @@
/**
* Instances of the class `LabelScope` represent a scope in which a single label is defined.
- *
- * @coverage dart.engine.resolver
*/
class LabelScope {
/**
@@ -15152,8 +15674,6 @@
/**
* Instances of the class `LibraryImportScope` represent the scope containing all of the names
* available from imported libraries.
- *
- * @coverage dart.engine.resolver
*/
class LibraryImportScope extends Scope {
/**
@@ -15306,8 +15826,6 @@
/**
* Instances of the class `LibraryScope` implement a scope containing all of the names defined
* in a given library.
- *
- * @coverage dart.engine.resolver
*/
class LibraryScope extends EnclosedScope {
/**
@@ -15377,8 +15895,6 @@
/**
* Instances of the class `Namespace` implement a mapping of identifiers to the elements
* represented by those identifiers. Namespaces are the building blocks for scopes.
- *
- * @coverage dart.engine.resolver
*/
class Namespace {
/**
@@ -15422,8 +15938,6 @@
/**
* Instances of the class `NamespaceBuilder` are used to build a `Namespace`. Namespace
* builders are thread-safe and re-usable.
- *
- * @coverage dart.engine.resolver
*/
class NamespaceBuilder {
/**
@@ -15658,8 +16172,6 @@
/**
* The abstract class `Scope` defines the behavior common to name scopes used by the resolver
* to determine which names are visible at any given point in the code.
- *
- * @coverage dart.engine.resolver
*/
abstract class Scope {
/**
@@ -15787,8 +16299,8 @@
* @param identifier the identifier whose source is to be returned
* @return the source that contains the given identifier
*/
- Source getSource(ASTNode node) {
- CompilationUnit unit = node.getAncestor(CompilationUnit);
+ Source getSource(AstNode node) {
+ CompilationUnit unit = node.getAncestor((node) => node is CompilationUnit);
if (unit != null) {
CompilationUnitElement unitElement = unit.element;
if (unitElement != null) {
@@ -15859,14 +16371,14 @@
* @throws AnalysisException if the AST structure has not been resolved or is not part of a
* [CompilationUnit]
*/
- static Scope scopeFor(ASTNode node, AnalysisErrorListener errorListener) {
+ static Scope scopeFor(AstNode node, AnalysisErrorListener errorListener) {
if (node == null) {
throw new AnalysisException.con1("Cannot create scope: node is null");
} else if (node is CompilationUnit) {
ScopeBuilder builder = new ScopeBuilder(errorListener);
return builder.scopeForAstNode(node);
}
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent == null) {
throw new AnalysisException.con1("Cannot create scope: node is not part of a CompilationUnit");
}
@@ -15900,11 +16412,11 @@
* @throws AnalysisException if the AST structure has not been resolved or is not part of a
* [CompilationUnit]
*/
- Scope scopeForAstNode(ASTNode node) {
+ Scope scopeForAstNode(AstNode node) {
if (node is CompilationUnit) {
return scopeForCompilationUnit(node);
}
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent == null) {
throw new AnalysisException.con1("Cannot create scope: node is not part of a CompilationUnit");
}
@@ -15948,10 +16460,8 @@
* Instances of the class `ConstantVerifier` traverse an AST structure looking for additional
* errors and warnings not covered by the parser and resolver. In particular, it looks for errors
* and warnings related to constant expressions.
- *
- * @coverage dart.engine.resolver
*/
-class ConstantVerifier extends RecursiveASTVisitor<Object> {
+class ConstantVerifier extends RecursiveAstVisitor<Object> {
/**
* The error reporter by which errors will be reported.
*/
@@ -16004,13 +16514,13 @@
ConstructorElement constructorElement = element;
// should 'const' constructor
if (!constructorElement.isConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, node, []);
return null;
}
// should have arguments
ArgumentList argumentList = node.arguments;
if (argumentList == null) {
- _errorReporter.reportError3(CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, node, []);
return null;
}
// arguments should be constants
@@ -16034,7 +16544,7 @@
}
Object visitInstanceCreationExpression(InstanceCreationExpression node) {
- validateConstantArguments2(node);
+ validateInstanceCreationArguments(node);
return super.visitInstanceCreationExpression(node);
}
@@ -16083,7 +16593,7 @@
}
if (reportEqualKeys) {
for (Expression key in invalidKeys) {
- _errorReporter.reportError3(StaticWarningCode.EQUAL_KEYS_IN_MAP, key, []);
+ _errorReporter.reportError2(StaticWarningCode.EQUAL_KEYS_IN_MAP, key, []);
}
}
return null;
@@ -16134,9 +16644,9 @@
for (ErrorResult_ErrorData data in result.errorData) {
ErrorCode dataErrorCode = data.errorCode;
if (identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION) || identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE) || identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING) || identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL) || identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_INT) || identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM)) {
- _errorReporter.reportError3(dataErrorCode, data.node, []);
+ _errorReporter.reportError2(dataErrorCode, data.node, []);
} else {
- _errorReporter.reportError3(errorCode, data.node, []);
+ _errorReporter.reportError2(errorCode, data.node, []);
}
}
}
@@ -16173,23 +16683,6 @@
}
/**
- * Validate that if the passed instance creation is 'const' then all its arguments are constant
- * expressions.
- *
- * @param node the instance creation evaluate
- */
- void validateConstantArguments2(InstanceCreationExpression node) {
- if (!node.isConst) {
- return;
- }
- ArgumentList argumentList = node.argumentList;
- if (argumentList == null) {
- return;
- }
- validateConstantArguments(argumentList);
- }
-
- /**
* Validate that the default value associated with each of the parameters in the given list is a
* compile time constant.
*
@@ -16264,6 +16757,23 @@
}
}
}
+
+ /**
+ * Validate that if the passed instance creation is 'const' then all its arguments are constant
+ * expressions.
+ *
+ * @param node the instance creation evaluate
+ */
+ void validateInstanceCreationArguments(InstanceCreationExpression node) {
+ if (!node.isConst) {
+ return;
+ }
+ ArgumentList argumentList = node.argumentList;
+ if (argumentList == null) {
+ return;
+ }
+ validateConstantArguments(argumentList);
+ }
}
class ConstantVisitor_ConstantVerifier_validateInitializerExpression extends ConstantVisitor {
@@ -16303,10 +16813,8 @@
/**
* Instances of the class `ErrorVerifier` traverse an AST structure looking for additional
* errors and warnings not covered by the parser and resolver.
- *
- * @coverage dart.engine.resolver
*/
-class ErrorVerifier extends RecursiveASTVisitor<Object> {
+class ErrorVerifier extends RecursiveAstVisitor<Object> {
/**
* The error reporter by which errors will be reported.
*/
@@ -16432,16 +16940,16 @@
ExecutableElement _enclosingFunction;
/**
- * The number of return statements found in the method or function that we are currently visiting
- * that have a return value.
+ * The return statements found in the method or function that we are currently visiting that have
+ * a return value.
*/
- int _returnWithCount = 0;
+ List<ReturnStatement> _returnsWith = new List<ReturnStatement>();
/**
- * The number of return statements found in the method or function that we are currently visiting
- * that do not have a return value.
+ * The return statements found in the method or function that we are currently visiting that do
+ * not have a return value.
*/
- int _returnWithoutCount = 0;
+ List<ReturnStatement> _returnsWithout = new List<ReturnStatement>();
/**
* This map is initialized when visiting the contents of a class declaration. If the visitor is
@@ -16516,7 +17024,7 @@
}
Object visitArgumentList(ArgumentList node) {
- checkForArgumentTypeNotAssignable(node);
+ checkForArgumentTypesNotAssignableInList(node);
return super.visitArgumentList(node);
}
@@ -16529,31 +17037,42 @@
sc.Token operator = node.operator;
sc.TokenType operatorType = operator.type;
if (identical(operatorType, sc.TokenType.EQ)) {
- checkForInvalidAssignment2(node.leftHandSide, node.rightHandSide);
+ checkForInvalidAssignment(node.leftHandSide, node.rightHandSide);
} else {
- checkForInvalidAssignment(node);
+ checkForInvalidCompoundAssignment(node);
}
- checkForAssignmentToFinal(node);
- checkForArgumentTypeNotAssignable2(node.rightHandSide);
+ checkForAssignmentToFinal(node.leftHandSide);
+ checkForArgumentTypeNotAssignableForArgument(node.rightHandSide);
return super.visitAssignmentExpression(node);
}
Object visitBinaryExpression(BinaryExpression node) {
- checkForArgumentTypeNotAssignable2(node.rightOperand);
+ checkForArgumentTypeNotAssignableForArgument(node.rightOperand);
return super.visitBinaryExpression(node);
}
Object visitBlockFunctionBody(BlockFunctionBody node) {
- int previousReturnWithCount = _returnWithCount;
- int previousReturnWithoutCount = _returnWithoutCount;
+ List<ReturnStatement> previousReturnsWith = _returnsWith;
+ List<ReturnStatement> previousReturnsWithout = _returnsWithout;
try {
- _returnWithCount = 0;
- _returnWithoutCount = 0;
+ _returnsWith = new List<ReturnStatement>();
+ _returnsWithout = new List<ReturnStatement>();
super.visitBlockFunctionBody(node);
checkForMixedReturns(node);
} finally {
- _returnWithCount = previousReturnWithCount;
- _returnWithoutCount = previousReturnWithoutCount;
+ _returnsWith = previousReturnsWith;
+ _returnsWithout = previousReturnsWithout;
+ }
+ return null;
+ }
+
+ Object visitBreakStatement(BreakStatement node) {
+ SimpleIdentifier labelNode = node.label;
+ if (labelNode != null) {
+ Element labelElement = labelNode.staticElement;
+ if (labelElement is LabelElementImpl && labelElement.isOnSwitchMember) {
+ _errorReporter.reportError2(ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER, labelNode, []);
+ }
}
return null;
}
@@ -16579,10 +17098,12 @@
checkForBuiltInIdentifierAsName(node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME);
checkForMemberWithClassName();
checkForNoDefaultSuperConstructorImplicit(node);
- checkForAllMixinErrorCodes(withClause);
checkForConflictingTypeVariableErrorCodes(node);
- if (implementsClause != null || extendsClause != null) {
- if (!checkForImplementsDisallowedClass(implementsClause) && !checkForExtendsDisallowedClass(extendsClause)) {
+ // Only do error checks on the clause nodes if there is a non-null clause
+ if (implementsClause != null || extendsClause != null || withClause != null) {
+ // Only check for all of the inheritance logic around clauses if there isn't an error code
+ // such as "Cannot extend double" already on the class.
+ if (!checkForImplementsDisallowedClass(implementsClause) && !checkForExtendsDisallowedClass(extendsClause) && !checkForAllMixinErrorCodes(withClause)) {
checkForNonAbstractClassInheritsAbstractMember(node);
checkForInconsistentMethodInheritance();
checkForRecursiveInterfaceInheritance(_enclosingClass);
@@ -16599,7 +17120,7 @@
}
}
}
- checkForFinalNotInitialized(node);
+ checkForFinalNotInitializedInClass(node);
checkForDuplicateDefinitionInheritance();
checkForConflictingGetterAndMethod();
checkForConflictingInstanceGetterAndSuperclassMember();
@@ -16669,6 +17190,7 @@
Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
_isInConstructorInitializer = true;
try {
+ checkForInvalidField(node);
checkForFieldInitializerNotAssignable(node);
return super.visitConstructorFieldInitializer(node);
} finally {
@@ -16676,8 +17198,19 @@
}
}
+ Object visitContinueStatement(ContinueStatement node) {
+ SimpleIdentifier labelNode = node.label;
+ if (labelNode != null) {
+ Element labelElement = labelNode.staticElement;
+ if (labelElement is LabelElementImpl && labelElement.isOnSwitchStatement) {
+ _errorReporter.reportError2(ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH, labelNode, []);
+ }
+ }
+ return null;
+ }
+
Object visitDefaultFormalParameter(DefaultFormalParameter node) {
- checkForInvalidAssignment2(node.identifier, node.defaultValue);
+ checkForInvalidAssignment(node.identifier, node.defaultValue);
checkForDefaultValueInFunctionTypedParameter(node);
return super.visitDefaultFormalParameter(node);
}
@@ -16705,13 +17238,13 @@
if (!node.isStatic) {
VariableDeclarationList variables = node.fields;
if (variables.isConst) {
- _errorReporter.reportError6(CompileTimeErrorCode.CONST_INSTANCE_FIELD, variables.keyword, []);
+ _errorReporter.reportError5(CompileTimeErrorCode.CONST_INSTANCE_FIELD, variables.keyword, []);
}
}
_isInStaticVariableDeclaration = node.isStatic;
_isInInstanceVariableDeclaration = !_isInStaticVariableDeclaration;
try {
- checkForAllInvalidOverrideErrorCodes2(node);
+ checkForAllInvalidOverrideErrorCodesForField(node);
return super.visitFieldDeclaration(node);
} finally {
_isInStaticVariableDeclaration = false;
@@ -16720,6 +17253,7 @@
}
Object visitFieldFormalParameter(FieldFormalParameter node) {
+ checkForValidField(node);
checkForConstFormalParameter(node);
checkForPrivateOptionalParameter(node);
checkForFieldInitializingFormalRedirectingConstructor(node);
@@ -16772,7 +17306,7 @@
Expression functionExpression = node.function;
Type2 expressionType = functionExpression.staticType;
if (!isFunctionType(expressionType)) {
- _errorReporter.reportError3(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, functionExpression, []);
+ _errorReporter.reportError2(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, functionExpression, []);
}
return super.visitFunctionExpressionInvocation(node);
}
@@ -16806,7 +17340,7 @@
}
Object visitIndexExpression(IndexExpression node) {
- checkForArgumentTypeNotAssignable2(node.index);
+ checkForArgumentTypeNotAssignableForArgument(node.index);
return super.visitIndexExpression(node);
}
@@ -16822,7 +17356,7 @@
if (_isInConstInstanceCreation) {
checkForConstWithNonConst(node);
checkForConstWithUndefinedConstructor(node);
- checkForConstWithTypeParameters(node);
+ checkForConstWithTypeParametersInCreation(node);
} else {
checkForNewWithUndefinedConstructor(node);
}
@@ -16861,7 +17395,7 @@
checkExpectedTwoMapTypeArguments(typeArguments);
checkForNonConstMapAsExpressionStatement(node);
checkForMapTypeNotAssignable(node);
- checkForConstMapKeyExpressionTypeImplementsEquals2(node);
+ checkForConstMapKeyExpressionTypeImplementsEquals(node);
return super.visitMapLiteral(node);
}
@@ -16892,7 +17426,7 @@
checkForConflictingInstanceMethodSetter(node);
}
checkForConcreteClassWithAbstractMember(node);
- checkForAllInvalidOverrideErrorCodes3(node);
+ checkForAllInvalidOverrideErrorCodesForMethod(node);
return super.visitMethodDeclaration(node);
} finally {
_enclosingFunction = previousFunction;
@@ -16916,7 +17450,7 @@
Object visitNativeClause(NativeClause node) {
// TODO(brianwilkerson) Figure out the right rule for when 'native' is allowed.
if (!_isInSystemLibrary) {
- _errorReporter.reportError3(ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE, node, []);
+ _errorReporter.reportError2(ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE, node, []);
}
return super.visitNativeClause(node);
}
@@ -16927,7 +17461,7 @@
}
Object visitPostfixExpression(PostfixExpression node) {
- checkForAssignmentToFinal2(node.operand);
+ checkForAssignmentToFinal(node.operand);
checkForIntNotAssignable(node.operand);
return super.visitPostfixExpression(node);
}
@@ -16948,7 +17482,7 @@
if (identical(operatorType, sc.TokenType.BANG)) {
checkForNonBoolNegationExpression(operand);
} else if (operatorType.isIncrementOperator) {
- checkForAssignmentToFinal2(operand);
+ checkForAssignmentToFinal(operand);
}
checkForIntNotAssignable(operand);
return super.visitPrefixExpression(node);
@@ -16978,9 +17512,9 @@
Object visitReturnStatement(ReturnStatement node) {
if (node.expression == null) {
- _returnWithoutCount++;
+ _returnsWithout.add(node);
} else {
- _returnWithCount++;
+ _returnsWith.add(node);
}
checkForAllReturnStatementErrorCodes(node);
return super.visitReturnStatement(node);
@@ -17027,7 +17561,7 @@
}
Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
- checkForFinalNotInitialized2(node.variables);
+ checkForFinalNotInitialized(node.variables);
return super.visitTopLevelVariableDeclaration(node);
}
@@ -17047,7 +17581,7 @@
SimpleIdentifier nameNode = node.name;
Expression initializerNode = node.initializer;
// do checks
- checkForInvalidAssignment2(nameNode, initializerNode);
+ checkForInvalidAssignment(nameNode, initializerNode);
// visit name
nameNode.accept(this);
// visit initializer
@@ -17069,7 +17603,7 @@
Object visitVariableDeclarationList(VariableDeclarationList node) => super.visitVariableDeclarationList(node);
Object visitVariableDeclarationStatement(VariableDeclarationStatement node) {
- checkForFinalNotInitialized2(node.variables);
+ checkForFinalNotInitialized(node.variables);
return super.visitVariableDeclarationStatement(node);
}
@@ -17096,7 +17630,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, typeArguments, [num]);
+ _errorReporter.reportError2(StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, typeArguments, [num]);
return true;
}
@@ -17134,12 +17668,12 @@
fieldElementsMap[fieldElement] = INIT_STATE.INIT_IN_FIELD_FORMAL;
} else if (identical(state, INIT_STATE.INIT_IN_DECLARATION)) {
if (fieldElement.isFinal || fieldElement.isConst) {
- _errorReporter.reportError3(StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, formalParameter.identifier, [fieldElement.displayName]);
+ _errorReporter.reportError2(StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, formalParameter.identifier, [fieldElement.displayName]);
foundError = true;
}
} else if (identical(state, INIT_STATE.INIT_IN_FIELD_FORMAL)) {
if (fieldElement.isFinal || fieldElement.isConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES, formalParameter.identifier, [fieldElement.displayName]);
+ _errorReporter.reportError2(CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES, formalParameter.identifier, [fieldElement.displayName]);
foundError = true;
}
}
@@ -17162,14 +17696,14 @@
fieldElementsMap[fieldElement] = INIT_STATE.INIT_IN_INITIALIZERS;
} else if (identical(state, INIT_STATE.INIT_IN_DECLARATION)) {
if (fieldElement.isFinal || fieldElement.isConst) {
- _errorReporter.reportError3(StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, fieldName, []);
+ _errorReporter.reportError2(StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, fieldName, []);
foundError = true;
}
} else if (identical(state, INIT_STATE.INIT_IN_FIELD_FORMAL)) {
- _errorReporter.reportError3(CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, fieldName, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, fieldName, []);
foundError = true;
} else if (identical(state, INIT_STATE.INIT_IN_INITIALIZERS)) {
- _errorReporter.reportError3(CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, fieldName, [fieldElement.displayName]);
+ _errorReporter.reportError2(CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, fieldName, [fieldElement.displayName]);
foundError = true;
}
}
@@ -17180,10 +17714,10 @@
if (identical(entry.getValue(), INIT_STATE.NOT_INIT)) {
FieldElement fieldElement = entry.getKey();
if (fieldElement.isConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_NOT_INITIALIZED, node.returnType, [fieldElement.name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_NOT_INITIALIZED, node.returnType, [fieldElement.name]);
foundError = true;
} else if (fieldElement.isFinal) {
- _errorReporter.reportError3(StaticWarningCode.FINAL_NOT_INITIALIZED, node.returnType, [fieldElement.name]);
+ _errorReporter.reportError2(StaticWarningCode.FINAL_NOT_INITIALIZED, node.returnType, [fieldElement.name]);
foundError = true;
}
}
@@ -17195,6 +17729,7 @@
* This checks the passed executable element against override-error codes.
*
* @param executableElement a non-null [ExecutableElement] to evaluate
+ * @param overriddenExecutable the element that the executableElement is overriding
* @param parameters the parameters of the executable element
* @param errorNameTarget the node to report problems on
* @return `true` if and only if an error code is generated on the passed node
@@ -17210,10 +17745,7 @@
* @see StaticWarningCode#INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE
* @see StaticWarningCode#INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES
*/
- bool checkForAllInvalidOverrideErrorCodes(ExecutableElement executableElement, List<ParameterElement> parameters, List<ASTNode> parameterLocations, SimpleIdentifier errorNameTarget) {
- String executableElementName = executableElement.name;
- bool executableElementPrivate = Identifier.isPrivateName(executableElementName);
- ExecutableElement overriddenExecutable = _inheritanceManager.lookupInheritance(_enclosingClass, executableElementName);
+ bool checkForAllInvalidOverrideErrorCodes(ExecutableElement executableElement, ExecutableElement overriddenExecutable, List<ParameterElement> parameters, List<AstNode> parameterLocations, SimpleIdentifier errorNameTarget) {
bool isGetter = false;
bool isSetter = false;
if (executableElement is PropertyAccessorElement) {
@@ -17221,12 +17753,14 @@
isGetter = accessorElement.isGetter;
isSetter = accessorElement.isSetter;
}
+ String executableElementName = executableElement.name;
// SWC.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC
if (overriddenExecutable == null) {
if (!isGetter && !isSetter && !executableElement.isOperator) {
Set<ClassElement> visitedClasses = new Set<ClassElement>();
InterfaceType superclassType = _enclosingClass.supertype;
ClassElement superclassElement = superclassType == null ? null : superclassType.element;
+ bool executableElementPrivate = Identifier.isPrivateName(executableElementName);
while (superclassElement != null && !visitedClasses.contains(superclassElement)) {
visitedClasses.add(superclassElement);
LibraryElement superclassLibrary = superclassElement.library;
@@ -17243,7 +17777,7 @@
}
// instance vs. static
if (fieldElt.isStatic) {
- _errorReporter.reportError3(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, errorNameTarget, [
+ _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, errorNameTarget, [
executableElementName,
fieldElt.enclosingElement.displayName]);
return true;
@@ -17262,7 +17796,7 @@
}
// instance vs. static
if (methodElement.isStatic) {
- _errorReporter.reportError3(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, errorNameTarget, [
+ _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, errorNameTarget, [
executableElementName,
methodElement.enclosingElement.displayName]);
return true;
@@ -17291,13 +17825,13 @@
Map<String, Type2> overriddenNamedPT = overriddenFT.namedParameterTypes;
// CTEC.INVALID_OVERRIDE_REQUIRED, CTEC.INVALID_OVERRIDE_POSITIONAL and CTEC.INVALID_OVERRIDE_NAMED
if (overridingNormalPT.length > overriddenNormalPT.length) {
- _errorReporter.reportError3(StaticWarningCode.INVALID_OVERRIDE_REQUIRED, errorNameTarget, [
+ _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_REQUIRED, errorNameTarget, [
overriddenNormalPT.length,
overriddenExecutable.enclosingElement.displayName]);
return true;
}
if (overridingNormalPT.length + overridingPositionalPT.length < overriddenPositionalPT.length + overriddenNormalPT.length) {
- _errorReporter.reportError3(StaticWarningCode.INVALID_OVERRIDE_POSITIONAL, errorNameTarget, [
+ _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_POSITIONAL, errorNameTarget, [
overriddenPositionalPT.length + overriddenNormalPT.length,
overriddenExecutable.enclosingElement.displayName]);
return true;
@@ -17311,7 +17845,7 @@
if (!overridingParameterNameSet.contains(overriddenParamName)) {
// The overridden method expected the overriding method to have overridingParamName,
// but it does not.
- _errorReporter.reportError3(StaticWarningCode.INVALID_OVERRIDE_NAMED, errorNameTarget, [
+ _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_NAMED, errorNameTarget, [
overriddenParamName,
overriddenExecutable.enclosingElement.displayName]);
return true;
@@ -17319,7 +17853,7 @@
}
// SWC.INVALID_METHOD_OVERRIDE_RETURN_TYPE
if (overriddenFTReturnType != VoidTypeImpl.instance && !overridingFTReturnType.isAssignableTo(overriddenFTReturnType)) {
- _errorReporter.reportError3(!isGetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE : StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE, errorNameTarget, [
+ _errorReporter.reportError2(!isGetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE : StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE, errorNameTarget, [
overridingFTReturnType.displayName,
overriddenFTReturnType.displayName,
overriddenExecutable.enclosingElement.displayName]);
@@ -17332,7 +17866,7 @@
int parameterIndex = 0;
for (int i = 0; i < overridingNormalPT.length; i++) {
if (!overridingNormalPT[i].isAssignableTo(overriddenNormalPT[i])) {
- _errorReporter.reportError3(!isSetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE : StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, parameterLocations[parameterIndex], [
+ _errorReporter.reportError2(!isSetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE : StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, parameterLocations[parameterIndex], [
overridingNormalPT[i].displayName,
overriddenNormalPT[i].displayName,
overriddenExecutable.enclosingElement.displayName]);
@@ -17343,7 +17877,7 @@
// SWC.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE
for (int i = 0; i < overriddenPositionalPT.length; i++) {
if (!overridingPositionalPT[i].isAssignableTo(overriddenPositionalPT[i])) {
- _errorReporter.reportError3(StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, parameterLocations[parameterIndex], [
+ _errorReporter.reportError2(StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, parameterLocations[parameterIndex], [
overridingPositionalPT[i].displayName,
overriddenPositionalPT[i].displayName,
overriddenExecutable.enclosingElement.displayName]);
@@ -17364,7 +17898,7 @@
if (!overriddenNamedPTEntry.getValue().isAssignableTo(overridingType)) {
// lookup the parameter for the error to select
ParameterElement parameterToSelect = null;
- ASTNode parameterLocationToSelect = null;
+ AstNode parameterLocationToSelect = null;
for (int i = 0; i < parameters.length; i++) {
ParameterElement parameter = parameters[i];
if (identical(parameter.parameterKind, ParameterKind.NAMED) && overriddenNamedPTEntry.getKey() == parameter.name) {
@@ -17374,7 +17908,7 @@
}
}
if (parameterToSelect != null) {
- _errorReporter.reportError3(StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE, parameterLocationToSelect, [
+ _errorReporter.reportError2(StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE, parameterLocationToSelect, [
overridingType.displayName,
overriddenNamedPTEntry.getValue().displayName,
overriddenExecutable.enclosingElement.displayName]);
@@ -17389,7 +17923,7 @@
// parameter elements from the method we are overriding.
//
bool foundError = false;
- List<ASTNode> formalParameters = new List<ASTNode>();
+ List<AstNode> formalParameters = new List<AstNode>();
List<ParameterElementImpl> parameterElts = new List<ParameterElementImpl>();
List<ParameterElementImpl> overriddenParameterElts = new List<ParameterElementImpl>();
List<ParameterElement> overriddenPEs = overriddenExecutable.parameters;
@@ -17431,7 +17965,7 @@
break;
}
if (!result.equalValues(_typeProvider, overriddenResult)) {
- _errorReporter.reportError3(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, formalParameters[i], [
+ _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, formalParameters[i], [
overriddenExecutable.enclosingElement.displayName,
overriddenExecutable.displayName,
parameterName]);
@@ -17455,7 +17989,7 @@
continue;
}
if (!result.equalValues(_typeProvider, overriddenResult)) {
- _errorReporter.reportError3(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, formalParameters[i], [
+ _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, formalParameters[i], [
overriddenExecutable.enclosingElement.displayName,
overriddenExecutable.displayName]);
foundError = true;
@@ -17467,13 +18001,50 @@
}
/**
+ * This checks the passed executable element against override-error codes. This method computes
+ * the passed executableElement is overriding and calls
+ * [checkForAllInvalidOverrideErrorCodes]
+ * when the [InheritanceManager] returns a [MultiplyInheritedExecutableElement], this
+ * method loops through the array in the [MultiplyInheritedExecutableElement].
+ *
+ * @param executableElement a non-null [ExecutableElement] to evaluate
+ * @param parameters the parameters of the executable element
+ * @param errorNameTarget the node to report problems on
+ * @return `true` if and only if an error code is generated on the passed node
+ */
+ bool checkForAllInvalidOverrideErrorCodesForExecutable(ExecutableElement executableElement, List<ParameterElement> parameters, List<AstNode> parameterLocations, SimpleIdentifier errorNameTarget) {
+ //
+ // Compute the overridden executable from the InheritanceManager
+ //
+ ExecutableElement overriddenExecutable = _inheritanceManager.lookupInheritance(_enclosingClass, executableElement.name);
+ //
+ // If the result is a MultiplyInheritedExecutableElement call
+ // checkForAllInvalidOverrideErrorCodes on all of the elements, until an error is found.
+ //
+ if (overriddenExecutable is MultiplyInheritedExecutableElement) {
+ MultiplyInheritedExecutableElement multiplyInheritedElement = overriddenExecutable;
+ List<ExecutableElement> overriddenElement = multiplyInheritedElement.inheritedElements;
+ for (int i = 0; i < overriddenElement.length; i++) {
+ if (checkForAllInvalidOverrideErrorCodes(executableElement, overriddenElement[i], parameters, parameterLocations, errorNameTarget)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ //
+ // Otherwise, just call checkForAllInvalidOverrideErrorCodes.
+ //
+ return checkForAllInvalidOverrideErrorCodes(executableElement, overriddenExecutable, parameters, parameterLocations, errorNameTarget);
+ }
+
+ /**
* This checks the passed field declaration against override-error codes.
*
* @param node the [MethodDeclaration] to evaluate
* @return `true` if and only if an error code is generated on the passed node
* @see #checkForAllInvalidOverrideErrorCodes(ExecutableElement)
*/
- bool checkForAllInvalidOverrideErrorCodes2(FieldDeclaration node) {
+ bool checkForAllInvalidOverrideErrorCodesForField(FieldDeclaration node) {
if (_enclosingClass == null || node.isStatic) {
return false;
}
@@ -17488,10 +18059,10 @@
PropertyAccessorElement setter = element.setter;
SimpleIdentifier fieldName = field.name;
if (getter != null) {
- hasProblems = javaBooleanOr(hasProblems, checkForAllInvalidOverrideErrorCodes(getter, ParameterElementImpl.EMPTY_ARRAY, ASTNode.EMPTY_ARRAY, fieldName));
+ hasProblems = javaBooleanOr(hasProblems, checkForAllInvalidOverrideErrorCodesForExecutable(getter, ParameterElementImpl.EMPTY_ARRAY, AstNode.EMPTY_ARRAY, fieldName));
}
if (setter != null) {
- hasProblems = javaBooleanOr(hasProblems, checkForAllInvalidOverrideErrorCodes(setter, setter.parameters, <ASTNode> [fieldName], fieldName));
+ hasProblems = javaBooleanOr(hasProblems, checkForAllInvalidOverrideErrorCodesForExecutable(setter, setter.parameters, <AstNode> [fieldName], fieldName));
}
}
return hasProblems;
@@ -17504,7 +18075,7 @@
* @return `true` if and only if an error code is generated on the passed node
* @see #checkForAllInvalidOverrideErrorCodes(ExecutableElement)
*/
- bool checkForAllInvalidOverrideErrorCodes3(MethodDeclaration node) {
+ bool checkForAllInvalidOverrideErrorCodesForMethod(MethodDeclaration node) {
if (_enclosingClass == null || node.isStatic || node.body is NativeFunctionBody) {
return false;
}
@@ -17518,8 +18089,8 @@
}
FormalParameterList formalParameterList = node.parameters;
NodeList<FormalParameter> parameterList = formalParameterList != null ? formalParameterList.parameters : null;
- List<ASTNode> parameters = parameterList != null ? new List.from(parameterList) : null;
- return checkForAllInvalidOverrideErrorCodes(executableElement, executableElement.parameters, parameters, methodName);
+ List<AstNode> parameters = parameterList != null ? new List.from(parameterList) : null;
+ return checkForAllInvalidOverrideErrorCodesForExecutable(executableElement, executableElement.parameters, parameters, methodName);
}
/**
@@ -17589,7 +18160,7 @@
constructorStrName += ".${redirectedConstructor.name.name}";
}
ErrorCode errorCode = (node.constKeyword != null ? CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR : StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR) as ErrorCode;
- _errorReporter.reportError3(errorCode, redirectedConstructor, [constructorStrName, redirectedType.displayName]);
+ _errorReporter.reportError2(errorCode, redirectedConstructor, [constructorStrName, redirectedType.displayName]);
return true;
}
return false;
@@ -17602,14 +18173,14 @@
FunctionType constructorType = node.element.type;
Type2 constructorReturnType = constructorType.returnType;
if (!redirectedReturnType.isAssignableTo(constructorReturnType)) {
- _errorReporter.reportError3(StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE, redirectedConstructor, [redirectedReturnType, constructorReturnType]);
+ _errorReporter.reportError2(StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE, redirectedConstructor, [redirectedReturnType, constructorReturnType]);
return true;
}
//
// Check parameters
//
if (!redirectedType.isSubtypeOf(constructorType)) {
- _errorReporter.reportError3(StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE, redirectedConstructor, [redirectedType, constructorType]);
+ _errorReporter.reportError2(StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE, redirectedConstructor, [redirectedType, constructorType]);
return true;
}
return false;
@@ -17642,7 +18213,7 @@
if (returnExpression == null) {
return false;
}
- _errorReporter.reportError3(CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, returnExpression, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, returnExpression, []);
return true;
}
// RETURN_WITHOUT_VALUE
@@ -17650,7 +18221,7 @@
if (VoidTypeImpl.instance.isAssignableTo(expectedReturnType)) {
return false;
}
- _errorReporter.reportError3(StaticWarningCode.RETURN_WITHOUT_VALUE, node, []);
+ _errorReporter.reportError2(StaticWarningCode.RETURN_WITHOUT_VALUE, node, []);
return true;
}
// RETURN_OF_INVALID_TYPE
@@ -17684,7 +18255,7 @@
Element element = definedEntry.getValue();
Element prevElement = _exportedElements[name];
if (element != null && prevElement != null && prevElement != element) {
- _errorReporter.reportError3(CompileTimeErrorCode.AMBIGUOUS_EXPORT, node, [
+ _errorReporter.reportError2(CompileTimeErrorCode.AMBIGUOUS_EXPORT, node, [
name,
prevElement.library.definingCompilationUnit.displayName,
element.library.definingCompilationUnit.displayName]);
@@ -17707,61 +18278,13 @@
SimpleIdentifier identifier = node.identifier;
Element element = identifier.staticElement;
if (element != null && element is! ParameterElement) {
- _errorReporter.reportError3(CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER, identifier, [identifier.name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER, identifier, [identifier.name]);
return true;
}
return false;
}
/**
- * This verifies that the passed arguments can be assigned to their corresponding parameters.
- *
- * @param node the arguments to evaluate
- * @return `true` if and only if an error code is generated on the passed node
- * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
- */
- bool checkForArgumentTypeNotAssignable(ArgumentList argumentList) {
- if (argumentList == null) {
- return false;
- }
- bool problemReported = false;
- for (Expression argument in argumentList.arguments) {
- problemReported = javaBooleanOr(problemReported, checkForArgumentTypeNotAssignable2(argument));
- }
- // done
- return problemReported;
- }
-
- /**
- * This verifies that the passed argument can be assigned to its corresponding parameter.
- *
- * @param argument the argument to evaluate
- * @return `true` if and only if an error code is generated on the passed node
- * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
- */
- bool checkForArgumentTypeNotAssignable2(Expression argument) {
- if (argument == null) {
- return false;
- }
- ParameterElement staticParameterElement = argument.staticParameterElement;
- Type2 staticParameterType = staticParameterElement == null ? null : staticParameterElement.type;
- ParameterElement propagatedParameterElement = argument.propagatedParameterElement;
- Type2 propagatedParameterType = propagatedParameterElement == null ? null : propagatedParameterElement.type;
- return checkForArgumentTypeNotAssignable3(argument, staticParameterType, propagatedParameterType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
- }
-
- /**
- * This verifies that the passed expression can be assigned to its corresponding parameters.
- *
- * @param expression the expression to evaluate
- * @param expectedStaticType the expected static type
- * @param expectedPropagatedType the expected propagated type, may be `null`
- * @return `true` if and only if an error code is generated on the passed node
- * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
- */
- bool checkForArgumentTypeNotAssignable3(Expression expression, Type2 expectedStaticType, Type2 expectedPropagatedType, ErrorCode errorCode) => checkForArgumentTypeNotAssignable4(expression, expectedStaticType, getStaticType(expression), expectedPropagatedType, expression.propagatedType, errorCode);
-
- /**
* This verifies that the passed expression can be assigned to its corresponding parameters.
*
* @param expression the expression to evaluate
@@ -17773,7 +18296,7 @@
* @return `true` if and only if an error code is generated on the passed node
* @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
*/
- bool checkForArgumentTypeNotAssignable4(Expression expression, Type2 expectedStaticType, Type2 actualStaticType, Type2 expectedPropagatedType, Type2 actualPropagatedType, ErrorCode errorCode) {
+ bool checkForArgumentTypeNotAssignable(Expression expression, Type2 expectedStaticType, Type2 actualStaticType, Type2 expectedPropagatedType, Type2 actualPropagatedType, ErrorCode errorCode) {
//
// Test static type information
//
@@ -17783,22 +18306,58 @@
if (actualStaticType.isAssignableTo(expectedStaticType)) {
return false;
}
- _errorReporter.reportError3(errorCode, expression, [
+ _errorReporter.reportError2(errorCode, expression, [
actualStaticType.displayName,
expectedStaticType.displayName]);
return true;
}
/**
- * This verifies that left hand side of the passed assignment expression is not final.
+ * This verifies that the passed argument can be assigned to its corresponding parameter.
*
- * @param node the assignment expression to evaluate
+ * @param argument the argument to evaluate
* @return `true` if and only if an error code is generated on the passed node
- * @see StaticWarningCode#ASSIGNMENT_TO_FINAL
+ * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
*/
- bool checkForAssignmentToFinal(AssignmentExpression node) {
- Expression leftExpression = node.leftHandSide;
- return checkForAssignmentToFinal2(leftExpression);
+ bool checkForArgumentTypeNotAssignableForArgument(Expression argument) {
+ if (argument == null) {
+ return false;
+ }
+ ParameterElement staticParameterElement = argument.staticParameterElement;
+ Type2 staticParameterType = staticParameterElement == null ? null : staticParameterElement.type;
+ ParameterElement propagatedParameterElement = argument.propagatedParameterElement;
+ Type2 propagatedParameterType = propagatedParameterElement == null ? null : propagatedParameterElement.type;
+ return checkForArgumentTypeNotAssignableWithExpectedTypes(argument, staticParameterType, propagatedParameterType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+ }
+
+ /**
+ * This verifies that the passed expression can be assigned to its corresponding parameters.
+ *
+ * @param expression the expression to evaluate
+ * @param expectedStaticType the expected static type
+ * @param expectedPropagatedType the expected propagated type, may be `null`
+ * @return `true` if and only if an error code is generated on the passed node
+ * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
+ */
+ bool checkForArgumentTypeNotAssignableWithExpectedTypes(Expression expression, Type2 expectedStaticType, Type2 expectedPropagatedType, ErrorCode errorCode) => checkForArgumentTypeNotAssignable(expression, expectedStaticType, getStaticType(expression), expectedPropagatedType, expression.propagatedType, errorCode);
+
+ /**
+ * This verifies that the passed arguments can be assigned to their corresponding parameters.
+ *
+ * @param node the arguments to evaluate
+ * @return `true` if and only if an error code is generated on the passed node
+ * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
+ */
+ bool checkForArgumentTypesNotAssignableInList(ArgumentList argumentList) {
+ if (argumentList == null) {
+ return false;
+ }
+ bool problemReported = false;
+ for (Expression argument in argumentList.arguments) {
+ problemReported = javaBooleanOr(problemReported, checkForArgumentTypeNotAssignableForArgument(argument));
+ }
+ // done
+ return problemReported;
}
/**
@@ -17810,7 +18369,7 @@
* @see StaticWarningCode#ASSIGNMENT_TO_FINAL
* @see StaticWarningCode#ASSIGNMENT_TO_METHOD
*/
- bool checkForAssignmentToFinal2(Expression expression) {
+ bool checkForAssignmentToFinal(Expression expression) {
// prepare element
Element element = null;
if (expression is Identifier) {
@@ -17827,17 +18386,17 @@
if (element is VariableElement) {
VariableElement variable = element as VariableElement;
if (variable.isConst) {
- _errorReporter.reportError3(StaticWarningCode.ASSIGNMENT_TO_CONST, expression, []);
+ _errorReporter.reportError2(StaticWarningCode.ASSIGNMENT_TO_CONST, expression, []);
return true;
}
if (variable.isFinal) {
- _errorReporter.reportError3(StaticWarningCode.ASSIGNMENT_TO_FINAL, expression, []);
+ _errorReporter.reportError2(StaticWarningCode.ASSIGNMENT_TO_FINAL, expression, [variable.name]);
return true;
}
return false;
}
if (element is MethodElement) {
- _errorReporter.reportError3(StaticWarningCode.ASSIGNMENT_TO_METHOD, expression, []);
+ _errorReporter.reportError2(StaticWarningCode.ASSIGNMENT_TO_METHOD, expression, []);
return true;
}
return false;
@@ -17861,7 +18420,7 @@
bool checkForBuiltInIdentifierAsName(SimpleIdentifier identifier, ErrorCode errorCode) {
sc.Token token = identifier.token;
if (identical(token.type, sc.TokenType.KEYWORD)) {
- _errorReporter.reportError3(errorCode, identifier, [identifier.name]);
+ _errorReporter.reportError2(errorCode, identifier, [identifier.name]);
return true;
}
return false;
@@ -17879,7 +18438,7 @@
NodeList<Statement> statements = node.statements;
if (statements.isEmpty) {
// fall-through without statements at all
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is SwitchStatement) {
SwitchStatement switchStatement = parent;
NodeList<SwitchMember> members = switchStatement.members;
@@ -17903,7 +18462,7 @@
}
}
// report error
- _errorReporter.reportError6(StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, node.keyword, []);
+ _errorReporter.reportError5(StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, node.keyword, []);
return true;
}
@@ -17942,7 +18501,7 @@
return false;
}
// report error
- _errorReporter.reportError6(CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, node.keyword, [type.displayName]);
+ _errorReporter.reportError5(CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, node.keyword, [type.displayName]);
return true;
}
@@ -17957,7 +18516,7 @@
bool checkForConcreteClassWithAbstractMember(MethodDeclaration node) {
if (node.isAbstract && _enclosingClass != null && !_enclosingClass.isAbstract) {
SimpleIdentifier methodName = node.name;
- _errorReporter.reportError3(StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, methodName, [methodName.name, _enclosingClass.displayName]);
+ _errorReporter.reportError2(StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, methodName, [methodName.name, _enclosingClass.displayName]);
return true;
}
return false;
@@ -17987,9 +18546,9 @@
}
if (name == otherConstructor.name) {
if (name == null || name.length == 0) {
- _errorReporter.reportError3(CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT, node, []);
} else {
- _errorReporter.reportError3(CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME, node, [name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME, node, [name]);
}
return true;
}
@@ -17999,13 +18558,13 @@
// fields
FieldElement field = classElement.getField(name);
if (field != null) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, node, [name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, node, [name]);
return true;
}
// methods
MethodElement method = classElement.getMethod(name);
if (method != null) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, node, [name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, node, [name]);
return true;
}
}
@@ -18035,7 +18594,7 @@
}
// report problem
hasProblem = true;
- _errorReporter.reportError5(CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, method.nameOffset, name.length, [
+ _errorReporter.reportError4(CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, method.nameOffset, name.length, [
_enclosingClass.displayName,
inherited.enclosingElement.displayName,
name]);
@@ -18053,7 +18612,7 @@
}
// report problem
hasProblem = true;
- _errorReporter.reportError5(CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, accessor.nameOffset, name.length, [
+ _errorReporter.reportError4(CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, accessor.nameOffset, name.length, [
_enclosingClass.displayName,
inherited.enclosingElement.displayName,
name]);
@@ -18113,9 +18672,9 @@
// report problem
hasProblem = true;
if (getter) {
- _errorReporter.reportError4(StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, accessor, [superElementType.displayName]);
+ _errorReporter.reportError3(StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, accessor, [superElementType.displayName]);
} else {
- _errorReporter.reportError4(StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, accessor, [superElementType.displayName]);
+ _errorReporter.reportError3(StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, accessor, [superElementType.displayName]);
}
}
// done
@@ -18150,7 +18709,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER, nameNode, [
+ _errorReporter.reportError2(StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER, nameNode, [
_enclosingClass.displayName,
name,
setter.enclosingElement.displayName]);
@@ -18193,7 +18752,7 @@
ClassElement setterClass = setter.enclosingElement as ClassElement;
InterfaceType setterType = setterClass.type;
// report problem
- _errorReporter.reportError3(StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, nameNode, [setterType.displayName]);
+ _errorReporter.reportError2(StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, nameNode, [setterType.displayName]);
return true;
}
@@ -18240,7 +18799,7 @@
ClassElement memberClass = member.enclosingElement as ClassElement;
InterfaceType memberType = memberClass.type;
// report problem
- _errorReporter.reportError3(StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER, nameNode, [memberType.displayName]);
+ _errorReporter.reportError2(StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER, nameNode, [memberType.displayName]);
return true;
}
@@ -18258,12 +18817,12 @@
String name = typeParameter.name;
// name is same as the name of the enclosing class
if (_enclosingClass.name == name) {
- _errorReporter.reportError5(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, typeParameter.nameOffset, name.length, [name]);
+ _errorReporter.reportError4(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, typeParameter.nameOffset, name.length, [name]);
problemReported = true;
}
// check members
if (_enclosingClass.getMethod(name) != null || _enclosingClass.getGetter(name) != null || _enclosingClass.getSetter(name) != null) {
- _errorReporter.reportError5(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER, typeParameter.nameOffset, name.length, [name]);
+ _errorReporter.reportError4(CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER, typeParameter.nameOffset, name.length, [name]);
problemReported = true;
}
}
@@ -18294,7 +18853,7 @@
if (element == null || element.isConst) {
return false;
}
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, superInvocation, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, superInvocation, []);
return true;
}
}
@@ -18314,7 +18873,7 @@
return false;
}
// default constructor is not 'const', report problem
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, node, []);
return true;
}
@@ -18337,7 +18896,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, node, []);
return true;
}
@@ -18351,7 +18910,7 @@
*/
bool checkForConstEvalThrowsException(ThrowExpression node) {
if (_isEnclosingConstructorConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION, node, []);
return true;
}
return false;
@@ -18366,31 +18925,13 @@
*/
bool checkForConstFormalParameter(NormalFormalParameter node) {
if (node.isConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_FORMAL_PARAMETER, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_FORMAL_PARAMETER, node, []);
return true;
}
return false;
}
/**
- * This verifies that the passed expression (used as a key in constant map) has class type that
- * does not declare operator <i>==<i>.
- *
- * @param key the expression to evaluate
- * @return `true` if and only if an error code is generated on the passed node
- * @see CompileTimeErrorCode#CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS
- */
- bool checkForConstMapKeyExpressionTypeImplementsEquals(Expression key) {
- Type2 type = key.staticType;
- if (!implementsEqualsWhenNotAllowed(type)) {
- return false;
- }
- // report error
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, key, [type.displayName]);
- return true;
- }
-
- /**
* This verifies that the all keys of the passed map literal have class type that does not declare
* operator <i>==<i>.
*
@@ -18398,7 +18939,7 @@
* @return `true` if and only if an error code is generated on the passed node
* @see CompileTimeErrorCode#CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS
*/
- bool checkForConstMapKeyExpressionTypeImplementsEquals2(MapLiteral node) {
+ bool checkForConstMapKeyExpressionTypeImplementsEquals(MapLiteral node) {
// OK, not const.
if (node.constKeyword == null) {
return false;
@@ -18407,7 +18948,11 @@
bool hasProblems = false;
for (MapLiteralEntry entry in node.entries) {
Expression key = entry.key;
- hasProblems = javaBooleanOr(hasProblems, checkForConstMapKeyExpressionTypeImplementsEquals(key));
+ Type2 type = key.staticType;
+ if (implementsEqualsWhenNotAllowed(type)) {
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, key, [type.displayName]);
+ hasProblems = true;
+ }
}
return hasProblems;
}
@@ -18429,9 +18974,9 @@
ConstructorElement element = node.staticElement;
if (element != null && !element.isFactory) {
if (identical((node.keyword as sc.KeywordToken).keyword, sc.Keyword.CONST)) {
- _errorReporter.reportError3(StaticWarningCode.CONST_WITH_ABSTRACT_CLASS, typeName, []);
+ _errorReporter.reportError2(StaticWarningCode.CONST_WITH_ABSTRACT_CLASS, typeName, []);
} else {
- _errorReporter.reportError3(StaticWarningCode.NEW_WITH_ABSTRACT_CLASS, typeName, []);
+ _errorReporter.reportError2(StaticWarningCode.NEW_WITH_ABSTRACT_CLASS, typeName, []);
}
return true;
}
@@ -18452,13 +18997,46 @@
bool checkForConstWithNonConst(InstanceCreationExpression node) {
ConstructorElement constructorElement = node.staticElement;
if (constructorElement != null && !constructorElement.isConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_WITH_NON_CONST, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_WITH_NON_CONST, node, []);
return true;
}
return false;
}
/**
+ * This verifies that the passed type name does not reference any type parameters.
+ *
+ * @param typeName the type name to evaluate
+ * @return `true` if and only if an error code is generated on the passed node
+ * @see CompileTimeErrorCode#CONST_WITH_TYPE_PARAMETERS
+ */
+ bool checkForConstWithTypeParameters(TypeName typeName) {
+ // something wrong with AST
+ if (typeName == null) {
+ return false;
+ }
+ Identifier name = typeName.name;
+ if (name == null) {
+ return false;
+ }
+ // should not be a type parameter
+ if (name.staticElement is TypeParameterElement) {
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, name, []);
+ }
+ // check type arguments
+ TypeArgumentList typeArguments = typeName.typeArguments;
+ if (typeArguments != null) {
+ bool hasError = false;
+ for (TypeName argument in typeArguments.arguments) {
+ hasError = javaBooleanOr(hasError, checkForConstWithTypeParameters(argument));
+ }
+ return hasError;
+ }
+ // OK
+ return false;
+ }
+
+ /**
* This verifies that the passed 'const' instance creation expression does not reference any type
* parameters.
*
@@ -18468,46 +19046,13 @@
* @return `true` if and only if an error code is generated on the passed node
* @see CompileTimeErrorCode#CONST_WITH_TYPE_PARAMETERS
*/
- bool checkForConstWithTypeParameters(InstanceCreationExpression node) {
+ bool checkForConstWithTypeParametersInCreation(InstanceCreationExpression node) {
ConstructorName constructorName = node.constructorName;
if (constructorName == null) {
return false;
}
TypeName typeName = constructorName.type;
- return checkForConstWithTypeParameters2(typeName);
- }
-
- /**
- * This verifies that the passed type name does not reference any type parameters.
- *
- * @param typeName the type name to evaluate
- * @return `true` if and only if an error code is generated on the passed node
- * @see CompileTimeErrorCode#CONST_WITH_TYPE_PARAMETERS
- */
- bool checkForConstWithTypeParameters2(TypeName typeName) {
- // something wrong with AST
- if (typeName == null) {
- return false;
- }
- Identifier name = typeName.name;
- if (name == null) {
- return false;
- }
- // should not be a type parameter
- if (name.staticElement is TypeParameterElement) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, name, []);
- }
- // check type arguments
- TypeArgumentList typeArguments = typeName.typeArguments;
- if (typeArguments != null) {
- bool hasError = false;
- for (TypeName argument in typeArguments.arguments) {
- hasError = javaBooleanOr(hasError, checkForConstWithTypeParameters2(argument));
- }
- return hasError;
- }
- // OK
- return false;
+ return checkForConstWithTypeParameters(typeName);
}
/**
@@ -18540,9 +19085,9 @@
// report as named or default constructor absence
SimpleIdentifier name = constructorName.name;
if (name != null) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR, name, [className, name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR, name, [className, name]);
} else {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, constructorName, [className]);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, constructorName, [className]);
}
return true;
}
@@ -18562,7 +19107,7 @@
if (formalParameter is DefaultFormalParameter) {
DefaultFormalParameter defaultFormalParameter = formalParameter;
if (defaultFormalParameter.defaultValue != null) {
- _errorReporter.reportError3(CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, node, []);
result = true;
}
}
@@ -18588,7 +19133,7 @@
return false;
}
// Report problem.
- _errorReporter.reportError3(CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER, node, []);
return true;
}
@@ -18608,13 +19153,13 @@
if (!member.isStatic) {
continue;
}
- hasProblem = javaBooleanOr(hasProblem, checkForDuplicateDefinitionInheritance2(member));
+ hasProblem = javaBooleanOr(hasProblem, checkForDuplicateDefinitionOfMember(member));
}
for (ExecutableElement member in _enclosingClass.accessors) {
if (!member.isStatic) {
continue;
}
- hasProblem = javaBooleanOr(hasProblem, checkForDuplicateDefinitionInheritance2(member));
+ hasProblem = javaBooleanOr(hasProblem, checkForDuplicateDefinitionOfMember(member));
}
return hasProblem;
}
@@ -18627,7 +19172,7 @@
* @return `true` if and only if an error code is generated on the passed node
* @see CompileTimeErrorCode#DUPLICATE_DEFINITION_INHERITANCE
*/
- bool checkForDuplicateDefinitionInheritance2(ExecutableElement staticMember) {
+ bool checkForDuplicateDefinitionOfMember(ExecutableElement staticMember) {
// prepare name
String name = staticMember.name;
if (name == null) {
@@ -18643,7 +19188,7 @@
return false;
}
// report problem
- _errorReporter.reportError5(CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE, staticMember.nameOffset, name.length, [name, inheritedMember.enclosingElement.displayName]);
+ _errorReporter.reportError4(CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE, staticMember.nameOffset, name.length, [name, inheritedMember.enclosingElement.displayName]);
return true;
}
@@ -18666,7 +19211,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, typeArguments, [num]);
+ _errorReporter.reportError2(StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, typeArguments, [num]);
return true;
}
@@ -18694,7 +19239,7 @@
LibraryElement prevLibrary = _nameToExportElement[name];
if (prevLibrary != null) {
if (prevLibrary != nodeLibrary) {
- _errorReporter.reportError3(StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAME, node, [
+ _errorReporter.reportError2(StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAME, node, [
prevLibrary.definingCompilationUnit.displayName,
nodeLibrary.definingCompilationUnit.displayName,
name]);
@@ -18736,7 +19281,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY, node, [node.uri]);
+ _errorReporter.reportError2(CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY, node, [node.uri]);
return true;
}
@@ -18747,11 +19292,11 @@
* @return `true` if and only if an error code is generated on the passed node
* @see CompileTimeErrorCode#EXTENDS_DISALLOWED_CLASS
*/
- bool checkForExtendsDisallowedClass(ExtendsClause extendsClause) {
- if (extendsClause == null) {
+ bool checkForExtendsDisallowedClass(ExtendsClause node) {
+ if (node == null) {
return false;
}
- return checkForExtendsOrImplementsDisallowedClass(extendsClause.superclass, CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS);
+ return checkForExtendsOrImplementsDisallowedClass(node.superclass, CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS);
}
/**
@@ -18775,7 +19320,7 @@
// if the violating type happens to be 'num', we need to rule out the case where the
// enclosing class is 'int' or 'double'
if (superType == _typeProvider.numType) {
- ASTNode grandParent = typeName.parent.parent;
+ AstNode grandParent = typeName.parent.parent;
// Note: this is a corner case that won't happen often, so adding a field currentClass
// (see currentFunction) to ErrorVerifier isn't worth if for this case, but if the field
// currentClass is added, then this message should become a todo to not lookup the
@@ -18789,7 +19334,7 @@
}
}
// otherwise, report the error
- _errorReporter.reportError3(errorCode, typeName, [disallowedType.displayName]);
+ _errorReporter.reportError2(errorCode, typeName, [disallowedType.displayName]);
return true;
}
}
@@ -18807,11 +19352,11 @@
*/
bool checkForFieldInitializerNotAssignable(ConstructorFieldInitializer node) {
// prepare field element
- Element fieldNameElement = node.fieldName.staticElement;
- if (fieldNameElement is! FieldElement) {
+ Element staticElement = node.fieldName.staticElement;
+ if (staticElement is! FieldElement) {
return false;
}
- FieldElement fieldElement = fieldNameElement as FieldElement;
+ FieldElement fieldElement = staticElement as FieldElement;
// prepare field type
Type2 fieldType = fieldElement.type;
// prepare expression type
@@ -18829,9 +19374,9 @@
}
// report problem
if (_isEnclosingConstructorConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [staticType.displayName, fieldType.displayName]);
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [staticType.displayName, fieldType.displayName]);
} else {
- _errorReporter.reportError3(StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [staticType.displayName, fieldType.displayName]);
+ _errorReporter.reportError2(StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [staticType.displayName, fieldType.displayName]);
}
return true;
}
@@ -18844,20 +19389,20 @@
* @see CompileTimeErrorCode#FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
*/
bool checkForFieldInitializingFormalRedirectingConstructor(FieldFormalParameter node) {
- ConstructorDeclaration constructor = node.getAncestor(ConstructorDeclaration);
+ ConstructorDeclaration constructor = node.getAncestor((node) => node is ConstructorDeclaration);
if (constructor == null) {
- _errorReporter.reportError3(CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, node, []);
return true;
}
// constructor cannot be a factory
if (constructor.factoryKeyword != null) {
- _errorReporter.reportError3(CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, node, []);
return true;
}
// constructor cannot have a redirection
for (ConstructorInitializer initializer in constructor.initializers) {
if (initializer is RedirectingConstructorInvocation) {
- _errorReporter.reportError3(CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, node, []);
return true;
}
}
@@ -18866,6 +19411,39 @@
}
/**
+ * This verifies that the passed variable declaration list has only initialized variables if the
+ * list is final or const. This method is called by
+ * [checkForFinalNotInitializedInClass],
+ * [visitTopLevelVariableDeclaration] and
+ * [visitVariableDeclarationStatement].
+ *
+ * @param node the class declaration to test
+ * @return `true` if and only if an error code is generated on the passed node
+ * @see CompileTimeErrorCode#CONST_NOT_INITIALIZED
+ * @see StaticWarningCode#FINAL_NOT_INITIALIZED
+ */
+ bool checkForFinalNotInitialized(VariableDeclarationList node) {
+ if (_isInNativeClass) {
+ return false;
+ }
+ bool foundError = false;
+ if (!node.isSynthetic) {
+ NodeList<VariableDeclaration> variables = node.variables;
+ for (VariableDeclaration variable in variables) {
+ if (variable.initializer == null) {
+ if (node.isConst) {
+ _errorReporter.reportError2(CompileTimeErrorCode.CONST_NOT_INITIALIZED, variable.name, [variable.name.name]);
+ } else if (node.isFinal) {
+ _errorReporter.reportError2(StaticWarningCode.FINAL_NOT_INITIALIZED, variable.name, [variable.name.name]);
+ }
+ foundError = true;
+ }
+ }
+ }
+ return foundError;
+ }
+
+ /**
* This verifies that final fields that are declared, without any constructors in the enclosing
* class, are initialized. Cases in which there is at least one constructor are handled at the end
* of [checkForAllFinalInitializedErrorCodes].
@@ -18875,7 +19453,7 @@
* @see CompileTimeErrorCode#CONST_NOT_INITIALIZED
* @see StaticWarningCode#FINAL_NOT_INITIALIZED
*/
- bool checkForFinalNotInitialized(ClassDeclaration node) {
+ bool checkForFinalNotInitializedInClass(ClassDeclaration node) {
NodeList<ClassMember> classMembers = node.members;
for (ClassMember classMember in classMembers) {
if (classMember is ConstructorDeclaration) {
@@ -18886,40 +19464,7 @@
for (ClassMember classMember in classMembers) {
if (classMember is FieldDeclaration) {
FieldDeclaration field = classMember;
- foundError = javaBooleanOr(foundError, checkForFinalNotInitialized2(field.fields));
- }
- }
- return foundError;
- }
-
- /**
- * This verifies that the passed variable declaration list has only initialized variables if the
- * list is final or const. This method is called by
- * [checkForFinalNotInitialized],
- * [visitTopLevelVariableDeclaration] and
- * [visitVariableDeclarationStatement].
- *
- * @param node the class declaration to test
- * @return `true` if and only if an error code is generated on the passed node
- * @see CompileTimeErrorCode#CONST_NOT_INITIALIZED
- * @see StaticWarningCode#FINAL_NOT_INITIALIZED
- */
- bool checkForFinalNotInitialized2(VariableDeclarationList node) {
- if (_isInNativeClass) {
- return false;
- }
- bool foundError = false;
- if (!node.isSynthetic) {
- NodeList<VariableDeclaration> variables = node.variables;
- for (VariableDeclaration variable in variables) {
- if (variable.initializer == null) {
- if (node.isConst) {
- _errorReporter.reportError3(CompileTimeErrorCode.CONST_NOT_INITIALIZED, variable.name, [variable.name.name]);
- } else if (node.isFinal) {
- _errorReporter.reportError3(StaticWarningCode.FINAL_NOT_INITIALIZED, variable.name, [variable.name.name]);
- }
- foundError = true;
- }
+ foundError = javaBooleanOr(foundError, checkForFinalNotInitialized(field.fields));
}
}
return foundError;
@@ -18933,12 +19478,12 @@
* @return `true` if and only if an error code is generated on the passed node
* @see CompileTimeErrorCode#IMPLEMENTS_DISALLOWED_CLASS
*/
- bool checkForImplementsDisallowedClass(ImplementsClause implementsClause) {
- if (implementsClause == null) {
+ bool checkForImplementsDisallowedClass(ImplementsClause node) {
+ if (node == null) {
return false;
}
bool foundError = false;
- for (TypeName type in implementsClause.interfaces) {
+ for (TypeName type in node.interfaces) {
foundError = javaBooleanOr(foundError, checkForExtendsOrImplementsDisallowedClass(type, CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS));
}
return foundError;
@@ -18973,7 +19518,7 @@
return false;
}
// comment
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is CommentReference) {
return false;
}
@@ -18999,9 +19544,9 @@
}
// report problem
if (_isInStaticMethod) {
- _errorReporter.reportError3(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, node, []);
} else {
- _errorReporter.reportError3(CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, node, []);
}
return true;
}
@@ -19029,7 +19574,7 @@
LibraryElement prevLibrary = _nameToImportElement[name];
if (prevLibrary != null) {
if (prevLibrary != nodeLibrary) {
- _errorReporter.reportError3(StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAME, node, [
+ _errorReporter.reportError2(StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAME, node, [
prevLibrary.definingCompilationUnit.displayName,
nodeLibrary.definingCompilationUnit.displayName,
name]);
@@ -19070,7 +19615,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, node, [node.uri]);
+ _errorReporter.reportError2(CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, node, [node.uri]);
return true;
}
@@ -19098,7 +19643,7 @@
} else {
Type2 nType = expression.bestType;
if (firstType != nType) {
- _errorReporter.reportError3(CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES, expression, [expression.toSource(), firstType.displayName]);
+ _errorReporter.reportError2(CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES, expression, [expression.toSource(), firstType.displayName]);
foundError = true;
}
}
@@ -19166,7 +19711,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, name, [name.name]);
+ _errorReporter.reportError2(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, name, [name.name]);
return true;
}
@@ -19187,37 +19732,7 @@
Type2 staticParameterType = staticParameterElement == null ? null : staticParameterElement.type;
ParameterElement propagatedParameterElement = argument.propagatedParameterElement;
Type2 propagatedParameterType = propagatedParameterElement == null ? null : propagatedParameterElement.type;
- return checkForArgumentTypeNotAssignable4(argument, staticParameterType, _typeProvider.intType, propagatedParameterType, _typeProvider.intType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
- }
-
- /**
- * Given an assignment using a compound assignment operator, this verifies that the given
- * assignment is valid.
- *
- * @param node the assignment expression being tested
- * @return `true` if and only if an error code is generated on the passed node
- * @see StaticTypeWarningCode#INVALID_ASSIGNMENT
- */
- bool checkForInvalidAssignment(AssignmentExpression node) {
- Expression lhs = node.leftHandSide;
- if (lhs == null) {
- return false;
- }
- VariableElement leftElement = getVariableElement(lhs);
- Type2 leftType = (leftElement == null) ? getStaticType(lhs) : leftElement.type;
- MethodElement invokedMethod = node.staticElement;
- if (invokedMethod == null) {
- return false;
- }
- Type2 rightType = invokedMethod.type.returnType;
- if (leftType == null || rightType == null) {
- return false;
- }
- if (!rightType.isAssignableTo(leftType)) {
- _errorReporter.reportError3(StaticTypeWarningCode.INVALID_ASSIGNMENT, node.rightHandSide, [rightType.displayName, leftType.displayName]);
- return true;
- }
- return false;
+ return checkForArgumentTypeNotAssignable(argument, staticParameterType, _typeProvider.intType, propagatedParameterType, _typeProvider.intType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
}
/**
@@ -19228,7 +19743,7 @@
* @return `true` if and only if an error code is generated on the passed node
* @see StaticTypeWarningCode#INVALID_ASSIGNMENT
*/
- bool checkForInvalidAssignment2(Expression lhs, Expression rhs) {
+ bool checkForInvalidAssignment(Expression lhs, Expression rhs) {
if (lhs == null || rhs == null) {
return false;
}
@@ -19237,7 +19752,13 @@
Type2 staticRightType = getStaticType(rhs);
bool isStaticAssignable = staticRightType.isAssignableTo(leftType);
if (!isStaticAssignable) {
- _errorReporter.reportError3(StaticTypeWarningCode.INVALID_ASSIGNMENT, rhs, [staticRightType.displayName, leftType.displayName]);
+ String leftName = leftType.displayName;
+ String rightName = staticRightType.displayName;
+ if (leftName == rightName) {
+ leftName = getExtendedDisplayName(leftType);
+ rightName = getExtendedDisplayName(staticRightType);
+ }
+ _errorReporter.reportError2(StaticTypeWarningCode.INVALID_ASSIGNMENT, rhs, [rightName, leftName]);
return true;
}
// TODO(brianwilkerson) Define a hint corresponding to the warning and report it if appropriate.
@@ -19255,6 +19776,63 @@
}
/**
+ * Given an assignment using a compound assignment operator, this verifies that the given
+ * assignment is valid.
+ *
+ * @param node the assignment expression being tested
+ * @return `true` if and only if an error code is generated on the passed node
+ * @see StaticTypeWarningCode#INVALID_ASSIGNMENT
+ */
+ bool checkForInvalidCompoundAssignment(AssignmentExpression node) {
+ Expression lhs = node.leftHandSide;
+ if (lhs == null) {
+ return false;
+ }
+ VariableElement leftElement = getVariableElement(lhs);
+ Type2 leftType = (leftElement == null) ? getStaticType(lhs) : leftElement.type;
+ MethodElement invokedMethod = node.staticElement;
+ if (invokedMethod == null) {
+ return false;
+ }
+ Type2 rightType = invokedMethod.type.returnType;
+ if (leftType == null || rightType == null) {
+ return false;
+ }
+ if (!rightType.isAssignableTo(leftType)) {
+ String leftName = leftType.displayName;
+ String rightName = rightType.displayName;
+ if (leftName == rightName) {
+ leftName = getExtendedDisplayName(leftType);
+ rightName = getExtendedDisplayName(rightType);
+ }
+ _errorReporter.reportError2(StaticTypeWarningCode.INVALID_ASSIGNMENT, node.rightHandSide, [rightName, leftName]);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Check the given initializer to ensure that the field being initialized is a valid field.
+ *
+ * @param node the field initializer being checked
+ */
+ void checkForInvalidField(ConstructorFieldInitializer node) {
+ SimpleIdentifier fieldName = node.fieldName;
+ Element staticElement = fieldName.staticElement;
+ if (staticElement is FieldElement) {
+ FieldElement fieldElement = staticElement;
+ if (fieldElement.isSynthetic) {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
+ } else if (fieldElement.isStatic) {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD, node, [fieldName]);
+ }
+ } else {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTANT_FIELD, node, [fieldName]);
+ return;
+ }
+ }
+
+ /**
* This verifies that the usage of the passed 'this' is valid.
*
* @param node the 'this' expression to evaluate
@@ -19263,7 +19841,7 @@
*/
bool checkForInvalidReferenceToThis(ThisExpression node) {
if (!isThisInValidContext(node)) {
- _errorReporter.reportError3(CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS, node, []);
return true;
}
return false;
@@ -19283,7 +19861,7 @@
bool foundError = false;
for (TypeName typeName in arguments) {
if (typeName.type is TypeParameterType) {
- _errorReporter.reportError3(errorCode, typeName, [typeName.name]);
+ _errorReporter.reportError2(errorCode, typeName, [typeName.name]);
foundError = true;
}
}
@@ -19320,7 +19898,7 @@
// Check every list element.
bool hasProblems = false;
for (Expression element in node.elements) {
- hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignable3(element, listElementType, null, errorCode));
+ hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignableWithExpectedTypes(element, listElementType, null, errorCode));
}
return hasProblems;
}
@@ -19364,8 +19942,8 @@
for (MapLiteralEntry entry in entries) {
Expression key = entry.key;
Expression value = entry.value;
- hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignable3(key, keyType, null, keyErrorCode));
- hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignable3(value, valueType, null, valueErrorCode));
+ hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignableWithExpectedTypes(key, keyType, null, keyErrorCode));
+ hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignableWithExpectedTypes(value, valueType, null, valueErrorCode));
}
return hasProblems;
}
@@ -19389,7 +19967,7 @@
// check accessors
for (PropertyAccessorElement accessor in _enclosingClass.accessors) {
if (className == accessor.name) {
- _errorReporter.reportError5(CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME, accessor.nameOffset, className.length, []);
+ _errorReporter.reportError4(CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME, accessor.nameOffset, className.length, []);
problemReported = true;
}
}
@@ -19463,13 +20041,13 @@
// it is dynamic which is assignable to everything).
if (setterType != null && getterType != null && !getterType.isAssignableTo(setterType)) {
if (enclosingClassForCounterpart == null) {
- _errorReporter.reportError3(StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES, accessorDeclaration, [
+ _errorReporter.reportError2(StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES, accessorDeclaration, [
accessorTextName,
setterType.displayName,
getterType.displayName]);
return true;
} else {
- _errorReporter.reportError3(StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, accessorDeclaration, [
+ _errorReporter.reportError2(StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, accessorDeclaration, [
accessorTextName,
setterType.displayName,
getterType.displayName,
@@ -19488,8 +20066,15 @@
* @see StaticWarningCode#MIXED_RETURN_TYPES
*/
bool checkForMixedReturns(BlockFunctionBody node) {
- if (_returnWithCount > 0 && _returnWithoutCount > 0) {
- _errorReporter.reportError3(StaticWarningCode.MIXED_RETURN_TYPES, node, []);
+ int withCount = _returnsWith.length;
+ int withoutCount = _returnsWithout.length;
+ if (withCount > 0 && withoutCount > 0) {
+ for (int i = 0; i < withCount; i++) {
+ _errorReporter.reportError5(StaticWarningCode.MIXED_RETURN_TYPES, _returnsWith[i].keyword, []);
+ }
+ for (int i = 0; i < withoutCount; i++) {
+ _errorReporter.reportError5(StaticWarningCode.MIXED_RETURN_TYPES, _returnsWithout[i].keyword, []);
+ }
return true;
}
return false;
@@ -19506,7 +20091,7 @@
bool checkForMixinDeclaresConstructor(TypeName mixinName, ClassElement mixinElement) {
for (ConstructorElement constructor in mixinElement.constructors) {
if (!constructor.isSynthetic && !constructor.isFactory) {
- _errorReporter.reportError3(CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR, mixinName, [mixinElement.name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR, mixinName, [mixinElement.name]);
return true;
}
}
@@ -19525,7 +20110,7 @@
InterfaceType mixinSupertype = mixinElement.supertype;
if (mixinSupertype != null) {
if (!mixinSupertype.isObject || !mixinElement.isTypedef && mixinElement.mixins.length != 0) {
- _errorReporter.reportError3(CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT, mixinName, [mixinElement.name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT, mixinName, [mixinElement.name]);
return true;
}
}
@@ -19542,7 +20127,7 @@
*/
bool checkForMixinReferencesSuper(TypeName mixinName, ClassElement mixinElement) {
if (mixinElement.hasReferenceToSuper()) {
- _errorReporter.reportError3(CompileTimeErrorCode.MIXIN_REFERENCES_SUPER, mixinName, [mixinElement.name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.MIXIN_REFERENCES_SUPER, mixinName, [mixinElement.name]);
}
return false;
}
@@ -19560,7 +20145,7 @@
if (initializer is SuperConstructorInvocation) {
numSuperInitializers++;
if (numSuperInitializers > 1) {
- _errorReporter.reportError3(CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS, initializer, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS, initializer, []);
}
}
}
@@ -19576,7 +20161,7 @@
*/
bool checkForNativeFunctionBodyInNonSDKCode(NativeFunctionBody node) {
if (!_isInSystemLibrary && !_hasExtUri) {
- _errorReporter.reportError3(ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, node, []);
+ _errorReporter.reportError2(ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, node, []);
return true;
}
return false;
@@ -19610,9 +20195,9 @@
// report as named or default constructor absence
SimpleIdentifier name = constructorName.name;
if (name != null) {
- _errorReporter.reportError3(StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR, name, [className, name]);
+ _errorReporter.reportError2(StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR, name, [className, name]);
} else {
- _errorReporter.reportError3(StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, constructorName, [className]);
+ _errorReporter.reportError2(StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, constructorName, [className]);
}
return true;
}
@@ -19641,7 +20226,7 @@
ConstructorElement superUnnamedConstructor = superElement.unnamedConstructor;
if (superUnnamedConstructor != null) {
if (superUnnamedConstructor.isFactory) {
- _errorReporter.reportError3(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, node.name, [superUnnamedConstructor]);
+ _errorReporter.reportError2(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, node.name, [superUnnamedConstructor]);
return true;
}
if (superUnnamedConstructor.isDefaultConstructor) {
@@ -19649,7 +20234,7 @@
}
}
// report problem
- _errorReporter.reportError3(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, node.name, [superType.displayName]);
+ _errorReporter.reportError2(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, node.name, [superType.displayName]);
return true;
}
@@ -19702,8 +20287,8 @@
if (memberName == null) {
break;
}
- // If the element is defined in Object, skip it.
- if ((executableElt.enclosingElement as ClassElement).type.isObject) {
+ // If the element is not synthetic and can be determined to be defined in Object, skip it.
+ if (executableElt.enclosingElement != null && (executableElt.enclosingElement as ClassElement).type.isObject) {
continue;
}
// Reference the type of the enclosing class
@@ -19747,7 +20332,12 @@
List<ExecutableElement> missingOverridesArray = new List.from(missingOverrides);
List<String> stringMembersArrayListSet = new List<String>();
for (int i = 0; i < missingOverridesArray.length; i++) {
- String newStrMember = "${missingOverridesArray[i].enclosingElement.displayName}.${missingOverridesArray[i].displayName}";
+ String newStrMember;
+ if (missingOverridesArray[i].enclosingElement != null) {
+ newStrMember = "${missingOverridesArray[i].enclosingElement.displayName}.${missingOverridesArray[i].displayName}";
+ } else {
+ newStrMember = missingOverridesArray[i].displayName;
+ }
if (!stringMembersArrayListSet.contains(newStrMember)) {
stringMembersArrayListSet.add(newStrMember);
}
@@ -19793,7 +20383,7 @@
bool checkForNonBoolCondition(Expression condition) {
Type2 conditionType = getStaticType(condition);
if (conditionType != null && !conditionType.isAssignableTo(_boolType)) {
- _errorReporter.reportError3(StaticTypeWarningCode.NON_BOOL_CONDITION, condition, []);
+ _errorReporter.reportError2(StaticTypeWarningCode.NON_BOOL_CONDITION, condition, []);
return true;
}
return false;
@@ -19811,13 +20401,13 @@
Type2 type = getStaticType(expression);
if (type is InterfaceType) {
if (!type.isAssignableTo(_boolType)) {
- _errorReporter.reportError3(StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression, []);
+ _errorReporter.reportError2(StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression, []);
return true;
}
} else if (type is FunctionType) {
FunctionType functionType = type;
if (functionType.typeArguments.length == 0 && !functionType.returnType.isAssignableTo(_boolType)) {
- _errorReporter.reportError3(StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression, []);
+ _errorReporter.reportError2(StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression, []);
return true;
}
}
@@ -19834,7 +20424,7 @@
bool checkForNonBoolNegationExpression(Expression expression) {
Type2 conditionType = getStaticType(expression);
if (conditionType != null && !conditionType.isAssignableTo(_boolType)) {
- _errorReporter.reportError3(StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, expression, []);
+ _errorReporter.reportError2(StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, expression, []);
return true;
}
return false;
@@ -19842,12 +20432,10 @@
/**
* This verifies the passed map literal either:
- *
* * has `const modifier`
* * has explicit type arguments
* * is not start of the statement
*
- *
* @param node the map literal to evaluate
* @return `true` if and only if an error code is generated on the passed node
* @see CompileTimeErrorCode#NON_CONST_MAP_AS_EXPRESSION_STATEMENT
@@ -19862,7 +20450,7 @@
return false;
}
// prepare statement
- Statement statement = node.getAncestor(ExpressionStatement);
+ Statement statement = node.getAncestor((node) => node is ExpressionStatement);
if (statement == null) {
return false;
}
@@ -19871,7 +20459,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT, node, []);
return true;
}
@@ -19894,7 +20482,7 @@
if (typeName != null) {
Type2 type = typeName.type;
if (type != null && !type.isVoid) {
- _errorReporter.reportError3(StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, typeName, []);
+ _errorReporter.reportError2(StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, typeName, []);
}
}
// no warning
@@ -19912,7 +20500,7 @@
if (typeName != null) {
Type2 type = typeName.type;
if (type != null && !type.isVoid) {
- _errorReporter.reportError3(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, typeName, []);
+ _errorReporter.reportError2(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, typeName, []);
}
}
return false;
@@ -19937,7 +20525,7 @@
NodeList<FormalParameter> formalParameters = parameterList.parameters;
for (FormalParameter formalParameter in formalParameters) {
if (formalParameter.kind.isOptional) {
- _errorReporter.reportError3(CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR, formalParameter, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR, formalParameter, []);
foundError = true;
}
}
@@ -19962,7 +20550,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, node, []);
return true;
}
@@ -19988,7 +20576,7 @@
return false;
}
// report error
- _errorReporter.reportError3(CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, initializer, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, initializer, []);
return true;
}
}
@@ -20016,7 +20604,7 @@
return false;
}
// report error
- _errorReporter.reportError3(CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, redirectedConstructorNode, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, redirectedConstructorNode, []);
return true;
}
@@ -20033,62 +20621,7 @@
if (classElt == null) {
return false;
}
- return checkForRecursiveInterfaceInheritance2(classElt, new List<ClassElement>());
- }
-
- /**
- * This checks the class declaration is not a superinterface to itself.
- *
- * @param classElt the class element to test
- * @param path a list containing the potentially cyclic implements path
- * @return `true` if and only if an error code is generated on the passed element
- * @see CompileTimeErrorCode#RECURSIVE_INTERFACE_INHERITANCE
- * @see CompileTimeErrorCode#RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
- * @see CompileTimeErrorCode#RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS
- */
- bool checkForRecursiveInterfaceInheritance2(ClassElement classElt, List<ClassElement> path) {
- // Detect error condition.
- int size = path.length;
- // If this is not the base case (size > 0), and the enclosing class is the passed class
- // element then an error an error.
- if (size > 0 && _enclosingClass == classElt) {
- String enclosingClassName = _enclosingClass.displayName;
- if (size > 1) {
- // Construct a string showing the cyclic implements path: "A, B, C, D, A"
- String separator = ", ";
- JavaStringBuilder builder = new JavaStringBuilder();
- for (int i = 0; i < size; i++) {
- builder.append(path[i].displayName);
- builder.append(separator);
- }
- builder.append(classElt.displayName);
- _errorReporter.reportError5(CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, _enclosingClass.nameOffset, enclosingClassName.length, [enclosingClassName, builder.toString()]);
- return true;
- } else {
- // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS or RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
- InterfaceType supertype = classElt.supertype;
- ErrorCode errorCode = (supertype != null && _enclosingClass == supertype.element ? CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS : CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS);
- _errorReporter.reportError5(errorCode, _enclosingClass.nameOffset, enclosingClassName.length, [enclosingClassName]);
- return true;
- }
- }
- if (path.indexOf(classElt) > 0) {
- return false;
- }
- path.add(classElt);
- // n-case
- InterfaceType supertype = classElt.supertype;
- if (supertype != null && checkForRecursiveInterfaceInheritance2(supertype.element, path)) {
- return true;
- }
- List<InterfaceType> interfaceTypes = classElt.interfaces;
- for (InterfaceType interfaceType in interfaceTypes) {
- if (checkForRecursiveInterfaceInheritance2(interfaceType.element, path)) {
- return true;
- }
- }
- path.removeAt(path.length - 1);
- return false;
+ return safeCheckForRecursiveInterfaceInheritance(classElt, new List<ClassElement>());
}
/**
@@ -20111,7 +20644,7 @@
if (redirectedConstructor != null) {
for (FormalParameter parameter in node.parameters.parameters) {
if (parameter is DefaultFormalParameter && parameter.defaultValue != null) {
- _errorReporter.reportError3(CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR, parameter.identifier, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR, parameter.identifier, []);
errorReported = true;
}
}
@@ -20121,7 +20654,7 @@
for (ConstructorInitializer initializer in node.initializers) {
if (initializer is RedirectingConstructorInvocation) {
if (numRedirections > 0) {
- _errorReporter.reportError3(CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, initializer, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, initializer, []);
errorReported = true;
}
numRedirections++;
@@ -20131,11 +20664,11 @@
if (numRedirections > 0) {
for (ConstructorInitializer initializer in node.initializers) {
if (initializer is SuperConstructorInvocation) {
- _errorReporter.reportError3(CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, initializer, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, initializer, []);
errorReported = true;
}
if (initializer is ConstructorFieldInitializer) {
- _errorReporter.reportError3(CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, initializer, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, initializer, []);
errorReported = true;
}
}
@@ -20177,7 +20710,7 @@
return false;
}
// report error
- _errorReporter.reportError3(CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR, redirectedConstructorNode, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR, redirectedConstructorNode, []);
return true;
}
@@ -20190,7 +20723,7 @@
*/
bool checkForRethrowOutsideCatch(RethrowExpression node) {
if (!_isInCatchClause) {
- _errorReporter.reportError3(CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH, node, []);
return true;
}
return false;
@@ -20215,7 +20748,7 @@
return false;
}
// report error
- _errorReporter.reportError3(CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, body, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, body, []);
return true;
}
@@ -20237,7 +20770,7 @@
if (staticReturnType.isVoid || staticReturnType.isDynamic || staticReturnType.isBottom) {
return false;
}
- _errorReporter.reportError3(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
+ _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
staticReturnType.displayName,
expectedReturnType.displayName,
_enclosingFunction.displayName]);
@@ -20247,7 +20780,7 @@
if (isStaticAssignable) {
return false;
}
- _errorReporter.reportError3(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
+ _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
staticReturnType.displayName,
expectedReturnType.displayName,
_enclosingFunction.displayName]);
@@ -20281,7 +20814,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, name, [name.name]);
+ _errorReporter.reportError2(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, name, [name.name]);
return true;
}
@@ -20315,7 +20848,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE, expression, [expressionType, caseType]);
+ _errorReporter.reportError2(StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE, expression, [expressionType, caseType]);
return true;
}
return false;
@@ -20333,7 +20866,7 @@
if (!hasTypedefSelfReference(element)) {
return false;
}
- _errorReporter.reportError3(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, node, []);
return true;
}
@@ -20348,7 +20881,7 @@
if (!hasTypedefSelfReference(element)) {
return false;
}
- _errorReporter.reportError3(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, node, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, node, []);
return true;
}
@@ -20395,7 +20928,7 @@
} else {
errorCode = StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS;
}
- _errorReporter.reportError3(errorCode, argTypeName, [argType.displayName, boundType.displayName]);
+ _errorReporter.reportError2(errorCode, argTypeName, [argType.displayName, boundType.displayName]);
foundError = true;
}
}
@@ -20415,7 +20948,7 @@
if (_isInStaticMethod || _isInStaticVariableDeclaration) {
Type2 type = node.type;
if (type is TypeParameterType) {
- _errorReporter.reportError3(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, node, []);
+ _errorReporter.reportError2(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, node, []);
return true;
}
}
@@ -20441,7 +20974,7 @@
return false;
}
// report problem
- _errorReporter.reportError3(StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, node, [element.displayName]);
+ _errorReporter.reportError2(StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, node, [element.displayName]);
return true;
}
@@ -20486,7 +21019,7 @@
ConstructorElement superUnnamedConstructor = superElement.unnamedConstructor;
if (superUnnamedConstructor != null) {
if (superUnnamedConstructor.isFactory) {
- _errorReporter.reportError3(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, node.returnType, [superUnnamedConstructor]);
+ _errorReporter.reportError2(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, node.returnType, [superUnnamedConstructor]);
return true;
}
if (!superUnnamedConstructor.isDefaultConstructor) {
@@ -20498,11 +21031,11 @@
offset = returnType.offset;
length = (name != null ? name.end : returnType.end) - offset;
}
- _errorReporter.reportError5(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, offset, length, [superType.displayName]);
+ _errorReporter.reportError4(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, offset, length, [superType.displayName]);
}
return false;
}
- _errorReporter.reportError3(CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, node.returnType, [superElement.name]);
+ _errorReporter.reportError2(CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, node.returnType, [superElement.name]);
return true;
}
@@ -20529,10 +21062,40 @@
if (identical(enclosingElement, _enclosingClass)) {
return false;
}
- _errorReporter.reportError3(StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER, name, [name.name]);
+ _errorReporter.reportError2(StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER, name, [name.name]);
return true;
}
+ void checkForValidField(FieldFormalParameter node) {
+ ParameterElement element = node.element;
+ if (element is FieldFormalParameterElement) {
+ FieldElement fieldElement = element.field;
+ if (fieldElement == null || fieldElement.isSynthetic) {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [node.identifier.name]);
+ } else {
+ ParameterElement parameterElement = node.element;
+ if (parameterElement is FieldFormalParameterElementImpl) {
+ FieldFormalParameterElementImpl fieldFormal = parameterElement;
+ Type2 declaredType = fieldFormal.type;
+ Type2 fieldType = fieldElement.type;
+ if (fieldElement.isSynthetic) {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [node.identifier.name]);
+ } else if (fieldElement.isStatic) {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, node, [node.identifier.name]);
+ } else if (declaredType != null && fieldType != null && !declaredType.isAssignableTo(fieldType)) {
+ _errorReporter.reportError2(StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, node, [declaredType.displayName, fieldType.displayName]);
+ }
+ } else {
+ if (fieldElement.isSynthetic) {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, node, [node.identifier.name]);
+ } else if (fieldElement.isStatic) {
+ _errorReporter.reportError2(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, node, [node.identifier.name]);
+ }
+ }
+ }
+ }
+ }
+
/**
* This verifies the passed operator-method declaration, has correct number of parameters.
*
@@ -20566,12 +21129,12 @@
expected = 0;
}
if (expected != -1 && numParameters != expected) {
- _errorReporter.reportError3(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, nameNode, [name, expected, numParameters]);
+ _errorReporter.reportError2(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, nameNode, [name, expected, numParameters]);
return true;
}
// check for operator "-"
if ("-" == name && numParameters > 1) {
- _errorReporter.reportError3(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, nameNode, [numParameters]);
+ _errorReporter.reportError2(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, nameNode, [numParameters]);
return true;
}
// OK
@@ -20597,7 +21160,7 @@
}
NodeList<FormalParameter> parameters = parameterList.parameters;
if (parameters.length != 1 || parameters[0].kind != ParameterKind.REQUIRED) {
- _errorReporter.reportError3(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, setterName, []);
+ _errorReporter.reportError2(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, setterName, []);
return true;
}
return false;
@@ -20623,7 +21186,7 @@
}
ExecutableElement callMethod = _inheritanceManager.lookupMember(classElement, "call");
if (callMethod == null || callMethod is! MethodElement || (callMethod as MethodElement).isAbstract) {
- _errorReporter.reportError3(StaticWarningCode.FUNCTION_WITHOUT_CALL, node.name, []);
+ _errorReporter.reportError2(StaticWarningCode.FUNCTION_WITHOUT_CALL, node.name, []);
return true;
}
return false;
@@ -20652,7 +21215,7 @@
for (TypeName interfaceNode in implementsClause.interfaces) {
if (interfaceNode.type == superType) {
hasProblem = true;
- _errorReporter.reportError3(CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS, interfaceNode, [superType.displayName]);
+ _errorReporter.reportError2(CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS, interfaceNode, [superType.displayName]);
}
}
// done
@@ -20660,6 +21223,24 @@
}
/**
+ * Return a display name for the given type that includes the path to the compilation unit in
+ * which the type is defined.
+ *
+ * @param type the type for which an extended display name is to be returned
+ * @return a display name that can help distiguish between two types with the same name
+ */
+ String getExtendedDisplayName(Type2 type) {
+ Element element = type.element;
+ if (element != null) {
+ Source source = element.source;
+ if (source != null) {
+ return "${type.displayName} (${source.fullName})";
+ }
+ }
+ return type.displayName;
+ }
+
+ /**
* Returns the Type (return type) for a given getter.
*
* @param propertyAccessorElement
@@ -20815,11 +21396,11 @@
}
/**
- * @return `true` if the given [ASTNode] is the part of constant constructor
+ * @return `true` if the given [AstNode] is the part of constant constructor
* invocation.
*/
- bool isInConstConstructorInvocation(ASTNode node) {
- InstanceCreationExpression creation = node.getAncestor(InstanceCreationExpression);
+ bool isInConstConstructorInvocation(AstNode node) {
+ InstanceCreationExpression creation = node.getAncestor((node) => node is InstanceCreationExpression);
if (creation == null) {
return false;
}
@@ -20881,7 +21462,7 @@
* @return `true` if the given 'this' expression is in the valid context
*/
bool isThisInValidContext(ThisExpression node) {
- for (ASTNode n = node; n != null; n = n.parent) {
+ for (AstNode n = node; n != null; n = n.parent) {
if (n is CompilationUnit) {
return false;
}
@@ -20912,7 +21493,7 @@
if (node.inDeclarationContext()) {
return true;
}
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is ConstructorName || parent is MethodInvocation || parent is PropertyAccess || parent is SuperConstructorInvocation) {
return true;
}
@@ -20934,84 +21515,57 @@
bool isUserDefinedObject(EvaluationResultImpl result) => result == null || (result is ValidResult && result.isUserDefinedObject);
/**
- * Return `true` iff the passed [ClassElement] has a concrete implementation of the
- * passed accessor name in the superclass chain.
+ * This checks the class declaration is not a superinterface to itself.
+ *
+ * @param classElt the class element to test
+ * @param path a list containing the potentially cyclic implements path
+ * @return `true` if and only if an error code is generated on the passed element
+ * @see CompileTimeErrorCode#RECURSIVE_INTERFACE_INHERITANCE
+ * @see CompileTimeErrorCode#RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
+ * @see CompileTimeErrorCode#RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS
*/
- bool memberHasConcreteAccessorImplementationInSuperclassChain(ClassElement classElement, String accessorName, List<ClassElement> superclassChain) {
- if (superclassChain.contains(classElement)) {
+ bool safeCheckForRecursiveInterfaceInheritance(ClassElement classElt, List<ClassElement> path) {
+ // Detect error condition.
+ int size = path.length;
+ // If this is not the base case (size > 0), and the enclosing class is the passed class
+ // element then an error an error.
+ if (size > 0 && _enclosingClass == classElt) {
+ String enclosingClassName = _enclosingClass.displayName;
+ if (size > 1) {
+ // Construct a string showing the cyclic implements path: "A, B, C, D, A"
+ String separator = ", ";
+ JavaStringBuilder builder = new JavaStringBuilder();
+ for (int i = 0; i < size; i++) {
+ builder.append(path[i].displayName);
+ builder.append(separator);
+ }
+ builder.append(classElt.displayName);
+ _errorReporter.reportError4(CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, _enclosingClass.nameOffset, enclosingClassName.length, [enclosingClassName, builder.toString()]);
+ return true;
+ } else {
+ // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS or RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
+ InterfaceType supertype = classElt.supertype;
+ ErrorCode errorCode = (supertype != null && _enclosingClass == supertype.element ? CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS : CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS);
+ _errorReporter.reportError4(errorCode, _enclosingClass.nameOffset, enclosingClassName.length, [enclosingClassName]);
+ return true;
+ }
+ }
+ if (path.indexOf(classElt) > 0) {
return false;
- } else {
- superclassChain.add(classElement);
}
- for (PropertyAccessorElement accessor in classElement.accessors) {
- if (accessor.name == accessorName) {
- if (!accessor.isAbstract) {
- return true;
- }
+ path.add(classElt);
+ // n-case
+ InterfaceType supertype = classElt.supertype;
+ if (supertype != null && safeCheckForRecursiveInterfaceInheritance(supertype.element, path)) {
+ return true;
+ }
+ List<InterfaceType> interfaceTypes = classElt.interfaces;
+ for (InterfaceType interfaceType in interfaceTypes) {
+ if (safeCheckForRecursiveInterfaceInheritance(interfaceType.element, path)) {
+ return true;
}
}
- for (InterfaceType mixinType in classElement.mixins) {
- if (mixinType != null) {
- ClassElement mixinElement = mixinType.element;
- if (mixinElement != null) {
- for (PropertyAccessorElement accessor in mixinElement.accessors) {
- if (accessor.name == accessorName) {
- if (!accessor.isAbstract) {
- return true;
- }
- }
- }
- }
- }
- }
- InterfaceType superType = classElement.supertype;
- if (superType != null) {
- ClassElement superClassElt = superType.element;
- if (superClassElt != null) {
- return memberHasConcreteAccessorImplementationInSuperclassChain(superClassElt, accessorName, superclassChain);
- }
- }
- return false;
- }
-
- /**
- * Return `true` iff the passed [ClassElement] has a concrete implementation of the
- * passed method name in the superclass chain.
- */
- bool memberHasConcreteMethodImplementationInSuperclassChain(ClassElement classElement, String methodName, List<ClassElement> superclassChain) {
- if (superclassChain.contains(classElement)) {
- return false;
- } else {
- superclassChain.add(classElement);
- }
- for (MethodElement method in classElement.methods) {
- if (method.name == methodName) {
- if (!method.isAbstract) {
- return true;
- }
- }
- }
- for (InterfaceType mixinType in classElement.mixins) {
- if (mixinType != null) {
- ClassElement mixinElement = mixinType.element;
- if (mixinElement != null) {
- for (MethodElement method in mixinElement.methods) {
- if (method.name == methodName) {
- if (!method.isAbstract) {
- return true;
- }
- }
- }
- }
- }
- }
- InterfaceType superType = classElement.supertype;
- if (superType != null) {
- ClassElement superClassElt = superType.element;
- if (superClassElt != null) {
- return memberHasConcreteMethodImplementationInSuperclassChain(superClassElt, methodName, superclassChain);
- }
- }
+ path.removeAt(path.length - 1);
return false;
}
}
@@ -21115,8 +21669,6 @@
* resolver. The convention for this class is for the name of the error code to indicate the problem
* that caused the error to be generated and for the error message to explain what is wrong and,
* when appropriate, how the problem can be corrected.
- *
- * @coverage dart.engine.resolver
*/
class ResolverErrorCode extends Enum<ResolverErrorCode> implements ErrorCode {
static final ResolverErrorCode BREAK_LABEL_ON_SWITCH_MEMBER = new ResolverErrorCode.con1('BREAK_LABEL_ON_SWITCH_MEMBER', 0, ErrorType.COMPILE_TIME_ERROR, "Break label resolves to case or default statement");
diff --git a/pkg/analyzer/lib/src/generated/scanner.dart b/pkg/analyzer/lib/src/generated/scanner.dart
index bb33c66..b2366e8 100644
--- a/pkg/analyzer/lib/src/generated/scanner.dart
+++ b/pkg/analyzer/lib/src/generated/scanner.dart
@@ -18,8 +18,6 @@
/**
* Instances of the abstract class `KeywordState` represent a state in a state machine used to
* scan keywords.
- *
- * @coverage dart.engine.parser
*/
class KeywordState {
/**
@@ -140,8 +138,6 @@
/**
* The enumeration `ScannerErrorCode` defines the error codes used for errors detected by the
* scanner.
- *
- * @coverage dart.engine.parser
*/
class ScannerErrorCode extends Enum<ScannerErrorCode> implements ErrorCode {
static final ScannerErrorCode ILLEGAL_CHARACTER = new ScannerErrorCode.con1('ILLEGAL_CHARACTER', 0, "Illegal character %x");
@@ -233,8 +229,6 @@
/**
* Instances of the class `TokenWithComment` represent a string token that is preceded by
* comments.
- *
- * @coverage dart.engine.parser
*/
class StringTokenWithComment extends StringToken {
/**
@@ -270,8 +264,6 @@
/**
* The enumeration `Keyword` defines the keywords in the Dart programming language.
- *
- * @coverage dart.engine.parser
*/
class Keyword extends Enum<Keyword> {
static final Keyword ASSERT = new Keyword.con1('ASSERT', 0, "assert");
@@ -541,8 +533,6 @@
/**
* Synthetic `StringToken` represent a token whose value is independent of it's type.
- *
- * @coverage dart.engine.parser
*/
class SyntheticStringToken extends StringToken {
/**
@@ -560,8 +550,6 @@
/**
* Instances of the class `IncrementalScanner` implement a scanner that scans a subset of a
* string and inserts the resulting tokens into the middle of an existing token stream.
- *
- * @coverage dart.engine.parser
*/
class IncrementalScanner extends Scanner {
/**
@@ -787,8 +775,6 @@
* should be scanned as a single left-shift operator or as two left angle brackets. This scanner
* does not have any context, so it always resolves such conflicts by scanning the longest possible
* token.
- *
- * @coverage dart.engine.parser
*/
class Scanner {
/**
@@ -1861,8 +1847,6 @@
/**
* Instances of the class `StringToken` represent a token whose value is independent of it's
* type.
- *
- * @coverage dart.engine.parser
*/
class StringToken extends Token {
/**
@@ -1891,8 +1875,6 @@
/**
* Instances of the class `TokenWithComment` represent a normal token that is preceded by
* comments.
- *
- * @coverage dart.engine.parser
*/
class TokenWithComment extends Token {
/**
@@ -1920,8 +1902,6 @@
/**
* Instances of the class `Token` represent a token that was scanned from the input. Each
* token knows which token follows it, acting as the head of a linked list of tokens.
- *
- * @coverage dart.engine.parser
*/
class Token {
/**
@@ -2139,8 +2119,6 @@
/**
* Instances of the class `BeginTokenWithComment` represent a begin token that is preceded by
* comments.
- *
- * @coverage dart.engine.parser
*/
class BeginTokenWithComment extends BeginToken {
/**
@@ -2176,8 +2154,6 @@
/**
* Instances of the class `KeywordToken` represent a keyword in the language.
- *
- * @coverage dart.engine.parser
*/
class KeywordToken extends Token {
/**
@@ -2203,8 +2179,6 @@
/**
* Instances of the class `BeginToken` represent the opening half of a grouping pair of
* tokens. This is used for curly brackets ('{'), parentheses ('('), and square brackets ('[').
- *
- * @coverage dart.engine.parser
*/
class BeginToken extends Token {
/**
@@ -2227,8 +2201,6 @@
/**
* The enumeration `TokenClass` represents classes (or groups) of tokens with a similar use.
- *
- * @coverage dart.engine.parser
*/
class TokenClass extends Enum<TokenClass> {
/**
@@ -2353,8 +2325,6 @@
/**
* Instances of the class `KeywordTokenWithComment` implement a keyword token that is preceded
* by comments.
- *
- * @coverage dart.engine.parser
*/
class KeywordTokenWithComment extends KeywordToken {
/**
@@ -2391,8 +2361,6 @@
/**
* The enumeration `TokenType` defines the types of tokens that can be returned by the
* scanner.
- *
- * @coverage dart.engine.parser
*/
class TokenType extends Enum<TokenType> {
/**
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 82d89fb..46fe71d 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -83,8 +83,6 @@
/**
* Instances of the class `SdkLibrary` represent the information known about a single library
* within the SDK.
- *
- * @coverage dart.engine.sdk
*/
class SdkLibraryImpl implements SdkLibrary {
/**
@@ -195,7 +193,7 @@
}
}
-class SdkLibrariesReader_LibraryBuilder extends RecursiveASTVisitor<Object> {
+class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> {
/**
* The prefix added to the name of a library to form the URI used in code to reference the
* library.
@@ -209,6 +207,11 @@
static String _IMPLEMENTATION = "implementation";
/**
+ * The name of the optional parameter used to specify the path used when compiling for dart2js.
+ */
+ static String _DART2JS_PATH = "dart2jsPath";
+
+ /**
* The name of the optional parameter used to indicate whether the library is documented.
*/
static String _DOCUMENTED = "documented";
@@ -231,10 +234,33 @@
static String _VM_PLATFORM = "VM_PLATFORM";
/**
+ * A flag indicating whether the dart2js path should be used when it is available.
+ */
+ bool _useDart2jsPaths = false;
+
+ /**
* The library map that is populated by visiting the AST structure parsed from the contents of
* the libraries file.
*/
- final LibraryMap librariesMap = new LibraryMap();
+ LibraryMap _librariesMap = new LibraryMap();
+
+ /**
+ * Initialize a newly created library builder to use the dart2js path if the given value is
+ * `true`.
+ *
+ * @param useDart2jsPaths `true` if the dart2js path should be used when it is available
+ */
+ SdkLibrariesReader_LibraryBuilder(bool useDart2jsPaths) {
+ this._useDart2jsPaths = useDart2jsPaths;
+ }
+
+ /**
+ * Return the library map that was populated by visiting the AST structure parsed from the
+ * contents of the libraries file.
+ *
+ * @return the library map describing the contents of the SDK
+ */
+ LibraryMap get librariesMap => _librariesMap;
Object visitMapLiteralEntry(MapLiteralEntry node) {
String libraryName = null;
@@ -267,10 +293,14 @@
library.setDart2JsLibrary();
}
}
+ } else if (_useDart2jsPaths && name == _DART2JS_PATH) {
+ if (expression is SimpleStringLiteral) {
+ library.path = expression.value;
+ }
}
}
}
- librariesMap.setLibrary(libraryName, library);
+ _librariesMap.setLibrary(libraryName, library);
}
return null;
}
@@ -279,8 +309,6 @@
/**
* Instances of the class `LibraryMap` map Dart library URI's to the [SdkLibraryImpl
].
- *
- * @coverage dart.engine.sdk
*/
class LibraryMap {
/**
@@ -330,8 +358,6 @@
/**
* Instances of the class `DartSdk` represent a Dart SDK installed in a specified location.
- *
- * @coverage dart.engine.sdk
*/
abstract class DartSdk {
/**
@@ -352,13 +378,12 @@
/**
* Return the source representing the file with the given URI.
*
- * @param contentCache the content cache used to access the contents of the mapped source
* @param kind the kind of URI that was originally resolved in order to produce an encoding with
* the given URI
* @param uri the URI of the file to be returned
* @return the source representing the specified file
*/
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri);
+ Source fromEncoding(UriKind kind, Uri uri);
/**
* Return the [AnalysisContext] used for all of the sources in this [DartSdk].
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index 896a15d..4381adf 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -21,8 +21,6 @@
/**
* Instances of the class `DirectoryBasedDartSdk` represent a Dart SDK installed in a
* specified directory.
- *
- * @coverage dart.engine.sdk
*/
class DirectoryBasedDartSdk implements DartSdk {
/**
@@ -176,12 +174,20 @@
*
* @param sdkDirectory the directory containing the SDK
*/
- DirectoryBasedDartSdk(JavaFile sdkDirectory) {
+ DirectoryBasedDartSdk(JavaFile sdkDirectory) : this.con1(sdkDirectory, false);
+
+ /**
+ * Initialize a newly created SDK to represent the Dart SDK installed in the given directory.
+ *
+ * @param sdkDirectory the directory containing the SDK
+ * @param useDart2jsPaths `true` if the dart2js path should be used when it is available
+ */
+ DirectoryBasedDartSdk.con1(JavaFile sdkDirectory, bool useDart2jsPaths) {
this._sdkDirectory = sdkDirectory.getAbsoluteFile();
initializeSdk();
- initializeLibraryMap();
+ initializeLibraryMap(useDart2jsPaths);
_analysisContext = new AnalysisContextImpl();
- _analysisContext.sourceFactory = new SourceFactory.con2([new DartUriResolver(this)]);
+ _analysisContext.sourceFactory = new SourceFactory([new DartUriResolver(this)]);
List<String> uris = this.uris;
ChangeSet changeSet = new ChangeSet();
for (String uri in uris) {
@@ -190,7 +196,7 @@
_analysisContext.applyChanges(changeSet);
}
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) => new FileBasedSource.con2(contentCache, new JavaFile.fromUri(uri), kind);
+ Source fromEncoding(UriKind kind, Uri uri) => new FileBasedSource.con2(new JavaFile.fromUri(uri), kind);
AnalysisContext get context => _analysisContext;
@@ -200,12 +206,10 @@
* @return the file containing the Dartium executable
*/
JavaFile get dartiumExecutable {
- {
- if (_dartiumExecutable == null) {
- JavaFile file = new JavaFile.relative(dartiumWorkingDirectory, dartiumBinaryName);
- if (file.exists()) {
- _dartiumExecutable = file;
- }
+ if (_dartiumExecutable == null) {
+ JavaFile file = new JavaFile.relative(dartiumWorkingDirectory, dartiumBinaryName);
+ if (file.exists()) {
+ _dartiumExecutable = file;
}
}
return _dartiumExecutable;
@@ -283,17 +287,15 @@
* @return the revision number of this SDK
*/
String get sdkVersion {
- {
- if (_sdkVersion == null) {
- _sdkVersion = DartSdk.DEFAULT_VERSION;
- JavaFile revisionFile = new JavaFile.relative(_sdkDirectory, _REVISION_FILE_NAME);
- try {
- String revision = revisionFile.readAsStringSync();
- if (revision != null) {
- _sdkVersion = revision;
- }
- } on JavaIOException catch (exception) {
+ if (_sdkVersion == null) {
+ _sdkVersion = DartSdk.DEFAULT_VERSION;
+ JavaFile revisionFile = new JavaFile.relative(_sdkDirectory, _REVISION_FILE_NAME);
+ try {
+ String revision = revisionFile.readAsStringSync();
+ if (revision != null) {
+ _sdkVersion = revision;
}
+ } on JavaIOException catch (exception) {
}
}
return _sdkVersion;
@@ -312,12 +314,10 @@
* @return the file containing the VM executable
*/
JavaFile get vmExecutable {
- {
- if (_vmExecutable == null) {
- JavaFile file = new JavaFile.relative(new JavaFile.relative(_sdkDirectory, _BIN_DIRECTORY_NAME), vmBinaryName);
- if (file.exists()) {
- _vmExecutable = file;
- }
+ if (_vmExecutable == null) {
+ JavaFile file = new JavaFile.relative(new JavaFile.relative(_sdkDirectory, _BIN_DIRECTORY_NAME), vmBinaryName);
+ if (file.exists()) {
+ _vmExecutable = file;
}
}
return _vmExecutable;
@@ -342,7 +342,7 @@
if (library == null) {
return null;
}
- return new FileBasedSource.con2(_analysisContext.sourceFactory.contentCache, new JavaFile.relative(libraryDirectory, library.path), UriKind.DART_URI);
+ return new FileBasedSource.con2(new JavaFile.relative(libraryDirectory, library.path), UriKind.DART_URI);
}
/**
@@ -382,12 +382,14 @@
/**
* Read all of the configuration files to initialize the library maps.
+ *
+ * @param useDart2jsPaths `true` if the dart2js path should be used when it is available
*/
- void initializeLibraryMap() {
+ void initializeLibraryMap(bool useDart2jsPaths) {
JavaFile librariesFile = new JavaFile.relative(new JavaFile.relative(libraryDirectory, _INTERNAL_DIR), _LIBRARIES_FILE);
try {
String contents = librariesFile.readAsStringSync();
- _libraryMap = new SdkLibrariesReader().readFrom(librariesFile, contents);
+ _libraryMap = new SdkLibrariesReader(useDart2jsPaths).readFrom(librariesFile, contents);
} on JavaException catch (exception) {
AnalysisEngine.instance.logger.logError2("Could not initialize the library map from ${librariesFile.getAbsolutePath()}", exception);
_libraryMap = new LibraryMap();
@@ -426,18 +428,31 @@
* platforms: 0),
* };
* </pre>
- *
- * @coverage dart.engine.sdk
*/
class SdkLibrariesReader {
/**
+ * A flag indicating whether the dart2js path should be used when it is available.
+ */
+ bool _useDart2jsPaths = false;
+
+ /**
+ * Initialize a newly created library reader to use the dart2js path if the given value is
+ * `true`.
+ *
+ * @param useDart2jsPaths `true` if the dart2js path should be used when it is available
+ */
+ SdkLibrariesReader(bool useDart2jsPaths) {
+ this._useDart2jsPaths = useDart2jsPaths;
+ }
+
+ /**
* Return the library map read from the given source.
*
* @param file the [File] of the library file
* @param libraryFileContents the contents from the library file
* @return the library map read from the given source
*/
- LibraryMap readFrom(JavaFile file, String libraryFileContents) => readFrom2(new FileBasedSource.con2(null, file, UriKind.FILE_URI), libraryFileContents);
+ LibraryMap readFrom(JavaFile file, String libraryFileContents) => readFrom2(new FileBasedSource.con2(file, UriKind.FILE_URI), libraryFileContents);
/**
* Return the library map read from the given source.
@@ -451,7 +466,7 @@
Scanner scanner = new Scanner(source, new CharSequenceReader(libraryFileContents), errorListener);
Parser parser = new Parser(source, errorListener);
CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize());
- SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_LibraryBuilder();
+ SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths);
// If any syntactic errors were found then don't try to visit the AST structure.
if (!errorListener.errorReported) {
unit.accept(libraryBuilder);
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index af3110c..8b3b3e9 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -9,13 +9,11 @@
import 'java_core.dart';
import 'sdk.dart' show DartSdk;
-import 'engine.dart' show AnalysisContext;
+import 'engine.dart' show AnalysisContext, TimestampedData;
/**
* Instances of interface `LocalSourcePredicate` are used to determine if the given
* [Source] is "local" in some sense, so can be updated.
- *
- * @coverage dart.engine.source
*/
abstract class LocalSourcePredicate {
/**
@@ -58,8 +56,6 @@
/**
* Instances of the class `SourceFactory` resolve possibly relative URI's against an existing
* [Source].
- *
- * @coverage dart.engine.source
*/
class SourceFactory {
/**
@@ -68,11 +64,6 @@
AnalysisContext context;
/**
- * A cache of content used to override the default content of a source.
- */
- ContentCache _contentCache;
-
- /**
* The resolvers used to resolve absolute URI's.
*/
List<UriResolver> _resolvers;
@@ -80,28 +71,18 @@
/**
* The predicate to determine is [Source] is local.
*/
- LocalSourcePredicate _localSourcePredicate;
+ LocalSourcePredicate _localSourcePredicate = LocalSourcePredicate.NOT_SDK;
/**
* Initialize a newly created source factory.
*
- * @param contentCache the cache holding content used to override the default content of a source
* @param resolvers the resolvers used to resolve absolute URI's
*/
- SourceFactory.con1(ContentCache contentCache, List<UriResolver> resolvers) {
- this._contentCache = contentCache;
+ SourceFactory(List<UriResolver> resolvers) {
this._resolvers = resolvers;
- this._localSourcePredicate = LocalSourcePredicate.NOT_SDK;
}
/**
- * Initialize a newly created source factory.
- *
- * @param resolvers the resolvers used to resolve absolute URI's
- */
- SourceFactory.con2(List<UriResolver> resolvers) : this.con1(new ContentCache(), resolvers);
-
- /**
* Return a source object representing the given absolute URI, or `null` if the URI is not a
* valid URI or if it is not an absolute URI.
*
@@ -138,7 +119,7 @@
try {
Uri uri = parseUriWithException(encoding.substring(1));
for (UriResolver resolver in _resolvers) {
- Source result = resolver.fromEncoding(_contentCache, kind, uri);
+ Source result = resolver.fromEncoding(kind, uri);
if (result != null) {
return result;
}
@@ -150,13 +131,6 @@
}
/**
- * Return a cache of content used to override the default content of a source.
- *
- * @return a cache of content used to override the default content of a source
- */
- ContentCache get contentCache => _contentCache;
-
- /**
* Return the [DartSdk] associated with this [SourceFactory], or `null` if there
* is no such SDK.
*
@@ -220,17 +194,6 @@
}
/**
- * Set the contents of the given source to the given contents. This has the effect of overriding
- * the default contents of the source. If the contents are `null` the override is removed so
- * that the default contents will be returned.
- *
- * @param source the source whose contents are being overridden
- * @param contents the new contents of the source
- * @return the original cached contents or `null` if none
- */
- String setContents(Source source, String contents) => _contentCache.setContents(source, contents);
-
- /**
* Sets the [LocalSourcePredicate].
*
* @param localSourcePredicate the predicate to determine is [Source] is local
@@ -240,30 +203,6 @@
}
/**
- * Return the contents of the given source, or `null` if this factory does not override the
- * contents of the source.
- *
- * <b>Note:</b> This method is not intended to be used except by
- * [FileBasedSource#getContents].
- *
- * @param source the source whose content is to be returned
- * @return the contents of the given source
- */
- String getContents(Source source) => _contentCache.getContents(source);
-
- /**
- * Return the modification stamp of the given source, or `null` if this factory does not
- * override the contents of the source.
- *
- * <b>Note:</b> This method is not intended to be used except by
- * [FileBasedSource#getModificationStamp].
- *
- * @param source the source whose modification stamp is to be returned
- * @return the modification stamp of the given source
- */
- int getModificationStamp(Source source) => _contentCache.getModificationStamp(source);
-
- /**
* Return a source object representing the URI that results from resolving the given (possibly
* relative) contained URI against the URI associated with an existing source object, or
* `null` if either the contained URI is invalid or if it cannot be resolved against the
@@ -276,7 +215,7 @@
Source resolveUri2(Source containingSource, Uri containedUri) {
if (containedUri.isAbsolute) {
for (UriResolver resolver in _resolvers) {
- Source result = resolver.resolveAbsolute(_contentCache, containedUri);
+ Source result = resolver.resolveAbsolute(containedUri);
if (result != null) {
return result;
}
@@ -292,8 +231,6 @@
* The abstract class `UriResolver` defines the behavior of objects that are used to resolve
* URI's for a source factory. Subclasses of this class are expected to resolve a single scheme of
* absolute URI.
- *
- * @coverage dart.engine.source
*/
abstract class UriResolver {
/**
@@ -302,23 +239,21 @@
* [Source] representing the file to which it was resolved, or `null` if it
* could not be resolved.
*
- * @param contentCache the content cache used to access the contents of the returned source
* @param kind the kind of URI that was originally resolved in order to produce an encoding with
* the given URI
* @param uri the URI to be resolved
* @return a [Source] representing the file to which given URI was resolved
*/
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri);
+ Source fromEncoding(UriKind kind, Uri uri);
/**
* Resolve the given absolute URI. Return a [Source] representing the file to which
* it was resolved, or `null` if it could not be resolved.
*
- * @param contentCache the content cache used to access the contents of the returned source
* @param uri the URI to be resolved
* @return a [Source] representing the file to which given URI was resolved
*/
- Source resolveAbsolute(ContentCache contentCache, Uri uri);
+ Source resolveAbsolute(Uri uri);
/**
* Return an absolute URI that represents the given source.
@@ -332,8 +267,6 @@
/**
* The interface `Source` defines the behavior of objects representing source code that can be
* compiled.
- *
- * @coverage dart.engine.source
*/
abstract class Source {
/**
@@ -355,20 +288,37 @@
/**
* Return `true` if this source exists.
*
+ * Clients should consider using the the method [AnalysisContext#exists] because
+ * contexts can have local overrides of the content of a source that the source is not aware of
+ * and a source with local content is considered to exist even if there is no file on disk.
+ *
* @return `true` if this source exists
*/
bool exists();
/**
- * Get the contents of this source and pass it to the given receiver. Exactly one of the methods
- * defined on the receiver will be invoked unless an exception is thrown. The method that will be
- * invoked depends on which of the possible representations of the contents is the most efficient.
- * Whichever method is invoked, it will be invoked before this method returns.
+ * Get the contents and timestamp of this source.
+ *
+ * Clients should consider using the the method [AnalysisContext#getContents]
+ * because contexts can have local overrides of the content of a source that the source is not
+ * aware of.
+ *
+ * @return the contents and timestamp of the source
+ * @throws Exception if the contents of this source could not be accessed
+ */
+ TimestampedData<String> get contents;
+
+ /**
+ * Get the contents of this source and pass it to the given content receiver.
+ *
+ * Clients should consider using the the method
+ * [AnalysisContext#getContentsToReceiver] because contexts can have local
+ * overrides of the content of a source that the source is not aware of.
*
* @param receiver the content receiver to which the content of this source will be passed
* @throws Exception if the contents of this source could not be accessed
*/
- void getContents(Source_ContentReceiver receiver);
+ void getContentsToReceiver(Source_ContentReceiver receiver);
/**
* Return an encoded representation of this source that can be used to create a source that is
@@ -395,6 +345,10 @@
* of the source have been modified one or more times (even if the net change is zero) the stamps
* will be different.
*
+ * Clients should consider using the the method
+ * [AnalysisContext#getModificationStamp] because contexts can have local overrides
+ * of the content of a source that the source is not aware of.
+ *
* @return the modification stamp for this source
*/
int get modificationStamp;
@@ -466,8 +420,6 @@
/**
* The enumeration `SourceKind` defines the different kinds of sources that are known to the
* analysis engine.
- *
- * @coverage dart.engine.source
*/
class SourceKind extends Enum<SourceKind> {
/**
@@ -501,8 +453,6 @@
/**
* The enumeration `UriKind` defines the different kinds of URI's that are known to the
* analysis engine. These are used to keep track of the kind of URI associated with a given source.
- *
- * @coverage dart.engine.source
*/
class UriKind extends Enum<UriKind> {
/**
@@ -565,8 +515,6 @@
/**
* A source range defines an [Element]'s source coordinates relative to its [Source].
- *
- * @coverage dart.engine.utilities
*/
class SourceRange {
/**
@@ -692,8 +640,6 @@
* sources for the purposes of accessing composite dependency information. For example, the Eclipse
* client uses source containers to represent Eclipse projects, which allows it to easily compute
* project-level dependencies.
- *
- * @coverage dart.engine.source
*/
abstract class SourceContainer {
/**
@@ -707,8 +653,6 @@
/**
* Instances of the class `DartUriResolver` resolve `dart` URI's.
- *
- * @coverage dart.engine.source
*/
class DartUriResolver extends UriResolver {
/**
@@ -739,9 +683,9 @@
this._sdk = sdk;
}
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) {
+ Source fromEncoding(UriKind kind, Uri uri) {
if (identical(kind, UriKind.DART_URI)) {
- return _sdk.fromEncoding(contentCache, kind, uri);
+ return _sdk.fromEncoding(kind, uri);
}
return null;
}
@@ -753,7 +697,7 @@
*/
DartSdk get dartSdk => _sdk;
- Source resolveAbsolute(ContentCache contentCache, Uri uri) {
+ Source resolveAbsolute(Uri uri) {
if (!isDartUri(uri)) {
return null;
}
@@ -764,8 +708,6 @@
/**
* Instances of the class `LineInfo` encapsulate information about line and column information
* within a source file.
- *
- * @coverage dart.engine.utilities
*/
class LineInfo {
/**
@@ -833,8 +775,6 @@
/**
* Instances of class `ContentCache` hold content used to override the default content of a
* [Source].
- *
- * @coverage dart.engine.source
*/
class ContentCache {
/**
@@ -854,7 +794,7 @@
* contents of the source.
*
* <b>Note:</b> This method is not intended to be used except by
- * [SourceFactory#getContents].
+ * [AnalysisContext#getContents].
*
* @param source the source whose content is to be returned
* @return the contents of the given source
@@ -866,7 +806,7 @@
* override the contents of the source.
*
* <b>Note:</b> This method is not intended to be used except by
- * [SourceFactory#getModificationStamp].
+ * [AnalysisContext#getModificationStamp].
*
* @param source the source whose modification stamp is to be returned
* @return the modification stamp of the given source
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index ed1ae3b..640903d 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -10,14 +10,13 @@
import 'source.dart';
import 'java_core.dart';
import 'java_io.dart';
-import 'engine.dart' show AnalysisContext, AnalysisEngine;
+import 'utilities_general.dart';
+import 'engine.dart';
export 'source.dart';
/**
* Instances of interface `LocalSourcePredicate` are used to determine if the given
* [Source] is "local" in some sense, so can be updated.
- *
- * @coverage dart.engine.source
*/
abstract class LocalSourcePredicate {
/**
@@ -59,17 +58,9 @@
/**
* Instances of the class `FileBasedSource` implement a source that represents a file.
- *
- * @coverage dart.engine.source
*/
class FileBasedSource implements Source {
/**
- * The content cache used to access the contents of this source if they have been overridden from
- * what is on disk or cached.
- */
- ContentCache _contentCache;
-
- /**
* The file represented by this source.
*/
JavaFile _file;
@@ -88,41 +79,41 @@
* Initialize a newly created source object. The source object is assumed to not be in a system
* library.
*
- * @param contentCache the content cache used to access the contents of this source
* @param file the file represented by this source
*/
- FileBasedSource.con1(ContentCache contentCache, JavaFile file) : this.con2(contentCache, file, UriKind.FILE_URI);
+ FileBasedSource.con1(JavaFile file) : this.con2(file, UriKind.FILE_URI);
/**
* Initialize a newly created source object.
*
- * @param contentCache the content cache used to access the contents of this source
* @param file the file represented by this source
* @param flags `true` if this source is in one of the system libraries
*/
- FileBasedSource.con2(ContentCache contentCache, JavaFile file, UriKind uriKind) {
- this._contentCache = contentCache;
+ FileBasedSource.con2(JavaFile file, UriKind uriKind) {
this._file = file;
this._uriKind = uriKind;
}
bool operator ==(Object object) => object != null && this.runtimeType == object.runtimeType && _file == (object as FileBasedSource)._file;
- bool exists() => _contentCache.getContents(this) != null || _file.isFile();
+ bool exists() => _file.isFile();
- void getContents(Source_ContentReceiver receiver) {
- //
- // First check to see whether our content cache has an override for our contents.
- //
- String contents = _contentCache.getContents(this);
- if (contents != null) {
- receiver.accept(contents, _contentCache.getModificationStamp(this));
- return;
+ TimestampedData<String> get contents {
+ TimeCounter_TimeCounterHandle handle = PerformanceStatistics.io.start();
+ try {
+ return contentsFromFile;
+ } finally {
+ handle.stop();
}
- //
- // If not, read the contents from the file using native I/O.
- //
- getContentsFromFile(receiver);
+ }
+
+ void getContentsToReceiver(Source_ContentReceiver receiver) {
+ TimeCounter_TimeCounterHandle handle = PerformanceStatistics.io.start();
+ try {
+ getContentsFromFileToReceiver(receiver);
+ } finally {
+ handle.stop();
+ }
}
String get encoding {
@@ -134,13 +125,7 @@
String get fullName => _file.getAbsolutePath();
- int get modificationStamp {
- int stamp = _contentCache.getModificationStamp(this);
- if (stamp != null) {
- return stamp;
- }
- return _file.lastModified();
- }
+ int get modificationStamp => _file.lastModified();
String get shortName => _file.getName();
@@ -153,7 +138,7 @@
Source resolveRelative(Uri containedUri) {
try {
Uri resolvedUri = file.toURI().resolveUri(containedUri);
- return new FileBasedSource.con2(_contentCache, new JavaFile.fromUri(resolvedUri), _uriKind);
+ return new FileBasedSource.con2(new JavaFile.fromUri(resolvedUri), _uriKind);
} on JavaException catch (exception) {
}
return null;
@@ -167,24 +152,34 @@
}
/**
- * Get the contents of underlying file and pass it to the given receiver. Exactly one of the
- * methods defined on the receiver will be invoked unless an exception is thrown. The method that
- * will be invoked depends on which of the possible representations of the contents is the most
- * efficient. Whichever method is invoked, it will be invoked before this method returns.
+ * Get the contents and timestamp of the underlying file.
+ *
+ * Clients should consider using the the method [AnalysisContext#getContents]
+ * because contexts can have local overrides of the content of a source that the source is not
+ * aware of.
+ *
+ * @return the contents of the source paired with the modification stamp of the source
+ * @throws Exception if the contents of this source could not be accessed
+ * @see #getContents()
+ */
+ TimestampedData<String> get contentsFromFile {
+ return new TimestampedData<String>(_file.lastModified(), _file.readAsStringSync());
+ }
+
+ /**
+ * Get the contents of underlying file and pass it to the given receiver.
*
* @param receiver the content receiver to which the content of this source will be passed
* @throws Exception if the contents of this source could not be accessed
- * @see #getContents(com.google.dart.engine.source.Source.ContentReceiver)
+ * @see #getContentsToReceiver(ContentReceiver)
*/
- void getContentsFromFile(Source_ContentReceiver receiver) {
- {
- }
- receiver.accept(file.readAsStringSync(), file.lastModified());
+ void getContentsFromFileToReceiver(Source_ContentReceiver receiver) {
+ throw new UnsupportedOperationException();
}
/**
* Return the file represented by this source. This is an internal method that is only intended to
- * be used by [UriResolver].
+ * be used by subclasses of [UriResolver] that are designed to work with file-based sources.
*
* @return the file represented by this source
*/
@@ -198,8 +193,6 @@
* For the purposes of sharing analysis, the path to each package under the "packages" directory
* should be canonicalized, but to preserve relative links within a package, the remainder of the
* path from the package directory to the leaf should not.
- *
- * @coverage dart.engine.source
*/
class PackageUriResolver extends UriResolver {
/**
@@ -239,14 +232,14 @@
this._packagesDirectories = packagesDirectories;
}
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) {
+ Source fromEncoding(UriKind kind, Uri uri) {
if (identical(kind, UriKind.PACKAGE_SELF_URI) || identical(kind, UriKind.PACKAGE_URI)) {
- return new FileBasedSource.con2(contentCache, new JavaFile.fromUri(uri), kind);
+ return new FileBasedSource.con2(new JavaFile.fromUri(uri), kind);
}
return null;
}
- Source resolveAbsolute(ContentCache contentCache, Uri uri) {
+ Source resolveAbsolute(Uri uri) {
if (!isPackageUri(uri)) {
return null;
}
@@ -277,10 +270,10 @@
if (resolvedFile.exists()) {
JavaFile canonicalFile = getCanonicalFile(packagesDirectory, pkgName, relPath);
UriKind uriKind = isSelfReference(packagesDirectory, canonicalFile) ? UriKind.PACKAGE_SELF_URI : UriKind.PACKAGE_URI;
- return new FileBasedSource.con2(contentCache, canonicalFile, uriKind);
+ return new FileBasedSource.con2(canonicalFile, uriKind);
}
}
- return new FileBasedSource.con2(contentCache, getCanonicalFile(_packagesDirectories[0], pkgName, relPath), UriKind.PACKAGE_URI);
+ return new FileBasedSource.con2(getCanonicalFile(_packagesDirectories[0], pkgName, relPath), UriKind.PACKAGE_URI);
}
Uri restoreAbsolute(Source source) {
@@ -347,8 +340,6 @@
/**
* Instances of the class [DirectoryBasedSourceContainer] represent a source container that
* contains all sources within a given directory.
- *
- * @coverage dart.engine.source
*/
class DirectoryBasedSourceContainer implements SourceContainer {
/**
@@ -408,8 +399,6 @@
/**
* Instances of the class `FileUriResolver` resolve `file` URI's.
- *
- * @coverage dart.engine.source
*/
class FileUriResolver extends UriResolver {
/**
@@ -425,17 +414,17 @@
*/
static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) {
+ Source fromEncoding(UriKind kind, Uri uri) {
if (identical(kind, UriKind.FILE_URI)) {
- return new FileBasedSource.con2(contentCache, new JavaFile.fromUri(uri), kind);
+ return new FileBasedSource.con2(new JavaFile.fromUri(uri), kind);
}
return null;
}
- Source resolveAbsolute(ContentCache contentCache, Uri uri) {
+ Source resolveAbsolute(Uri uri) {
if (!isFileUri(uri)) {
return null;
}
- return new FileBasedSource.con1(contentCache, new JavaFile.fromUri(uri));
+ return new FileBasedSource.con1(new JavaFile.fromUri(uri));
}
}
\ No newline at end of file
diff --git a/pkg/analyzer/lib/src/generated/utilities_collection.dart b/pkg/analyzer/lib/src/generated/utilities_collection.dart
index 8653603..dd07792 100644
--- a/pkg/analyzer/lib/src/generated/utilities_collection.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_collection.dart
@@ -123,8 +123,9 @@
* @param elements the elements to be added to the list
*/
static void addAll(List list, List<Object> elements) {
- for (Object element in elements) {
- list.add(element);
+ int count = elements.length;
+ for (int i = 0; i < count; i++) {
+ list.add(elements[i]);
}
}
}
\ No newline at end of file
diff --git a/pkg/analyzer/lib/src/generated/utilities_dart.dart b/pkg/analyzer/lib/src/generated/utilities_dart.dart
index 8df7125..76a711a 100644
--- a/pkg/analyzer/lib/src/generated/utilities_dart.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_dart.dart
@@ -13,8 +13,6 @@
* The enumeration `ParameterKind` defines the different kinds of parameters. There are two
* basic kinds of parameters: required and optional. Optional parameters are further divided into
* two kinds: positional optional and named optional.
- *
- * @coverage dart.engine.utilities
*/
class ParameterKind extends Enum<ParameterKind> {
static final ParameterKind REQUIRED = new ParameterKind('REQUIRED', 0, false);
diff --git a/pkg/analyzer/lib/src/services/formatter_impl.dart b/pkg/analyzer/lib/src/services/formatter_impl.dart
index eab8d8b..f687e6f 100644
--- a/pkg/analyzer/lib/src/services/formatter_impl.dart
+++ b/pkg/analyzer/lib/src/services/formatter_impl.dart
@@ -147,7 +147,7 @@
new TokenStreamComparator(lineInfo, t1, t2, transforms: allowTransforms).
verifyEquals();
- ASTNode parse(CodeKind kind, Token start) {
+ AstNode parse(CodeKind kind, Token start) {
var parser = new Parser(null, this);
@@ -310,7 +310,7 @@
/// Test for token type.
bool tokenIs(Token token, TokenType type) =>
- token != null && tokenTester.matches4(token, type);
+ token != null && tokenTester.matchesAny(token, [type]);
/// Test if this token is a GT token.
bool isGT(Token token) => tokenIs(token, TokenType.GT);
@@ -343,7 +343,7 @@
/// An AST visitor that drives formatting heuristics.
-class SourceVisitor implements ASTVisitor {
+class SourceVisitor implements AstVisitor {
static final OPEN_CURLY = syntheticToken(TokenType.OPEN_CURLY_BRACKET, '{');
static final CLOSE_CURLY = syntheticToken(TokenType.CLOSE_CURLY_BRACKET, '}');
@@ -1391,7 +1391,7 @@
}
/// Safely visit the given [node].
- visit(ASTNode node) {
+ visit(AstNode node) {
if (node != null) {
node.accept(this);
}
@@ -1408,7 +1408,7 @@
/// Visit a list of [nodes] if not null, optionally separated and/or preceded
/// and followed by the given functions.
- visitNodes(NodeList<ASTNode> nodes, {precededBy(): null,
+ visitNodes(NodeList<AstNode> nodes, {precededBy(): null,
separatedBy() : null, followedBy(): null}) {
if (nodes != null) {
var size = nodes.length;
@@ -1430,7 +1430,7 @@
}
/// Visit a comma-separated list of [nodes] if not null.
- visitCommaSeparatedNodes(NodeList<ASTNode> nodes, {followedBy(): null}) {
+ visitCommaSeparatedNodes(NodeList<AstNode> nodes, {followedBy(): null}) {
//TODO(pquitslund): handle this more neatly
if (followedBy == null) {
followedBy = space;
@@ -1455,7 +1455,7 @@
/// Visit a [node], and if not null, optionally preceded or followed by the
/// specified functions.
- visitNode(ASTNode node, {precededBy(): null, followedBy(): null}) {
+ visitNode(AstNode node, {precededBy(): null, followedBy(): null}) {
if (node != null) {
if (precededBy != null) {
precededBy();
@@ -1693,15 +1693,15 @@
countNewlinesBetween(last, current) > 0 ? 0 : current.offset - last.end;
/// Count the blanks between these two nodes.
- int countBlankLinesBetween(ASTNode lastNode, ASTNode currentNode) =>
+ int countBlankLinesBetween(AstNode lastNode, AstNode currentNode) =>
countNewlinesBetween(lastNode.endToken, currentNode.beginToken);
/// Count newlines preceeding this [node].
- int countPrecedingNewlines(ASTNode node) =>
+ int countPrecedingNewlines(AstNode node) =>
countNewlinesBetween(node.beginToken.previous, node.beginToken);
/// Count newlines succeeding this [node].
- int countSucceedingNewlines(ASTNode node) => node == null ? 0 :
+ int countSucceedingNewlines(AstNode node) => node == null ? 0 :
countNewlinesBetween(node.endToken, node.endToken.next);
/// Count the blanks between these two tokens.
diff --git a/pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart b/pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart
index bf245d5..b50ccca 100644
--- a/pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart
+++ b/pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart
@@ -254,7 +254,7 @@
/// The visitor that inserts `touch` method invocations.
-class InsertTouchInvocationsVisitor extends GeneralizingASTVisitor {
+class InsertTouchInvocationsVisitor extends GeneralizingAstVisitor {
final AppInfo appInfo;
final CodeInjector injector;
diff --git a/pkg/analyzer/lib/src/services/runtime/coverage/models.dart b/pkg/analyzer/lib/src/services/runtime/coverage/models.dart
index 912985f..74fc7aa 100644
--- a/pkg/analyzer/lib/src/services/runtime/coverage/models.dart
+++ b/pkg/analyzer/lib/src/services/runtime/coverage/models.dart
@@ -8,7 +8,7 @@
import 'dart:collection' show SplayTreeMap;
import 'package:analyzer/src/generated/source.dart' show Source, SourceRange;
-import 'package:analyzer/src/generated/ast.dart' show ASTNode;
+import 'package:analyzer/src/generated/ast.dart' show AstNode;
import 'utils.dart';
@@ -36,7 +36,7 @@
currentNode = nodeStack.removeLast();
}
- int addNode(ASTNode node) {
+ int addNode(AstNode node) {
return currentNode.addNode(node);
}
@@ -66,7 +66,7 @@
}
}
- int addNode(ASTNode node) {
+ int addNode(AstNode node) {
var id = appInfo.nextId++;
var range = new SourceRange(node.offset, node.length);
idToRange[id] = range;
diff --git a/pkg/analyzer/lib/src/string_source.dart b/pkg/analyzer/lib/src/string_source.dart
index 7123bb4..e3e91c7 100644
--- a/pkg/analyzer/lib/src/string_source.dart
+++ b/pkg/analyzer/lib/src/string_source.dart
@@ -5,6 +5,7 @@
library analyzer.string_source;
import 'generated/source.dart';
+import 'generated/engine.dart' show TimestampedData;
/// An implementation of [Source] that's based on an in-memory Dart string.
class StringSource implements Source {
@@ -25,9 +26,11 @@
bool exists() => true;
- void getContents(Source_ContentReceiver receiver) =>
+ void getContentsToReceiver(Source_ContentReceiver receiver) =>
receiver.accept(_contents, modificationStamp);
+ TimestampedData<String> get contents => new TimestampedData(modificationStamp, _contents);
+
String get encoding => throw new UnsupportedError("StringSource doesn't support "
"encoding.");
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 52ff899..4ba875c 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
name: analyzer
-version: 0.12.2
+version: 0.13.0-dev.3
author: Dart Team <misc@dartlang.org>
description: Static analyzer for Dart.
homepage: http://www.dartlang.org
diff --git a/pkg/analyzer/test/generated/ast_test.dart b/pkg/analyzer/test/generated/ast_test.dart
index 198d57d..6c75ce2 100644
--- a/pkg/analyzer/test/generated/ast_test.dart
+++ b/pkg/analyzer/test/generated/ast_test.dart
@@ -8,7 +8,9 @@
library engine.ast_test;
import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/java_junit.dart';
+import 'package:analyzer/src/generated/java_engine.dart' show Predicate;
import 'package:analyzer/src/generated/scanner.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/utilities_dart.dart';
@@ -21,7 +23,7 @@
class NodeLocatorTest extends ParserTestCase {
void test_range() {
CompilationUnit unit = ParserTestCase.parseCompilationUnit("library myLib;", []);
- assertLocate2(unit, 4, 10, LibraryDirective);
+ assertLocate(unit, 4, 10, (node) => node is LibraryDirective, LibraryDirective);
}
void test_searchWithin_null() {
@@ -31,35 +33,31 @@
void test_searchWithin_offset() {
CompilationUnit unit = ParserTestCase.parseCompilationUnit("library myLib;", []);
- assertLocate(unit, 10, SimpleIdentifier);
+ assertLocate(unit, 10, 10, (node) => node is SimpleIdentifier, SimpleIdentifier);
}
void test_searchWithin_offsetAfterNode() {
CompilationUnit unit = ParserTestCase.parseCompilationUnit(EngineTestCase.createSource(["class A {}", "class B {}"]), []);
NodeLocator locator = new NodeLocator.con2(1024, 1024);
- ASTNode node = locator.searchWithin(unit.declarations[0]);
+ AstNode node = locator.searchWithin(unit.declarations[0]);
JUnitTestCase.assertNull(node);
}
void test_searchWithin_offsetBeforeNode() {
CompilationUnit unit = ParserTestCase.parseCompilationUnit(EngineTestCase.createSource(["class A {}", "class B {}"]), []);
NodeLocator locator = new NodeLocator.con2(0, 0);
- ASTNode node = locator.searchWithin(unit.declarations[1]);
+ AstNode node = locator.searchWithin(unit.declarations[1]);
JUnitTestCase.assertNull(node);
}
- void assertLocate(CompilationUnit unit, int offset, Type expectedClass) {
- assertLocate2(unit, offset, offset, expectedClass);
- }
-
- void assertLocate2(CompilationUnit unit, int start, int end, Type expectedClass) {
+ void assertLocate(CompilationUnit unit, int start, int end, Predicate<AstNode> predicate, Type expectedClass) {
NodeLocator locator = new NodeLocator.con2(start, end);
- ASTNode node = locator.searchWithin(unit);
+ AstNode node = locator.searchWithin(unit);
JUnitTestCase.assertNotNull(node);
JUnitTestCase.assertSame(node, locator.foundNode);
JUnitTestCase.assertTrueMsg("Node starts after range", node.offset <= start);
JUnitTestCase.assertTrueMsg("Node ends before range", node.offset + node.length > end);
- EngineTestCase.assertInstanceOf(expectedClass, node);
+ EngineTestCase.assertInstanceOf(predicate, expectedClass, node);
}
static dartSuite() {
@@ -90,86 +88,86 @@
class IndexExpressionTest extends EngineTestCase {
void test_inGetterContext_assignment_compound_left() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// a[i] += ?
- ASTFactory.assignmentExpression(expression, TokenType.PLUS_EQ, null);
+ AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, null);
JUnitTestCase.assertTrue(expression.inGetterContext());
}
void test_inGetterContext_assignment_simple_left() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// a[i] = ?
- ASTFactory.assignmentExpression(expression, TokenType.EQ, null);
+ AstFactory.assignmentExpression(expression, TokenType.EQ, null);
JUnitTestCase.assertFalse(expression.inGetterContext());
}
void test_inGetterContext_nonAssignment() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// a[i] + ?
- ASTFactory.binaryExpression(expression, TokenType.PLUS, null);
+ AstFactory.binaryExpression(expression, TokenType.PLUS, null);
JUnitTestCase.assertTrue(expression.inGetterContext());
}
void test_inSetterContext_assignment_compound_left() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// a[i] += ?
- ASTFactory.assignmentExpression(expression, TokenType.PLUS_EQ, null);
+ AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, null);
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_assignment_compound_right() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// ? += a[i]
- ASTFactory.assignmentExpression(null, TokenType.PLUS_EQ, expression);
+ AstFactory.assignmentExpression(null, TokenType.PLUS_EQ, expression);
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_assignment_simple_left() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// a[i] = ?
- ASTFactory.assignmentExpression(expression, TokenType.EQ, null);
+ AstFactory.assignmentExpression(expression, TokenType.EQ, null);
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_assignment_simple_right() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// ? = a[i]
- ASTFactory.assignmentExpression(null, TokenType.EQ, expression);
+ AstFactory.assignmentExpression(null, TokenType.EQ, expression);
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_nonAssignment() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
- ASTFactory.binaryExpression(expression, TokenType.PLUS, null);
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
+ AstFactory.binaryExpression(expression, TokenType.PLUS, null);
// a[i] + ?
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_postfix() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
- ASTFactory.postfixExpression(expression, TokenType.PLUS_PLUS);
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
+ AstFactory.postfixExpression(expression, TokenType.PLUS_PLUS);
// a[i]++
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_prefix_bang() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// !a[i]
- ASTFactory.prefixExpression(TokenType.BANG, expression);
+ AstFactory.prefixExpression(TokenType.BANG, expression);
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_prefix_minusMinus() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// --a[i]
- ASTFactory.prefixExpression(TokenType.MINUS_MINUS, expression);
+ AstFactory.prefixExpression(TokenType.MINUS_MINUS, expression);
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_prefix_plusPlus() {
- IndexExpression expression = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
// ++a[i]
- ASTFactory.prefixExpression(TokenType.PLUS_PLUS, expression);
+ AstFactory.prefixExpression(TokenType.PLUS_PLUS, expression);
JUnitTestCase.assertTrue(expression.inSetterContext());
}
@@ -230,10 +228,10 @@
class ClassDeclarationTest extends ParserTestCase {
void test_getConstructor() {
List<ConstructorInitializer> initializers = new List<ConstructorInitializer>();
- ConstructorDeclaration defaultConstructor = ASTFactory.constructorDeclaration(ASTFactory.identifier3("Test"), null, ASTFactory.formalParameterList([]), initializers);
- ConstructorDeclaration aConstructor = ASTFactory.constructorDeclaration(ASTFactory.identifier3("Test"), "a", ASTFactory.formalParameterList([]), initializers);
- ConstructorDeclaration bConstructor = ASTFactory.constructorDeclaration(ASTFactory.identifier3("Test"), "b", ASTFactory.formalParameterList([]), initializers);
- ClassDeclaration clazz = ASTFactory.classDeclaration(null, "Test", null, null, null, null, [defaultConstructor, aConstructor, bConstructor]);
+ ConstructorDeclaration defaultConstructor = AstFactory.constructorDeclaration(AstFactory.identifier3("Test"), null, AstFactory.formalParameterList([]), initializers);
+ ConstructorDeclaration aConstructor = AstFactory.constructorDeclaration(AstFactory.identifier3("Test"), "a", AstFactory.formalParameterList([]), initializers);
+ ConstructorDeclaration bConstructor = AstFactory.constructorDeclaration(AstFactory.identifier3("Test"), "b", AstFactory.formalParameterList([]), initializers);
+ ClassDeclaration clazz = AstFactory.classDeclaration(null, "Test", null, null, null, null, [defaultConstructor, aConstructor, bConstructor]);
JUnitTestCase.assertSame(defaultConstructor, clazz.getConstructor(null));
JUnitTestCase.assertSame(aConstructor, clazz.getConstructor("a"));
JUnitTestCase.assertSame(bConstructor, clazz.getConstructor("b"));
@@ -241,12 +239,12 @@
}
void test_getField() {
- VariableDeclaration aVar = ASTFactory.variableDeclaration("a");
- VariableDeclaration bVar = ASTFactory.variableDeclaration("b");
- VariableDeclaration cVar = ASTFactory.variableDeclaration("c");
- ClassDeclaration clazz = ASTFactory.classDeclaration(null, "Test", null, null, null, null, [
- ASTFactory.fieldDeclaration2(false, null, [aVar]),
- ASTFactory.fieldDeclaration2(false, null, [bVar, cVar])]);
+ VariableDeclaration aVar = AstFactory.variableDeclaration("a");
+ VariableDeclaration bVar = AstFactory.variableDeclaration("b");
+ VariableDeclaration cVar = AstFactory.variableDeclaration("c");
+ ClassDeclaration clazz = AstFactory.classDeclaration(null, "Test", null, null, null, null, [
+ AstFactory.fieldDeclaration2(false, null, [aVar]),
+ AstFactory.fieldDeclaration2(false, null, [bVar, cVar])]);
JUnitTestCase.assertSame(aVar, clazz.getField("a"));
JUnitTestCase.assertSame(bVar, clazz.getField("b"));
JUnitTestCase.assertSame(cVar, clazz.getField("c"));
@@ -254,9 +252,9 @@
}
void test_getMethod() {
- MethodDeclaration aMethod = ASTFactory.methodDeclaration(null, null, null, null, ASTFactory.identifier3("a"), ASTFactory.formalParameterList([]));
- MethodDeclaration bMethod = ASTFactory.methodDeclaration(null, null, null, null, ASTFactory.identifier3("b"), ASTFactory.formalParameterList([]));
- ClassDeclaration clazz = ASTFactory.classDeclaration(null, "Test", null, null, null, null, [aMethod, bMethod]);
+ MethodDeclaration aMethod = AstFactory.methodDeclaration(null, null, null, null, AstFactory.identifier3("a"), AstFactory.formalParameterList([]));
+ MethodDeclaration bMethod = AstFactory.methodDeclaration(null, null, null, null, AstFactory.identifier3("b"), AstFactory.formalParameterList([]));
+ ClassDeclaration clazz = AstFactory.classDeclaration(null, "Test", null, null, null, null, [aMethod, bMethod]);
JUnitTestCase.assertSame(aMethod, clazz.getMethod("a"));
JUnitTestCase.assertSame(bMethod, clazz.getMethod("b"));
JUnitTestCase.assertSame(null, clazz.getMethod("noSuchMethod"));
@@ -282,8 +280,8 @@
class VariableDeclarationTest extends ParserTestCase {
void test_getDocumentationComment_onGrandParent() {
- VariableDeclaration varDecl = ASTFactory.variableDeclaration("a");
- TopLevelVariableDeclaration decl = ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [varDecl]);
+ VariableDeclaration varDecl = AstFactory.variableDeclaration("a");
+ TopLevelVariableDeclaration decl = AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [varDecl]);
Comment comment = Comment.createDocumentationComment(new List<Token>(0));
JUnitTestCase.assertNull(varDecl.documentationComment);
decl.documentationComment = comment;
@@ -292,7 +290,7 @@
}
void test_getDocumentationComment_onNode() {
- VariableDeclaration decl = ASTFactory.variableDeclaration("a");
+ VariableDeclaration decl = AstFactory.variableDeclaration("a");
Comment comment = Comment.createDocumentationComment(new List<Token>(0));
decl.documentationComment = comment;
JUnitTestCase.assertNotNull(decl.documentationComment);
@@ -313,7 +311,7 @@
}
/**
- * The class `ASTFactory` defines utility methods that can be used to create AST nodes. The
+ * The class `AstFactory` defines utility methods that can be used to create AST nodes. The
* nodes that are created are complete in the sense that all of the tokens that would have been
* associated with the nodes by a parser are also created, but the token stream is not constructed.
* None of the nodes are resolved.
@@ -324,7 +322,7 @@
* second is places where a shorter name seemed unambiguous and easier to read, such as using
* 'identifier' rather than 'prefixedIdentifier', or 'integer' rather than 'integerLiteral'.
*/
-class ASTFactory {
+class AstFactory {
static AdjacentStrings adjacentStrings(List<StringLiteral> strings) => new AdjacentStrings(list(strings));
static Annotation annotation(Identifier name) => new Annotation(TokenFactory.token3(TokenType.AT), name, null, null, null);
@@ -391,7 +389,7 @@
static CompilationUnit compilationUnit7(String scriptTag, List<Directive> directives) => compilationUnit8(scriptTag, list(directives), null);
- static CompilationUnit compilationUnit8(String scriptTag, List<Directive> directives, List<CompilationUnitMember> declarations) => new CompilationUnit(TokenFactory.token3(TokenType.EOF), scriptTag == null ? null : ASTFactory.scriptTag(scriptTag), directives == null ? new List<Directive>() : directives, declarations == null ? new List<CompilationUnitMember>() : declarations, TokenFactory.token3(TokenType.EOF));
+ static CompilationUnit compilationUnit8(String scriptTag, List<Directive> directives, List<CompilationUnitMember> declarations) => new CompilationUnit(TokenFactory.token3(TokenType.EOF), scriptTag == null ? null : AstFactory.scriptTag(scriptTag), directives == null ? new List<Directive>() : directives, declarations == null ? new List<CompilationUnitMember>() : declarations, TokenFactory.token3(TokenType.EOF));
static ConditionalExpression conditionalExpression(Expression condition, Expression thenExpression, Expression elseExpression) => new ConditionalExpression(condition, TokenFactory.token3(TokenType.QUESTION), thenExpression, TokenFactory.token3(TokenType.COLON), elseExpression);
@@ -511,7 +509,7 @@
static Label label(SimpleIdentifier label) => new Label(label, TokenFactory.token3(TokenType.COLON));
- static Label label2(String label) => ASTFactory.label(identifier3(label));
+ static Label label2(String label) => AstFactory.label(identifier3(label));
static LabeledStatement labeledStatement(List<Label> labels, Statement statement) => new LabeledStatement(labels, statement);
@@ -727,93 +725,93 @@
class SimpleIdentifierTest extends ParserTestCase {
void test_inDeclarationContext_argumentDefinition() {
- SimpleIdentifier identifier = ASTFactory.argumentDefinitionTest("p").identifier;
+ SimpleIdentifier identifier = AstFactory.argumentDefinitionTest("p").identifier;
JUnitTestCase.assertFalse(identifier.inDeclarationContext());
}
void test_inDeclarationContext_catch_exception() {
- SimpleIdentifier identifier = ASTFactory.catchClause("e", []).exceptionParameter;
+ SimpleIdentifier identifier = AstFactory.catchClause("e", []).exceptionParameter;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_catch_stack() {
- SimpleIdentifier identifier = ASTFactory.catchClause2("e", "s", []).stackTraceParameter;
+ SimpleIdentifier identifier = AstFactory.catchClause2("e", "s", []).stackTraceParameter;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_classDeclaration() {
- SimpleIdentifier identifier = ASTFactory.classDeclaration(null, "C", null, null, null, null, []).name;
+ SimpleIdentifier identifier = AstFactory.classDeclaration(null, "C", null, null, null, null, []).name;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_classTypeAlias() {
- SimpleIdentifier identifier = ASTFactory.classTypeAlias("C", null, null, null, null, null).name;
+ SimpleIdentifier identifier = AstFactory.classTypeAlias("C", null, null, null, null, null).name;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_constructorDeclaration() {
- SimpleIdentifier identifier = ASTFactory.constructorDeclaration(ASTFactory.identifier3("C"), "c", null, null).name;
+ SimpleIdentifier identifier = AstFactory.constructorDeclaration(AstFactory.identifier3("C"), "c", null, null).name;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_declaredIdentifier() {
- DeclaredIdentifier declaredIdentifier = ASTFactory.declaredIdentifier3("v");
+ DeclaredIdentifier declaredIdentifier = AstFactory.declaredIdentifier3("v");
SimpleIdentifier identifier = declaredIdentifier.identifier;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_fieldFormalParameter() {
- SimpleIdentifier identifier = ASTFactory.fieldFormalParameter3("p").identifier;
+ SimpleIdentifier identifier = AstFactory.fieldFormalParameter3("p").identifier;
JUnitTestCase.assertFalse(identifier.inDeclarationContext());
}
void test_inDeclarationContext_functionDeclaration() {
- SimpleIdentifier identifier = ASTFactory.functionDeclaration(null, null, "f", null).name;
+ SimpleIdentifier identifier = AstFactory.functionDeclaration(null, null, "f", null).name;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_functionTypeAlias() {
- SimpleIdentifier identifier = ASTFactory.typeAlias(null, "F", null, null).name;
+ SimpleIdentifier identifier = AstFactory.typeAlias(null, "F", null, null).name;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_label_false() {
- SimpleIdentifier identifier = ASTFactory.namedExpression2("l", ASTFactory.integer(0)).name.label;
+ SimpleIdentifier identifier = AstFactory.namedExpression2("l", AstFactory.integer(0)).name.label;
JUnitTestCase.assertFalse(identifier.inDeclarationContext());
}
void test_inDeclarationContext_label_true() {
- Label label = ASTFactory.label2("l");
+ Label label = AstFactory.label2("l");
SimpleIdentifier identifier = label.label;
- ASTFactory.labeledStatement(ASTFactory.list([label]), ASTFactory.emptyStatement());
+ AstFactory.labeledStatement(AstFactory.list([label]), AstFactory.emptyStatement());
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_methodDeclaration() {
- SimpleIdentifier identifier = ASTFactory.identifier3("m");
- ASTFactory.methodDeclaration2(null, null, null, null, identifier, null, null);
+ SimpleIdentifier identifier = AstFactory.identifier3("m");
+ AstFactory.methodDeclaration2(null, null, null, null, identifier, null, null);
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_simpleFormalParameter() {
- SimpleIdentifier identifier = ASTFactory.simpleFormalParameter3("p").identifier;
+ SimpleIdentifier identifier = AstFactory.simpleFormalParameter3("p").identifier;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_typeParameter_bound() {
- TypeName bound = ASTFactory.typeName4("A", []);
+ TypeName bound = AstFactory.typeName4("A", []);
SimpleIdentifier identifier = bound.name as SimpleIdentifier;
- ASTFactory.typeParameter2("E", bound);
+ AstFactory.typeParameter2("E", bound);
JUnitTestCase.assertFalse(identifier.inDeclarationContext());
}
void test_inDeclarationContext_typeParameter_name() {
- SimpleIdentifier identifier = ASTFactory.typeParameter("E").name;
+ SimpleIdentifier identifier = AstFactory.typeParameter("E").name;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
void test_inDeclarationContext_variableDeclaration() {
- SimpleIdentifier identifier = ASTFactory.variableDeclaration("v").name;
+ SimpleIdentifier identifier = AstFactory.variableDeclaration("v").name;
JUnitTestCase.assertTrue(identifier.inDeclarationContext());
}
@@ -835,8 +833,8 @@
}
void test_inReferenceContext() {
- SimpleIdentifier identifier = ASTFactory.identifier3("id");
- ASTFactory.namedExpression(ASTFactory.label(identifier), ASTFactory.identifier3("_"));
+ SimpleIdentifier identifier = AstFactory.identifier3("id");
+ AstFactory.namedExpression(AstFactory.label(identifier), AstFactory.identifier3("_"));
JUnitTestCase.assertFalse(identifier.inGetterContext());
JUnitTestCase.assertFalse(identifier.inSetterContext());
}
@@ -859,39 +857,41 @@
}
SimpleIdentifier createIdentifier(WrapperKind wrapper, AssignmentKind assignment) {
- SimpleIdentifier identifier = ASTFactory.identifier3("a");
+ SimpleIdentifier identifier = AstFactory.identifier3("a");
Expression expression = identifier;
while (true) {
if (wrapper == WrapperKind.PREFIXED_LEFT) {
- expression = ASTFactory.identifier(identifier, ASTFactory.identifier3("_"));
+ expression = AstFactory.identifier(identifier, AstFactory.identifier3("_"));
} else if (wrapper == WrapperKind.PREFIXED_RIGHT) {
- expression = ASTFactory.identifier(ASTFactory.identifier3("_"), identifier);
+ expression = AstFactory.identifier(AstFactory.identifier3("_"), identifier);
} else if (wrapper == WrapperKind.PROPERTY_LEFT) {
- expression = ASTFactory.propertyAccess2(expression, "_");
+ expression = AstFactory.propertyAccess2(expression, "_");
} else if (wrapper == WrapperKind.PROPERTY_RIGHT) {
- expression = ASTFactory.propertyAccess(ASTFactory.identifier3("_"), identifier);
+ expression = AstFactory.propertyAccess(AstFactory.identifier3("_"), identifier);
+ } else if (wrapper == WrapperKind.NONE) {
}
break;
}
while (true) {
if (assignment == AssignmentKind.BINARY) {
- ASTFactory.binaryExpression(expression, TokenType.PLUS, ASTFactory.identifier3("_"));
+ AstFactory.binaryExpression(expression, TokenType.PLUS, AstFactory.identifier3("_"));
} else if (assignment == AssignmentKind.COMPOUND_LEFT) {
- ASTFactory.assignmentExpression(expression, TokenType.PLUS_EQ, ASTFactory.identifier3("_"));
+ AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, AstFactory.identifier3("_"));
} else if (assignment == AssignmentKind.COMPOUND_RIGHT) {
- ASTFactory.assignmentExpression(ASTFactory.identifier3("_"), TokenType.PLUS_EQ, expression);
+ AstFactory.assignmentExpression(AstFactory.identifier3("_"), TokenType.PLUS_EQ, expression);
} else if (assignment == AssignmentKind.POSTFIX_INC) {
- ASTFactory.postfixExpression(expression, TokenType.PLUS_PLUS);
+ AstFactory.postfixExpression(expression, TokenType.PLUS_PLUS);
} else if (assignment == AssignmentKind.PREFIX_DEC) {
- ASTFactory.prefixExpression(TokenType.MINUS_MINUS, expression);
+ AstFactory.prefixExpression(TokenType.MINUS_MINUS, expression);
} else if (assignment == AssignmentKind.PREFIX_INC) {
- ASTFactory.prefixExpression(TokenType.PLUS_PLUS, expression);
+ AstFactory.prefixExpression(TokenType.PLUS_PLUS, expression);
} else if (assignment == AssignmentKind.PREFIX_NOT) {
- ASTFactory.prefixExpression(TokenType.BANG, expression);
+ AstFactory.prefixExpression(TokenType.BANG, expression);
} else if (assignment == AssignmentKind.SIMPLE_LEFT) {
- ASTFactory.assignmentExpression(expression, TokenType.EQ, ASTFactory.identifier3("_"));
+ AstFactory.assignmentExpression(expression, TokenType.EQ, AstFactory.identifier3("_"));
} else if (assignment == AssignmentKind.SIMPLE_RIGHT) {
- ASTFactory.assignmentExpression(ASTFactory.identifier3("_"), TokenType.EQ, expression);
+ AstFactory.assignmentExpression(AstFactory.identifier3("_"), TokenType.EQ, expression);
+ } else if (assignment == AssignmentKind.NONE) {
}
break;
}
@@ -904,9 +904,9 @@
* @param identifier the identifier in the AST structure being traversed
* @return the root of the AST structure containing the identifier
*/
- ASTNode topMostNode(SimpleIdentifier identifier) {
- ASTNode child = identifier;
- ASTNode parent = identifier.parent;
+ AstNode topMostNode(SimpleIdentifier identifier) {
+ AstNode child = identifier;
+ AstNode parent = identifier.parent;
while (parent != null) {
child = parent;
parent = parent.parent;
@@ -1079,15 +1079,15 @@
" }",
"}"]);
CompilationUnit unit = ParserTestCase.parseCompilationUnit(source, []);
- List<ASTNode> nodes = new List<ASTNode>();
+ List<AstNode> nodes = new List<AstNode>();
BreadthFirstVisitor<Object> visitor = new BreadthFirstVisitor_BreadthFirstVisitorTest_testIt(nodes);
visitor.visitAllNodes(unit);
EngineTestCase.assertSize(59, nodes);
- EngineTestCase.assertInstanceOf(CompilationUnit, nodes[0]);
- EngineTestCase.assertInstanceOf(ClassDeclaration, nodes[2]);
- EngineTestCase.assertInstanceOf(FunctionDeclaration, nodes[3]);
- EngineTestCase.assertInstanceOf(FunctionDeclarationStatement, nodes[27]);
- EngineTestCase.assertInstanceOf(IntegerLiteral, nodes[58]);
+ EngineTestCase.assertInstanceOf((obj) => obj is CompilationUnit, CompilationUnit, nodes[0]);
+ EngineTestCase.assertInstanceOf((obj) => obj is ClassDeclaration, ClassDeclaration, nodes[2]);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionDeclaration, FunctionDeclaration, nodes[3]);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionDeclarationStatement, FunctionDeclarationStatement, nodes[27]);
+ EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiteral, nodes[58]);
}
static dartSuite() {
@@ -1101,11 +1101,11 @@
}
class BreadthFirstVisitor_BreadthFirstVisitorTest_testIt extends BreadthFirstVisitor<Object> {
- List<ASTNode> nodes;
+ List<AstNode> nodes;
BreadthFirstVisitor_BreadthFirstVisitorTest_testIt(this.nodes) : super();
- Object visitNode(ASTNode node) {
+ Object visitNode(AstNode node) {
nodes.add(node);
return super.visitNode(node);
}
@@ -1113,10 +1113,10 @@
class NodeListTest extends EngineTestCase {
void test_add() {
- ASTNode parent = ASTFactory.argumentList([]);
- ASTNode firstNode = ASTFactory.booleanLiteral(true);
- ASTNode secondNode = ASTFactory.booleanLiteral(false);
- NodeList<ASTNode> list = new NodeList<ASTNode>(parent);
+ AstNode parent = AstFactory.argumentList([]);
+ AstNode firstNode = AstFactory.booleanLiteral(true);
+ AstNode secondNode = AstFactory.booleanLiteral(false);
+ NodeList<AstNode> list = new NodeList<AstNode>(parent);
list.insert(0, secondNode);
list.insert(0, firstNode);
EngineTestCase.assertSize(2, list);
@@ -1124,7 +1124,7 @@
JUnitTestCase.assertSame(secondNode, list[1]);
JUnitTestCase.assertSame(parent, firstNode.parent);
JUnitTestCase.assertSame(parent, secondNode.parent);
- ASTNode thirdNode = ASTFactory.booleanLiteral(false);
+ AstNode thirdNode = AstFactory.booleanLiteral(false);
list.insert(1, thirdNode);
EngineTestCase.assertSize(3, list);
JUnitTestCase.assertSame(firstNode, list[0]);
@@ -1136,40 +1136,40 @@
}
void test_add_negative() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
- list.insert(-1, ASTFactory.booleanLiteral(true));
+ list.insert(-1, AstFactory.booleanLiteral(true));
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
} on RangeError catch (exception) {
}
}
void test_add_tooBig() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
- list.insert(1, ASTFactory.booleanLiteral(true));
+ list.insert(1, AstFactory.booleanLiteral(true));
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
} on RangeError catch (exception) {
}
}
void test_addAll() {
- ASTNode parent = ASTFactory.argumentList([]);
- List<ASTNode> firstNodes = new List<ASTNode>();
- ASTNode firstNode = ASTFactory.booleanLiteral(true);
- ASTNode secondNode = ASTFactory.booleanLiteral(false);
+ AstNode parent = AstFactory.argumentList([]);
+ List<AstNode> firstNodes = new List<AstNode>();
+ AstNode firstNode = AstFactory.booleanLiteral(true);
+ AstNode secondNode = AstFactory.booleanLiteral(false);
firstNodes.add(firstNode);
firstNodes.add(secondNode);
- NodeList<ASTNode> list = new NodeList<ASTNode>(parent);
+ NodeList<AstNode> list = new NodeList<AstNode>(parent);
list.addAll(firstNodes);
EngineTestCase.assertSize(2, list);
JUnitTestCase.assertSame(firstNode, list[0]);
JUnitTestCase.assertSame(secondNode, list[1]);
JUnitTestCase.assertSame(parent, firstNode.parent);
JUnitTestCase.assertSame(parent, secondNode.parent);
- List<ASTNode> secondNodes = new List<ASTNode>();
- ASTNode thirdNode = ASTFactory.booleanLiteral(true);
- ASTNode fourthNode = ASTFactory.booleanLiteral(false);
+ List<AstNode> secondNodes = new List<AstNode>();
+ AstNode thirdNode = AstFactory.booleanLiteral(true);
+ AstNode fourthNode = AstFactory.booleanLiteral(false);
secondNodes.add(thirdNode);
secondNodes.add(fourthNode);
list.addAll(secondNodes);
@@ -1185,23 +1185,23 @@
}
void test_create() {
- ASTNode owner = ASTFactory.argumentList([]);
- NodeList<ASTNode> list = NodeList.create(owner);
+ AstNode owner = AstFactory.argumentList([]);
+ NodeList<AstNode> list = NodeList.create(owner);
JUnitTestCase.assertNotNull(list);
EngineTestCase.assertSize(0, list);
JUnitTestCase.assertSame(owner, list.owner);
}
void test_creation() {
- ASTNode owner = ASTFactory.argumentList([]);
- NodeList<ASTNode> list = new NodeList<ASTNode>(owner);
+ AstNode owner = AstFactory.argumentList([]);
+ NodeList<AstNode> list = new NodeList<AstNode>(owner);
JUnitTestCase.assertNotNull(list);
EngineTestCase.assertSize(0, list);
JUnitTestCase.assertSame(owner, list.owner);
}
void test_get_negative() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
list[-1];
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
@@ -1210,7 +1210,7 @@
}
void test_get_tooBig() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
list[1];
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
@@ -1219,39 +1219,39 @@
}
void test_getBeginToken_empty() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
JUnitTestCase.assertNull(list.beginToken);
}
void test_getBeginToken_nonEmpty() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
- ASTNode node = ASTFactory.parenthesizedExpression(ASTFactory.booleanLiteral(true));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
+ AstNode node = AstFactory.parenthesizedExpression(AstFactory.booleanLiteral(true));
list.add(node);
JUnitTestCase.assertSame(node.beginToken, list.beginToken);
}
void test_getEndToken_empty() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
JUnitTestCase.assertNull(list.endToken);
}
void test_getEndToken_nonEmpty() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
- ASTNode node = ASTFactory.parenthesizedExpression(ASTFactory.booleanLiteral(true));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
+ AstNode node = AstFactory.parenthesizedExpression(AstFactory.booleanLiteral(true));
list.add(node);
JUnitTestCase.assertSame(node.endToken, list.endToken);
}
void test_indexOf() {
- List<ASTNode> nodes = new List<ASTNode>();
- ASTNode firstNode = ASTFactory.booleanLiteral(true);
- ASTNode secondNode = ASTFactory.booleanLiteral(false);
- ASTNode thirdNode = ASTFactory.booleanLiteral(true);
- ASTNode fourthNode = ASTFactory.booleanLiteral(false);
+ List<AstNode> nodes = new List<AstNode>();
+ AstNode firstNode = AstFactory.booleanLiteral(true);
+ AstNode secondNode = AstFactory.booleanLiteral(false);
+ AstNode thirdNode = AstFactory.booleanLiteral(true);
+ AstNode fourthNode = AstFactory.booleanLiteral(false);
nodes.add(firstNode);
nodes.add(secondNode);
nodes.add(thirdNode);
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
list.addAll(nodes);
EngineTestCase.assertSize(3, list);
JUnitTestCase.assertEquals(0, list.indexOf(firstNode));
@@ -1262,14 +1262,14 @@
}
void test_remove() {
- List<ASTNode> nodes = new List<ASTNode>();
- ASTNode firstNode = ASTFactory.booleanLiteral(true);
- ASTNode secondNode = ASTFactory.booleanLiteral(false);
- ASTNode thirdNode = ASTFactory.booleanLiteral(true);
+ List<AstNode> nodes = new List<AstNode>();
+ AstNode firstNode = AstFactory.booleanLiteral(true);
+ AstNode secondNode = AstFactory.booleanLiteral(false);
+ AstNode thirdNode = AstFactory.booleanLiteral(true);
nodes.add(firstNode);
nodes.add(secondNode);
nodes.add(thirdNode);
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
list.addAll(nodes);
EngineTestCase.assertSize(3, list);
JUnitTestCase.assertSame(secondNode, list.removeAt(1));
@@ -1279,7 +1279,7 @@
}
void test_remove_negative() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
list.removeAt(-1);
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
@@ -1288,7 +1288,7 @@
}
void test_remove_tooBig() {
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
list.removeAt(1);
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
@@ -1297,17 +1297,17 @@
}
void test_set() {
- List<ASTNode> nodes = new List<ASTNode>();
- ASTNode firstNode = ASTFactory.booleanLiteral(true);
- ASTNode secondNode = ASTFactory.booleanLiteral(false);
- ASTNode thirdNode = ASTFactory.booleanLiteral(true);
+ List<AstNode> nodes = new List<AstNode>();
+ AstNode firstNode = AstFactory.booleanLiteral(true);
+ AstNode secondNode = AstFactory.booleanLiteral(false);
+ AstNode thirdNode = AstFactory.booleanLiteral(true);
nodes.add(firstNode);
nodes.add(secondNode);
nodes.add(thirdNode);
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
list.addAll(nodes);
EngineTestCase.assertSize(3, list);
- ASTNode fourthNode = ASTFactory.integer(0);
+ AstNode fourthNode = AstFactory.integer(0);
JUnitTestCase.assertSame(secondNode, javaListSet(list, 1, fourthNode));
EngineTestCase.assertSize(3, list);
JUnitTestCase.assertSame(firstNode, list[0]);
@@ -1316,8 +1316,8 @@
}
void test_set_negative() {
- ASTNode node = ASTFactory.booleanLiteral(true);
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ AstNode node = AstFactory.booleanLiteral(true);
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
javaListSet(list, -1, node);
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
@@ -1326,8 +1326,8 @@
}
void test_set_tooBig() {
- ASTNode node = ASTFactory.booleanLiteral(true);
- NodeList<ASTNode> list = new NodeList<ASTNode>(ASTFactory.argumentList([]));
+ AstNode node = AstFactory.booleanLiteral(true);
+ NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([]));
try {
javaListSet(list, 1, node);
JUnitTestCase.fail("Expected IndexOutOfBoundsException");
@@ -1455,31 +1455,31 @@
void test_binary_bitAnd() {
Object value = getConstantValue("74 & 42");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(74 & 42, value as int);
}
void test_binary_bitOr() {
Object value = getConstantValue("74 | 42");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(74 | 42, value as int);
}
void test_binary_bitXor() {
Object value = getConstantValue("74 ^ 42");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(74 ^ 42, value as int);
}
void test_binary_divide_double() {
Object value = getConstantValue("3.2 / 2.3");
- EngineTestCase.assertInstanceOf(double, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is double, double, value);
JUnitTestCase.assertEquals(3.2 / 2.3, value as double);
}
void test_binary_divide_integer() {
Object value = getConstantValue("3 / 2");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(1, value as int);
}
@@ -1520,7 +1520,7 @@
void test_binary_leftShift() {
Object value = getConstantValue("16 << 2");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(64, value as int);
}
@@ -1546,13 +1546,13 @@
void test_binary_minus_double() {
Object value = getConstantValue("3.2 - 2.3");
- EngineTestCase.assertInstanceOf(double, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is double, double, value);
JUnitTestCase.assertEquals(3.2 - 2.3, value as double);
}
void test_binary_minus_integer() {
Object value = getConstantValue("3 - 2");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(1, value as int);
}
@@ -1583,55 +1583,55 @@
void test_binary_plus_double() {
Object value = getConstantValue("2.3 + 3.2");
- EngineTestCase.assertInstanceOf(double, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is double, double, value);
JUnitTestCase.assertEquals(2.3 + 3.2, value as double);
}
void test_binary_plus_integer() {
Object value = getConstantValue("2 + 3");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(5, value as int);
}
void test_binary_remainder_double() {
Object value = getConstantValue("3.2 % 2.3");
- EngineTestCase.assertInstanceOf(double, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is double, double, value);
JUnitTestCase.assertEquals(3.2 % 2.3, value as double);
}
void test_binary_remainder_integer() {
Object value = getConstantValue("8 % 3");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(2, value as int);
}
void test_binary_rightShift() {
Object value = getConstantValue("64 >> 2");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(16, value as int);
}
void test_binary_times_double() {
Object value = getConstantValue("2.3 * 3.2");
- EngineTestCase.assertInstanceOf(double, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is double, double, value);
JUnitTestCase.assertEquals(2.3 * 3.2, value as double);
}
void test_binary_times_integer() {
Object value = getConstantValue("2 * 3");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(6, value as int);
}
void test_binary_truncatingDivide_double() {
Object value = getConstantValue("3.2 ~/ 2.3");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(1, value as int);
}
void test_binary_truncatingDivide_integer() {
Object value = getConstantValue("10 ~/ 3");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(3, value as int);
}
@@ -1647,7 +1647,7 @@
void test_literal_list() {
Object value = getConstantValue("['a', 'b', 'c']");
- EngineTestCase.assertInstanceOf(List, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is List, List, value);
List list = value as List;
JUnitTestCase.assertEquals(3, list.length);
JUnitTestCase.assertEquals("a", list[0]);
@@ -1657,7 +1657,7 @@
void test_literal_map() {
Object value = getConstantValue("{'a' : 'm', 'b' : 'n', 'c' : 'o'}");
- EngineTestCase.assertInstanceOf(Map, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, value);
Map map = value as Map;
JUnitTestCase.assertEquals(3, map.length);
JUnitTestCase.assertEquals("m", map["a"]);
@@ -1672,13 +1672,13 @@
void test_literal_number_double() {
Object value = getConstantValue("3.45");
- EngineTestCase.assertInstanceOf(double, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is double, double, value);
JUnitTestCase.assertEquals(3.45, value as double);
}
void test_literal_number_integer() {
Object value = getConstantValue("42");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(42, value as int);
}
@@ -1709,7 +1709,7 @@
void test_unary_bitNot() {
Object value = getConstantValue("~42");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(~42, value as int);
}
@@ -1720,13 +1720,13 @@
void test_unary_negated_double() {
Object value = getConstantValue("-42.3");
- EngineTestCase.assertInstanceOf(double, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is double, double, value);
JUnitTestCase.assertEquals(-42.3, value as double);
}
void test_unary_negated_integer() {
Object value = getConstantValue("-42");
- EngineTestCase.assertInstanceOf(int, value);
+ EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
JUnitTestCase.assertEquals(-42, value as int);
}
@@ -2001,195 +2001,195 @@
class ToSourceVisitorTest extends EngineTestCase {
void test_visitAdjacentStrings() {
- assertSource("'a' 'b'", ASTFactory.adjacentStrings([ASTFactory.string2("a"), ASTFactory.string2("b")]));
+ assertSource("'a' 'b'", AstFactory.adjacentStrings([AstFactory.string2("a"), AstFactory.string2("b")]));
}
void test_visitAnnotation_constant() {
- assertSource("@A", ASTFactory.annotation(ASTFactory.identifier3("A")));
+ assertSource("@A", AstFactory.annotation(AstFactory.identifier3("A")));
}
void test_visitAnnotation_constructor() {
- assertSource("@A.c()", ASTFactory.annotation2(ASTFactory.identifier3("A"), ASTFactory.identifier3("c"), ASTFactory.argumentList([])));
+ assertSource("@A.c()", AstFactory.annotation2(AstFactory.identifier3("A"), AstFactory.identifier3("c"), AstFactory.argumentList([])));
}
void test_visitArgumentDefinitionTest() {
- assertSource("?a", ASTFactory.argumentDefinitionTest("a"));
+ assertSource("?a", AstFactory.argumentDefinitionTest("a"));
}
void test_visitArgumentList() {
- assertSource("(a, b)", ASTFactory.argumentList([ASTFactory.identifier3("a"), ASTFactory.identifier3("b")]));
+ assertSource("(a, b)", AstFactory.argumentList([AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
}
void test_visitAsExpression() {
- assertSource("e as T", ASTFactory.asExpression(ASTFactory.identifier3("e"), ASTFactory.typeName4("T", [])));
+ assertSource("e as T", AstFactory.asExpression(AstFactory.identifier3("e"), AstFactory.typeName4("T", [])));
}
void test_visitAssertStatement() {
- assertSource("assert (a);", ASTFactory.assertStatement(ASTFactory.identifier3("a")));
+ assertSource("assert (a);", AstFactory.assertStatement(AstFactory.identifier3("a")));
}
void test_visitAssignmentExpression() {
- assertSource("a = b", ASTFactory.assignmentExpression(ASTFactory.identifier3("a"), TokenType.EQ, ASTFactory.identifier3("b")));
+ assertSource("a = b", AstFactory.assignmentExpression(AstFactory.identifier3("a"), TokenType.EQ, AstFactory.identifier3("b")));
}
void test_visitBinaryExpression() {
- assertSource("a + b", ASTFactory.binaryExpression(ASTFactory.identifier3("a"), TokenType.PLUS, ASTFactory.identifier3("b")));
+ assertSource("a + b", AstFactory.binaryExpression(AstFactory.identifier3("a"), TokenType.PLUS, AstFactory.identifier3("b")));
}
void test_visitBlock_empty() {
- assertSource("{}", ASTFactory.block([]));
+ assertSource("{}", AstFactory.block([]));
}
void test_visitBlock_nonEmpty() {
- assertSource("{break; break;}", ASTFactory.block([ASTFactory.breakStatement(), ASTFactory.breakStatement()]));
+ assertSource("{break; break;}", AstFactory.block([AstFactory.breakStatement(), AstFactory.breakStatement()]));
}
void test_visitBlockFunctionBody() {
- assertSource("{}", ASTFactory.blockFunctionBody2([]));
+ assertSource("{}", AstFactory.blockFunctionBody2([]));
}
void test_visitBooleanLiteral_false() {
- assertSource("false", ASTFactory.booleanLiteral(false));
+ assertSource("false", AstFactory.booleanLiteral(false));
}
void test_visitBooleanLiteral_true() {
- assertSource("true", ASTFactory.booleanLiteral(true));
+ assertSource("true", AstFactory.booleanLiteral(true));
}
void test_visitBreakStatement_label() {
- assertSource("break l;", ASTFactory.breakStatement2("l"));
+ assertSource("break l;", AstFactory.breakStatement2("l"));
}
void test_visitBreakStatement_noLabel() {
- assertSource("break;", ASTFactory.breakStatement());
+ assertSource("break;", AstFactory.breakStatement());
}
void test_visitCascadeExpression_field() {
- assertSource("a..b..c", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [
- ASTFactory.cascadedPropertyAccess("b"),
- ASTFactory.cascadedPropertyAccess("c")]));
+ assertSource("a..b..c", AstFactory.cascadeExpression(AstFactory.identifier3("a"), [
+ AstFactory.cascadedPropertyAccess("b"),
+ AstFactory.cascadedPropertyAccess("c")]));
}
void test_visitCascadeExpression_index() {
- assertSource("a..[0]..[1]", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [
- ASTFactory.cascadedIndexExpression(ASTFactory.integer(0)),
- ASTFactory.cascadedIndexExpression(ASTFactory.integer(1))]));
+ assertSource("a..[0]..[1]", AstFactory.cascadeExpression(AstFactory.identifier3("a"), [
+ AstFactory.cascadedIndexExpression(AstFactory.integer(0)),
+ AstFactory.cascadedIndexExpression(AstFactory.integer(1))]));
}
void test_visitCascadeExpression_method() {
- assertSource("a..b()..c()", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [
- ASTFactory.cascadedMethodInvocation("b", []),
- ASTFactory.cascadedMethodInvocation("c", [])]));
+ assertSource("a..b()..c()", AstFactory.cascadeExpression(AstFactory.identifier3("a"), [
+ AstFactory.cascadedMethodInvocation("b", []),
+ AstFactory.cascadedMethodInvocation("c", [])]));
}
void test_visitCatchClause_catch_noStack() {
- assertSource("catch (e) {}", ASTFactory.catchClause("e", []));
+ assertSource("catch (e) {}", AstFactory.catchClause("e", []));
}
void test_visitCatchClause_catch_stack() {
- assertSource("catch (e, s) {}", ASTFactory.catchClause2("e", "s", []));
+ assertSource("catch (e, s) {}", AstFactory.catchClause2("e", "s", []));
}
void test_visitCatchClause_on() {
- assertSource("on E {}", ASTFactory.catchClause3(ASTFactory.typeName4("E", []), []));
+ assertSource("on E {}", AstFactory.catchClause3(AstFactory.typeName4("E", []), []));
}
void test_visitCatchClause_on_catch() {
- assertSource("on E catch (e) {}", ASTFactory.catchClause4(ASTFactory.typeName4("E", []), "e", []));
+ assertSource("on E catch (e) {}", AstFactory.catchClause4(AstFactory.typeName4("E", []), "e", []));
}
void test_visitClassDeclaration_abstract() {
- assertSource("abstract class C {}", ASTFactory.classDeclaration(Keyword.ABSTRACT, "C", null, null, null, null, []));
+ assertSource("abstract class C {}", AstFactory.classDeclaration(Keyword.ABSTRACT, "C", null, null, null, null, []));
}
void test_visitClassDeclaration_empty() {
- assertSource("class C {}", ASTFactory.classDeclaration(null, "C", null, null, null, null, []));
+ assertSource("class C {}", AstFactory.classDeclaration(null, "C", null, null, null, null, []));
}
void test_visitClassDeclaration_extends() {
- assertSource("class C extends A {}", ASTFactory.classDeclaration(null, "C", null, ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), null, null, []));
+ assertSource("class C extends A {}", AstFactory.classDeclaration(null, "C", null, AstFactory.extendsClause(AstFactory.typeName4("A", [])), null, null, []));
}
void test_visitClassDeclaration_extends_implements() {
- assertSource("class C extends A implements B {}", ASTFactory.classDeclaration(null, "C", null, ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), null, ASTFactory.implementsClause([ASTFactory.typeName4("B", [])]), []));
+ assertSource("class C extends A implements B {}", AstFactory.classDeclaration(null, "C", null, AstFactory.extendsClause(AstFactory.typeName4("A", [])), null, AstFactory.implementsClause([AstFactory.typeName4("B", [])]), []));
}
void test_visitClassDeclaration_extends_with() {
- assertSource("class C extends A with M {}", ASTFactory.classDeclaration(null, "C", null, ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), ASTFactory.withClause([ASTFactory.typeName4("M", [])]), null, []));
+ assertSource("class C extends A with M {}", AstFactory.classDeclaration(null, "C", null, AstFactory.extendsClause(AstFactory.typeName4("A", [])), AstFactory.withClause([AstFactory.typeName4("M", [])]), null, []));
}
void test_visitClassDeclaration_extends_with_implements() {
- assertSource("class C extends A with M implements B {}", ASTFactory.classDeclaration(null, "C", null, ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), ASTFactory.withClause([ASTFactory.typeName4("M", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("B", [])]), []));
+ assertSource("class C extends A with M implements B {}", AstFactory.classDeclaration(null, "C", null, AstFactory.extendsClause(AstFactory.typeName4("A", [])), AstFactory.withClause([AstFactory.typeName4("M", [])]), AstFactory.implementsClause([AstFactory.typeName4("B", [])]), []));
}
void test_visitClassDeclaration_implements() {
- assertSource("class C implements B {}", ASTFactory.classDeclaration(null, "C", null, null, null, ASTFactory.implementsClause([ASTFactory.typeName4("B", [])]), []));
+ assertSource("class C implements B {}", AstFactory.classDeclaration(null, "C", null, null, null, AstFactory.implementsClause([AstFactory.typeName4("B", [])]), []));
}
void test_visitClassDeclaration_multipleMember() {
- assertSource("class C {var a; var b;}", ASTFactory.classDeclaration(null, "C", null, null, null, null, [
- ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("a")]),
- ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("b")])]));
+ assertSource("class C {var a; var b;}", AstFactory.classDeclaration(null, "C", null, null, null, null, [
+ AstFactory.fieldDeclaration2(false, Keyword.VAR, [AstFactory.variableDeclaration("a")]),
+ AstFactory.fieldDeclaration2(false, Keyword.VAR, [AstFactory.variableDeclaration("b")])]));
}
void test_visitClassDeclaration_parameters() {
- assertSource("class C<E> {}", ASTFactory.classDeclaration(null, "C", ASTFactory.typeParameterList(["E"]), null, null, null, []));
+ assertSource("class C<E> {}", AstFactory.classDeclaration(null, "C", AstFactory.typeParameterList(["E"]), null, null, null, []));
}
void test_visitClassDeclaration_parameters_extends() {
- assertSource("class C<E> extends A {}", ASTFactory.classDeclaration(null, "C", ASTFactory.typeParameterList(["E"]), ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), null, null, []));
+ assertSource("class C<E> extends A {}", AstFactory.classDeclaration(null, "C", AstFactory.typeParameterList(["E"]), AstFactory.extendsClause(AstFactory.typeName4("A", [])), null, null, []));
}
void test_visitClassDeclaration_parameters_extends_implements() {
- assertSource("class C<E> extends A implements B {}", ASTFactory.classDeclaration(null, "C", ASTFactory.typeParameterList(["E"]), ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), null, ASTFactory.implementsClause([ASTFactory.typeName4("B", [])]), []));
+ assertSource("class C<E> extends A implements B {}", AstFactory.classDeclaration(null, "C", AstFactory.typeParameterList(["E"]), AstFactory.extendsClause(AstFactory.typeName4("A", [])), null, AstFactory.implementsClause([AstFactory.typeName4("B", [])]), []));
}
void test_visitClassDeclaration_parameters_extends_with() {
- assertSource("class C<E> extends A with M {}", ASTFactory.classDeclaration(null, "C", ASTFactory.typeParameterList(["E"]), ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), ASTFactory.withClause([ASTFactory.typeName4("M", [])]), null, []));
+ assertSource("class C<E> extends A with M {}", AstFactory.classDeclaration(null, "C", AstFactory.typeParameterList(["E"]), AstFactory.extendsClause(AstFactory.typeName4("A", [])), AstFactory.withClause([AstFactory.typeName4("M", [])]), null, []));
}
void test_visitClassDeclaration_parameters_extends_with_implements() {
- assertSource("class C<E> extends A with M implements B {}", ASTFactory.classDeclaration(null, "C", ASTFactory.typeParameterList(["E"]), ASTFactory.extendsClause(ASTFactory.typeName4("A", [])), ASTFactory.withClause([ASTFactory.typeName4("M", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("B", [])]), []));
+ assertSource("class C<E> extends A with M implements B {}", AstFactory.classDeclaration(null, "C", AstFactory.typeParameterList(["E"]), AstFactory.extendsClause(AstFactory.typeName4("A", [])), AstFactory.withClause([AstFactory.typeName4("M", [])]), AstFactory.implementsClause([AstFactory.typeName4("B", [])]), []));
}
void test_visitClassDeclaration_parameters_implements() {
- assertSource("class C<E> implements B {}", ASTFactory.classDeclaration(null, "C", ASTFactory.typeParameterList(["E"]), null, null, ASTFactory.implementsClause([ASTFactory.typeName4("B", [])]), []));
+ assertSource("class C<E> implements B {}", AstFactory.classDeclaration(null, "C", AstFactory.typeParameterList(["E"]), null, null, AstFactory.implementsClause([AstFactory.typeName4("B", [])]), []));
}
void test_visitClassDeclaration_singleMember() {
- assertSource("class C {var a;}", ASTFactory.classDeclaration(null, "C", null, null, null, null, [ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("a")])]));
+ assertSource("class C {var a;}", AstFactory.classDeclaration(null, "C", null, null, null, null, [AstFactory.fieldDeclaration2(false, Keyword.VAR, [AstFactory.variableDeclaration("a")])]));
}
void test_visitClassTypeAlias_abstract() {
- assertSource("abstract class C = S with M1;", ASTFactory.classTypeAlias("C", null, Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), null));
+ assertSource("abstract class C = S with M1;", AstFactory.classTypeAlias("C", null, Keyword.ABSTRACT, AstFactory.typeName4("S", []), AstFactory.withClause([AstFactory.typeName4("M1", [])]), null));
}
void test_visitClassTypeAlias_abstract_implements() {
- assertSource("abstract class C = S with M1 implements I;", ASTFactory.classTypeAlias("C", null, Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
+ assertSource("abstract class C = S with M1 implements I;", AstFactory.classTypeAlias("C", null, Keyword.ABSTRACT, AstFactory.typeName4("S", []), AstFactory.withClause([AstFactory.typeName4("M1", [])]), AstFactory.implementsClause([AstFactory.typeName4("I", [])])));
}
void test_visitClassTypeAlias_generic() {
- assertSource("class C<E> = S<E> with M1<E>;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), null, ASTFactory.typeName4("S", [ASTFactory.typeName4("E", [])]), ASTFactory.withClause([ASTFactory.typeName4("M1", [ASTFactory.typeName4("E", [])])]), null));
+ assertSource("class C<E> = S<E> with M1<E>;", AstFactory.classTypeAlias("C", AstFactory.typeParameterList(["E"]), null, AstFactory.typeName4("S", [AstFactory.typeName4("E", [])]), AstFactory.withClause([AstFactory.typeName4("M1", [AstFactory.typeName4("E", [])])]), null));
}
void test_visitClassTypeAlias_implements() {
- assertSource("class C = S with M1 implements I;", ASTFactory.classTypeAlias("C", null, null, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
+ assertSource("class C = S with M1 implements I;", AstFactory.classTypeAlias("C", null, null, AstFactory.typeName4("S", []), AstFactory.withClause([AstFactory.typeName4("M1", [])]), AstFactory.implementsClause([AstFactory.typeName4("I", [])])));
}
void test_visitClassTypeAlias_minimal() {
- assertSource("class C = S with M1;", ASTFactory.classTypeAlias("C", null, null, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), null));
+ assertSource("class C = S with M1;", AstFactory.classTypeAlias("C", null, null, AstFactory.typeName4("S", []), AstFactory.withClause([AstFactory.typeName4("M1", [])]), null));
}
void test_visitClassTypeAlias_parameters_abstract() {
- assertSource("abstract class C<E> = S with M1;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), null));
+ assertSource("abstract class C<E> = S with M1;", AstFactory.classTypeAlias("C", AstFactory.typeParameterList(["E"]), Keyword.ABSTRACT, AstFactory.typeName4("S", []), AstFactory.withClause([AstFactory.typeName4("M1", [])]), null));
}
void test_visitClassTypeAlias_parameters_abstract_implements() {
- assertSource("abstract class C<E> = S with M1 implements I;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), Keyword.ABSTRACT, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
+ assertSource("abstract class C<E> = S with M1 implements I;", AstFactory.classTypeAlias("C", AstFactory.typeParameterList(["E"]), Keyword.ABSTRACT, AstFactory.typeName4("S", []), AstFactory.withClause([AstFactory.typeName4("M1", [])]), AstFactory.implementsClause([AstFactory.typeName4("I", [])])));
}
void test_visitClassTypeAlias_parameters_implements() {
- assertSource("class C<E> = S with M1 implements I;", ASTFactory.classTypeAlias("C", ASTFactory.typeParameterList(["E"]), null, ASTFactory.typeName4("S", []), ASTFactory.withClause([ASTFactory.typeName4("M1", [])]), ASTFactory.implementsClause([ASTFactory.typeName4("I", [])])));
+ assertSource("class C<E> = S with M1 implements I;", AstFactory.classTypeAlias("C", AstFactory.typeParameterList(["E"]), null, AstFactory.typeName4("S", []), AstFactory.withClause([AstFactory.typeName4("M1", [])]), AstFactory.implementsClause([AstFactory.typeName4("I", [])])));
}
void test_visitComment() {
@@ -2197,881 +2197,881 @@
}
void test_visitCommentReference() {
- assertSource("", new CommentReference(null, ASTFactory.identifier3("a")));
+ assertSource("", new CommentReference(null, AstFactory.identifier3("a")));
}
void test_visitCompilationUnit_declaration() {
- assertSource("var a;", ASTFactory.compilationUnit2([ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")])]));
+ assertSource("var a;", AstFactory.compilationUnit2([AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [AstFactory.variableDeclaration("a")])]));
}
void test_visitCompilationUnit_directive() {
- assertSource("library l;", ASTFactory.compilationUnit3([ASTFactory.libraryDirective2("l")]));
+ assertSource("library l;", AstFactory.compilationUnit3([AstFactory.libraryDirective2("l")]));
}
void test_visitCompilationUnit_directive_declaration() {
- assertSource("library l; var a;", ASTFactory.compilationUnit4(ASTFactory.list([ASTFactory.libraryDirective2("l")]), ASTFactory.list([ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")])])));
+ assertSource("library l; var a;", AstFactory.compilationUnit4(AstFactory.list([AstFactory.libraryDirective2("l")]), AstFactory.list([AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [AstFactory.variableDeclaration("a")])])));
}
void test_visitCompilationUnit_empty() {
- assertSource("", ASTFactory.compilationUnit());
+ assertSource("", AstFactory.compilationUnit());
}
void test_visitCompilationUnit_script() {
- assertSource("!#/bin/dartvm", ASTFactory.compilationUnit5("!#/bin/dartvm"));
+ assertSource("!#/bin/dartvm", AstFactory.compilationUnit5("!#/bin/dartvm"));
}
void test_visitCompilationUnit_script_declaration() {
- assertSource("!#/bin/dartvm var a;", ASTFactory.compilationUnit6("!#/bin/dartvm", [ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")])]));
+ assertSource("!#/bin/dartvm var a;", AstFactory.compilationUnit6("!#/bin/dartvm", [AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [AstFactory.variableDeclaration("a")])]));
}
void test_visitCompilationUnit_script_directive() {
- assertSource("!#/bin/dartvm library l;", ASTFactory.compilationUnit7("!#/bin/dartvm", [ASTFactory.libraryDirective2("l")]));
+ assertSource("!#/bin/dartvm library l;", AstFactory.compilationUnit7("!#/bin/dartvm", [AstFactory.libraryDirective2("l")]));
}
void test_visitCompilationUnit_script_directives_declarations() {
- assertSource("!#/bin/dartvm library l; var a;", ASTFactory.compilationUnit8("!#/bin/dartvm", ASTFactory.list([ASTFactory.libraryDirective2("l")]), ASTFactory.list([ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")])])));
+ assertSource("!#/bin/dartvm library l; var a;", AstFactory.compilationUnit8("!#/bin/dartvm", AstFactory.list([AstFactory.libraryDirective2("l")]), AstFactory.list([AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [AstFactory.variableDeclaration("a")])])));
}
void test_visitConditionalExpression() {
- assertSource("a ? b : c", ASTFactory.conditionalExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("b"), ASTFactory.identifier3("c")));
+ assertSource("a ? b : c", AstFactory.conditionalExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"), AstFactory.identifier3("c")));
}
void test_visitConstructorDeclaration_const() {
- assertSource("const C() {}", ASTFactory.constructorDeclaration2(Keyword.CONST, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), null, ASTFactory.blockFunctionBody2([])));
+ assertSource("const C() {}", AstFactory.constructorDeclaration2(Keyword.CONST, null, AstFactory.identifier3("C"), null, AstFactory.formalParameterList([]), null, AstFactory.blockFunctionBody2([])));
}
void test_visitConstructorDeclaration_external() {
- assertSource("external C();", ASTFactory.constructorDeclaration(ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), null));
+ assertSource("external C();", AstFactory.constructorDeclaration(AstFactory.identifier3("C"), null, AstFactory.formalParameterList([]), null));
}
void test_visitConstructorDeclaration_minimal() {
- assertSource("C() {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), null, ASTFactory.blockFunctionBody2([])));
+ assertSource("C() {}", AstFactory.constructorDeclaration2(null, null, AstFactory.identifier3("C"), null, AstFactory.formalParameterList([]), null, AstFactory.blockFunctionBody2([])));
}
void test_visitConstructorDeclaration_multipleInitializers() {
- assertSource("C() : a = b, c = d {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), ASTFactory.list([
- ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifier3("b")),
- ASTFactory.constructorFieldInitializer(false, "c", ASTFactory.identifier3("d"))]), ASTFactory.blockFunctionBody2([])));
+ assertSource("C() : a = b, c = d {}", AstFactory.constructorDeclaration2(null, null, AstFactory.identifier3("C"), null, AstFactory.formalParameterList([]), AstFactory.list([
+ AstFactory.constructorFieldInitializer(false, "a", AstFactory.identifier3("b")),
+ AstFactory.constructorFieldInitializer(false, "c", AstFactory.identifier3("d"))]), AstFactory.blockFunctionBody2([])));
}
void test_visitConstructorDeclaration_multipleParameters() {
- assertSource("C(var a, var b) {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter(Keyword.VAR, "a"),
- ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), null, ASTFactory.blockFunctionBody2([])));
+ assertSource("C(var a, var b) {}", AstFactory.constructorDeclaration2(null, null, AstFactory.identifier3("C"), null, AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+ AstFactory.simpleFormalParameter(Keyword.VAR, "b")]), null, AstFactory.blockFunctionBody2([])));
}
void test_visitConstructorDeclaration_named() {
- assertSource("C.m() {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), "m", ASTFactory.formalParameterList([]), null, ASTFactory.blockFunctionBody2([])));
+ assertSource("C.m() {}", AstFactory.constructorDeclaration2(null, null, AstFactory.identifier3("C"), "m", AstFactory.formalParameterList([]), null, AstFactory.blockFunctionBody2([])));
}
void test_visitConstructorDeclaration_singleInitializer() {
- assertSource("C() : a = b {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), ASTFactory.list([ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifier3("b"))]), ASTFactory.blockFunctionBody2([])));
+ assertSource("C() : a = b {}", AstFactory.constructorDeclaration2(null, null, AstFactory.identifier3("C"), null, AstFactory.formalParameterList([]), AstFactory.list([AstFactory.constructorFieldInitializer(false, "a", AstFactory.identifier3("b"))]), AstFactory.blockFunctionBody2([])));
}
void test_visitConstructorFieldInitializer_withoutThis() {
- assertSource("a = b", ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifier3("b")));
+ assertSource("a = b", AstFactory.constructorFieldInitializer(false, "a", AstFactory.identifier3("b")));
}
void test_visitConstructorFieldInitializer_withThis() {
- assertSource("this.a = b", ASTFactory.constructorFieldInitializer(true, "a", ASTFactory.identifier3("b")));
+ assertSource("this.a = b", AstFactory.constructorFieldInitializer(true, "a", AstFactory.identifier3("b")));
}
void test_visitConstructorName_named_prefix() {
- assertSource("p.C.n", ASTFactory.constructorName(ASTFactory.typeName4("p.C.n", []), null));
+ assertSource("p.C.n", AstFactory.constructorName(AstFactory.typeName4("p.C.n", []), null));
}
void test_visitConstructorName_unnamed_noPrefix() {
- assertSource("C", ASTFactory.constructorName(ASTFactory.typeName4("C", []), null));
+ assertSource("C", AstFactory.constructorName(AstFactory.typeName4("C", []), null));
}
void test_visitConstructorName_unnamed_prefix() {
- assertSource("p.C", ASTFactory.constructorName(ASTFactory.typeName3(ASTFactory.identifier5("p", "C"), []), null));
+ assertSource("p.C", AstFactory.constructorName(AstFactory.typeName3(AstFactory.identifier5("p", "C"), []), null));
}
void test_visitContinueStatement_label() {
- assertSource("continue l;", ASTFactory.continueStatement2("l"));
+ assertSource("continue l;", AstFactory.continueStatement2("l"));
}
void test_visitContinueStatement_noLabel() {
- assertSource("continue;", ASTFactory.continueStatement());
+ assertSource("continue;", AstFactory.continueStatement());
}
void test_visitDefaultFormalParameter_named_noValue() {
- assertSource("p", ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("p"), null));
+ assertSource("p", AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("p"), null));
}
void test_visitDefaultFormalParameter_named_value() {
- assertSource("p : 0", ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("p"), ASTFactory.integer(0)));
+ assertSource("p : 0", AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0)));
}
void test_visitDefaultFormalParameter_positional_noValue() {
- assertSource("p", ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("p"), null));
+ assertSource("p", AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("p"), null));
}
void test_visitDefaultFormalParameter_positional_value() {
- assertSource("p = 0", ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("p"), ASTFactory.integer(0)));
+ assertSource("p = 0", AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0)));
}
void test_visitDoStatement() {
- assertSource("do {} while (c);", ASTFactory.doStatement(ASTFactory.block([]), ASTFactory.identifier3("c")));
+ assertSource("do {} while (c);", AstFactory.doStatement(AstFactory.block([]), AstFactory.identifier3("c")));
}
void test_visitDoubleLiteral() {
- assertSource("4.2", ASTFactory.doubleLiteral(4.2));
+ assertSource("4.2", AstFactory.doubleLiteral(4.2));
}
void test_visitEmptyFunctionBody() {
- assertSource(";", ASTFactory.emptyFunctionBody());
+ assertSource(";", AstFactory.emptyFunctionBody());
}
void test_visitEmptyStatement() {
- assertSource(";", ASTFactory.emptyStatement());
+ assertSource(";", AstFactory.emptyStatement());
}
void test_visitExportDirective_combinator() {
- assertSource("export 'a.dart' show A;", ASTFactory.exportDirective2("a.dart", [ASTFactory.showCombinator([ASTFactory.identifier3("A")])]));
+ assertSource("export 'a.dart' show A;", AstFactory.exportDirective2("a.dart", [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
}
void test_visitExportDirective_combinators() {
- assertSource("export 'a.dart' show A hide B;", ASTFactory.exportDirective2("a.dart", [
- ASTFactory.showCombinator([ASTFactory.identifier3("A")]),
- ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
+ assertSource("export 'a.dart' show A hide B;", AstFactory.exportDirective2("a.dart", [
+ AstFactory.showCombinator([AstFactory.identifier3("A")]),
+ AstFactory.hideCombinator([AstFactory.identifier3("B")])]));
}
void test_visitExportDirective_minimal() {
- assertSource("export 'a.dart';", ASTFactory.exportDirective2("a.dart", []));
+ assertSource("export 'a.dart';", AstFactory.exportDirective2("a.dart", []));
}
void test_visitExpressionFunctionBody() {
- assertSource("=> a;", ASTFactory.expressionFunctionBody(ASTFactory.identifier3("a")));
+ assertSource("=> a;", AstFactory.expressionFunctionBody(AstFactory.identifier3("a")));
}
void test_visitExpressionStatement() {
- assertSource("a;", ASTFactory.expressionStatement(ASTFactory.identifier3("a")));
+ assertSource("a;", AstFactory.expressionStatement(AstFactory.identifier3("a")));
}
void test_visitExtendsClause() {
- assertSource("extends C", ASTFactory.extendsClause(ASTFactory.typeName4("C", [])));
+ assertSource("extends C", AstFactory.extendsClause(AstFactory.typeName4("C", [])));
}
void test_visitFieldDeclaration_instance() {
- assertSource("var a;", ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("a")]));
+ assertSource("var a;", AstFactory.fieldDeclaration2(false, Keyword.VAR, [AstFactory.variableDeclaration("a")]));
}
void test_visitFieldDeclaration_static() {
- assertSource("static var a;", ASTFactory.fieldDeclaration2(true, Keyword.VAR, [ASTFactory.variableDeclaration("a")]));
+ assertSource("static var a;", AstFactory.fieldDeclaration2(true, Keyword.VAR, [AstFactory.variableDeclaration("a")]));
}
void test_visitFieldFormalParameter_functionTyped() {
- assertSource("A this.a(b)", ASTFactory.fieldFormalParameter2(null, ASTFactory.typeName4("A", []), "a", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("b")])));
+ assertSource("A this.a(b)", AstFactory.fieldFormalParameter2(null, AstFactory.typeName4("A", []), "a", AstFactory.formalParameterList([AstFactory.simpleFormalParameter3("b")])));
}
void test_visitFieldFormalParameter_keyword() {
- assertSource("var this.a", ASTFactory.fieldFormalParameter(Keyword.VAR, null, "a"));
+ assertSource("var this.a", AstFactory.fieldFormalParameter(Keyword.VAR, null, "a"));
}
void test_visitFieldFormalParameter_keywordAndType() {
- assertSource("final A this.a", ASTFactory.fieldFormalParameter(Keyword.FINAL, ASTFactory.typeName4("A", []), "a"));
+ assertSource("final A this.a", AstFactory.fieldFormalParameter(Keyword.FINAL, AstFactory.typeName4("A", []), "a"));
}
void test_visitFieldFormalParameter_type() {
- assertSource("A this.a", ASTFactory.fieldFormalParameter(null, ASTFactory.typeName4("A", []), "a"));
+ assertSource("A this.a", AstFactory.fieldFormalParameter(null, AstFactory.typeName4("A", []), "a"));
}
void test_visitForEachStatement() {
- assertSource("for (a in b) {}", ASTFactory.forEachStatement(ASTFactory.declaredIdentifier3("a"), ASTFactory.identifier3("b"), ASTFactory.block([])));
+ assertSource("for (a in b) {}", AstFactory.forEachStatement(AstFactory.declaredIdentifier3("a"), AstFactory.identifier3("b"), AstFactory.block([])));
}
void test_visitFormalParameterList_empty() {
- assertSource("()", ASTFactory.formalParameterList([]));
+ assertSource("()", AstFactory.formalParameterList([]));
}
void test_visitFormalParameterList_n() {
- assertSource("({a : 0})", ASTFactory.formalParameterList([ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0))]));
+ assertSource("({a : 0})", AstFactory.formalParameterList([AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0))]));
}
void test_visitFormalParameterList_nn() {
- assertSource("({a : 0, b : 1})", ASTFactory.formalParameterList([
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0)),
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+ assertSource("({a : 0, b : 1})", AstFactory.formalParameterList([
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0)),
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))]));
}
void test_visitFormalParameterList_p() {
- assertSource("([a = 0])", ASTFactory.formalParameterList([ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0))]));
+ assertSource("([a = 0])", AstFactory.formalParameterList([AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0))]));
}
void test_visitFormalParameterList_pp() {
- assertSource("([a = 0, b = 1])", ASTFactory.formalParameterList([
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0)),
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+ assertSource("([a = 0, b = 1])", AstFactory.formalParameterList([
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0)),
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))]));
}
void test_visitFormalParameterList_r() {
- assertSource("(a)", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a")]));
+ assertSource("(a)", AstFactory.formalParameterList([AstFactory.simpleFormalParameter3("a")]));
}
void test_visitFormalParameterList_rn() {
- assertSource("(a, {b : 1})", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+ assertSource("(a, {b : 1})", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))]));
}
void test_visitFormalParameterList_rnn() {
- assertSource("(a, {b : 1, c : 2})", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1)),
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(2))]));
+ assertSource("(a, {b : 1, c : 2})", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1)),
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("c"), AstFactory.integer(2))]));
}
void test_visitFormalParameterList_rp() {
- assertSource("(a, [b = 1])", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+ assertSource("(a, [b = 1])", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))]));
}
void test_visitFormalParameterList_rpp() {
- assertSource("(a, [b = 1, c = 2])", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1)),
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(2))]));
+ assertSource("(a, [b = 1, c = 2])", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1)),
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("c"), AstFactory.integer(2))]));
}
void test_visitFormalParameterList_rr() {
- assertSource("(a, b)", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.simpleFormalParameter3("b")]));
+ assertSource("(a, b)", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.simpleFormalParameter3("b")]));
}
void test_visitFormalParameterList_rrn() {
- assertSource("(a, b, {c : 3})", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.simpleFormalParameter3("b"),
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3))]));
+ assertSource("(a, b, {c : 3})", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.simpleFormalParameter3("b"),
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3))]));
}
void test_visitFormalParameterList_rrnn() {
- assertSource("(a, b, {c : 3, d : 4})", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.simpleFormalParameter3("b"),
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3)),
- ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("d"), ASTFactory.integer(4))]));
+ assertSource("(a, b, {c : 3, d : 4})", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.simpleFormalParameter3("b"),
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3)),
+ AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("d"), AstFactory.integer(4))]));
}
void test_visitFormalParameterList_rrp() {
- assertSource("(a, b, [c = 3])", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.simpleFormalParameter3("b"),
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3))]));
+ assertSource("(a, b, [c = 3])", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.simpleFormalParameter3("b"),
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3))]));
}
void test_visitFormalParameterList_rrpp() {
- assertSource("(a, b, [c = 3, d = 4])", ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter3("a"),
- ASTFactory.simpleFormalParameter3("b"),
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3)),
- ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("d"), ASTFactory.integer(4))]));
+ assertSource("(a, b, [c = 3, d = 4])", AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter3("a"),
+ AstFactory.simpleFormalParameter3("b"),
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3)),
+ AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("d"), AstFactory.integer(4))]));
}
void test_visitForStatement_c() {
- assertSource("for (; c;) {}", ASTFactory.forStatement(null, ASTFactory.identifier3("c"), null, ASTFactory.block([])));
+ assertSource("for (; c;) {}", AstFactory.forStatement(null, AstFactory.identifier3("c"), null, AstFactory.block([])));
}
void test_visitForStatement_cu() {
- assertSource("for (; c; u) {}", ASTFactory.forStatement(null, ASTFactory.identifier3("c"), ASTFactory.list([ASTFactory.identifier3("u")]), ASTFactory.block([])));
+ assertSource("for (; c; u) {}", AstFactory.forStatement(null, AstFactory.identifier3("c"), AstFactory.list([AstFactory.identifier3("u")]), AstFactory.block([])));
}
void test_visitForStatement_e() {
- assertSource("for (e;;) {}", ASTFactory.forStatement(ASTFactory.identifier3("e"), null, null, ASTFactory.block([])));
+ assertSource("for (e;;) {}", AstFactory.forStatement(AstFactory.identifier3("e"), null, null, AstFactory.block([])));
}
void test_visitForStatement_ec() {
- assertSource("for (e; c;) {}", ASTFactory.forStatement(ASTFactory.identifier3("e"), ASTFactory.identifier3("c"), null, ASTFactory.block([])));
+ assertSource("for (e; c;) {}", AstFactory.forStatement(AstFactory.identifier3("e"), AstFactory.identifier3("c"), null, AstFactory.block([])));
}
void test_visitForStatement_ecu() {
- assertSource("for (e; c; u) {}", ASTFactory.forStatement(ASTFactory.identifier3("e"), ASTFactory.identifier3("c"), ASTFactory.list([ASTFactory.identifier3("u")]), ASTFactory.block([])));
+ assertSource("for (e; c; u) {}", AstFactory.forStatement(AstFactory.identifier3("e"), AstFactory.identifier3("c"), AstFactory.list([AstFactory.identifier3("u")]), AstFactory.block([])));
}
void test_visitForStatement_eu() {
- assertSource("for (e;; u) {}", ASTFactory.forStatement(ASTFactory.identifier3("e"), null, ASTFactory.list([ASTFactory.identifier3("u")]), ASTFactory.block([])));
+ assertSource("for (e;; u) {}", AstFactory.forStatement(AstFactory.identifier3("e"), null, AstFactory.list([AstFactory.identifier3("u")]), AstFactory.block([])));
}
void test_visitForStatement_i() {
- assertSource("for (var i;;) {}", ASTFactory.forStatement2(ASTFactory.variableDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), null, null, ASTFactory.block([])));
+ assertSource("for (var i;;) {}", AstFactory.forStatement2(AstFactory.variableDeclarationList2(Keyword.VAR, [AstFactory.variableDeclaration("i")]), null, null, AstFactory.block([])));
}
void test_visitForStatement_ic() {
- assertSource("for (var i; c;) {}", ASTFactory.forStatement2(ASTFactory.variableDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), ASTFactory.identifier3("c"), null, ASTFactory.block([])));
+ assertSource("for (var i; c;) {}", AstFactory.forStatement2(AstFactory.variableDeclarationList2(Keyword.VAR, [AstFactory.variableDeclaration("i")]), AstFactory.identifier3("c"), null, AstFactory.block([])));
}
void test_visitForStatement_icu() {
- assertSource("for (var i; c; u) {}", ASTFactory.forStatement2(ASTFactory.variableDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), ASTFactory.identifier3("c"), ASTFactory.list([ASTFactory.identifier3("u")]), ASTFactory.block([])));
+ assertSource("for (var i; c; u) {}", AstFactory.forStatement2(AstFactory.variableDeclarationList2(Keyword.VAR, [AstFactory.variableDeclaration("i")]), AstFactory.identifier3("c"), AstFactory.list([AstFactory.identifier3("u")]), AstFactory.block([])));
}
void test_visitForStatement_iu() {
- assertSource("for (var i;; u) {}", ASTFactory.forStatement2(ASTFactory.variableDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), null, ASTFactory.list([ASTFactory.identifier3("u")]), ASTFactory.block([])));
+ assertSource("for (var i;; u) {}", AstFactory.forStatement2(AstFactory.variableDeclarationList2(Keyword.VAR, [AstFactory.variableDeclaration("i")]), null, AstFactory.list([AstFactory.identifier3("u")]), AstFactory.block([])));
}
void test_visitForStatement_u() {
- assertSource("for (;; u) {}", ASTFactory.forStatement(null, null, ASTFactory.list([ASTFactory.identifier3("u")]), ASTFactory.block([])));
+ assertSource("for (;; u) {}", AstFactory.forStatement(null, null, AstFactory.list([AstFactory.identifier3("u")]), AstFactory.block([])));
}
void test_visitFunctionDeclaration_getter() {
- assertSource("get f() {}", ASTFactory.functionDeclaration(null, Keyword.GET, "f", ASTFactory.functionExpression()));
+ assertSource("get f() {}", AstFactory.functionDeclaration(null, Keyword.GET, "f", AstFactory.functionExpression()));
}
void test_visitFunctionDeclaration_normal() {
- assertSource("f() {}", ASTFactory.functionDeclaration(null, null, "f", ASTFactory.functionExpression()));
+ assertSource("f() {}", AstFactory.functionDeclaration(null, null, "f", AstFactory.functionExpression()));
}
void test_visitFunctionDeclaration_setter() {
- assertSource("set f() {}", ASTFactory.functionDeclaration(null, Keyword.SET, "f", ASTFactory.functionExpression()));
+ assertSource("set f() {}", AstFactory.functionDeclaration(null, Keyword.SET, "f", AstFactory.functionExpression()));
}
void test_visitFunctionDeclarationStatement() {
- assertSource("f() {};", ASTFactory.functionDeclarationStatement(null, null, "f", ASTFactory.functionExpression()));
+ assertSource("f() {};", AstFactory.functionDeclarationStatement(null, null, "f", AstFactory.functionExpression()));
}
void test_visitFunctionExpression() {
- assertSource("() {}", ASTFactory.functionExpression());
+ assertSource("() {}", AstFactory.functionExpression());
}
void test_visitFunctionExpressionInvocation() {
- assertSource("f()", ASTFactory.functionExpressionInvocation(ASTFactory.identifier3("f"), []));
+ assertSource("f()", AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"), []));
}
void test_visitFunctionTypedFormalParameter_noType() {
- assertSource("f()", ASTFactory.functionTypedFormalParameter(null, "f", []));
+ assertSource("f()", AstFactory.functionTypedFormalParameter(null, "f", []));
}
void test_visitFunctionTypedFormalParameter_type() {
- assertSource("T f()", ASTFactory.functionTypedFormalParameter(ASTFactory.typeName4("T", []), "f", []));
+ assertSource("T f()", AstFactory.functionTypedFormalParameter(AstFactory.typeName4("T", []), "f", []));
}
void test_visitIfStatement_withElse() {
- assertSource("if (c) {} else {}", ASTFactory.ifStatement2(ASTFactory.identifier3("c"), ASTFactory.block([]), ASTFactory.block([])));
+ assertSource("if (c) {} else {}", AstFactory.ifStatement2(AstFactory.identifier3("c"), AstFactory.block([]), AstFactory.block([])));
}
void test_visitIfStatement_withoutElse() {
- assertSource("if (c) {}", ASTFactory.ifStatement(ASTFactory.identifier3("c"), ASTFactory.block([])));
+ assertSource("if (c) {}", AstFactory.ifStatement(AstFactory.identifier3("c"), AstFactory.block([])));
}
void test_visitImplementsClause_multiple() {
- assertSource("implements A, B", ASTFactory.implementsClause([
- ASTFactory.typeName4("A", []),
- ASTFactory.typeName4("B", [])]));
+ assertSource("implements A, B", AstFactory.implementsClause([
+ AstFactory.typeName4("A", []),
+ AstFactory.typeName4("B", [])]));
}
void test_visitImplementsClause_single() {
- assertSource("implements A", ASTFactory.implementsClause([ASTFactory.typeName4("A", [])]));
+ assertSource("implements A", AstFactory.implementsClause([AstFactory.typeName4("A", [])]));
}
void test_visitImportDirective_combinator() {
- assertSource("import 'a.dart' show A;", ASTFactory.importDirective2("a.dart", null, [ASTFactory.showCombinator([ASTFactory.identifier3("A")])]));
+ assertSource("import 'a.dart' show A;", AstFactory.importDirective2("a.dart", null, [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
}
void test_visitImportDirective_combinators() {
- assertSource("import 'a.dart' show A hide B;", ASTFactory.importDirective2("a.dart", null, [
- ASTFactory.showCombinator([ASTFactory.identifier3("A")]),
- ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
+ assertSource("import 'a.dart' show A hide B;", AstFactory.importDirective2("a.dart", null, [
+ AstFactory.showCombinator([AstFactory.identifier3("A")]),
+ AstFactory.hideCombinator([AstFactory.identifier3("B")])]));
}
void test_visitImportDirective_minimal() {
- assertSource("import 'a.dart';", ASTFactory.importDirective2("a.dart", null, []));
+ assertSource("import 'a.dart';", AstFactory.importDirective2("a.dart", null, []));
}
void test_visitImportDirective_prefix() {
- assertSource("import 'a.dart' as p;", ASTFactory.importDirective2("a.dart", "p", []));
+ assertSource("import 'a.dart' as p;", AstFactory.importDirective2("a.dart", "p", []));
}
void test_visitImportDirective_prefix_combinator() {
- assertSource("import 'a.dart' as p show A;", ASTFactory.importDirective2("a.dart", "p", [ASTFactory.showCombinator([ASTFactory.identifier3("A")])]));
+ assertSource("import 'a.dart' as p show A;", AstFactory.importDirective2("a.dart", "p", [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
}
void test_visitImportDirective_prefix_combinators() {
- assertSource("import 'a.dart' as p show A hide B;", ASTFactory.importDirective2("a.dart", "p", [
- ASTFactory.showCombinator([ASTFactory.identifier3("A")]),
- ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
+ assertSource("import 'a.dart' as p show A hide B;", AstFactory.importDirective2("a.dart", "p", [
+ AstFactory.showCombinator([AstFactory.identifier3("A")]),
+ AstFactory.hideCombinator([AstFactory.identifier3("B")])]));
}
void test_visitImportHideCombinator_multiple() {
- assertSource("hide a, b", ASTFactory.hideCombinator([ASTFactory.identifier3("a"), ASTFactory.identifier3("b")]));
+ assertSource("hide a, b", AstFactory.hideCombinator([AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
}
void test_visitImportHideCombinator_single() {
- assertSource("hide a", ASTFactory.hideCombinator([ASTFactory.identifier3("a")]));
+ assertSource("hide a", AstFactory.hideCombinator([AstFactory.identifier3("a")]));
}
void test_visitImportShowCombinator_multiple() {
- assertSource("show a, b", ASTFactory.showCombinator([ASTFactory.identifier3("a"), ASTFactory.identifier3("b")]));
+ assertSource("show a, b", AstFactory.showCombinator([AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
}
void test_visitImportShowCombinator_single() {
- assertSource("show a", ASTFactory.showCombinator([ASTFactory.identifier3("a")]));
+ assertSource("show a", AstFactory.showCombinator([AstFactory.identifier3("a")]));
}
void test_visitIndexExpression() {
- assertSource("a[i]", ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.identifier3("i")));
+ assertSource("a[i]", AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("i")));
}
void test_visitInstanceCreationExpression_const() {
- assertSource("const C()", ASTFactory.instanceCreationExpression2(Keyword.CONST, ASTFactory.typeName4("C", []), []));
+ assertSource("const C()", AstFactory.instanceCreationExpression2(Keyword.CONST, AstFactory.typeName4("C", []), []));
}
void test_visitInstanceCreationExpression_named() {
- assertSource("new C.c()", ASTFactory.instanceCreationExpression3(Keyword.NEW, ASTFactory.typeName4("C", []), "c", []));
+ assertSource("new C.c()", AstFactory.instanceCreationExpression3(Keyword.NEW, AstFactory.typeName4("C", []), "c", []));
}
void test_visitInstanceCreationExpression_unnamed() {
- assertSource("new C()", ASTFactory.instanceCreationExpression2(Keyword.NEW, ASTFactory.typeName4("C", []), []));
+ assertSource("new C()", AstFactory.instanceCreationExpression2(Keyword.NEW, AstFactory.typeName4("C", []), []));
}
void test_visitIntegerLiteral() {
- assertSource("42", ASTFactory.integer(42));
+ assertSource("42", AstFactory.integer(42));
}
void test_visitInterpolationExpression_expression() {
- assertSource("\${a}", ASTFactory.interpolationExpression(ASTFactory.identifier3("a")));
+ assertSource("\${a}", AstFactory.interpolationExpression(AstFactory.identifier3("a")));
}
void test_visitInterpolationExpression_identifier() {
- assertSource("\$a", ASTFactory.interpolationExpression2("a"));
+ assertSource("\$a", AstFactory.interpolationExpression2("a"));
}
void test_visitInterpolationString() {
- assertSource("'x", ASTFactory.interpolationString("'x", "x"));
+ assertSource("'x", AstFactory.interpolationString("'x", "x"));
}
void test_visitIsExpression_negated() {
- assertSource("a is! C", ASTFactory.isExpression(ASTFactory.identifier3("a"), true, ASTFactory.typeName4("C", [])));
+ assertSource("a is! C", AstFactory.isExpression(AstFactory.identifier3("a"), true, AstFactory.typeName4("C", [])));
}
void test_visitIsExpression_normal() {
- assertSource("a is C", ASTFactory.isExpression(ASTFactory.identifier3("a"), false, ASTFactory.typeName4("C", [])));
+ assertSource("a is C", AstFactory.isExpression(AstFactory.identifier3("a"), false, AstFactory.typeName4("C", [])));
}
void test_visitLabel() {
- assertSource("a:", ASTFactory.label2("a"));
+ assertSource("a:", AstFactory.label2("a"));
}
void test_visitLabeledStatement_multiple() {
- assertSource("a: b: return;", ASTFactory.labeledStatement(ASTFactory.list([ASTFactory.label2("a"), ASTFactory.label2("b")]), ASTFactory.returnStatement()));
+ assertSource("a: b: return;", AstFactory.labeledStatement(AstFactory.list([AstFactory.label2("a"), AstFactory.label2("b")]), AstFactory.returnStatement()));
}
void test_visitLabeledStatement_single() {
- assertSource("a: return;", ASTFactory.labeledStatement(ASTFactory.list([ASTFactory.label2("a")]), ASTFactory.returnStatement()));
+ assertSource("a: return;", AstFactory.labeledStatement(AstFactory.list([AstFactory.label2("a")]), AstFactory.returnStatement()));
}
void test_visitLibraryDirective() {
- assertSource("library l;", ASTFactory.libraryDirective2("l"));
+ assertSource("library l;", AstFactory.libraryDirective2("l"));
}
void test_visitLibraryIdentifier_multiple() {
- assertSource("a.b.c", ASTFactory.libraryIdentifier([
- ASTFactory.identifier3("a"),
- ASTFactory.identifier3("b"),
- ASTFactory.identifier3("c")]));
+ assertSource("a.b.c", AstFactory.libraryIdentifier([
+ AstFactory.identifier3("a"),
+ AstFactory.identifier3("b"),
+ AstFactory.identifier3("c")]));
}
void test_visitLibraryIdentifier_single() {
- assertSource("a", ASTFactory.libraryIdentifier([ASTFactory.identifier3("a")]));
+ assertSource("a", AstFactory.libraryIdentifier([AstFactory.identifier3("a")]));
}
void test_visitListLiteral_const() {
- assertSource("const []", ASTFactory.listLiteral2(Keyword.CONST, null, []));
+ assertSource("const []", AstFactory.listLiteral2(Keyword.CONST, null, []));
}
void test_visitListLiteral_empty() {
- assertSource("[]", ASTFactory.listLiteral([]));
+ assertSource("[]", AstFactory.listLiteral([]));
}
void test_visitListLiteral_nonEmpty() {
- assertSource("[a, b, c]", ASTFactory.listLiteral([
- ASTFactory.identifier3("a"),
- ASTFactory.identifier3("b"),
- ASTFactory.identifier3("c")]));
+ assertSource("[a, b, c]", AstFactory.listLiteral([
+ AstFactory.identifier3("a"),
+ AstFactory.identifier3("b"),
+ AstFactory.identifier3("c")]));
}
void test_visitMapLiteral_const() {
- assertSource("const {}", ASTFactory.mapLiteral(Keyword.CONST, null, []));
+ assertSource("const {}", AstFactory.mapLiteral(Keyword.CONST, null, []));
}
void test_visitMapLiteral_empty() {
- assertSource("{}", ASTFactory.mapLiteral2([]));
+ assertSource("{}", AstFactory.mapLiteral2([]));
}
void test_visitMapLiteral_nonEmpty() {
- assertSource("{'a' : a, 'b' : b, 'c' : c}", ASTFactory.mapLiteral2([
- ASTFactory.mapLiteralEntry("a", ASTFactory.identifier3("a")),
- ASTFactory.mapLiteralEntry("b", ASTFactory.identifier3("b")),
- ASTFactory.mapLiteralEntry("c", ASTFactory.identifier3("c"))]));
+ assertSource("{'a' : a, 'b' : b, 'c' : c}", AstFactory.mapLiteral2([
+ AstFactory.mapLiteralEntry("a", AstFactory.identifier3("a")),
+ AstFactory.mapLiteralEntry("b", AstFactory.identifier3("b")),
+ AstFactory.mapLiteralEntry("c", AstFactory.identifier3("c"))]));
}
void test_visitMapLiteralEntry() {
- assertSource("'a' : b", ASTFactory.mapLiteralEntry("a", ASTFactory.identifier3("b")));
+ assertSource("'a' : b", AstFactory.mapLiteralEntry("a", AstFactory.identifier3("b")));
}
void test_visitMethodDeclaration_external() {
- assertSource("external m();", ASTFactory.methodDeclaration(null, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([])));
+ assertSource("external m();", AstFactory.methodDeclaration(null, null, null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([])));
}
void test_visitMethodDeclaration_external_returnType() {
- assertSource("external T m();", ASTFactory.methodDeclaration(null, ASTFactory.typeName4("T", []), null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([])));
+ assertSource("external T m();", AstFactory.methodDeclaration(null, AstFactory.typeName4("T", []), null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([])));
}
void test_visitMethodDeclaration_getter() {
- assertSource("get m {}", ASTFactory.methodDeclaration2(null, null, Keyword.GET, null, ASTFactory.identifier3("m"), null, ASTFactory.blockFunctionBody2([])));
+ assertSource("get m {}", AstFactory.methodDeclaration2(null, null, Keyword.GET, null, AstFactory.identifier3("m"), null, AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_getter_returnType() {
- assertSource("T get m {}", ASTFactory.methodDeclaration2(null, ASTFactory.typeName4("T", []), Keyword.GET, null, ASTFactory.identifier3("m"), null, ASTFactory.blockFunctionBody2([])));
+ assertSource("T get m {}", AstFactory.methodDeclaration2(null, AstFactory.typeName4("T", []), Keyword.GET, null, AstFactory.identifier3("m"), null, AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_getter_seturnType() {
- assertSource("T set m(var v) {}", ASTFactory.methodDeclaration2(null, ASTFactory.typeName4("T", []), Keyword.SET, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter(Keyword.VAR, "v")]), ASTFactory.blockFunctionBody2([])));
+ assertSource("T set m(var v) {}", AstFactory.methodDeclaration2(null, AstFactory.typeName4("T", []), Keyword.SET, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([AstFactory.simpleFormalParameter(Keyword.VAR, "v")]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_minimal() {
- assertSource("m() {}", ASTFactory.methodDeclaration2(null, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody2([])));
+ assertSource("m() {}", AstFactory.methodDeclaration2(null, null, null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_multipleParameters() {
- assertSource("m(var a, var b) {}", ASTFactory.methodDeclaration2(null, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([
- ASTFactory.simpleFormalParameter(Keyword.VAR, "a"),
- ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), ASTFactory.blockFunctionBody2([])));
+ assertSource("m(var a, var b) {}", AstFactory.methodDeclaration2(null, null, null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([
+ AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+ AstFactory.simpleFormalParameter(Keyword.VAR, "b")]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_operator() {
- assertSource("operator +() {}", ASTFactory.methodDeclaration2(null, null, null, Keyword.OPERATOR, ASTFactory.identifier3("+"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody2([])));
+ assertSource("operator +() {}", AstFactory.methodDeclaration2(null, null, null, Keyword.OPERATOR, AstFactory.identifier3("+"), AstFactory.formalParameterList([]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_operator_returnType() {
- assertSource("T operator +() {}", ASTFactory.methodDeclaration2(null, ASTFactory.typeName4("T", []), null, Keyword.OPERATOR, ASTFactory.identifier3("+"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody2([])));
+ assertSource("T operator +() {}", AstFactory.methodDeclaration2(null, AstFactory.typeName4("T", []), null, Keyword.OPERATOR, AstFactory.identifier3("+"), AstFactory.formalParameterList([]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_returnType() {
- assertSource("T m() {}", ASTFactory.methodDeclaration2(null, ASTFactory.typeName4("T", []), null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody2([])));
+ assertSource("T m() {}", AstFactory.methodDeclaration2(null, AstFactory.typeName4("T", []), null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_setter() {
- assertSource("set m(var v) {}", ASTFactory.methodDeclaration2(null, null, Keyword.SET, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter(Keyword.VAR, "v")]), ASTFactory.blockFunctionBody2([])));
+ assertSource("set m(var v) {}", AstFactory.methodDeclaration2(null, null, Keyword.SET, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([AstFactory.simpleFormalParameter(Keyword.VAR, "v")]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_static() {
- assertSource("static m() {}", ASTFactory.methodDeclaration2(Keyword.STATIC, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody2([])));
+ assertSource("static m() {}", AstFactory.methodDeclaration2(Keyword.STATIC, null, null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodDeclaration_static_returnType() {
- assertSource("static T m() {}", ASTFactory.methodDeclaration2(Keyword.STATIC, ASTFactory.typeName4("T", []), null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody2([])));
+ assertSource("static T m() {}", AstFactory.methodDeclaration2(Keyword.STATIC, AstFactory.typeName4("T", []), null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([]), AstFactory.blockFunctionBody2([])));
}
void test_visitMethodInvocation_noTarget() {
- assertSource("m()", ASTFactory.methodInvocation2("m", []));
+ assertSource("m()", AstFactory.methodInvocation2("m", []));
}
void test_visitMethodInvocation_target() {
- assertSource("t.m()", ASTFactory.methodInvocation(ASTFactory.identifier3("t"), "m", []));
+ assertSource("t.m()", AstFactory.methodInvocation(AstFactory.identifier3("t"), "m", []));
}
void test_visitNamedExpression() {
- assertSource("a: b", ASTFactory.namedExpression2("a", ASTFactory.identifier3("b")));
+ assertSource("a: b", AstFactory.namedExpression2("a", AstFactory.identifier3("b")));
}
void test_visitNamedFormalParameter() {
- assertSource("var a : 0", ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter(Keyword.VAR, "a"), ASTFactory.integer(0)));
+ assertSource("var a : 0", AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter(Keyword.VAR, "a"), AstFactory.integer(0)));
}
void test_visitNativeClause() {
- assertSource("native 'code'", ASTFactory.nativeClause("code"));
+ assertSource("native 'code'", AstFactory.nativeClause("code"));
}
void test_visitNativeFunctionBody() {
- assertSource("native 'str';", ASTFactory.nativeFunctionBody("str"));
+ assertSource("native 'str';", AstFactory.nativeFunctionBody("str"));
}
void test_visitNullLiteral() {
- assertSource("null", ASTFactory.nullLiteral());
+ assertSource("null", AstFactory.nullLiteral());
}
void test_visitParenthesizedExpression() {
- assertSource("(a)", ASTFactory.parenthesizedExpression(ASTFactory.identifier3("a")));
+ assertSource("(a)", AstFactory.parenthesizedExpression(AstFactory.identifier3("a")));
}
void test_visitPartDirective() {
- assertSource("part 'a.dart';", ASTFactory.partDirective2("a.dart"));
+ assertSource("part 'a.dart';", AstFactory.partDirective2("a.dart"));
}
void test_visitPartOfDirective() {
- assertSource("part of l;", ASTFactory.partOfDirective(ASTFactory.libraryIdentifier2(["l"])));
+ assertSource("part of l;", AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["l"])));
}
void test_visitPositionalFormalParameter() {
- assertSource("var a = 0", ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter(Keyword.VAR, "a"), ASTFactory.integer(0)));
+ assertSource("var a = 0", AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter(Keyword.VAR, "a"), AstFactory.integer(0)));
}
void test_visitPostfixExpression() {
- assertSource("a++", ASTFactory.postfixExpression(ASTFactory.identifier3("a"), TokenType.PLUS_PLUS));
+ assertSource("a++", AstFactory.postfixExpression(AstFactory.identifier3("a"), TokenType.PLUS_PLUS));
}
void test_visitPrefixedIdentifier() {
- assertSource("a.b", ASTFactory.identifier5("a", "b"));
+ assertSource("a.b", AstFactory.identifier5("a", "b"));
}
void test_visitPrefixExpression() {
- assertSource("-a", ASTFactory.prefixExpression(TokenType.MINUS, ASTFactory.identifier3("a")));
+ assertSource("-a", AstFactory.prefixExpression(TokenType.MINUS, AstFactory.identifier3("a")));
}
void test_visitPropertyAccess() {
- assertSource("a.b", ASTFactory.propertyAccess2(ASTFactory.identifier3("a"), "b"));
+ assertSource("a.b", AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b"));
}
void test_visitRedirectingConstructorInvocation_named() {
- assertSource("this.c()", ASTFactory.redirectingConstructorInvocation2("c", []));
+ assertSource("this.c()", AstFactory.redirectingConstructorInvocation2("c", []));
}
void test_visitRedirectingConstructorInvocation_unnamed() {
- assertSource("this()", ASTFactory.redirectingConstructorInvocation([]));
+ assertSource("this()", AstFactory.redirectingConstructorInvocation([]));
}
void test_visitRethrowExpression() {
- assertSource("rethrow", ASTFactory.rethrowExpression());
+ assertSource("rethrow", AstFactory.rethrowExpression());
}
void test_visitReturnStatement_expression() {
- assertSource("return a;", ASTFactory.returnStatement2(ASTFactory.identifier3("a")));
+ assertSource("return a;", AstFactory.returnStatement2(AstFactory.identifier3("a")));
}
void test_visitReturnStatement_noExpression() {
- assertSource("return;", ASTFactory.returnStatement());
+ assertSource("return;", AstFactory.returnStatement());
}
void test_visitScriptTag() {
String scriptTag = "!#/bin/dart.exe";
- assertSource(scriptTag, ASTFactory.scriptTag(scriptTag));
+ assertSource(scriptTag, AstFactory.scriptTag(scriptTag));
}
void test_visitSimpleFormalParameter_keyword() {
- assertSource("var a", ASTFactory.simpleFormalParameter(Keyword.VAR, "a"));
+ assertSource("var a", AstFactory.simpleFormalParameter(Keyword.VAR, "a"));
}
void test_visitSimpleFormalParameter_keyword_type() {
- assertSource("final A a", ASTFactory.simpleFormalParameter2(Keyword.FINAL, ASTFactory.typeName4("A", []), "a"));
+ assertSource("final A a", AstFactory.simpleFormalParameter2(Keyword.FINAL, AstFactory.typeName4("A", []), "a"));
}
void test_visitSimpleFormalParameter_type() {
- assertSource("A a", ASTFactory.simpleFormalParameter4(ASTFactory.typeName4("A", []), "a"));
+ assertSource("A a", AstFactory.simpleFormalParameter4(AstFactory.typeName4("A", []), "a"));
}
void test_visitSimpleIdentifier() {
- assertSource("a", ASTFactory.identifier3("a"));
+ assertSource("a", AstFactory.identifier3("a"));
}
void test_visitSimpleStringLiteral() {
- assertSource("'a'", ASTFactory.string2("a"));
+ assertSource("'a'", AstFactory.string2("a"));
}
void test_visitStringInterpolation() {
- assertSource("'a\${e}b'", ASTFactory.string([
- ASTFactory.interpolationString("'a", "a"),
- ASTFactory.interpolationExpression(ASTFactory.identifier3("e")),
- ASTFactory.interpolationString("b'", "b")]));
+ assertSource("'a\${e}b'", AstFactory.string([
+ AstFactory.interpolationString("'a", "a"),
+ AstFactory.interpolationExpression(AstFactory.identifier3("e")),
+ AstFactory.interpolationString("b'", "b")]));
}
void test_visitSuperConstructorInvocation() {
- assertSource("super()", ASTFactory.superConstructorInvocation([]));
+ assertSource("super()", AstFactory.superConstructorInvocation([]));
}
void test_visitSuperConstructorInvocation_named() {
- assertSource("super.c()", ASTFactory.superConstructorInvocation2("c", []));
+ assertSource("super.c()", AstFactory.superConstructorInvocation2("c", []));
}
void test_visitSuperExpression() {
- assertSource("super", ASTFactory.superExpression());
+ assertSource("super", AstFactory.superExpression());
}
void test_visitSwitchCase_multipleLabels() {
- assertSource("l1: l2: case a: {}", ASTFactory.switchCase2(ASTFactory.list([ASTFactory.label2("l1"), ASTFactory.label2("l2")]), ASTFactory.identifier3("a"), [ASTFactory.block([])]));
+ assertSource("l1: l2: case a: {}", AstFactory.switchCase2(AstFactory.list([AstFactory.label2("l1"), AstFactory.label2("l2")]), AstFactory.identifier3("a"), [AstFactory.block([])]));
}
void test_visitSwitchCase_multipleStatements() {
- assertSource("case a: {} {}", ASTFactory.switchCase(ASTFactory.identifier3("a"), [ASTFactory.block([]), ASTFactory.block([])]));
+ assertSource("case a: {} {}", AstFactory.switchCase(AstFactory.identifier3("a"), [AstFactory.block([]), AstFactory.block([])]));
}
void test_visitSwitchCase_noLabels() {
- assertSource("case a: {}", ASTFactory.switchCase(ASTFactory.identifier3("a"), [ASTFactory.block([])]));
+ assertSource("case a: {}", AstFactory.switchCase(AstFactory.identifier3("a"), [AstFactory.block([])]));
}
void test_visitSwitchCase_singleLabel() {
- assertSource("l1: case a: {}", ASTFactory.switchCase2(ASTFactory.list([ASTFactory.label2("l1")]), ASTFactory.identifier3("a"), [ASTFactory.block([])]));
+ assertSource("l1: case a: {}", AstFactory.switchCase2(AstFactory.list([AstFactory.label2("l1")]), AstFactory.identifier3("a"), [AstFactory.block([])]));
}
void test_visitSwitchDefault_multipleLabels() {
- assertSource("l1: l2: default: {}", ASTFactory.switchDefault(ASTFactory.list([ASTFactory.label2("l1"), ASTFactory.label2("l2")]), [ASTFactory.block([])]));
+ assertSource("l1: l2: default: {}", AstFactory.switchDefault(AstFactory.list([AstFactory.label2("l1"), AstFactory.label2("l2")]), [AstFactory.block([])]));
}
void test_visitSwitchDefault_multipleStatements() {
- assertSource("default: {} {}", ASTFactory.switchDefault2([ASTFactory.block([]), ASTFactory.block([])]));
+ assertSource("default: {} {}", AstFactory.switchDefault2([AstFactory.block([]), AstFactory.block([])]));
}
void test_visitSwitchDefault_noLabels() {
- assertSource("default: {}", ASTFactory.switchDefault2([ASTFactory.block([])]));
+ assertSource("default: {}", AstFactory.switchDefault2([AstFactory.block([])]));
}
void test_visitSwitchDefault_singleLabel() {
- assertSource("l1: default: {}", ASTFactory.switchDefault(ASTFactory.list([ASTFactory.label2("l1")]), [ASTFactory.block([])]));
+ assertSource("l1: default: {}", AstFactory.switchDefault(AstFactory.list([AstFactory.label2("l1")]), [AstFactory.block([])]));
}
void test_visitSwitchStatement() {
- assertSource("switch (a) {case 'b': {} default: {}}", ASTFactory.switchStatement(ASTFactory.identifier3("a"), [
- ASTFactory.switchCase(ASTFactory.string2("b"), [ASTFactory.block([])]),
- ASTFactory.switchDefault2([ASTFactory.block([])])]));
+ assertSource("switch (a) {case 'b': {} default: {}}", AstFactory.switchStatement(AstFactory.identifier3("a"), [
+ AstFactory.switchCase(AstFactory.string2("b"), [AstFactory.block([])]),
+ AstFactory.switchDefault2([AstFactory.block([])])]));
}
void test_visitSymbolLiteral_multiple() {
- assertSource("#a.b.c", ASTFactory.symbolLiteral(["a", "b", "c"]));
+ assertSource("#a.b.c", AstFactory.symbolLiteral(["a", "b", "c"]));
}
void test_visitSymbolLiteral_single() {
- assertSource("#a", ASTFactory.symbolLiteral(["a"]));
+ assertSource("#a", AstFactory.symbolLiteral(["a"]));
}
void test_visitThisExpression() {
- assertSource("this", ASTFactory.thisExpression());
+ assertSource("this", AstFactory.thisExpression());
}
void test_visitThrowStatement() {
- assertSource("throw e", ASTFactory.throwExpression2(ASTFactory.identifier3("e")));
+ assertSource("throw e", AstFactory.throwExpression2(AstFactory.identifier3("e")));
}
void test_visitTopLevelVariableDeclaration_multiple() {
- assertSource("var a;", ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")]));
+ assertSource("var a;", AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [AstFactory.variableDeclaration("a")]));
}
void test_visitTopLevelVariableDeclaration_single() {
- assertSource("var a, b;", ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [
- ASTFactory.variableDeclaration("a"),
- ASTFactory.variableDeclaration("b")]));
+ assertSource("var a, b;", AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [
+ AstFactory.variableDeclaration("a"),
+ AstFactory.variableDeclaration("b")]));
}
void test_visitTryStatement_catch() {
- assertSource("try {} on E {}", ASTFactory.tryStatement2(ASTFactory.block([]), [ASTFactory.catchClause3(ASTFactory.typeName4("E", []), [])]));
+ assertSource("try {} on E {}", AstFactory.tryStatement2(AstFactory.block([]), [AstFactory.catchClause3(AstFactory.typeName4("E", []), [])]));
}
void test_visitTryStatement_catches() {
- assertSource("try {} on E {} on F {}", ASTFactory.tryStatement2(ASTFactory.block([]), [
- ASTFactory.catchClause3(ASTFactory.typeName4("E", []), []),
- ASTFactory.catchClause3(ASTFactory.typeName4("F", []), [])]));
+ assertSource("try {} on E {} on F {}", AstFactory.tryStatement2(AstFactory.block([]), [
+ AstFactory.catchClause3(AstFactory.typeName4("E", []), []),
+ AstFactory.catchClause3(AstFactory.typeName4("F", []), [])]));
}
void test_visitTryStatement_catchFinally() {
- assertSource("try {} on E {} finally {}", ASTFactory.tryStatement3(ASTFactory.block([]), ASTFactory.list([ASTFactory.catchClause3(ASTFactory.typeName4("E", []), [])]), ASTFactory.block([])));
+ assertSource("try {} on E {} finally {}", AstFactory.tryStatement3(AstFactory.block([]), AstFactory.list([AstFactory.catchClause3(AstFactory.typeName4("E", []), [])]), AstFactory.block([])));
}
void test_visitTryStatement_finally() {
- assertSource("try {} finally {}", ASTFactory.tryStatement(ASTFactory.block([]), ASTFactory.block([])));
+ assertSource("try {} finally {}", AstFactory.tryStatement(AstFactory.block([]), AstFactory.block([])));
}
void test_visitTypeAlias_generic() {
- assertSource("typedef A F<B>();", ASTFactory.typeAlias(ASTFactory.typeName4("A", []), "F", ASTFactory.typeParameterList(["B"]), ASTFactory.formalParameterList([])));
+ assertSource("typedef A F<B>();", AstFactory.typeAlias(AstFactory.typeName4("A", []), "F", AstFactory.typeParameterList(["B"]), AstFactory.formalParameterList([])));
}
void test_visitTypeAlias_nonGeneric() {
- assertSource("typedef A F();", ASTFactory.typeAlias(ASTFactory.typeName4("A", []), "F", null, ASTFactory.formalParameterList([])));
+ assertSource("typedef A F();", AstFactory.typeAlias(AstFactory.typeName4("A", []), "F", null, AstFactory.formalParameterList([])));
}
void test_visitTypeArgumentList_multiple() {
- assertSource("<E, F>", ASTFactory.typeArgumentList([
- ASTFactory.typeName4("E", []),
- ASTFactory.typeName4("F", [])]));
+ assertSource("<E, F>", AstFactory.typeArgumentList([
+ AstFactory.typeName4("E", []),
+ AstFactory.typeName4("F", [])]));
}
void test_visitTypeArgumentList_single() {
- assertSource("<E>", ASTFactory.typeArgumentList([ASTFactory.typeName4("E", [])]));
+ assertSource("<E>", AstFactory.typeArgumentList([AstFactory.typeName4("E", [])]));
}
void test_visitTypeName_multipleArgs() {
- assertSource("C<D, E>", ASTFactory.typeName4("C", [
- ASTFactory.typeName4("D", []),
- ASTFactory.typeName4("E", [])]));
+ assertSource("C<D, E>", AstFactory.typeName4("C", [
+ AstFactory.typeName4("D", []),
+ AstFactory.typeName4("E", [])]));
}
void test_visitTypeName_nestedArg() {
- assertSource("C<D<E>>", ASTFactory.typeName4("C", [ASTFactory.typeName4("D", [ASTFactory.typeName4("E", [])])]));
+ assertSource("C<D<E>>", AstFactory.typeName4("C", [AstFactory.typeName4("D", [AstFactory.typeName4("E", [])])]));
}
void test_visitTypeName_noArgs() {
- assertSource("C", ASTFactory.typeName4("C", []));
+ assertSource("C", AstFactory.typeName4("C", []));
}
void test_visitTypeName_singleArg() {
- assertSource("C<D>", ASTFactory.typeName4("C", [ASTFactory.typeName4("D", [])]));
+ assertSource("C<D>", AstFactory.typeName4("C", [AstFactory.typeName4("D", [])]));
}
void test_visitTypeParameter_withExtends() {
- assertSource("E extends C", ASTFactory.typeParameter2("E", ASTFactory.typeName4("C", [])));
+ assertSource("E extends C", AstFactory.typeParameter2("E", AstFactory.typeName4("C", [])));
}
void test_visitTypeParameter_withoutExtends() {
- assertSource("E", ASTFactory.typeParameter("E"));
+ assertSource("E", AstFactory.typeParameter("E"));
}
void test_visitTypeParameterList_multiple() {
- assertSource("<E, F>", ASTFactory.typeParameterList(["E", "F"]));
+ assertSource("<E, F>", AstFactory.typeParameterList(["E", "F"]));
}
void test_visitTypeParameterList_single() {
- assertSource("<E>", ASTFactory.typeParameterList(["E"]));
+ assertSource("<E>", AstFactory.typeParameterList(["E"]));
}
void test_visitVariableDeclaration_initialized() {
- assertSource("a = b", ASTFactory.variableDeclaration2("a", ASTFactory.identifier3("b")));
+ assertSource("a = b", AstFactory.variableDeclaration2("a", AstFactory.identifier3("b")));
}
void test_visitVariableDeclaration_uninitialized() {
- assertSource("a", ASTFactory.variableDeclaration("a"));
+ assertSource("a", AstFactory.variableDeclaration("a"));
}
void test_visitVariableDeclarationList_const_type() {
- assertSource("const C a, b", ASTFactory.variableDeclarationList(Keyword.CONST, ASTFactory.typeName4("C", []), [
- ASTFactory.variableDeclaration("a"),
- ASTFactory.variableDeclaration("b")]));
+ assertSource("const C a, b", AstFactory.variableDeclarationList(Keyword.CONST, AstFactory.typeName4("C", []), [
+ AstFactory.variableDeclaration("a"),
+ AstFactory.variableDeclaration("b")]));
}
void test_visitVariableDeclarationList_final_noType() {
- assertSource("final a, b", ASTFactory.variableDeclarationList2(Keyword.FINAL, [
- ASTFactory.variableDeclaration("a"),
- ASTFactory.variableDeclaration("b")]));
+ assertSource("final a, b", AstFactory.variableDeclarationList2(Keyword.FINAL, [
+ AstFactory.variableDeclaration("a"),
+ AstFactory.variableDeclaration("b")]));
}
void test_visitVariableDeclarationList_type() {
- assertSource("C a, b", ASTFactory.variableDeclarationList(null, ASTFactory.typeName4("C", []), [
- ASTFactory.variableDeclaration("a"),
- ASTFactory.variableDeclaration("b")]));
+ assertSource("C a, b", AstFactory.variableDeclarationList(null, AstFactory.typeName4("C", []), [
+ AstFactory.variableDeclaration("a"),
+ AstFactory.variableDeclaration("b")]));
}
void test_visitVariableDeclarationList_var() {
- assertSource("var a, b", ASTFactory.variableDeclarationList2(Keyword.VAR, [
- ASTFactory.variableDeclaration("a"),
- ASTFactory.variableDeclaration("b")]));
+ assertSource("var a, b", AstFactory.variableDeclarationList2(Keyword.VAR, [
+ AstFactory.variableDeclaration("a"),
+ AstFactory.variableDeclaration("b")]));
}
void test_visitVariableDeclarationStatement() {
- assertSource("C c;", ASTFactory.variableDeclarationStatement(null, ASTFactory.typeName4("C", []), [ASTFactory.variableDeclaration("c")]));
+ assertSource("C c;", AstFactory.variableDeclarationStatement(null, AstFactory.typeName4("C", []), [AstFactory.variableDeclaration("c")]));
}
void test_visitWhileStatement() {
- assertSource("while (c) {}", ASTFactory.whileStatement(ASTFactory.identifier3("c"), ASTFactory.block([])));
+ assertSource("while (c) {}", AstFactory.whileStatement(AstFactory.identifier3("c"), AstFactory.block([])));
}
void test_visitWithClause_multiple() {
- assertSource("with A, B, C", ASTFactory.withClause([
- ASTFactory.typeName4("A", []),
- ASTFactory.typeName4("B", []),
- ASTFactory.typeName4("C", [])]));
+ assertSource("with A, B, C", AstFactory.withClause([
+ AstFactory.typeName4("A", []),
+ AstFactory.typeName4("B", []),
+ AstFactory.typeName4("C", [])]));
}
void test_visitWithClause_single() {
- assertSource("with A", ASTFactory.withClause([ASTFactory.typeName4("A", [])]));
+ assertSource("with A", AstFactory.withClause([AstFactory.typeName4("A", [])]));
}
/**
@@ -3082,7 +3082,7 @@
* @param node the AST node being visited to produce the actual source
* @throws AFE if the visitor does not produce the expected source for the given node
*/
- void assertSource(String expectedSource, ASTNode node) {
+ void assertSource(String expectedSource, AstNode node) {
PrintStringWriter writer = new PrintStringWriter();
node.accept(new ToSourceVisitor(writer));
JUnitTestCase.assertEquals(expectedSource, writer.toString());
diff --git a/pkg/analyzer/test/generated/element_test.dart b/pkg/analyzer/test/generated/element_test.dart
index 974e35d..3f464fd 100644
--- a/pkg/analyzer/test/generated/element_test.dart
+++ b/pkg/analyzer/test/generated/element_test.dart
@@ -17,7 +17,7 @@
import 'package:analyzer/src/generated/engine.dart' show AnalysisContext, AnalysisContextImpl;
import 'package:unittest/unittest.dart' as _ut;
import 'test_support.dart';
-import 'ast_test.dart' show ASTFactory;
+import 'ast_test.dart' show AstFactory;
import 'resolver_test.dart' show TestTypeProvider, AnalysisContextHelper;
class ElementLocationImplTest extends EngineTestCase {
@@ -186,11 +186,11 @@
Element firstElement = ElementFactory.localVariableElement2("xx");
Element secondElement = ElementFactory.localVariableElement2("yy");
Element result = MultiplyDefinedElementImpl.fromElements(null, firstElement, secondElement);
- EngineTestCase.assertInstanceOf(MultiplyDefinedElement, result);
+ EngineTestCase.assertInstanceOf((obj) => obj is MultiplyDefinedElement, MultiplyDefinedElement, result);
List<Element> elements = (result as MultiplyDefinedElement).conflictingElements;
EngineTestCase.assertLength(2, elements);
for (int i = 0; i < elements.length; i++) {
- EngineTestCase.assertInstanceOf(LocalVariableElement, elements[i]);
+ EngineTestCase.assertInstanceOf((obj) => obj is LocalVariableElement, LocalVariableElement, elements[i]);
}
}
@@ -199,11 +199,11 @@
Element secondElement = ElementFactory.localVariableElement2("yy");
Element thirdElement = ElementFactory.localVariableElement2("zz");
Element result = MultiplyDefinedElementImpl.fromElements(null, MultiplyDefinedElementImpl.fromElements(null, firstElement, secondElement), thirdElement);
- EngineTestCase.assertInstanceOf(MultiplyDefinedElement, result);
+ EngineTestCase.assertInstanceOf((obj) => obj is MultiplyDefinedElement, MultiplyDefinedElement, result);
List<Element> elements = (result as MultiplyDefinedElement).conflictingElements;
EngineTestCase.assertLength(3, elements);
for (int i = 0; i < elements.length; i++) {
- EngineTestCase.assertInstanceOf(LocalVariableElement, elements[i]);
+ EngineTestCase.assertInstanceOf((obj) => obj is LocalVariableElement, LocalVariableElement, elements[i]);
}
}
@@ -232,7 +232,7 @@
class LibraryElementImplTest extends EngineTestCase {
void test_creation() {
- JUnitTestCase.assertNotNull(new LibraryElementImpl(createAnalysisContext(), ASTFactory.libraryIdentifier2(["l"])));
+ JUnitTestCase.assertNotNull(new LibraryElementImpl(createAnalysisContext(), AstFactory.libraryIdentifier2(["l"])));
}
void test_getImportedLibraries() {
@@ -241,8 +241,8 @@
LibraryElementImpl library2 = ElementFactory.library(context, "l2");
LibraryElementImpl library3 = ElementFactory.library(context, "l3");
LibraryElementImpl library4 = ElementFactory.library(context, "l4");
- PrefixElement prefixA = new PrefixElementImpl(ASTFactory.identifier3("a"));
- PrefixElement prefixB = new PrefixElementImpl(ASTFactory.identifier3("b"));
+ PrefixElement prefixA = new PrefixElementImpl(AstFactory.identifier3("a"));
+ PrefixElement prefixB = new PrefixElementImpl(AstFactory.identifier3("b"));
List<ImportElementImpl> imports = [
ElementFactory.importFor(library2, null, []),
ElementFactory.importFor(library2, prefixB, []),
@@ -258,8 +258,8 @@
void test_getPrefixes() {
AnalysisContext context = createAnalysisContext();
LibraryElementImpl library = ElementFactory.library(context, "l1");
- PrefixElement prefixA = new PrefixElementImpl(ASTFactory.identifier3("a"));
- PrefixElement prefixB = new PrefixElementImpl(ASTFactory.identifier3("b"));
+ PrefixElement prefixA = new PrefixElementImpl(AstFactory.identifier3("a"));
+ PrefixElement prefixB = new PrefixElementImpl(AstFactory.identifier3("b"));
List<ImportElementImpl> imports = [
ElementFactory.importFor(ElementFactory.library(context, "l2"), null, []),
ElementFactory.importFor(ElementFactory.library(context, "l3"), null, []),
@@ -281,8 +281,8 @@
AnalysisContext context = createAnalysisContext();
LibraryElementImpl library = ElementFactory.library(context, "test");
CompilationUnitElement unitLib = library.definingCompilationUnit;
- CompilationUnitElementImpl unitA = ElementFactory.compilationUnit(context, "unit_a.dart");
- CompilationUnitElementImpl unitB = ElementFactory.compilationUnit(context, "unit_b.dart");
+ CompilationUnitElementImpl unitA = ElementFactory.compilationUnit("unit_a.dart");
+ CompilationUnitElementImpl unitB = ElementFactory.compilationUnit("unit_b.dart");
library.parts = <CompilationUnitElement> [unitA, unitB];
EngineTestCase.assertEqualsIgnoreOrder(<CompilationUnitElement> [unitLib, unitA, unitB], library.units);
}
@@ -348,9 +348,9 @@
void test_isUpToDate() {
AnalysisContext context = createAnalysisContext();
- context.sourceFactory = new SourceFactory.con2([]);
+ context.sourceFactory = new SourceFactory([]);
LibraryElement library = ElementFactory.library(context, "foo");
- context.sourceFactory.setContents(library.definingCompilationUnit.source, "sdfsdff");
+ context.setContents(library.definingCompilationUnit.source, "sdfsdff");
// Assert that we are not up to date if the target has an old time stamp.
JUnitTestCase.assertFalse(library.isUpToDate2(0));
// Assert that we are up to date with a target modification time in the future.
@@ -359,7 +359,7 @@
void test_setImports() {
AnalysisContext context = createAnalysisContext();
- LibraryElementImpl library = new LibraryElementImpl(context, ASTFactory.libraryIdentifier2(["l1"]));
+ LibraryElementImpl library = new LibraryElementImpl(context, AstFactory.libraryIdentifier2(["l1"]));
List<ImportElementImpl> expectedImports = [
ElementFactory.importFor(ElementFactory.library(context, "l2"), null, []),
ElementFactory.importFor(ElementFactory.library(context, "l3"), null, [])];
@@ -427,31 +427,31 @@
class TypeParameterTypeImplTest extends EngineTestCase {
void test_creation() {
- JUnitTestCase.assertNotNull(new TypeParameterTypeImpl(new TypeParameterElementImpl(ASTFactory.identifier3("E"))));
+ JUnitTestCase.assertNotNull(new TypeParameterTypeImpl(new TypeParameterElementImpl(AstFactory.identifier3("E"))));
}
void test_getElement() {
- TypeParameterElementImpl element = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl element = new TypeParameterElementImpl(AstFactory.identifier3("E"));
TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
JUnitTestCase.assertEquals(element, type.element);
}
void test_isMoreSpecificThan_typeArguments_bottom() {
- TypeParameterElementImpl element = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl element = new TypeParameterElementImpl(AstFactory.identifier3("E"));
TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
// E << bottom
JUnitTestCase.assertTrue(type.isMoreSpecificThan(BottomTypeImpl.instance));
}
void test_isMoreSpecificThan_typeArguments_dynamic() {
- TypeParameterElementImpl element = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl element = new TypeParameterElementImpl(AstFactory.identifier3("E"));
TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
// E << dynamic
JUnitTestCase.assertTrue(type.isMoreSpecificThan(DynamicTypeImpl.instance));
}
void test_isMoreSpecificThan_typeArguments_object() {
- TypeParameterElementImpl element = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl element = new TypeParameterElementImpl(AstFactory.identifier3("E"));
TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
// E << Object
JUnitTestCase.assertTrue(type.isMoreSpecificThan(ElementFactory.object.type));
@@ -459,9 +459,9 @@
void test_isMoreSpecificThan_typeArguments_resursive() {
ClassElementImpl classS = ElementFactory.classElement2("A", []);
- TypeParameterElementImpl typeParameterU = new TypeParameterElementImpl(ASTFactory.identifier3("U"));
+ TypeParameterElementImpl typeParameterU = new TypeParameterElementImpl(AstFactory.identifier3("U"));
TypeParameterTypeImpl typeParameterTypeU = new TypeParameterTypeImpl(typeParameterU);
- TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(ASTFactory.identifier3("T"));
+ TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(AstFactory.identifier3("T"));
TypeParameterTypeImpl typeParameterTypeT = new TypeParameterTypeImpl(typeParameterT);
typeParameterT.bound = typeParameterTypeU;
typeParameterU.bound = typeParameterTypeU;
@@ -471,7 +471,7 @@
}
void test_isMoreSpecificThan_typeArguments_self() {
- TypeParameterElementImpl element = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl element = new TypeParameterElementImpl(AstFactory.identifier3("E"));
TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
// E << E
JUnitTestCase.assertTrue(type.isMoreSpecificThan(type));
@@ -485,7 +485,7 @@
ClassElement classB = ElementFactory.classElement("B", classA.type, []);
InterfaceType typeA = classA.type;
InterfaceType typeB = classB.type;
- TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(ASTFactory.identifier3("T"));
+ TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(AstFactory.identifier3("T"));
typeParameterT.bound = typeB;
TypeParameterTypeImpl typeParameterTypeT = new TypeParameterTypeImpl(typeParameterT);
// <T extends B>
@@ -495,10 +495,10 @@
void test_isMoreSpecificThan_typeArguments_transitivity_typeParameters() {
ClassElementImpl classS = ElementFactory.classElement2("A", []);
- TypeParameterElementImpl typeParameterU = new TypeParameterElementImpl(ASTFactory.identifier3("U"));
+ TypeParameterElementImpl typeParameterU = new TypeParameterElementImpl(AstFactory.identifier3("U"));
typeParameterU.bound = classS.type;
TypeParameterTypeImpl typeParameterTypeU = new TypeParameterTypeImpl(typeParameterU);
- TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(ASTFactory.identifier3("T"));
+ TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(AstFactory.identifier3("T"));
typeParameterT.bound = typeParameterTypeU;
TypeParameterTypeImpl typeParameterTypeT = new TypeParameterTypeImpl(typeParameterT);
// <T extends U> and <U extends S>
@@ -508,7 +508,7 @@
void test_isMoreSpecificThan_typeArguments_upperBound() {
ClassElementImpl classS = ElementFactory.classElement2("A", []);
- TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(ASTFactory.identifier3("T"));
+ TypeParameterElementImpl typeParameterT = new TypeParameterElementImpl(AstFactory.identifier3("T"));
typeParameterT.bound = classS.type;
TypeParameterTypeImpl typeParameterTypeT = new TypeParameterTypeImpl(typeParameterT);
// <T extends S>
@@ -517,17 +517,17 @@
}
void test_substitute_equal() {
- TypeParameterElementImpl element = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl element = new TypeParameterElementImpl(AstFactory.identifier3("E"));
TypeParameterTypeImpl type = new TypeParameterTypeImpl(element);
- InterfaceTypeImpl argument = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("A")));
+ InterfaceTypeImpl argument = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("A")));
TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(element);
JUnitTestCase.assertSame(argument, type.substitute2(<Type2> [argument], <Type2> [parameter]));
}
void test_substitute_notEqual() {
- TypeParameterTypeImpl type = new TypeParameterTypeImpl(new TypeParameterElementImpl(ASTFactory.identifier3("E")));
- InterfaceTypeImpl argument = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("A")));
- TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(new TypeParameterElementImpl(ASTFactory.identifier3("F")));
+ TypeParameterTypeImpl type = new TypeParameterTypeImpl(new TypeParameterElementImpl(AstFactory.identifier3("E")));
+ InterfaceTypeImpl argument = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("A")));
+ TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(new TypeParameterElementImpl(AstFactory.identifier3("F")));
JUnitTestCase.assertSame(type, type.substitute2(<Type2> [argument], <Type2> [parameter]));
}
@@ -957,7 +957,7 @@
void test_getLeastUpperBound_functionType() {
Type2 interfaceType = ElementFactory.classElement2("A", []).type;
- FunctionTypeImpl functionType = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(ASTFactory.identifier3("f")));
+ FunctionTypeImpl functionType = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(AstFactory.identifier3("f")));
JUnitTestCase.assertNull(interfaceType.getLeastUpperBound(functionType));
}
@@ -1934,7 +1934,7 @@
void test_substitute_equal() {
ClassElementImpl classA = ElementFactory.classElement2("A", []);
- TypeParameterElementImpl parameterElement = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl parameterElement = new TypeParameterElementImpl(AstFactory.identifier3("E"));
InterfaceTypeImpl type = new InterfaceTypeImpl.con1(classA);
TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(parameterElement);
type.typeArguments = <Type2> [parameter];
@@ -1959,12 +1959,12 @@
void test_substitute_notEqual() {
ClassElementImpl classA = ElementFactory.classElement2("A", []);
- TypeParameterElementImpl parameterElement = new TypeParameterElementImpl(ASTFactory.identifier3("E"));
+ TypeParameterElementImpl parameterElement = new TypeParameterElementImpl(AstFactory.identifier3("E"));
InterfaceTypeImpl type = new InterfaceTypeImpl.con1(classA);
TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(parameterElement);
type.typeArguments = <Type2> [parameter];
InterfaceType argumentType = ElementFactory.classElement2("B", []).type;
- TypeParameterTypeImpl parameterType = new TypeParameterTypeImpl(new TypeParameterElementImpl(ASTFactory.identifier3("F")));
+ TypeParameterTypeImpl parameterType = new TypeParameterTypeImpl(new TypeParameterElementImpl(AstFactory.identifier3("F")));
InterfaceType result = type.substitute2(<Type2> [argumentType], <Type2> [parameterType]);
JUnitTestCase.assertEquals(classA, result.element);
List<Type2> resultArguments = result.typeArguments;
@@ -2464,7 +2464,7 @@
static ClassElementImpl _objectElement;
static ClassElementImpl classElement(String typeName, InterfaceType superclassType, List<String> parameterNames) {
- ClassElementImpl element = new ClassElementImpl(ASTFactory.identifier3(typeName));
+ ClassElementImpl element = new ClassElementImpl(AstFactory.identifier3(typeName));
element.supertype = superclassType;
InterfaceTypeImpl type = new InterfaceTypeImpl.con1(element);
element.type = type;
@@ -2473,7 +2473,7 @@
List<TypeParameterElementImpl> typeParameters = new List<TypeParameterElementImpl>(count);
List<TypeParameterTypeImpl> typeParameterTypes = new List<TypeParameterTypeImpl>(count);
for (int i = 0; i < count; i++) {
- TypeParameterElementImpl typeParameter = new TypeParameterElementImpl(ASTFactory.identifier3(parameterNames[i]));
+ TypeParameterElementImpl typeParameter = new TypeParameterElementImpl(AstFactory.identifier3(parameterNames[i]));
typeParameters[i] = typeParameter;
typeParameterTypes[i] = new TypeParameterTypeImpl(typeParameter);
typeParameter.type = typeParameterTypes[i];
@@ -2486,8 +2486,8 @@
static ClassElementImpl classElement2(String typeName, List<String> parameterNames) => classElement(typeName, object.type, parameterNames);
- static CompilationUnitElementImpl compilationUnit(AnalysisContext context, String fileName) {
- FileBasedSource source = new FileBasedSource.con1(context.sourceFactory.contentCache, FileUtilities2.createFile(fileName));
+ static CompilationUnitElementImpl compilationUnit(String fileName) {
+ FileBasedSource source = new FileBasedSource.con1(FileUtilities2.createFile(fileName));
CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName);
unit.source = source;
return unit;
@@ -2495,12 +2495,12 @@
static ConstructorElementImpl constructorElement(ClassElement definingClass, String name, bool isConst, List<Type2> argumentTypes) {
Type2 type = definingClass.type;
- ConstructorElementImpl constructor = new ConstructorElementImpl(name == null ? null : ASTFactory.identifier3(name));
+ ConstructorElementImpl constructor = new ConstructorElementImpl.con1(name == null ? null : AstFactory.identifier3(name));
constructor.const2 = isConst;
int count = argumentTypes.length;
List<ParameterElement> parameters = new List<ParameterElement>(count);
for (int i = 0; i < count; i++) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3("a${i}"));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3("a${i}"));
parameter.type = argumentTypes[i];
parameter.parameterKind = ParameterKind.REQUIRED;
parameters[i] = parameter;
@@ -2522,7 +2522,7 @@
}
static FieldElementImpl fieldElement(String name, bool isStatic, bool isFinal, bool isConst, Type2 type) {
- FieldElementImpl field = new FieldElementImpl.con1(ASTFactory.identifier3(name));
+ FieldElementImpl field = new FieldElementImpl.con1(AstFactory.identifier3(name));
field.const3 = isConst;
field.final2 = isFinal;
field.static = isStatic;
@@ -2558,7 +2558,7 @@
static FunctionElementImpl functionElement3(String functionName, ClassElement returnElement, List<ClassElement> normalParameters, List<ClassElement> optionalParameters) {
// We don't create parameter elements because we don't have parameter names
- FunctionElementImpl functionElement = new FunctionElementImpl.con1(ASTFactory.identifier3(functionName));
+ FunctionElementImpl functionElement = new FunctionElementImpl.con1(AstFactory.identifier3(functionName));
FunctionTypeImpl functionType = new FunctionTypeImpl.con1(functionElement);
functionElement.type = functionType;
// return type
@@ -2573,7 +2573,7 @@
int totalCount = normalCount + optionalCount;
List<ParameterElement> parameters = new List<ParameterElement>(totalCount);
for (int i = 0; i < totalCount; i++) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3("a${i}"));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3("a${i}"));
if (i < normalCount) {
parameter.type = normalParameters[i].type;
parameter.parameterKind = ParameterKind.REQUIRED;
@@ -2589,7 +2589,7 @@
}
static FunctionElementImpl functionElement4(String functionName, ClassElement returnElement, List<ClassElement> normalParameters, List<String> names, List<ClassElement> namedParameters) {
- FunctionElementImpl functionElement = new FunctionElementImpl.con1(ASTFactory.identifier3(functionName));
+ FunctionElementImpl functionElement = new FunctionElementImpl.con1(AstFactory.identifier3(functionName));
FunctionTypeImpl functionType = new FunctionTypeImpl.con1(functionElement);
functionElement.type = functionType;
// parameters
@@ -2603,12 +2603,12 @@
List<ParameterElement> parameters = new List<ParameterElement>(totalCount);
for (int i = 0; i < totalCount; i++) {
if (i < normalCount) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3("a${i}"));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3("a${i}"));
parameter.type = normalParameters[i].type;
parameter.parameterKind = ParameterKind.REQUIRED;
parameters[i] = parameter;
} else {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3(names[i - normalCount]));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3(names[i - normalCount]));
parameter.type = namedParameters[i - normalCount].type;
parameter.parameterKind = ParameterKind.NAMED;
parameters[i] = parameter;
@@ -2638,7 +2638,7 @@
}
static PropertyAccessorElementImpl getterElement(String name, bool isStatic, Type2 type) {
- FieldElementImpl field = new FieldElementImpl.con1(ASTFactory.identifier3(name));
+ FieldElementImpl field = new FieldElementImpl.con1(AstFactory.identifier3(name));
field.static = isStatic;
field.synthetic = true;
field.type = type;
@@ -2654,7 +2654,7 @@
}
static HtmlElementImpl htmlUnit(AnalysisContext context, String fileName) {
- FileBasedSource source = new FileBasedSource.con1(context.sourceFactory.contentCache, FileUtilities2.createFile(fileName));
+ FileBasedSource source = new FileBasedSource.con1(FileUtilities2.createFile(fileName));
HtmlElementImpl unit = new HtmlElementImpl(context, fileName);
unit.source = source;
return unit;
@@ -2670,22 +2670,22 @@
static LibraryElementImpl library(AnalysisContext context, String libraryName) {
String fileName = "/${libraryName}.dart";
- CompilationUnitElementImpl unit = compilationUnit(context, fileName);
- LibraryElementImpl library = new LibraryElementImpl(context, ASTFactory.libraryIdentifier2([libraryName]));
+ CompilationUnitElementImpl unit = compilationUnit(fileName);
+ LibraryElementImpl library = new LibraryElementImpl(context, AstFactory.libraryIdentifier2([libraryName]));
library.definingCompilationUnit = unit;
return library;
}
static LocalVariableElementImpl localVariableElement(Identifier name) => new LocalVariableElementImpl(name);
- static LocalVariableElementImpl localVariableElement2(String name) => new LocalVariableElementImpl(ASTFactory.identifier3(name));
+ static LocalVariableElementImpl localVariableElement2(String name) => new LocalVariableElementImpl(AstFactory.identifier3(name));
static MethodElementImpl methodElement(String methodName, Type2 returnType, List<Type2> argumentTypes) {
- MethodElementImpl method = new MethodElementImpl.con1(ASTFactory.identifier3(methodName));
+ MethodElementImpl method = new MethodElementImpl.con1(AstFactory.identifier3(methodName));
int count = argumentTypes.length;
List<ParameterElement> parameters = new List<ParameterElement>(count);
for (int i = 0; i < count; i++) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3("a${i}"));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3("a${i}"));
parameter.type = argumentTypes[i];
parameter.parameterKind = ParameterKind.REQUIRED;
parameters[i] = parameter;
@@ -2698,48 +2698,48 @@
}
static ParameterElementImpl namedParameter(String name) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3(name));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3(name));
parameter.parameterKind = ParameterKind.NAMED;
return parameter;
}
static ParameterElementImpl namedParameter2(String name, Type2 type) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3(name));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3(name));
parameter.parameterKind = ParameterKind.NAMED;
parameter.type = type;
return parameter;
}
static ParameterElementImpl positionalParameter(String name) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3(name));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3(name));
parameter.parameterKind = ParameterKind.POSITIONAL;
return parameter;
}
static ParameterElementImpl positionalParameter2(String name, Type2 type) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3(name));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3(name));
parameter.parameterKind = ParameterKind.POSITIONAL;
parameter.type = type;
return parameter;
}
- static PrefixElementImpl prefix(String name) => new PrefixElementImpl(ASTFactory.identifier3(name));
+ static PrefixElementImpl prefix(String name) => new PrefixElementImpl(AstFactory.identifier3(name));
static ParameterElementImpl requiredParameter(String name) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3(name));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3(name));
parameter.parameterKind = ParameterKind.REQUIRED;
return parameter;
}
static ParameterElementImpl requiredParameter2(String name, Type2 type) {
- ParameterElementImpl parameter = new ParameterElementImpl.con1(ASTFactory.identifier3(name));
+ ParameterElementImpl parameter = new ParameterElementImpl.con1(AstFactory.identifier3(name));
parameter.parameterKind = ParameterKind.REQUIRED;
parameter.type = type;
return parameter;
}
static PropertyAccessorElementImpl setterElement(String name, bool isStatic, Type2 type) {
- FieldElementImpl field = new FieldElementImpl.con1(ASTFactory.identifier3(name));
+ FieldElementImpl field = new FieldElementImpl.con1(AstFactory.identifier3(name));
field.static = isStatic;
field.synthetic = true;
field.type = type;
@@ -3358,30 +3358,30 @@
class FunctionTypeImplTest extends EngineTestCase {
void test_creation() {
- JUnitTestCase.assertNotNull(new FunctionTypeImpl.con1(new FunctionElementImpl.con1(ASTFactory.identifier3("f"))));
+ JUnitTestCase.assertNotNull(new FunctionTypeImpl.con1(new FunctionElementImpl.con1(AstFactory.identifier3("f"))));
}
void test_getElement() {
- FunctionElementImpl typeElement = new FunctionElementImpl.con1(ASTFactory.identifier3("f"));
+ FunctionElementImpl typeElement = new FunctionElementImpl.con1(AstFactory.identifier3("f"));
FunctionTypeImpl type = new FunctionTypeImpl.con1(typeElement);
JUnitTestCase.assertEquals(typeElement, type.element);
}
void test_getNamedParameterTypes() {
- FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(ASTFactory.identifier3("f")));
+ FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(AstFactory.identifier3("f")));
Map<String, Type2> types = type.namedParameterTypes;
EngineTestCase.assertSize2(0, types);
}
void test_getNormalParameterTypes() {
- FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(ASTFactory.identifier3("f")));
+ FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(AstFactory.identifier3("f")));
List<Type2> types = type.normalParameterTypes;
EngineTestCase.assertLength(0, types);
}
void test_getReturnType() {
Type2 expectedReturnType = VoidTypeImpl.instance;
- FunctionElementImpl functionElement = new FunctionElementImpl.con1(ASTFactory.identifier3("f"));
+ FunctionElementImpl functionElement = new FunctionElementImpl.con1(AstFactory.identifier3("f"));
functionElement.returnType = expectedReturnType;
FunctionTypeImpl type = new FunctionTypeImpl.con1(functionElement);
Type2 returnType = type.returnType;
@@ -3389,13 +3389,13 @@
}
void test_getTypeArguments() {
- FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(ASTFactory.identifier3("f")));
+ FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(AstFactory.identifier3("f")));
List<Type2> types = type.typeArguments;
EngineTestCase.assertLength(0, types);
}
void test_hashCode_element() {
- FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(ASTFactory.identifier3("f")));
+ FunctionTypeImpl type = new FunctionTypeImpl.con1(new FunctionElementImpl.con1(AstFactory.identifier3("f")));
type.hashCode;
}
@@ -3686,20 +3686,20 @@
TestTypeProvider provider = new TestTypeProvider();
InterfaceType boolType = provider.boolType;
InterfaceType stringType = provider.stringType;
- TypeParameterElementImpl parameterB = new TypeParameterElementImpl(ASTFactory.identifier3("B"));
+ TypeParameterElementImpl parameterB = new TypeParameterElementImpl(AstFactory.identifier3("B"));
parameterB.bound = boolType;
TypeParameterTypeImpl typeB = new TypeParameterTypeImpl(parameterB);
- TypeParameterElementImpl parameterS = new TypeParameterElementImpl(ASTFactory.identifier3("S"));
+ TypeParameterElementImpl parameterS = new TypeParameterElementImpl(AstFactory.identifier3("S"));
parameterS.bound = stringType;
TypeParameterTypeImpl typeS = new TypeParameterTypeImpl(parameterS);
- FunctionElementImpl functionAliasElement = new FunctionElementImpl.con1(ASTFactory.identifier3("func"));
+ FunctionElementImpl functionAliasElement = new FunctionElementImpl.con1(AstFactory.identifier3("func"));
functionAliasElement.parameters = <ParameterElement> [
ElementFactory.requiredParameter2("a", typeB),
ElementFactory.positionalParameter2("b", typeS)];
functionAliasElement.returnType = stringType;
FunctionTypeImpl functionAliasType = new FunctionTypeImpl.con1(functionAliasElement);
functionAliasElement.type = functionAliasType;
- FunctionElementImpl functionElement = new FunctionElementImpl.con1(ASTFactory.identifier3("f"));
+ FunctionElementImpl functionElement = new FunctionElementImpl.con1(AstFactory.identifier3("f"));
functionElement.parameters = <ParameterElement> [
ElementFactory.requiredParameter2("c", boolType),
ElementFactory.positionalParameter2("d", stringType)];
@@ -3731,7 +3731,7 @@
void test_setTypeArguments() {
ClassElementImpl enclosingClass = ElementFactory.classElement2("C", ["E"]);
- MethodElementImpl methodElement = new MethodElementImpl.con1(ASTFactory.identifier3("m"));
+ MethodElementImpl methodElement = new MethodElementImpl.con1(AstFactory.identifier3("m"));
enclosingClass.methods = <MethodElement> [methodElement];
FunctionTypeImpl type = new FunctionTypeImpl.con1(methodElement);
Type2 expectedType = enclosingClass.typeParameters[0].type;
@@ -3744,7 +3744,7 @@
void test_substitute2_equal() {
ClassElementImpl definingClass = ElementFactory.classElement2("C", ["E"]);
TypeParameterType parameterType = definingClass.typeParameters[0].type;
- MethodElementImpl functionElement = new MethodElementImpl.con1(ASTFactory.identifier3("m"));
+ MethodElementImpl functionElement = new MethodElementImpl.con1(AstFactory.identifier3("m"));
String namedParameterName = "c";
functionElement.parameters = <ParameterElement> [
ElementFactory.requiredParameter2("a", parameterType),
@@ -3754,7 +3754,7 @@
definingClass.methods = <MethodElement> [functionElement];
FunctionTypeImpl functionType = new FunctionTypeImpl.con1(functionElement);
functionType.typeArguments = <Type2> [parameterType];
- InterfaceTypeImpl argumentType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("D")));
+ InterfaceTypeImpl argumentType = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("D")));
FunctionType result = functionType.substitute2(<Type2> [argumentType], <Type2> [parameterType]);
JUnitTestCase.assertEquals(argumentType, result.returnType);
List<Type2> normalParameters = result.normalParameterTypes;
@@ -3769,11 +3769,11 @@
}
void test_substitute2_notEqual() {
- Type2 returnType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("R")));
- Type2 normalParameterType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("A")));
- Type2 optionalParameterType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("B")));
- Type2 namedParameterType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("C")));
- FunctionElementImpl functionElement = new FunctionElementImpl.con1(ASTFactory.identifier3("f"));
+ Type2 returnType = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("R")));
+ Type2 normalParameterType = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("A")));
+ Type2 optionalParameterType = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("B")));
+ Type2 namedParameterType = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("C")));
+ FunctionElementImpl functionElement = new FunctionElementImpl.con1(AstFactory.identifier3("f"));
String namedParameterName = "c";
functionElement.parameters = <ParameterElement> [
ElementFactory.requiredParameter2("a", normalParameterType),
@@ -3781,8 +3781,8 @@
ElementFactory.namedParameter2(namedParameterName, namedParameterType)];
functionElement.returnType = returnType;
FunctionTypeImpl functionType = new FunctionTypeImpl.con1(functionElement);
- InterfaceTypeImpl argumentType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("D")));
- TypeParameterTypeImpl parameterType = new TypeParameterTypeImpl(new TypeParameterElementImpl(ASTFactory.identifier3("E")));
+ InterfaceTypeImpl argumentType = new InterfaceTypeImpl.con1(new ClassElementImpl(AstFactory.identifier3("D")));
+ TypeParameterTypeImpl parameterType = new TypeParameterTypeImpl(new TypeParameterElementImpl(AstFactory.identifier3("E")));
FunctionType result = functionType.substitute2(<Type2> [argumentType], <Type2> [parameterType]);
JUnitTestCase.assertEquals(returnType, result.returnType);
List<Type2> normalParameters = result.normalParameterTypes;
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 68e4cba..7915d4e 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -19,7 +19,7 @@
import 'package:unittest/unittest.dart' as _ut;
import 'test_support.dart';
import 'scanner_test.dart' show TokenFactory;
-import 'ast_test.dart' show ASTFactory;
+import 'ast_test.dart' show AstFactory;
import 'element_test.dart' show ElementFactory;
/**
@@ -34,7 +34,7 @@
// This fails because we are returning null from the method and asserting that the return value
// is not null.
CommentReference reference = ParserTestCase.parse("parseCommentReference", <Object> ["this", 5], "");
- SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(SimpleIdentifier, reference.identifier);
+ SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, reference.identifier);
JUnitTestCase.assertNotNull(identifier.token);
JUnitTestCase.assertEquals("a", identifier.name);
JUnitTestCase.assertEquals(5, identifier.offset);
@@ -296,7 +296,7 @@
}
void test_parseAdditiveExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseAdditiveExpression", "x + y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseAdditiveExpression", "x + y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.PLUS, expression.operator.type);
@@ -304,15 +304,15 @@
}
void test_parseAdditiveExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseAdditiveExpression", "super + y", []);
- EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand);
+ BinaryExpression expression = ParserTestCase.parse4("parseAdditiveExpression", "super + y", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.PLUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.rightOperand);
}
void test_parseAnnotation_n1() {
- Annotation annotation = ParserTestCase.parse5("parseAnnotation", "@A", []);
+ Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A", []);
JUnitTestCase.assertNotNull(annotation.atSign);
JUnitTestCase.assertNotNull(annotation.name);
JUnitTestCase.assertNull(annotation.period);
@@ -321,7 +321,7 @@
}
void test_parseAnnotation_n1_a() {
- Annotation annotation = ParserTestCase.parse5("parseAnnotation", "@A(x,y)", []);
+ Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A(x,y)", []);
JUnitTestCase.assertNotNull(annotation.atSign);
JUnitTestCase.assertNotNull(annotation.name);
JUnitTestCase.assertNull(annotation.period);
@@ -330,7 +330,7 @@
}
void test_parseAnnotation_n2() {
- Annotation annotation = ParserTestCase.parse5("parseAnnotation", "@A.B", []);
+ Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A.B", []);
JUnitTestCase.assertNotNull(annotation.atSign);
JUnitTestCase.assertNotNull(annotation.name);
JUnitTestCase.assertNull(annotation.period);
@@ -339,7 +339,7 @@
}
void test_parseAnnotation_n2_a() {
- Annotation annotation = ParserTestCase.parse5("parseAnnotation", "@A.B(x,y)", []);
+ Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A.B(x,y)", []);
JUnitTestCase.assertNotNull(annotation.atSign);
JUnitTestCase.assertNotNull(annotation.name);
JUnitTestCase.assertNull(annotation.period);
@@ -348,7 +348,7 @@
}
void test_parseAnnotation_n3() {
- Annotation annotation = ParserTestCase.parse5("parseAnnotation", "@A.B.C", []);
+ Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A.B.C", []);
JUnitTestCase.assertNotNull(annotation.atSign);
JUnitTestCase.assertNotNull(annotation.name);
JUnitTestCase.assertNotNull(annotation.period);
@@ -357,7 +357,7 @@
}
void test_parseAnnotation_n3_a() {
- Annotation annotation = ParserTestCase.parse5("parseAnnotation", "@A.B.C(x,y)", []);
+ Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A.B.C(x,y)", []);
JUnitTestCase.assertNotNull(annotation.atSign);
JUnitTestCase.assertNotNull(annotation.name);
JUnitTestCase.assertNotNull(annotation.period);
@@ -366,7 +366,7 @@
}
void test_parseArgument_named() {
- NamedExpression expression = ParserTestCase.parse5("parseArgument", "n: x", []);
+ NamedExpression expression = ParserTestCase.parse4("parseArgument", "n: x", []);
Label name = expression.name;
JUnitTestCase.assertNotNull(name);
JUnitTestCase.assertNotNull(name.label);
@@ -376,42 +376,42 @@
void test_parseArgument_unnamed() {
String lexeme = "x";
- SimpleIdentifier identifier = ParserTestCase.parse5("parseArgument", lexeme, []);
+ SimpleIdentifier identifier = ParserTestCase.parse4("parseArgument", lexeme, []);
JUnitTestCase.assertEquals(lexeme, identifier.name);
}
void test_parseArgumentDefinitionTest() {
- ArgumentDefinitionTest test = ParserTestCase.parse5("parseArgumentDefinitionTest", "?x", [ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST]);
+ ArgumentDefinitionTest test = ParserTestCase.parse4("parseArgumentDefinitionTest", "?x", [ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST]);
JUnitTestCase.assertNotNull(test.question);
JUnitTestCase.assertNotNull(test.identifier);
}
void test_parseArgumentList_empty() {
- ArgumentList argumentList = ParserTestCase.parse5("parseArgumentList", "()", []);
+ ArgumentList argumentList = ParserTestCase.parse4("parseArgumentList", "()", []);
NodeList<Expression> arguments = argumentList.arguments;
EngineTestCase.assertSize(0, arguments);
}
void test_parseArgumentList_mixed() {
- ArgumentList argumentList = ParserTestCase.parse5("parseArgumentList", "(w, x, y: y, z: z)", []);
+ ArgumentList argumentList = ParserTestCase.parse4("parseArgumentList", "(w, x, y: y, z: z)", []);
NodeList<Expression> arguments = argumentList.arguments;
EngineTestCase.assertSize(4, arguments);
}
void test_parseArgumentList_noNamed() {
- ArgumentList argumentList = ParserTestCase.parse5("parseArgumentList", "(x, y, z)", []);
+ ArgumentList argumentList = ParserTestCase.parse4("parseArgumentList", "(x, y, z)", []);
NodeList<Expression> arguments = argumentList.arguments;
EngineTestCase.assertSize(3, arguments);
}
void test_parseArgumentList_onlyNamed() {
- ArgumentList argumentList = ParserTestCase.parse5("parseArgumentList", "(x: x, y: y)", []);
+ ArgumentList argumentList = ParserTestCase.parse4("parseArgumentList", "(x: x, y: y)", []);
NodeList<Expression> arguments = argumentList.arguments;
EngineTestCase.assertSize(2, arguments);
}
void test_parseAssertStatement() {
- AssertStatement statement = ParserTestCase.parse5("parseAssertStatement", "assert (x);", []);
+ AssertStatement statement = ParserTestCase.parse4("parseAssertStatement", "assert (x);", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.condition);
@@ -478,14 +478,14 @@
void test_parseAssignableExpression_super_dot() {
PropertyAccess propertyAccess = ParserTestCase.parse("parseAssignableExpression", <Object> [false], "super.y");
- EngineTestCase.assertInstanceOf(SuperExpression, propertyAccess.target);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, propertyAccess.target);
JUnitTestCase.assertNotNull(propertyAccess.operator);
JUnitTestCase.assertNotNull(propertyAccess.propertyName);
}
void test_parseAssignableExpression_super_index() {
IndexExpression expression = ParserTestCase.parse("parseAssignableExpression", <Object> [false], "super[y]");
- EngineTestCase.assertInstanceOf(SuperExpression, expression.target);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, expression.target);
JUnitTestCase.assertNotNull(expression.leftBracket);
JUnitTestCase.assertNotNull(expression.index);
JUnitTestCase.assertNotNull(expression.rightBracket);
@@ -510,7 +510,7 @@
}
void test_parseBitwiseAndExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseBitwiseAndExpression", "x & y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpression", "x & y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type);
@@ -518,15 +518,15 @@
}
void test_parseBitwiseAndExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseBitwiseAndExpression", "super & y", []);
- EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand);
+ BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpression", "super & y", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type);
JUnitTestCase.assertNotNull(expression.rightOperand);
}
void test_parseBitwiseOrExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseBitwiseOrExpression", "x | y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseBitwiseOrExpression", "x | y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.BAR, expression.operator.type);
@@ -534,15 +534,15 @@
}
void test_parseBitwiseOrExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseBitwiseOrExpression", "super | y", []);
- EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand);
+ BinaryExpression expression = ParserTestCase.parse4("parseBitwiseOrExpression", "super | y", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.BAR, expression.operator.type);
JUnitTestCase.assertNotNull(expression.rightOperand);
}
void test_parseBitwiseXorExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseBitwiseXorExpression", "x ^ y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseBitwiseXorExpression", "x ^ y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.CARET, expression.operator.type);
@@ -550,43 +550,43 @@
}
void test_parseBitwiseXorExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseBitwiseXorExpression", "super ^ y", []);
- EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand);
+ BinaryExpression expression = ParserTestCase.parse4("parseBitwiseXorExpression", "super ^ y", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.CARET, expression.operator.type);
JUnitTestCase.assertNotNull(expression.rightOperand);
}
void test_parseBlock_empty() {
- Block block = ParserTestCase.parse5("parseBlock", "{}", []);
+ Block block = ParserTestCase.parse4("parseBlock", "{}", []);
JUnitTestCase.assertNotNull(block.leftBracket);
EngineTestCase.assertSize(0, block.statements);
JUnitTestCase.assertNotNull(block.rightBracket);
}
void test_parseBlock_nonEmpty() {
- Block block = ParserTestCase.parse5("parseBlock", "{;}", []);
+ Block block = ParserTestCase.parse4("parseBlock", "{;}", []);
JUnitTestCase.assertNotNull(block.leftBracket);
EngineTestCase.assertSize(1, block.statements);
JUnitTestCase.assertNotNull(block.rightBracket);
}
void test_parseBreakStatement_label() {
- BreakStatement statement = ParserTestCase.parse5("parseBreakStatement", "break foo;", []);
+ BreakStatement statement = ParserTestCase.parse4("parseBreakStatement", "break foo;", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.label);
JUnitTestCase.assertNotNull(statement.semicolon);
}
void test_parseBreakStatement_noLabel() {
- BreakStatement statement = ParserTestCase.parse5("parseBreakStatement", "break;", [ParserErrorCode.BREAK_OUTSIDE_OF_LOOP]);
+ BreakStatement statement = ParserTestCase.parse4("parseBreakStatement", "break;", [ParserErrorCode.BREAK_OUTSIDE_OF_LOOP]);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNull(statement.label);
JUnitTestCase.assertNotNull(statement.semicolon);
}
void test_parseCascadeSection_i() {
- IndexExpression section = ParserTestCase.parse5("parseCascadeSection", "..[i]", []);
+ IndexExpression section = ParserTestCase.parse4("parseCascadeSection", "..[i]", []);
JUnitTestCase.assertNull(section.target);
JUnitTestCase.assertNotNull(section.leftBracket);
JUnitTestCase.assertNotNull(section.index);
@@ -594,14 +594,14 @@
}
void test_parseCascadeSection_ia() {
- FunctionExpressionInvocation section = ParserTestCase.parse5("parseCascadeSection", "..[i](b)", []);
- EngineTestCase.assertInstanceOf(IndexExpression, section.function);
+ FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSection", "..[i](b)", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is IndexExpression, IndexExpression, section.function);
JUnitTestCase.assertNotNull(section.argumentList);
}
void test_parseCascadeSection_ii() {
- MethodInvocation section = ParserTestCase.parse5("parseCascadeSection", "..a(b).c(d)", []);
- EngineTestCase.assertInstanceOf(MethodInvocation, section.target);
+ MethodInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a(b).c(d)", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvocation, section.target);
JUnitTestCase.assertNotNull(section.period);
JUnitTestCase.assertNotNull(section.methodName);
JUnitTestCase.assertNotNull(section.argumentList);
@@ -609,14 +609,14 @@
}
void test_parseCascadeSection_p() {
- PropertyAccess section = ParserTestCase.parse5("parseCascadeSection", "..a", []);
+ PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..a", []);
JUnitTestCase.assertNull(section.target);
JUnitTestCase.assertNotNull(section.operator);
JUnitTestCase.assertNotNull(section.propertyName);
}
void test_parseCascadeSection_p_assign() {
- AssignmentExpression section = ParserTestCase.parse5("parseCascadeSection", "..a = 3", []);
+ AssignmentExpression section = ParserTestCase.parse4("parseCascadeSection", "..a = 3", []);
JUnitTestCase.assertNotNull(section.leftHandSide);
JUnitTestCase.assertNotNull(section.operator);
Expression rhs = section.rightHandSide;
@@ -624,22 +624,22 @@
}
void test_parseCascadeSection_p_assign_withCascade() {
- AssignmentExpression section = ParserTestCase.parse5("parseCascadeSection", "..a = 3..m()", []);
+ AssignmentExpression section = ParserTestCase.parse4("parseCascadeSection", "..a = 3..m()", []);
JUnitTestCase.assertNotNull(section.leftHandSide);
JUnitTestCase.assertNotNull(section.operator);
Expression rhs = section.rightHandSide;
- EngineTestCase.assertInstanceOf(IntegerLiteral, rhs);
+ EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiteral, rhs);
}
void test_parseCascadeSection_p_builtIn() {
- PropertyAccess section = ParserTestCase.parse5("parseCascadeSection", "..as", []);
+ PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..as", []);
JUnitTestCase.assertNull(section.target);
JUnitTestCase.assertNotNull(section.operator);
JUnitTestCase.assertNotNull(section.propertyName);
}
void test_parseCascadeSection_pa() {
- MethodInvocation section = ParserTestCase.parse5("parseCascadeSection", "..a(b)", []);
+ MethodInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a(b)", []);
JUnitTestCase.assertNull(section.target);
JUnitTestCase.assertNotNull(section.period);
JUnitTestCase.assertNotNull(section.methodName);
@@ -648,21 +648,21 @@
}
void test_parseCascadeSection_paa() {
- FunctionExpressionInvocation section = ParserTestCase.parse5("parseCascadeSection", "..a(b)(c)", []);
- EngineTestCase.assertInstanceOf(MethodInvocation, section.function);
+ FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a(b)(c)", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvocation, section.function);
JUnitTestCase.assertNotNull(section.argumentList);
EngineTestCase.assertSize(1, section.argumentList.arguments);
}
void test_parseCascadeSection_paapaa() {
- FunctionExpressionInvocation section = ParserTestCase.parse5("parseCascadeSection", "..a(b)(c).d(e)(f)", []);
- EngineTestCase.assertInstanceOf(MethodInvocation, section.function);
+ FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a(b)(c).d(e)(f)", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvocation, section.function);
JUnitTestCase.assertNotNull(section.argumentList);
EngineTestCase.assertSize(1, section.argumentList.arguments);
}
void test_parseCascadeSection_pap() {
- PropertyAccess section = ParserTestCase.parse5("parseCascadeSection", "..a(b).c", []);
+ PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..a(b).c", []);
JUnitTestCase.assertNotNull(section.target);
JUnitTestCase.assertNotNull(section.operator);
JUnitTestCase.assertNotNull(section.propertyName);
@@ -1204,7 +1204,7 @@
}
void test_parseCombinators_h() {
- List<Combinator> combinators = ParserTestCase.parse5("parseCombinators", "hide a;", []);
+ List<Combinator> combinators = ParserTestCase.parse4("parseCombinators", "hide a;", []);
EngineTestCase.assertSize(1, combinators);
HideCombinator combinator = combinators[0] as HideCombinator;
JUnitTestCase.assertNotNull(combinator);
@@ -1213,7 +1213,7 @@
}
void test_parseCombinators_hs() {
- List<Combinator> combinators = ParserTestCase.parse5("parseCombinators", "hide a show b;", []);
+ List<Combinator> combinators = ParserTestCase.parse4("parseCombinators", "hide a show b;", []);
EngineTestCase.assertSize(2, combinators);
HideCombinator hideCombinator = combinators[0] as HideCombinator;
JUnitTestCase.assertNotNull(hideCombinator);
@@ -1226,12 +1226,12 @@
}
void test_parseCombinators_hshs() {
- List<Combinator> combinators = ParserTestCase.parse5("parseCombinators", "hide a show b hide c show d;", []);
+ List<Combinator> combinators = ParserTestCase.parse4("parseCombinators", "hide a show b hide c show d;", []);
EngineTestCase.assertSize(4, combinators);
}
void test_parseCombinators_s() {
- List<Combinator> combinators = ParserTestCase.parse5("parseCombinators", "show a;", []);
+ List<Combinator> combinators = ParserTestCase.parse4("parseCombinators", "show a;", []);
EngineTestCase.assertSize(1, combinators);
ShowCombinator combinator = combinators[0] as ShowCombinator;
JUnitTestCase.assertNotNull(combinator);
@@ -1240,68 +1240,68 @@
}
void test_parseCommentAndMetadata_c() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "/** 1 */ void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "/** 1 */ void", []);
JUnitTestCase.assertNotNull(commentAndMetadata.comment);
EngineTestCase.assertSize(0, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_cmc() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "/** 1 */ @A /** 2 */ void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "/** 1 */ @A /** 2 */ void", []);
JUnitTestCase.assertNotNull(commentAndMetadata.comment);
EngineTestCase.assertSize(1, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_cmcm() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "/** 1 */ @A /** 2 */ @B void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "/** 1 */ @A /** 2 */ @B void", []);
JUnitTestCase.assertNotNull(commentAndMetadata.comment);
EngineTestCase.assertSize(2, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_cmm() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "/** 1 */ @A @B void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "/** 1 */ @A @B void", []);
JUnitTestCase.assertNotNull(commentAndMetadata.comment);
EngineTestCase.assertSize(2, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_m() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "@A void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "@A void", []);
JUnitTestCase.assertNull(commentAndMetadata.comment);
EngineTestCase.assertSize(1, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_mcm() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "@A /** 1 */ @B void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "@A /** 1 */ @B void", []);
JUnitTestCase.assertNotNull(commentAndMetadata.comment);
EngineTestCase.assertSize(2, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_mcmc() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "@A /** 1 */ @B /** 2 */ void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "@A /** 1 */ @B /** 2 */ void", []);
JUnitTestCase.assertNotNull(commentAndMetadata.comment);
EngineTestCase.assertSize(2, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_mm() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "@A @B(x) void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "@A @B(x) void", []);
JUnitTestCase.assertNull(commentAndMetadata.comment);
EngineTestCase.assertSize(2, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_none() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", "void", []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", "void", []);
JUnitTestCase.assertNull(commentAndMetadata.comment);
EngineTestCase.assertSize(0, commentAndMetadata.metadata);
}
void test_parseCommentAndMetadata_singleLine() {
- CommentAndMetadata commentAndMetadata = ParserTestCase.parse5("parseCommentAndMetadata", EngineTestCase.createSource(["/// 1", "/// 2", "void"]), []);
+ CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentAndMetadata", EngineTestCase.createSource(["/// 1", "/// 2", "void"]), []);
JUnitTestCase.assertNotNull(commentAndMetadata.comment);
EngineTestCase.assertSize(0, commentAndMetadata.metadata);
}
void test_parseCommentReference_new_prefixed() {
CommentReference reference = ParserTestCase.parse("parseCommentReference", <Object> ["new a.b", 7], "");
- PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf(PrefixedIdentifier, reference.identifier);
+ PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf((obj) => obj is PrefixedIdentifier, PrefixedIdentifier, reference.identifier);
SimpleIdentifier prefix = prefixedIdentifier.prefix;
JUnitTestCase.assertNotNull(prefix.token);
JUnitTestCase.assertEquals("a", prefix.name);
@@ -1315,7 +1315,7 @@
void test_parseCommentReference_new_simple() {
CommentReference reference = ParserTestCase.parse("parseCommentReference", <Object> ["new a", 5], "");
- SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(SimpleIdentifier, reference.identifier);
+ SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, reference.identifier);
JUnitTestCase.assertNotNull(identifier.token);
JUnitTestCase.assertEquals("a", identifier.name);
JUnitTestCase.assertEquals(9, identifier.offset);
@@ -1323,7 +1323,7 @@
void test_parseCommentReference_prefixed() {
CommentReference reference = ParserTestCase.parse("parseCommentReference", <Object> ["a.b", 7], "");
- PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf(PrefixedIdentifier, reference.identifier);
+ PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf((obj) => obj is PrefixedIdentifier, PrefixedIdentifier, reference.identifier);
SimpleIdentifier prefix = prefixedIdentifier.prefix;
JUnitTestCase.assertNotNull(prefix.token);
JUnitTestCase.assertEquals("a", prefix.name);
@@ -1337,12 +1337,22 @@
void test_parseCommentReference_simple() {
CommentReference reference = ParserTestCase.parse("parseCommentReference", <Object> ["a", 5], "");
- SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(SimpleIdentifier, reference.identifier);
+ SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, reference.identifier);
JUnitTestCase.assertNotNull(identifier.token);
JUnitTestCase.assertEquals("a", identifier.name);
JUnitTestCase.assertEquals(5, identifier.offset);
}
+ void test_parseCommentReference_synthetic() {
+ CommentReference reference = ParserTestCase.parse("parseCommentReference", <Object> ["", 5], "");
+ SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, reference.identifier);
+ JUnitTestCase.assertNotNull(identifier);
+ JUnitTestCase.assertTrue(identifier.isSynthetic);
+ JUnitTestCase.assertNotNull(identifier.token);
+ JUnitTestCase.assertEquals("", identifier.name);
+ JUnitTestCase.assertEquals(5, identifier.offset);
+ }
+
void test_parseCommentReferences_multiLine() {
List<Token> tokens = <Token> [new StringToken(TokenType.MULTI_LINE_COMMENT, "/** xxx [a] yyy [b] zzz */", 3)];
List<CommentReference> references = ParserTestCase.parse("parseCommentReferences", <Object> [tokens], "");
@@ -1357,6 +1367,28 @@
JUnitTestCase.assertEquals(20, reference.offset);
}
+ void test_parseCommentReferences_notClosed_noIdentifier() {
+ List<Token> tokens = <Token> [new StringToken(TokenType.MULTI_LINE_COMMENT, "/** [ some text", 5)];
+ List<CommentReference> references = ParserTestCase.parse("parseCommentReferences", <Object> [tokens], "");
+ EngineTestCase.assertSize(1, references);
+ CommentReference reference = references[0];
+ JUnitTestCase.assertNotNull(reference);
+ JUnitTestCase.assertNotNull(reference.identifier);
+ JUnitTestCase.assertTrue(reference.identifier.isSynthetic);
+ JUnitTestCase.assertEquals("", reference.identifier.name);
+ }
+
+ void test_parseCommentReferences_notClosed_withIdentifier() {
+ List<Token> tokens = <Token> [new StringToken(TokenType.MULTI_LINE_COMMENT, "/** [namePrefix some text", 5)];
+ List<CommentReference> references = ParserTestCase.parse("parseCommentReferences", <Object> [tokens], "");
+ EngineTestCase.assertSize(1, references);
+ CommentReference reference = references[0];
+ JUnitTestCase.assertNotNull(reference);
+ JUnitTestCase.assertNotNull(reference.identifier);
+ JUnitTestCase.assertFalse(reference.identifier.isSynthetic);
+ JUnitTestCase.assertEquals("namePrefix", reference.identifier.name);
+ }
+
void test_parseCommentReferences_singleLine() {
List<Token> tokens = <Token> [
new StringToken(TokenType.SINGLE_LINE_COMMENT, "/// xxx [a] yyy [b] zzz", 3),
@@ -1428,74 +1460,74 @@
}
void test_parseCompilationUnit_abstractAsPrefix_parameterized() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "abstract<dynamic> _abstract = new abstract.A();", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "abstract<dynamic> _abstract = new abstract.A();", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(1, unit.declarations);
}
void test_parseCompilationUnit_builtIn_asFunctionName() {
- ParserTestCase.parse5("parseCompilationUnit", "abstract(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "as(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "dynamic(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "export(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "external(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "factory(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "get(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "implements(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "import(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "library(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "operator(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "part(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "set(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "static(x) => 0;", []);
- ParserTestCase.parse5("parseCompilationUnit", "typedef(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "abstract(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "as(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "dynamic(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "export(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "external(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "factory(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "get(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "implements(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "import(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "library(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "operator(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "part(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "set(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "static(x) => 0;", []);
+ ParserTestCase.parse4("parseCompilationUnit", "typedef(x) => 0;", []);
}
void test_parseCompilationUnit_directives_multiple() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "library l;\npart 'a.dart';", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "library l;\npart 'a.dart';", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(2, unit.directives);
EngineTestCase.assertSize(0, unit.declarations);
}
void test_parseCompilationUnit_directives_single() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "library l;", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "library l;", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(1, unit.directives);
EngineTestCase.assertSize(0, unit.declarations);
}
void test_parseCompilationUnit_empty() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(0, unit.declarations);
}
void test_parseCompilationUnit_exportAsPrefix() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "export.A _export = new export.A();", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "export.A _export = new export.A();", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(1, unit.declarations);
}
void test_parseCompilationUnit_exportAsPrefix_parameterized() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "export<dynamic> _export = new export.A();", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "export<dynamic> _export = new export.A();", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(1, unit.declarations);
}
void test_parseCompilationUnit_operatorAsPrefix_parameterized() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "operator<dynamic> _operator = new operator.A();", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "operator<dynamic> _operator = new operator.A();", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(1, unit.declarations);
}
void test_parseCompilationUnit_script() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "#! /bin/dart", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "#! /bin/dart", []);
JUnitTestCase.assertNotNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(0, unit.declarations);
@@ -1503,20 +1535,20 @@
void test_parseCompilationUnit_skipFunctionBody_withInterpolation() {
ParserTestCase._parseFunctionBodies = false;
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "f() { '\${n}'; }", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "f() { '\${n}'; }", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(1, unit.declarations);
}
void test_parseCompilationUnit_topLevelDeclaration() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "class A {}", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "class A {}", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(1, unit.declarations);
}
void test_parseCompilationUnit_typedefAsPrefix() {
- CompilationUnit unit = ParserTestCase.parse5("parseCompilationUnit", "typedef.A _typedef = new typedef.A();", []);
+ CompilationUnit unit = ParserTestCase.parse4("parseCompilationUnit", "typedef.A _typedef = new typedef.A();", []);
JUnitTestCase.assertNull(unit.scriptTag);
EngineTestCase.assertSize(0, unit.directives);
EngineTestCase.assertSize(1, unit.declarations);
@@ -1713,7 +1745,7 @@
}
void test_parseConditionalExpression() {
- ConditionalExpression expression = ParserTestCase.parse5("parseConditionalExpression", "x ? y : z", []);
+ ConditionalExpression expression = ParserTestCase.parse4("parseConditionalExpression", "x ? y : z", []);
JUnitTestCase.assertNotNull(expression.condition);
JUnitTestCase.assertNotNull(expression.question);
JUnitTestCase.assertNotNull(expression.thenExpression);
@@ -1722,7 +1754,7 @@
}
void test_parseConstExpression_instanceCreation() {
- InstanceCreationExpression expression = ParserTestCase.parse5("parseConstExpression", "const A()", []);
+ InstanceCreationExpression expression = ParserTestCase.parse4("parseConstExpression", "const A()", []);
JUnitTestCase.assertNotNull(expression.keyword);
ConstructorName name = expression.constructorName;
JUnitTestCase.assertNotNull(name);
@@ -1733,7 +1765,7 @@
}
void test_parseConstExpression_listLiteral_typed() {
- ListLiteral literal = ParserTestCase.parse5("parseConstExpression", "const <A> []", []);
+ ListLiteral literal = ParserTestCase.parse4("parseConstExpression", "const <A> []", []);
JUnitTestCase.assertNotNull(literal.constKeyword);
JUnitTestCase.assertNotNull(literal.typeArguments);
JUnitTestCase.assertNotNull(literal.leftBracket);
@@ -1742,7 +1774,7 @@
}
void test_parseConstExpression_listLiteral_untyped() {
- ListLiteral literal = ParserTestCase.parse5("parseConstExpression", "const []", []);
+ ListLiteral literal = ParserTestCase.parse4("parseConstExpression", "const []", []);
JUnitTestCase.assertNotNull(literal.constKeyword);
JUnitTestCase.assertNull(literal.typeArguments);
JUnitTestCase.assertNotNull(literal.leftBracket);
@@ -1751,7 +1783,7 @@
}
void test_parseConstExpression_mapLiteral_typed() {
- MapLiteral literal = ParserTestCase.parse5("parseConstExpression", "const <A, B> {}", []);
+ MapLiteral literal = ParserTestCase.parse4("parseConstExpression", "const <A, B> {}", []);
JUnitTestCase.assertNotNull(literal.leftBracket);
EngineTestCase.assertSize(0, literal.entries);
JUnitTestCase.assertNotNull(literal.rightBracket);
@@ -1759,7 +1791,7 @@
}
void test_parseConstExpression_mapLiteral_untyped() {
- MapLiteral literal = ParserTestCase.parse5("parseConstExpression", "const {}", []);
+ MapLiteral literal = ParserTestCase.parse4("parseConstExpression", "const {}", []);
JUnitTestCase.assertNotNull(literal.leftBracket);
EngineTestCase.assertSize(0, literal.entries);
JUnitTestCase.assertNotNull(literal.rightBracket);
@@ -1770,7 +1802,7 @@
}
void test_parseConstructorFieldInitializer_qualified() {
- ConstructorFieldInitializer invocation = ParserTestCase.parse5("parseConstructorFieldInitializer", "this.a = b", []);
+ ConstructorFieldInitializer invocation = ParserTestCase.parse4("parseConstructorFieldInitializer", "this.a = b", []);
JUnitTestCase.assertNotNull(invocation.equals);
JUnitTestCase.assertNotNull(invocation.expression);
JUnitTestCase.assertNotNull(invocation.fieldName);
@@ -1779,7 +1811,7 @@
}
void test_parseConstructorFieldInitializer_unqualified() {
- ConstructorFieldInitializer invocation = ParserTestCase.parse5("parseConstructorFieldInitializer", "a = b", []);
+ ConstructorFieldInitializer invocation = ParserTestCase.parse4("parseConstructorFieldInitializer", "a = b", []);
JUnitTestCase.assertNotNull(invocation.equals);
JUnitTestCase.assertNotNull(invocation.expression);
JUnitTestCase.assertNotNull(invocation.fieldName);
@@ -1788,42 +1820,42 @@
}
void test_parseConstructorName_named_noPrefix() {
- ConstructorName name = ParserTestCase.parse5("parseConstructorName", "A.n;", []);
+ ConstructorName name = ParserTestCase.parse4("parseConstructorName", "A.n;", []);
JUnitTestCase.assertNotNull(name.type);
JUnitTestCase.assertNull(name.period);
JUnitTestCase.assertNull(name.name);
}
void test_parseConstructorName_named_prefixed() {
- ConstructorName name = ParserTestCase.parse5("parseConstructorName", "p.A.n;", []);
+ ConstructorName name = ParserTestCase.parse4("parseConstructorName", "p.A.n;", []);
JUnitTestCase.assertNotNull(name.type);
JUnitTestCase.assertNotNull(name.period);
JUnitTestCase.assertNotNull(name.name);
}
void test_parseConstructorName_unnamed_noPrefix() {
- ConstructorName name = ParserTestCase.parse5("parseConstructorName", "A;", []);
+ ConstructorName name = ParserTestCase.parse4("parseConstructorName", "A;", []);
JUnitTestCase.assertNotNull(name.type);
JUnitTestCase.assertNull(name.period);
JUnitTestCase.assertNull(name.name);
}
void test_parseConstructorName_unnamed_prefixed() {
- ConstructorName name = ParserTestCase.parse5("parseConstructorName", "p.A;", []);
+ ConstructorName name = ParserTestCase.parse4("parseConstructorName", "p.A;", []);
JUnitTestCase.assertNotNull(name.type);
JUnitTestCase.assertNull(name.period);
JUnitTestCase.assertNull(name.name);
}
void test_parseContinueStatement_label() {
- ContinueStatement statement = ParserTestCase.parse5("parseContinueStatement", "continue foo;", [ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP]);
+ ContinueStatement statement = ParserTestCase.parse4("parseContinueStatement", "continue foo;", [ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP]);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.label);
JUnitTestCase.assertNotNull(statement.semicolon);
}
void test_parseContinueStatement_noLabel() {
- ContinueStatement statement = ParserTestCase.parse5("parseContinueStatement", "continue;", [ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP]);
+ ContinueStatement statement = ParserTestCase.parse4("parseContinueStatement", "continue;", [ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP]);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNull(statement.label);
JUnitTestCase.assertNotNull(statement.semicolon);
@@ -1870,14 +1902,14 @@
}
void test_parseDocumentationComment_block() {
- Comment comment = ParserTestCase.parse5("parseDocumentationComment", "/** */ class", []);
+ Comment comment = ParserTestCase.parse4("parseDocumentationComment", "/** */ class", []);
JUnitTestCase.assertFalse(comment.isBlock);
JUnitTestCase.assertTrue(comment.isDocumentation);
JUnitTestCase.assertFalse(comment.isEndOfLine);
}
void test_parseDocumentationComment_block_withReference() {
- Comment comment = ParserTestCase.parse5("parseDocumentationComment", "/** [a] */ class", []);
+ Comment comment = ParserTestCase.parse4("parseDocumentationComment", "/** [a] */ class", []);
JUnitTestCase.assertFalse(comment.isBlock);
JUnitTestCase.assertTrue(comment.isDocumentation);
JUnitTestCase.assertFalse(comment.isEndOfLine);
@@ -1889,14 +1921,14 @@
}
void test_parseDocumentationComment_endOfLine() {
- Comment comment = ParserTestCase.parse5("parseDocumentationComment", "/// \n/// \n class", []);
+ Comment comment = ParserTestCase.parse4("parseDocumentationComment", "/// \n/// \n class", []);
JUnitTestCase.assertFalse(comment.isBlock);
JUnitTestCase.assertTrue(comment.isDocumentation);
JUnitTestCase.assertFalse(comment.isEndOfLine);
}
void test_parseDoStatement() {
- DoStatement statement = ParserTestCase.parse5("parseDoStatement", "do {} while (x);", []);
+ DoStatement statement = ParserTestCase.parse4("parseDoStatement", "do {} while (x);", []);
JUnitTestCase.assertNotNull(statement.doKeyword);
JUnitTestCase.assertNotNull(statement.body);
JUnitTestCase.assertNotNull(statement.whileKeyword);
@@ -1907,12 +1939,12 @@
}
void test_parseEmptyStatement() {
- EmptyStatement statement = ParserTestCase.parse5("parseEmptyStatement", ";", []);
+ EmptyStatement statement = ParserTestCase.parse4("parseEmptyStatement", ";", []);
JUnitTestCase.assertNotNull(statement.semicolon);
}
void test_parseEqualityExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseEqualityExpression", "x == y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseEqualityExpression", "x == y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type);
@@ -1920,8 +1952,8 @@
}
void test_parseEqualityExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseEqualityExpression", "super == y", []);
- EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand);
+ BinaryExpression expression = ParserTestCase.parse4("parseEqualityExpression", "super == y", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type);
JUnitTestCase.assertNotNull(expression.rightOperand);
@@ -1969,7 +2001,7 @@
void test_parseExpression_assign() {
// TODO(brianwilkerson) Implement more tests for this method.
- AssignmentExpression expression = ParserTestCase.parse5("parseExpression", "x = y", []);
+ AssignmentExpression expression = ParserTestCase.parse4("parseExpression", "x = y", []);
JUnitTestCase.assertNotNull(expression.leftHandSide);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.EQ, expression.operator.type);
@@ -1977,7 +2009,7 @@
}
void test_parseExpression_comparison() {
- BinaryExpression expression = ParserTestCase.parse5("parseExpression", "--a.b == c", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseExpression", "--a.b == c", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type);
@@ -1985,8 +2017,8 @@
}
void test_parseExpression_invokeFunctionExpression() {
- FunctionExpressionInvocation invocation = ParserTestCase.parse5("parseExpression", "(a) {return a + a;} (3)", []);
- EngineTestCase.assertInstanceOf(FunctionExpression, invocation.function);
+ FunctionExpressionInvocation invocation = ParserTestCase.parse4("parseExpression", "(a) {return a + a;} (3)", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, FunctionExpression, invocation.function);
FunctionExpression expression = invocation.function as FunctionExpression;
JUnitTestCase.assertNotNull(expression.parameters);
JUnitTestCase.assertNotNull(expression.body);
@@ -1996,25 +2028,25 @@
}
void test_parseExpression_superMethodInvocation() {
- MethodInvocation invocation = ParserTestCase.parse5("parseExpression", "super.m()", []);
+ MethodInvocation invocation = ParserTestCase.parse4("parseExpression", "super.m()", []);
JUnitTestCase.assertNotNull(invocation.target);
JUnitTestCase.assertNotNull(invocation.methodName);
JUnitTestCase.assertNotNull(invocation.argumentList);
}
void test_parseExpressionList_multiple() {
- List<Expression> result = ParserTestCase.parse5("parseExpressionList", "1, 2, 3", []);
+ List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1, 2, 3", []);
EngineTestCase.assertSize(3, result);
}
void test_parseExpressionList_single() {
- List<Expression> result = ParserTestCase.parse5("parseExpressionList", "1", []);
+ List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1", []);
EngineTestCase.assertSize(1, result);
}
void test_parseExpressionWithoutCascade_assign() {
// TODO(brianwilkerson) Implement more tests for this method.
- AssignmentExpression expression = ParserTestCase.parse5("parseExpressionWithoutCascade", "x = y", []);
+ AssignmentExpression expression = ParserTestCase.parse4("parseExpressionWithoutCascade", "x = y", []);
JUnitTestCase.assertNotNull(expression.leftHandSide);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.EQ, expression.operator.type);
@@ -2022,7 +2054,7 @@
}
void test_parseExpressionWithoutCascade_comparison() {
- BinaryExpression expression = ParserTestCase.parse5("parseExpressionWithoutCascade", "--a.b == c", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseExpressionWithoutCascade", "--a.b == c", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type);
@@ -2030,17 +2062,17 @@
}
void test_parseExpressionWithoutCascade_superMethodInvocation() {
- MethodInvocation invocation = ParserTestCase.parse5("parseExpressionWithoutCascade", "super.m()", []);
+ MethodInvocation invocation = ParserTestCase.parse4("parseExpressionWithoutCascade", "super.m()", []);
JUnitTestCase.assertNotNull(invocation.target);
JUnitTestCase.assertNotNull(invocation.methodName);
JUnitTestCase.assertNotNull(invocation.argumentList);
}
void test_parseExtendsClause() {
- ExtendsClause clause = ParserTestCase.parse5("parseExtendsClause", "extends B", []);
+ ExtendsClause clause = ParserTestCase.parse4("parseExtendsClause", "extends B", []);
JUnitTestCase.assertNotNull(clause.keyword);
JUnitTestCase.assertNotNull(clause.superclass);
- EngineTestCase.assertInstanceOf(TypeName, clause.superclass);
+ EngineTestCase.assertInstanceOf((obj) => obj is TypeName, TypeName, clause.superclass);
}
void test_parseFinalConstVarOrType_const_noType() {
@@ -2227,7 +2259,7 @@
}
void test_parseFormalParameterList_empty() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "()", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "()", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(0, parameterList.parameters);
@@ -2236,7 +2268,7 @@
}
void test_parseFormalParameterList_named_multiple() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "({A a : 1, B b, C c : 3})", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "({A a : 1, B b, C c : 3})", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNotNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(3, parameterList.parameters);
@@ -2245,7 +2277,7 @@
}
void test_parseFormalParameterList_named_single() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "({A a})", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "({A a})", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNotNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(1, parameterList.parameters);
@@ -2254,7 +2286,7 @@
}
void test_parseFormalParameterList_normal_multiple() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "(A a, B b, C c)", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "(A a, B b, C c)", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(3, parameterList.parameters);
@@ -2263,7 +2295,7 @@
}
void test_parseFormalParameterList_normal_named() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "(A a, {B b})", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "(A a, {B b})", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNotNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(2, parameterList.parameters);
@@ -2272,7 +2304,7 @@
}
void test_parseFormalParameterList_normal_positional() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "(A a, [B b])", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "(A a, [B b])", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNotNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(2, parameterList.parameters);
@@ -2281,7 +2313,7 @@
}
void test_parseFormalParameterList_normal_single() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "(A a)", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "(A a)", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(1, parameterList.parameters);
@@ -2290,7 +2322,7 @@
}
void test_parseFormalParameterList_positional_multiple() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "([A a = null, B b, C c = null])", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "([A a = null, B b, C c = null])", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNotNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(3, parameterList.parameters);
@@ -2299,7 +2331,7 @@
}
void test_parseFormalParameterList_positional_single() {
- FormalParameterList parameterList = ParserTestCase.parse5("parseFormalParameterList", "([A a = null])", []);
+ FormalParameterList parameterList = ParserTestCase.parse4("parseFormalParameterList", "([A a = null])", []);
JUnitTestCase.assertNotNull(parameterList.leftParenthesis);
JUnitTestCase.assertNotNull(parameterList.leftDelimiter);
EngineTestCase.assertSize(1, parameterList.parameters);
@@ -2308,7 +2340,7 @@
}
void test_parseForStatement_each_identifier() {
- ForEachStatement statement = ParserTestCase.parse5("parseForStatement", "for (element in list) {}", []);
+ ForEachStatement statement = ParserTestCase.parse4("parseForStatement", "for (element in list) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNull(statement.loopVariable);
@@ -2320,7 +2352,7 @@
}
void test_parseForStatement_each_noType_metadata() {
- ForEachStatement statement = ParserTestCase.parse5("parseForStatement", "for (@A var element in list) {}", []);
+ ForEachStatement statement = ParserTestCase.parse4("parseForStatement", "for (@A var element in list) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.loopVariable);
@@ -2333,7 +2365,7 @@
}
void test_parseForStatement_each_type() {
- ForEachStatement statement = ParserTestCase.parse5("parseForStatement", "for (A element in list) {}", []);
+ ForEachStatement statement = ParserTestCase.parse4("parseForStatement", "for (A element in list) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.loopVariable);
@@ -2345,7 +2377,7 @@
}
void test_parseForStatement_each_var() {
- ForEachStatement statement = ParserTestCase.parse5("parseForStatement", "for (var element in list) {}", []);
+ ForEachStatement statement = ParserTestCase.parse4("parseForStatement", "for (var element in list) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.loopVariable);
@@ -2357,7 +2389,7 @@
}
void test_parseForStatement_loop_c() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (; i < count;) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (; i < count;) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNull(statement.variables);
@@ -2371,7 +2403,7 @@
}
void test_parseForStatement_loop_cu() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (; i < count; i++) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (; i < count; i++) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNull(statement.variables);
@@ -2385,7 +2417,7 @@
}
void test_parseForStatement_loop_ecu() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (i--; i < count; i++) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (i--; i < count; i++) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNull(statement.variables);
@@ -2399,7 +2431,7 @@
}
void test_parseForStatement_loop_i() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (var i = 0;;) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (var i = 0;;) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
VariableDeclarationList variables = statement.variables;
@@ -2416,7 +2448,7 @@
}
void test_parseForStatement_loop_i_withMetadata() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (@A var i = 0;;) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (@A var i = 0;;) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
VariableDeclarationList variables = statement.variables;
@@ -2433,7 +2465,7 @@
}
void test_parseForStatement_loop_ic() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (var i = 0; i < count;) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (var i = 0; i < count;) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
VariableDeclarationList variables = statement.variables;
@@ -2449,7 +2481,7 @@
}
void test_parseForStatement_loop_icu() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (var i = 0; i < count; i++) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (var i = 0; i < count; i++) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
VariableDeclarationList variables = statement.variables;
@@ -2465,7 +2497,7 @@
}
void test_parseForStatement_loop_iicuu() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (int i = 0, j = count; i < j; i++, j--) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (int i = 0, j = count; i < j; i++, j--) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
VariableDeclarationList variables = statement.variables;
@@ -2481,7 +2513,7 @@
}
void test_parseForStatement_loop_iu() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (var i = 0;; i++) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (var i = 0;; i++) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
VariableDeclarationList variables = statement.variables;
@@ -2497,7 +2529,7 @@
}
void test_parseForStatement_loop_u() {
- ForStatement statement = ParserTestCase.parse5("parseForStatement", "for (;; i++) {}", []);
+ ForStatement statement = ParserTestCase.parse4("parseForStatement", "for (;; i++) {}", []);
JUnitTestCase.assertNotNull(statement.forKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNull(statement.variables);
@@ -2537,19 +2569,19 @@
void test_parseFunctionBody_skip_block() {
ParserTestCase._parseFunctionBodies = false;
FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Object> [false, null, false], "{}");
- EngineTestCase.assertInstanceOf(EmptyFunctionBody, functionBody);
+ EngineTestCase.assertInstanceOf((obj) => obj is EmptyFunctionBody, EmptyFunctionBody, functionBody);
}
void test_parseFunctionBody_skip_blocks() {
ParserTestCase._parseFunctionBodies = false;
FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Object> [false, null, false], "{ {} }");
- EngineTestCase.assertInstanceOf(EmptyFunctionBody, functionBody);
+ EngineTestCase.assertInstanceOf((obj) => obj is EmptyFunctionBody, EmptyFunctionBody, functionBody);
}
void test_parseFunctionBody_skip_expression() {
ParserTestCase._parseFunctionBodies = false;
FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Object> [false, null, false], "=> y;");
- EngineTestCase.assertInstanceOf(EmptyFunctionBody, functionBody);
+ EngineTestCase.assertInstanceOf((obj) => obj is EmptyFunctionBody, EmptyFunctionBody, functionBody);
}
void test_parseFunctionDeclaration_function() {
@@ -2595,19 +2627,19 @@
}
void test_parseFunctionDeclarationStatement() {
- FunctionDeclarationStatement statement = ParserTestCase.parse5("parseFunctionDeclarationStatement", "void f(int p) => p * 2;", []);
+ FunctionDeclarationStatement statement = ParserTestCase.parse4("parseFunctionDeclarationStatement", "void f(int p) => p * 2;", []);
JUnitTestCase.assertNotNull(statement.functionDeclaration);
}
void test_parseFunctionExpression_body_inExpression() {
- FunctionExpression expression = ParserTestCase.parse5("parseFunctionExpression", "(int i) => i++", []);
+ FunctionExpression expression = ParserTestCase.parse4("parseFunctionExpression", "(int i) => i++", []);
JUnitTestCase.assertNotNull(expression.body);
JUnitTestCase.assertNotNull(expression.parameters);
JUnitTestCase.assertNull((expression.body as ExpressionFunctionBody).semicolon);
}
void test_parseFunctionExpression_minimal() {
- FunctionExpression expression = ParserTestCase.parse5("parseFunctionExpression", "() {}", []);
+ FunctionExpression expression = ParserTestCase.parse4("parseFunctionExpression", "() {}", []);
JUnitTestCase.assertNotNull(expression.body);
JUnitTestCase.assertNotNull(expression.parameters);
}
@@ -2648,17 +2680,17 @@
}
void test_parseIdentifierList_multiple() {
- List<SimpleIdentifier> list = ParserTestCase.parse5("parseIdentifierList", "a, b, c", []);
+ List<SimpleIdentifier> list = ParserTestCase.parse4("parseIdentifierList", "a, b, c", []);
EngineTestCase.assertSize(3, list);
}
void test_parseIdentifierList_single() {
- List<SimpleIdentifier> list = ParserTestCase.parse5("parseIdentifierList", "a", []);
+ List<SimpleIdentifier> list = ParserTestCase.parse4("parseIdentifierList", "a", []);
EngineTestCase.assertSize(1, list);
}
void test_parseIfStatement_else_block() {
- IfStatement statement = ParserTestCase.parse5("parseIfStatement", "if (x) {} else {}", []);
+ IfStatement statement = ParserTestCase.parse4("parseIfStatement", "if (x) {} else {}", []);
JUnitTestCase.assertNotNull(statement.ifKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.condition);
@@ -2669,7 +2701,7 @@
}
void test_parseIfStatement_else_statement() {
- IfStatement statement = ParserTestCase.parse5("parseIfStatement", "if (x) f(x); else f(y);", []);
+ IfStatement statement = ParserTestCase.parse4("parseIfStatement", "if (x) f(x); else f(y);", []);
JUnitTestCase.assertNotNull(statement.ifKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.condition);
@@ -2680,7 +2712,7 @@
}
void test_parseIfStatement_noElse_block() {
- IfStatement statement = ParserTestCase.parse5("parseIfStatement", "if (x) {}", []);
+ IfStatement statement = ParserTestCase.parse4("parseIfStatement", "if (x) {}", []);
JUnitTestCase.assertNotNull(statement.ifKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.condition);
@@ -2691,7 +2723,7 @@
}
void test_parseIfStatement_noElse_statement() {
- IfStatement statement = ParserTestCase.parse5("parseIfStatement", "if (x) f(x);", []);
+ IfStatement statement = ParserTestCase.parse4("parseIfStatement", "if (x) f(x);", []);
JUnitTestCase.assertNotNull(statement.ifKeyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.condition);
@@ -2702,13 +2734,13 @@
}
void test_parseImplementsClause_multiple() {
- ImplementsClause clause = ParserTestCase.parse5("parseImplementsClause", "implements A, B, C", []);
+ ImplementsClause clause = ParserTestCase.parse4("parseImplementsClause", "implements A, B, C", []);
EngineTestCase.assertSize(3, clause.interfaces);
JUnitTestCase.assertNotNull(clause.keyword);
}
void test_parseImplementsClause_single() {
- ImplementsClause clause = ParserTestCase.parse5("parseImplementsClause", "implements A", []);
+ ImplementsClause clause = ParserTestCase.parse4("parseImplementsClause", "implements A", []);
EngineTestCase.assertSize(1, clause.interfaces);
JUnitTestCase.assertNotNull(clause.keyword);
}
@@ -2868,13 +2900,13 @@
void test_parseLibraryIdentifier_multiple() {
String name = "a.b.c";
- LibraryIdentifier identifier = ParserTestCase.parse5("parseLibraryIdentifier", name, []);
+ LibraryIdentifier identifier = ParserTestCase.parse4("parseLibraryIdentifier", name, []);
JUnitTestCase.assertEquals(name, identifier.name);
}
void test_parseLibraryIdentifier_single() {
String name = "a";
- LibraryIdentifier identifier = ParserTestCase.parse5("parseLibraryIdentifier", name, []);
+ LibraryIdentifier identifier = ParserTestCase.parse4("parseLibraryIdentifier", name, []);
JUnitTestCase.assertEquals(name, identifier.name);
}
@@ -2955,7 +2987,7 @@
}
void test_parseLogicalAndExpression() {
- BinaryExpression expression = ParserTestCase.parse5("parseLogicalAndExpression", "x && y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseLogicalAndExpression", "x && y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.AMPERSAND_AMPERSAND, expression.operator.type);
@@ -2963,7 +2995,7 @@
}
void test_parseLogicalOrExpression() {
- BinaryExpression expression = ParserTestCase.parse5("parseLogicalOrExpression", "x || y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseLogicalOrExpression", "x || y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.BAR_BAR, expression.operator.type);
@@ -2972,9 +3004,9 @@
void test_parseMapLiteral_empty() {
Token token = TokenFactory.token(Keyword.CONST);
- TypeArgumentList typeArguments = ASTFactory.typeArgumentList([
- ASTFactory.typeName4("String", []),
- ASTFactory.typeName4("int", [])]);
+ TypeArgumentList typeArguments = AstFactory.typeArgumentList([
+ AstFactory.typeName4("String", []),
+ AstFactory.typeName4("int", [])]);
MapLiteral literal = ParserTestCase.parse("parseMapLiteral", <Object> [token, typeArguments], "{}");
JUnitTestCase.assertEquals(token, literal.constKeyword);
JUnitTestCase.assertEquals(typeArguments, literal.typeArguments);
@@ -2998,63 +3030,63 @@
}
void test_parseMapLiteralEntry_complex() {
- MapLiteralEntry entry = ParserTestCase.parse5("parseMapLiteralEntry", "2 + 2 : y", []);
+ MapLiteralEntry entry = ParserTestCase.parse4("parseMapLiteralEntry", "2 + 2 : y", []);
JUnitTestCase.assertNotNull(entry.key);
JUnitTestCase.assertNotNull(entry.separator);
JUnitTestCase.assertNotNull(entry.value);
}
void test_parseMapLiteralEntry_int() {
- MapLiteralEntry entry = ParserTestCase.parse5("parseMapLiteralEntry", "0 : y", []);
+ MapLiteralEntry entry = ParserTestCase.parse4("parseMapLiteralEntry", "0 : y", []);
JUnitTestCase.assertNotNull(entry.key);
JUnitTestCase.assertNotNull(entry.separator);
JUnitTestCase.assertNotNull(entry.value);
}
void test_parseMapLiteralEntry_string() {
- MapLiteralEntry entry = ParserTestCase.parse5("parseMapLiteralEntry", "'x' : y", []);
+ MapLiteralEntry entry = ParserTestCase.parse4("parseMapLiteralEntry", "'x' : y", []);
JUnitTestCase.assertNotNull(entry.key);
JUnitTestCase.assertNotNull(entry.separator);
JUnitTestCase.assertNotNull(entry.value);
}
void test_parseModifiers_abstract() {
- Modifiers modifiers = ParserTestCase.parse5("parseModifiers", "abstract A", []);
+ Modifiers modifiers = ParserTestCase.parse4("parseModifiers", "abstract A", []);
JUnitTestCase.assertNotNull(modifiers.abstractKeyword);
}
void test_parseModifiers_const() {
- Modifiers modifiers = ParserTestCase.parse5("parseModifiers", "const A", []);
+ Modifiers modifiers = ParserTestCase.parse4("parseModifiers", "const A", []);
JUnitTestCase.assertNotNull(modifiers.constKeyword);
}
void test_parseModifiers_external() {
- Modifiers modifiers = ParserTestCase.parse5("parseModifiers", "external A", []);
+ Modifiers modifiers = ParserTestCase.parse4("parseModifiers", "external A", []);
JUnitTestCase.assertNotNull(modifiers.externalKeyword);
}
void test_parseModifiers_factory() {
- Modifiers modifiers = ParserTestCase.parse5("parseModifiers", "factory A", []);
+ Modifiers modifiers = ParserTestCase.parse4("parseModifiers", "factory A", []);
JUnitTestCase.assertNotNull(modifiers.factoryKeyword);
}
void test_parseModifiers_final() {
- Modifiers modifiers = ParserTestCase.parse5("parseModifiers", "final A", []);
+ Modifiers modifiers = ParserTestCase.parse4("parseModifiers", "final A", []);
JUnitTestCase.assertNotNull(modifiers.finalKeyword);
}
void test_parseModifiers_static() {
- Modifiers modifiers = ParserTestCase.parse5("parseModifiers", "static A", []);
+ Modifiers modifiers = ParserTestCase.parse4("parseModifiers", "static A", []);
JUnitTestCase.assertNotNull(modifiers.staticKeyword);
}
void test_parseModifiers_var() {
- Modifiers modifiers = ParserTestCase.parse5("parseModifiers", "var A", []);
+ Modifiers modifiers = ParserTestCase.parse4("parseModifiers", "var A", []);
JUnitTestCase.assertNotNull(modifiers.varKeyword);
}
void test_parseMultiplicativeExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseMultiplicativeExpression", "x * y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseMultiplicativeExpression", "x * y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.STAR, expression.operator.type);
@@ -3062,15 +3094,15 @@
}
void test_parseMultiplicativeExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseMultiplicativeExpression", "super * y", []);
- EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand);
+ BinaryExpression expression = ParserTestCase.parse4("parseMultiplicativeExpression", "super * y", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpression, expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.STAR, expression.operator.type);
JUnitTestCase.assertNotNull(expression.rightOperand);
}
void test_parseNewExpression() {
- InstanceCreationExpression expression = ParserTestCase.parse5("parseNewExpression", "new A()", []);
+ InstanceCreationExpression expression = ParserTestCase.parse4("parseNewExpression", "new A()", []);
JUnitTestCase.assertNotNull(expression.keyword);
ConstructorName name = expression.constructorName;
JUnitTestCase.assertNotNull(name);
@@ -3081,68 +3113,68 @@
}
void test_parseNonLabeledStatement_const_list_empty() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "const [];", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "const [];", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_const_list_nonEmpty() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "const [1, 2];", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "const [1, 2];", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_const_map_empty() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "const {};", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "const {};", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_const_map_nonEmpty() {
// TODO(brianwilkerson) Implement more tests for this method.
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "const {'a' : 1};", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "const {'a' : 1};", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_const_object() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "const A();", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "const A();", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_const_object_named_typeParameters() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "const A<B>.c();", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "const A<B>.c();", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_constructorInvocation() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "new C().m();", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "new C().m();", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_false() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "false;", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "false;", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_functionDeclaration() {
- ParserTestCase.parse5("parseNonLabeledStatement", "f() {};", []);
+ ParserTestCase.parse4("parseNonLabeledStatement", "f() {};", []);
}
void test_parseNonLabeledStatement_functionDeclaration_arguments() {
- ParserTestCase.parse5("parseNonLabeledStatement", "f(void g()) {};", []);
+ ParserTestCase.parse4("parseNonLabeledStatement", "f(void g()) {};", []);
}
void test_parseNonLabeledStatement_functionExpressionIndex() {
- ParserTestCase.parse5("parseNonLabeledStatement", "() {}[0] = null;", []);
+ ParserTestCase.parse4("parseNonLabeledStatement", "() {}[0] = null;", []);
}
void test_parseNonLabeledStatement_functionInvocation() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "f();", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "f();", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_invokeFunctionExpression() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "(a) {return a + a;} (3);", []);
- EngineTestCase.assertInstanceOf(FunctionExpressionInvocation, statement.expression);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "(a) {return a + a;} (3);", []);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpressionInvocation, FunctionExpressionInvocation, statement.expression);
FunctionExpressionInvocation invocation = statement.expression as FunctionExpressionInvocation;
- EngineTestCase.assertInstanceOf(FunctionExpression, invocation.function);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, FunctionExpression, invocation.function);
FunctionExpression expression = invocation.function as FunctionExpression;
JUnitTestCase.assertNotNull(expression.parameters);
JUnitTestCase.assertNotNull(expression.body);
@@ -3152,27 +3184,27 @@
}
void test_parseNonLabeledStatement_null() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "null;", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "null;", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_startingWithBuiltInIdentifier() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "library.getName();", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "library.getName();", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_true() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "true;", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "true;", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNonLabeledStatement_typeCast() {
- ExpressionStatement statement = ParserTestCase.parse5("parseNonLabeledStatement", "double.NAN as num;", []);
+ ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatement", "double.NAN as num;", []);
JUnitTestCase.assertNotNull(statement.expression);
}
void test_parseNormalFormalParameter_field_const_noType() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "const this.a)", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "const this.a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3180,7 +3212,7 @@
}
void test_parseNormalFormalParameter_field_const_type() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "const A this.a)", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "const A this.a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3188,7 +3220,7 @@
}
void test_parseNormalFormalParameter_field_final_noType() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "final this.a)", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "final this.a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3196,7 +3228,7 @@
}
void test_parseNormalFormalParameter_field_final_type() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "final A this.a)", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "final A this.a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3204,7 +3236,7 @@
}
void test_parseNormalFormalParameter_field_function_nested() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "this.a(B b))", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "this.a(B b))", []);
JUnitTestCase.assertNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3214,7 +3246,7 @@
}
void test_parseNormalFormalParameter_field_function_noNested() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "this.a())", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "this.a())", []);
JUnitTestCase.assertNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3224,7 +3256,7 @@
}
void test_parseNormalFormalParameter_field_noType() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "this.a)", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "this.a)", []);
JUnitTestCase.assertNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3232,7 +3264,7 @@
}
void test_parseNormalFormalParameter_field_type() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "A this.a)", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "A this.a)", []);
JUnitTestCase.assertNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3240,7 +3272,7 @@
}
void test_parseNormalFormalParameter_field_var() {
- FieldFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "var this.a)", []);
+ FieldFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "var this.a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3248,63 +3280,63 @@
}
void test_parseNormalFormalParameter_function_noType() {
- FunctionTypedFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "a())", []);
+ FunctionTypedFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "a())", []);
JUnitTestCase.assertNull(parameter.returnType);
JUnitTestCase.assertNotNull(parameter.identifier);
JUnitTestCase.assertNotNull(parameter.parameters);
}
void test_parseNormalFormalParameter_function_type() {
- FunctionTypedFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "A a())", []);
+ FunctionTypedFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "A a())", []);
JUnitTestCase.assertNotNull(parameter.returnType);
JUnitTestCase.assertNotNull(parameter.identifier);
JUnitTestCase.assertNotNull(parameter.parameters);
}
void test_parseNormalFormalParameter_function_void() {
- FunctionTypedFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "void a())", []);
+ FunctionTypedFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "void a())", []);
JUnitTestCase.assertNotNull(parameter.returnType);
JUnitTestCase.assertNotNull(parameter.identifier);
JUnitTestCase.assertNotNull(parameter.parameters);
}
void test_parseNormalFormalParameter_simple_const_noType() {
- SimpleFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "const a)", []);
+ SimpleFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "const a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
}
void test_parseNormalFormalParameter_simple_const_type() {
- SimpleFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "const A a)", []);
+ SimpleFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "const A a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
}
void test_parseNormalFormalParameter_simple_final_noType() {
- SimpleFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "final a)", []);
+ SimpleFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "final a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
}
void test_parseNormalFormalParameter_simple_final_type() {
- SimpleFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "final A a)", []);
+ SimpleFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "final A a)", []);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
}
void test_parseNormalFormalParameter_simple_noType() {
- SimpleFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "a)", []);
+ SimpleFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "a)", []);
JUnitTestCase.assertNull(parameter.keyword);
JUnitTestCase.assertNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
}
void test_parseNormalFormalParameter_simple_type() {
- SimpleFormalParameter parameter = ParserTestCase.parse5("parseNormalFormalParameter", "A a)", []);
+ SimpleFormalParameter parameter = ParserTestCase.parse4("parseNormalFormalParameter", "A a)", []);
JUnitTestCase.assertNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.type);
JUnitTestCase.assertNotNull(parameter.identifier);
@@ -3344,167 +3376,167 @@
}
void test_parsePostfixExpression_decrement() {
- PostfixExpression expression = ParserTestCase.parse5("parsePostfixExpression", "i--", []);
+ PostfixExpression expression = ParserTestCase.parse4("parsePostfixExpression", "i--", []);
JUnitTestCase.assertNotNull(expression.operand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.MINUS_MINUS, expression.operator.type);
}
void test_parsePostfixExpression_increment() {
- PostfixExpression expression = ParserTestCase.parse5("parsePostfixExpression", "i++", []);
+ PostfixExpression expression = ParserTestCase.parse4("parsePostfixExpression", "i++", []);
JUnitTestCase.assertNotNull(expression.operand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.PLUS_PLUS, expression.operator.type);
}
void test_parsePostfixExpression_none_indexExpression() {
- IndexExpression expression = ParserTestCase.parse5("parsePostfixExpression", "a[0]", []);
+ IndexExpression expression = ParserTestCase.parse4("parsePostfixExpression", "a[0]", []);
JUnitTestCase.assertNotNull(expression.target);
JUnitTestCase.assertNotNull(expression.index);
}
void test_parsePostfixExpression_none_methodInvocation() {
- MethodInvocation expression = ParserTestCase.parse5("parsePostfixExpression", "a.m()", []);
+ MethodInvocation expression = ParserTestCase.parse4("parsePostfixExpression", "a.m()", []);
JUnitTestCase.assertNotNull(expression.target);
JUnitTestCase.assertNotNull(expression.methodName);
JUnitTestCase.assertNotNull(expression.argumentList);
}
void test_parsePostfixExpression_none_propertyAccess() {
- PrefixedIdentifier expression = ParserTestCase.parse5("parsePostfixExpression", "a.b", []);
+ PrefixedIdentifier expression = ParserTestCase.parse4("parsePostfixExpression", "a.b", []);
JUnitTestCase.assertNotNull(expression.prefix);
JUnitTestCase.assertNotNull(expression.identifier);
}
void test_parsePrefixedIdentifier_noPrefix() {
String lexeme = "bar";
- SimpleIdentifier identifier = ParserTestCase.parse5("parsePrefixedIdentifier", lexeme, []);
+ SimpleIdentifier identifier = ParserTestCase.parse4("parsePrefixedIdentifier", lexeme, []);
JUnitTestCase.assertNotNull(identifier.token);
JUnitTestCase.assertEquals(lexeme, identifier.name);
}
void test_parsePrefixedIdentifier_prefix() {
String lexeme = "foo.bar";
- PrefixedIdentifier identifier = ParserTestCase.parse5("parsePrefixedIdentifier", lexeme, []);
+ PrefixedIdentifier identifier = ParserTestCase.parse4("parsePrefixedIdentifier", lexeme, []);
JUnitTestCase.assertEquals("foo", identifier.prefix.name);
JUnitTestCase.assertNotNull(identifier.period);
JUnitTestCase.assertEquals("bar", identifier.identifier.name);
}
void test_parsePrimaryExpression_const() {
- InstanceCreationExpression expression = ParserTestCase.parse5("parsePrimaryExpression", "const A()", []);
+ InstanceCreationExpression expression = ParserTestCase.parse4("parsePrimaryExpression", "const A()", []);
JUnitTestCase.assertNotNull(expression);
}
void test_parsePrimaryExpression_double() {
String doubleLiteral = "3.2e4";
- DoubleLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", doubleLiteral, []);
+ DoubleLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", doubleLiteral, []);
JUnitTestCase.assertNotNull(literal.literal);
JUnitTestCase.assertEquals(double.parse(doubleLiteral), literal.value);
}
void test_parsePrimaryExpression_false() {
- BooleanLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "false", []);
+ BooleanLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "false", []);
JUnitTestCase.assertNotNull(literal.literal);
JUnitTestCase.assertFalse(literal.value);
}
void test_parsePrimaryExpression_function_arguments() {
- FunctionExpression expression = ParserTestCase.parse5("parsePrimaryExpression", "(int i) => i + 1", []);
+ FunctionExpression expression = ParserTestCase.parse4("parsePrimaryExpression", "(int i) => i + 1", []);
JUnitTestCase.assertNotNull(expression.parameters);
JUnitTestCase.assertNotNull(expression.body);
}
void test_parsePrimaryExpression_function_noArguments() {
- FunctionExpression expression = ParserTestCase.parse5("parsePrimaryExpression", "() => 42", []);
+ FunctionExpression expression = ParserTestCase.parse4("parsePrimaryExpression", "() => 42", []);
JUnitTestCase.assertNotNull(expression.parameters);
JUnitTestCase.assertNotNull(expression.body);
}
void test_parsePrimaryExpression_hex() {
String hexLiteral = "3F";
- IntegerLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "0x${hexLiteral}", []);
+ IntegerLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "0x${hexLiteral}", []);
JUnitTestCase.assertNotNull(literal.literal);
JUnitTestCase.assertEquals(int.parse(hexLiteral, radix: 16), literal.value);
}
void test_parsePrimaryExpression_identifier() {
- SimpleIdentifier identifier = ParserTestCase.parse5("parsePrimaryExpression", "a", []);
+ SimpleIdentifier identifier = ParserTestCase.parse4("parsePrimaryExpression", "a", []);
JUnitTestCase.assertNotNull(identifier);
}
void test_parsePrimaryExpression_int() {
String intLiteral = "472";
- IntegerLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", intLiteral, []);
+ IntegerLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", intLiteral, []);
JUnitTestCase.assertNotNull(literal.literal);
JUnitTestCase.assertEquals(int.parse(intLiteral), literal.value);
}
void test_parsePrimaryExpression_listLiteral() {
- ListLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "[ ]", []);
+ ListLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "[ ]", []);
JUnitTestCase.assertNotNull(literal);
}
void test_parsePrimaryExpression_listLiteral_index() {
- ListLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "[]", []);
+ ListLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "[]", []);
JUnitTestCase.assertNotNull(literal);
}
void test_parsePrimaryExpression_listLiteral_typed() {
- ListLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "<A>[ ]", []);
+ ListLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "<A>[ ]", []);
JUnitTestCase.assertNotNull(literal.typeArguments);
EngineTestCase.assertSize(1, literal.typeArguments.arguments);
}
void test_parsePrimaryExpression_mapLiteral() {
- MapLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "{}", []);
+ MapLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "{}", []);
JUnitTestCase.assertNotNull(literal);
}
void test_parsePrimaryExpression_mapLiteral_typed() {
- MapLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "<A, B>{}", []);
+ MapLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "<A, B>{}", []);
JUnitTestCase.assertNotNull(literal.typeArguments);
EngineTestCase.assertSize(2, literal.typeArguments.arguments);
}
void test_parsePrimaryExpression_new() {
- InstanceCreationExpression expression = ParserTestCase.parse5("parsePrimaryExpression", "new A()", []);
+ InstanceCreationExpression expression = ParserTestCase.parse4("parsePrimaryExpression", "new A()", []);
JUnitTestCase.assertNotNull(expression);
}
void test_parsePrimaryExpression_null() {
- NullLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "null", []);
+ NullLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "null", []);
JUnitTestCase.assertNotNull(literal.literal);
}
void test_parsePrimaryExpression_parenthesized() {
- ParenthesizedExpression expression = ParserTestCase.parse5("parsePrimaryExpression", "(x)", []);
+ ParenthesizedExpression expression = ParserTestCase.parse4("parsePrimaryExpression", "(x)", []);
JUnitTestCase.assertNotNull(expression);
}
void test_parsePrimaryExpression_string() {
- SimpleStringLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "\"string\"", []);
+ SimpleStringLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "\"string\"", []);
JUnitTestCase.assertFalse(literal.isMultiline);
JUnitTestCase.assertFalse(literal.isRaw);
JUnitTestCase.assertEquals("string", literal.value);
}
void test_parsePrimaryExpression_string_multiline() {
- SimpleStringLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "'''string'''", []);
+ SimpleStringLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "'''string'''", []);
JUnitTestCase.assertTrue(literal.isMultiline);
JUnitTestCase.assertFalse(literal.isRaw);
JUnitTestCase.assertEquals("string", literal.value);
}
void test_parsePrimaryExpression_string_raw() {
- SimpleStringLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "r'string'", []);
+ SimpleStringLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "r'string'", []);
JUnitTestCase.assertFalse(literal.isMultiline);
JUnitTestCase.assertTrue(literal.isRaw);
JUnitTestCase.assertEquals("string", literal.value);
}
void test_parsePrimaryExpression_super() {
- PropertyAccess propertyAccess = ParserTestCase.parse5("parsePrimaryExpression", "super.x", []);
+ PropertyAccess propertyAccess = ParserTestCase.parse4("parsePrimaryExpression", "super.x", []);
JUnitTestCase.assertTrue(propertyAccess.target is SuperExpression);
JUnitTestCase.assertNotNull(propertyAccess.operator);
JUnitTestCase.assertEquals(TokenType.PERIOD, propertyAccess.operator.type);
@@ -3512,12 +3544,12 @@
}
void test_parsePrimaryExpression_this() {
- ThisExpression expression = ParserTestCase.parse5("parsePrimaryExpression", "this", []);
+ ThisExpression expression = ParserTestCase.parse4("parsePrimaryExpression", "this", []);
JUnitTestCase.assertNotNull(expression.keyword);
}
void test_parsePrimaryExpression_true() {
- BooleanLiteral literal = ParserTestCase.parse5("parsePrimaryExpression", "true", []);
+ BooleanLiteral literal = ParserTestCase.parse4("parsePrimaryExpression", "true", []);
JUnitTestCase.assertNotNull(literal.literal);
JUnitTestCase.assertTrue(literal.value);
}
@@ -3527,7 +3559,7 @@
}
void test_parseRedirectingConstructorInvocation_named() {
- RedirectingConstructorInvocation invocation = ParserTestCase.parse5("parseRedirectingConstructorInvocation", "this.a()", []);
+ RedirectingConstructorInvocation invocation = ParserTestCase.parse4("parseRedirectingConstructorInvocation", "this.a()", []);
JUnitTestCase.assertNotNull(invocation.argumentList);
JUnitTestCase.assertNotNull(invocation.constructorName);
JUnitTestCase.assertNotNull(invocation.keyword);
@@ -3535,7 +3567,7 @@
}
void test_parseRedirectingConstructorInvocation_unnamed() {
- RedirectingConstructorInvocation invocation = ParserTestCase.parse5("parseRedirectingConstructorInvocation", "this()", []);
+ RedirectingConstructorInvocation invocation = ParserTestCase.parse4("parseRedirectingConstructorInvocation", "this()", []);
JUnitTestCase.assertNotNull(invocation.argumentList);
JUnitTestCase.assertNull(invocation.constructorName);
JUnitTestCase.assertNotNull(invocation.keyword);
@@ -3543,14 +3575,14 @@
}
void test_parseRelationalExpression_as() {
- AsExpression expression = ParserTestCase.parse5("parseRelationalExpression", "x as Y", []);
+ AsExpression expression = ParserTestCase.parse4("parseRelationalExpression", "x as Y", []);
JUnitTestCase.assertNotNull(expression.expression);
JUnitTestCase.assertNotNull(expression.asOperator);
JUnitTestCase.assertNotNull(expression.type);
}
void test_parseRelationalExpression_is() {
- IsExpression expression = ParserTestCase.parse5("parseRelationalExpression", "x is y", []);
+ IsExpression expression = ParserTestCase.parse4("parseRelationalExpression", "x is y", []);
JUnitTestCase.assertNotNull(expression.expression);
JUnitTestCase.assertNotNull(expression.isOperator);
JUnitTestCase.assertNull(expression.notOperator);
@@ -3558,7 +3590,7 @@
}
void test_parseRelationalExpression_isNot() {
- IsExpression expression = ParserTestCase.parse5("parseRelationalExpression", "x is! y", []);
+ IsExpression expression = ParserTestCase.parse4("parseRelationalExpression", "x is! y", []);
JUnitTestCase.assertNotNull(expression.expression);
JUnitTestCase.assertNotNull(expression.isOperator);
JUnitTestCase.assertNotNull(expression.notOperator);
@@ -3566,7 +3598,7 @@
}
void test_parseRelationalExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseRelationalExpression", "x < y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseRelationalExpression", "x < y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.LT, expression.operator.type);
@@ -3574,7 +3606,7 @@
}
void test_parseRelationalExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseRelationalExpression", "super < y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseRelationalExpression", "super < y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.LT, expression.operator.type);
@@ -3582,32 +3614,32 @@
}
void test_parseRethrowExpression() {
- RethrowExpression expression = ParserTestCase.parse5("parseRethrowExpression", "rethrow;", []);
+ RethrowExpression expression = ParserTestCase.parse4("parseRethrowExpression", "rethrow;", []);
JUnitTestCase.assertNotNull(expression.keyword);
}
void test_parseReturnStatement_noValue() {
- ReturnStatement statement = ParserTestCase.parse5("parseReturnStatement", "return;", []);
+ ReturnStatement statement = ParserTestCase.parse4("parseReturnStatement", "return;", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNull(statement.expression);
JUnitTestCase.assertNotNull(statement.semicolon);
}
void test_parseReturnStatement_value() {
- ReturnStatement statement = ParserTestCase.parse5("parseReturnStatement", "return x;", []);
+ ReturnStatement statement = ParserTestCase.parse4("parseReturnStatement", "return x;", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.expression);
JUnitTestCase.assertNotNull(statement.semicolon);
}
void test_parseReturnType_nonVoid() {
- TypeName typeName = ParserTestCase.parse5("parseReturnType", "A<B>", []);
+ TypeName typeName = ParserTestCase.parse4("parseReturnType", "A<B>", []);
JUnitTestCase.assertNotNull(typeName.name);
JUnitTestCase.assertNotNull(typeName.typeArguments);
}
void test_parseReturnType_void() {
- TypeName typeName = ParserTestCase.parse5("parseReturnType", "void", []);
+ TypeName typeName = ParserTestCase.parse4("parseReturnType", "void", []);
JUnitTestCase.assertNotNull(typeName.name);
JUnitTestCase.assertNull(typeName.typeArguments);
}
@@ -3648,7 +3680,7 @@
}
void test_parseShiftExpression_normal() {
- BinaryExpression expression = ParserTestCase.parse5("parseShiftExpression", "x << y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseShiftExpression", "x << y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.LT_LT, expression.operator.type);
@@ -3656,7 +3688,7 @@
}
void test_parseShiftExpression_super() {
- BinaryExpression expression = ParserTestCase.parse5("parseShiftExpression", "super << y", []);
+ BinaryExpression expression = ParserTestCase.parse4("parseShiftExpression", "super << y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.LT_LT, expression.operator.type);
@@ -3665,14 +3697,14 @@
void test_parseSimpleIdentifier_builtInIdentifier() {
String lexeme = "as";
- SimpleIdentifier identifier = ParserTestCase.parse5("parseSimpleIdentifier", lexeme, []);
+ SimpleIdentifier identifier = ParserTestCase.parse4("parseSimpleIdentifier", lexeme, []);
JUnitTestCase.assertNotNull(identifier.token);
JUnitTestCase.assertEquals(lexeme, identifier.name);
}
void test_parseSimpleIdentifier_normalIdentifier() {
String lexeme = "foo";
- SimpleIdentifier identifier = ParserTestCase.parse5("parseSimpleIdentifier", lexeme, []);
+ SimpleIdentifier identifier = ParserTestCase.parse4("parseSimpleIdentifier", lexeme, []);
JUnitTestCase.assertNotNull(identifier.token);
JUnitTestCase.assertEquals(lexeme, identifier.name);
}
@@ -3682,22 +3714,22 @@
void test_parseStatement_functionDeclaration() {
// TODO(brianwilkerson) Implement more tests for this method.
- FunctionDeclarationStatement statement = ParserTestCase.parse5("parseStatement", "int f(a, b) {};", []);
+ FunctionDeclarationStatement statement = ParserTestCase.parse4("parseStatement", "int f(a, b) {};", []);
JUnitTestCase.assertNotNull(statement.functionDeclaration);
}
void test_parseStatement_mulipleLabels() {
- LabeledStatement statement = ParserTestCase.parse5("parseStatement", "l: m: return x;", []);
+ LabeledStatement statement = ParserTestCase.parse4("parseStatement", "l: m: return x;", []);
EngineTestCase.assertSize(2, statement.labels);
JUnitTestCase.assertNotNull(statement.statement);
}
void test_parseStatement_noLabels() {
- ParserTestCase.parse5("parseStatement", "return x;", []);
+ ParserTestCase.parse4("parseStatement", "return x;", []);
}
void test_parseStatement_singleLabel() {
- LabeledStatement statement = ParserTestCase.parse5("parseStatement", "l: return x;", []);
+ LabeledStatement statement = ParserTestCase.parse4("parseStatement", "l: return x;", []);
EngineTestCase.assertSize(1, statement.labels);
JUnitTestCase.assertNotNull(statement.statement);
}
@@ -3713,7 +3745,7 @@
}
void test_parseStringLiteral_adjacent() {
- AdjacentStrings literal = ParserTestCase.parse5("parseStringLiteral", "'a' 'b'", []);
+ AdjacentStrings literal = ParserTestCase.parse4("parseStringLiteral", "'a' 'b'", []);
NodeList<StringLiteral> strings = literal.strings;
EngineTestCase.assertSize(2, strings);
StringLiteral firstString = strings[0];
@@ -3723,7 +3755,7 @@
}
void test_parseStringLiteral_interpolated() {
- StringInterpolation literal = ParserTestCase.parse5("parseStringLiteral", "'a \${b} c \$this d'", []);
+ StringInterpolation literal = ParserTestCase.parse4("parseStringLiteral", "'a \${b} c \$this d'", []);
NodeList<InterpolationElement> elements = literal.elements;
EngineTestCase.assertSize(5, elements);
JUnitTestCase.assertTrue(elements[0] is InterpolationString);
@@ -3734,13 +3766,13 @@
}
void test_parseStringLiteral_single() {
- SimpleStringLiteral literal = ParserTestCase.parse5("parseStringLiteral", "'a'", []);
+ SimpleStringLiteral literal = ParserTestCase.parse4("parseStringLiteral", "'a'", []);
JUnitTestCase.assertNotNull(literal.literal);
JUnitTestCase.assertEquals("a", literal.value);
}
void test_parseSuperConstructorInvocation_named() {
- SuperConstructorInvocation invocation = ParserTestCase.parse5("parseSuperConstructorInvocation", "super.a()", []);
+ SuperConstructorInvocation invocation = ParserTestCase.parse4("parseSuperConstructorInvocation", "super.a()", []);
JUnitTestCase.assertNotNull(invocation.argumentList);
JUnitTestCase.assertNotNull(invocation.constructorName);
JUnitTestCase.assertNotNull(invocation.keyword);
@@ -3748,7 +3780,7 @@
}
void test_parseSuperConstructorInvocation_unnamed() {
- SuperConstructorInvocation invocation = ParserTestCase.parse5("parseSuperConstructorInvocation", "super()", []);
+ SuperConstructorInvocation invocation = ParserTestCase.parse4("parseSuperConstructorInvocation", "super()", []);
JUnitTestCase.assertNotNull(invocation.argumentList);
JUnitTestCase.assertNull(invocation.constructorName);
JUnitTestCase.assertNotNull(invocation.keyword);
@@ -3756,7 +3788,7 @@
}
void test_parseSwitchStatement_case() {
- SwitchStatement statement = ParserTestCase.parse5("parseSwitchStatement", "switch (a) {case 1: return 'I';}", []);
+ SwitchStatement statement = ParserTestCase.parse4("parseSwitchStatement", "switch (a) {case 1: return 'I';}", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.expression);
@@ -3767,7 +3799,7 @@
}
void test_parseSwitchStatement_empty() {
- SwitchStatement statement = ParserTestCase.parse5("parseSwitchStatement", "switch (a) {}", []);
+ SwitchStatement statement = ParserTestCase.parse4("parseSwitchStatement", "switch (a) {}", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.expression);
@@ -3778,7 +3810,7 @@
}
void test_parseSwitchStatement_labeledCase() {
- SwitchStatement statement = ParserTestCase.parse5("parseSwitchStatement", "switch (a) {l1: l2: l3: case(1):}", []);
+ SwitchStatement statement = ParserTestCase.parse4("parseSwitchStatement", "switch (a) {l1: l2: l3: case(1):}", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.expression);
@@ -3790,7 +3822,7 @@
}
void test_parseSwitchStatement_labeledStatementInCase() {
- SwitchStatement statement = ParserTestCase.parse5("parseSwitchStatement", "switch (a) {case 0: f(); l1: g(); break;}", []);
+ SwitchStatement statement = ParserTestCase.parse4("parseSwitchStatement", "switch (a) {case 0: f(); l1: g(); break;}", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.expression);
@@ -3802,7 +3834,7 @@
}
void test_parseSymbolLiteral_builtInIdentifier() {
- SymbolLiteral literal = ParserTestCase.parse5("parseSymbolLiteral", "#dynamic.static.abstract", []);
+ SymbolLiteral literal = ParserTestCase.parse4("parseSymbolLiteral", "#dynamic.static.abstract", []);
JUnitTestCase.assertNotNull(literal.poundSign);
List<Token> components = literal.components;
EngineTestCase.assertLength(3, components);
@@ -3812,7 +3844,7 @@
}
void test_parseSymbolLiteral_multiple() {
- SymbolLiteral literal = ParserTestCase.parse5("parseSymbolLiteral", "#a.b.c", []);
+ SymbolLiteral literal = ParserTestCase.parse4("parseSymbolLiteral", "#a.b.c", []);
JUnitTestCase.assertNotNull(literal.poundSign);
List<Token> components = literal.components;
EngineTestCase.assertLength(3, components);
@@ -3822,7 +3854,7 @@
}
void test_parseSymbolLiteral_operator() {
- SymbolLiteral literal = ParserTestCase.parse5("parseSymbolLiteral", "#==", []);
+ SymbolLiteral literal = ParserTestCase.parse4("parseSymbolLiteral", "#==", []);
JUnitTestCase.assertNotNull(literal.poundSign);
List<Token> components = literal.components;
EngineTestCase.assertLength(1, components);
@@ -3830,7 +3862,7 @@
}
void test_parseSymbolLiteral_single() {
- SymbolLiteral literal = ParserTestCase.parse5("parseSymbolLiteral", "#a", []);
+ SymbolLiteral literal = ParserTestCase.parse4("parseSymbolLiteral", "#a", []);
JUnitTestCase.assertNotNull(literal.poundSign);
List<Token> components = literal.components;
EngineTestCase.assertLength(1, components);
@@ -3838,19 +3870,19 @@
}
void test_parseThrowExpression() {
- ThrowExpression expression = ParserTestCase.parse5("parseThrowExpression", "throw x;", []);
+ ThrowExpression expression = ParserTestCase.parse4("parseThrowExpression", "throw x;", []);
JUnitTestCase.assertNotNull(expression.keyword);
JUnitTestCase.assertNotNull(expression.expression);
}
void test_parseThrowExpressionWithoutCascade() {
- ThrowExpression expression = ParserTestCase.parse5("parseThrowExpressionWithoutCascade", "throw x;", []);
+ ThrowExpression expression = ParserTestCase.parse4("parseThrowExpressionWithoutCascade", "throw x;", []);
JUnitTestCase.assertNotNull(expression.keyword);
JUnitTestCase.assertNotNull(expression.expression);
}
void test_parseTryStatement_catch() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {} catch (e) {}", []);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {} catch (e) {}", []);
JUnitTestCase.assertNotNull(statement.tryKeyword);
JUnitTestCase.assertNotNull(statement.body);
NodeList<CatchClause> catchClauses = statement.catchClauses;
@@ -3868,7 +3900,7 @@
}
void test_parseTryStatement_catch_finally() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {} catch (e, s) {} finally {}", []);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {} catch (e, s) {} finally {}", []);
JUnitTestCase.assertNotNull(statement.tryKeyword);
JUnitTestCase.assertNotNull(statement.body);
NodeList<CatchClause> catchClauses = statement.catchClauses;
@@ -3886,7 +3918,7 @@
}
void test_parseTryStatement_finally() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {} finally {}", []);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {} finally {}", []);
JUnitTestCase.assertNotNull(statement.tryKeyword);
JUnitTestCase.assertNotNull(statement.body);
EngineTestCase.assertSize(0, statement.catchClauses);
@@ -3895,7 +3927,7 @@
}
void test_parseTryStatement_multiple() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {} on NPE catch (e) {} on Error {} catch (e) {}", []);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {} on NPE catch (e) {} on Error {} catch (e) {}", []);
JUnitTestCase.assertNotNull(statement.tryKeyword);
JUnitTestCase.assertNotNull(statement.body);
EngineTestCase.assertSize(3, statement.catchClauses);
@@ -3904,7 +3936,7 @@
}
void test_parseTryStatement_on() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {} on Error {}", []);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {} on Error {}", []);
JUnitTestCase.assertNotNull(statement.tryKeyword);
JUnitTestCase.assertNotNull(statement.body);
NodeList<CatchClause> catchClauses = statement.catchClauses;
@@ -3922,7 +3954,7 @@
}
void test_parseTryStatement_on_catch() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {} on Error catch (e, s) {}", []);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {} on Error catch (e, s) {}", []);
JUnitTestCase.assertNotNull(statement.tryKeyword);
JUnitTestCase.assertNotNull(statement.body);
NodeList<CatchClause> catchClauses = statement.catchClauses;
@@ -3940,7 +3972,7 @@
}
void test_parseTryStatement_on_catch_finally() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {} on Error catch (e, s) {} finally {}", []);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {} on Error catch (e, s) {} finally {}", []);
JUnitTestCase.assertNotNull(statement.tryKeyword);
JUnitTestCase.assertNotNull(statement.body);
NodeList<CatchClause> catchClauses = statement.catchClauses;
@@ -4018,14 +4050,14 @@
}
void test_parseTypeArgumentList_multiple() {
- TypeArgumentList argumentList = ParserTestCase.parse5("parseTypeArgumentList", "<int, int, int>", []);
+ TypeArgumentList argumentList = ParserTestCase.parse4("parseTypeArgumentList", "<int, int, int>", []);
JUnitTestCase.assertNotNull(argumentList.leftBracket);
EngineTestCase.assertSize(3, argumentList.arguments);
JUnitTestCase.assertNotNull(argumentList.rightBracket);
}
void test_parseTypeArgumentList_nested() {
- TypeArgumentList argumentList = ParserTestCase.parse5("parseTypeArgumentList", "<A<B>>", []);
+ TypeArgumentList argumentList = ParserTestCase.parse4("parseTypeArgumentList", "<A<B>>", []);
JUnitTestCase.assertNotNull(argumentList.leftBracket);
EngineTestCase.assertSize(1, argumentList.arguments);
TypeName argument = argumentList.arguments[0];
@@ -4037,75 +4069,75 @@
}
void test_parseTypeArgumentList_single() {
- TypeArgumentList argumentList = ParserTestCase.parse5("parseTypeArgumentList", "<int>", []);
+ TypeArgumentList argumentList = ParserTestCase.parse4("parseTypeArgumentList", "<int>", []);
JUnitTestCase.assertNotNull(argumentList.leftBracket);
EngineTestCase.assertSize(1, argumentList.arguments);
JUnitTestCase.assertNotNull(argumentList.rightBracket);
}
void test_parseTypeName_parameterized() {
- TypeName typeName = ParserTestCase.parse5("parseTypeName", "List<int>", []);
+ TypeName typeName = ParserTestCase.parse4("parseTypeName", "List<int>", []);
JUnitTestCase.assertNotNull(typeName.name);
JUnitTestCase.assertNotNull(typeName.typeArguments);
}
void test_parseTypeName_simple() {
- TypeName typeName = ParserTestCase.parse5("parseTypeName", "int", []);
+ TypeName typeName = ParserTestCase.parse4("parseTypeName", "int", []);
JUnitTestCase.assertNotNull(typeName.name);
JUnitTestCase.assertNull(typeName.typeArguments);
}
void test_parseTypeParameter_bounded() {
- TypeParameter parameter = ParserTestCase.parse5("parseTypeParameter", "A extends B", []);
+ TypeParameter parameter = ParserTestCase.parse4("parseTypeParameter", "A extends B", []);
JUnitTestCase.assertNotNull(parameter.bound);
JUnitTestCase.assertNotNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.name);
}
void test_parseTypeParameter_simple() {
- TypeParameter parameter = ParserTestCase.parse5("parseTypeParameter", "A", []);
+ TypeParameter parameter = ParserTestCase.parse4("parseTypeParameter", "A", []);
JUnitTestCase.assertNull(parameter.bound);
JUnitTestCase.assertNull(parameter.keyword);
JUnitTestCase.assertNotNull(parameter.name);
}
void test_parseTypeParameterList_multiple() {
- TypeParameterList parameterList = ParserTestCase.parse5("parseTypeParameterList", "<A, B extends C, D>", []);
+ TypeParameterList parameterList = ParserTestCase.parse4("parseTypeParameterList", "<A, B extends C, D>", []);
JUnitTestCase.assertNotNull(parameterList.leftBracket);
JUnitTestCase.assertNotNull(parameterList.rightBracket);
EngineTestCase.assertSize(3, parameterList.typeParameters);
}
void test_parseTypeParameterList_parameterizedWithTrailingEquals() {
- TypeParameterList parameterList = ParserTestCase.parse5("parseTypeParameterList", "<A extends B<E>>=", []);
+ TypeParameterList parameterList = ParserTestCase.parse4("parseTypeParameterList", "<A extends B<E>>=", []);
JUnitTestCase.assertNotNull(parameterList.leftBracket);
JUnitTestCase.assertNotNull(parameterList.rightBracket);
EngineTestCase.assertSize(1, parameterList.typeParameters);
}
void test_parseTypeParameterList_single() {
- TypeParameterList parameterList = ParserTestCase.parse5("parseTypeParameterList", "<A>", []);
+ TypeParameterList parameterList = ParserTestCase.parse4("parseTypeParameterList", "<A>", []);
JUnitTestCase.assertNotNull(parameterList.leftBracket);
JUnitTestCase.assertNotNull(parameterList.rightBracket);
EngineTestCase.assertSize(1, parameterList.typeParameters);
}
void test_parseTypeParameterList_withTrailingEquals() {
- TypeParameterList parameterList = ParserTestCase.parse5("parseTypeParameterList", "<A>=", []);
+ TypeParameterList parameterList = ParserTestCase.parse4("parseTypeParameterList", "<A>=", []);
JUnitTestCase.assertNotNull(parameterList.leftBracket);
JUnitTestCase.assertNotNull(parameterList.rightBracket);
EngineTestCase.assertSize(1, parameterList.typeParameters);
}
void test_parseUnaryExpression_decrement_normal() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "--x", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "--x", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.MINUS_MINUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseUnaryExpression_decrement_super() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "--super", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "--super", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.MINUS, expression.operator.type);
Expression innerExpression = expression.operand;
@@ -4118,7 +4150,7 @@
}
void test_parseUnaryExpression_decrement_super_propertyAccess() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "--super.x", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "--super.x", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.MINUS_MINUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
@@ -4128,14 +4160,14 @@
}
void test_parseUnaryExpression_increment_normal() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "++x", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "++x", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.PLUS_PLUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseUnaryExpression_increment_super_index() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "++super[0]", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "++super[0]", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.PLUS_PLUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
@@ -4145,7 +4177,7 @@
}
void test_parseUnaryExpression_increment_super_propertyAccess() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "++super.x", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "++super.x", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.PLUS_PLUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
@@ -4155,143 +4187,143 @@
}
void test_parseUnaryExpression_minus_normal() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "-x", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "-x", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.MINUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseUnaryExpression_minus_super() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "-super", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "-super", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.MINUS, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseUnaryExpression_not_normal() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "!x", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "!x", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.BANG, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseUnaryExpression_not_super() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "!super", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "!super", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.BANG, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseUnaryExpression_tilda_normal() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "~x", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "~x", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.TILDE, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseUnaryExpression_tilda_super() {
- PrefixExpression expression = ParserTestCase.parse5("parseUnaryExpression", "~super", []);
+ PrefixExpression expression = ParserTestCase.parse4("parseUnaryExpression", "~super", []);
JUnitTestCase.assertNotNull(expression.operator);
JUnitTestCase.assertEquals(TokenType.TILDE, expression.operator.type);
JUnitTestCase.assertNotNull(expression.operand);
}
void test_parseVariableDeclaration_equals() {
- VariableDeclaration declaration = ParserTestCase.parse5("parseVariableDeclaration", "a = b", []);
+ VariableDeclaration declaration = ParserTestCase.parse4("parseVariableDeclaration", "a = b", []);
JUnitTestCase.assertNotNull(declaration.name);
JUnitTestCase.assertNotNull(declaration.equals);
JUnitTestCase.assertNotNull(declaration.initializer);
}
void test_parseVariableDeclaration_noEquals() {
- VariableDeclaration declaration = ParserTestCase.parse5("parseVariableDeclaration", "a", []);
+ VariableDeclaration declaration = ParserTestCase.parse4("parseVariableDeclaration", "a", []);
JUnitTestCase.assertNotNull(declaration.name);
JUnitTestCase.assertNull(declaration.equals);
JUnitTestCase.assertNull(declaration.initializer);
}
- void test_parseVariableDeclarationList_const_noType() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "const a");
+ void test_parseVariableDeclarationListAfterMetadata_const_noType() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "const a");
JUnitTestCase.assertNotNull(declarationList.keyword);
JUnitTestCase.assertNull(declarationList.type);
EngineTestCase.assertSize(1, declarationList.variables);
}
- void test_parseVariableDeclarationList_const_type() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "const A a");
+ void test_parseVariableDeclarationListAfterMetadata_const_type() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "const A a");
JUnitTestCase.assertNotNull(declarationList.keyword);
JUnitTestCase.assertNotNull(declarationList.type);
EngineTestCase.assertSize(1, declarationList.variables);
}
- void test_parseVariableDeclarationList_final_noType() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "final a");
+ void test_parseVariableDeclarationListAfterMetadata_final_noType() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "final a");
JUnitTestCase.assertNotNull(declarationList.keyword);
JUnitTestCase.assertNull(declarationList.type);
EngineTestCase.assertSize(1, declarationList.variables);
}
- void test_parseVariableDeclarationList_final_type() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "final A a");
+ void test_parseVariableDeclarationListAfterMetadata_final_type() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "final A a");
JUnitTestCase.assertNotNull(declarationList.keyword);
JUnitTestCase.assertNotNull(declarationList.type);
EngineTestCase.assertSize(1, declarationList.variables);
}
- void test_parseVariableDeclarationList_type_multiple() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "A a, b, c");
+ void test_parseVariableDeclarationListAfterMetadata_type_multiple() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "A a, b, c");
JUnitTestCase.assertNull(declarationList.keyword);
JUnitTestCase.assertNotNull(declarationList.type);
EngineTestCase.assertSize(3, declarationList.variables);
}
- void test_parseVariableDeclarationList_type_single() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "A a");
+ void test_parseVariableDeclarationListAfterMetadata_type_single() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "A a");
JUnitTestCase.assertNull(declarationList.keyword);
JUnitTestCase.assertNotNull(declarationList.type);
EngineTestCase.assertSize(1, declarationList.variables);
}
- void test_parseVariableDeclarationList_var_multiple() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "var a, b, c");
+ void test_parseVariableDeclarationListAfterMetadata_var_multiple() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "var a, b, c");
JUnitTestCase.assertNotNull(declarationList.keyword);
JUnitTestCase.assertNull(declarationList.type);
EngineTestCase.assertSize(3, declarationList.variables);
}
- void test_parseVariableDeclarationList_var_single() {
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata()], "var a");
+ void test_parseVariableDeclarationListAfterMetadata_var_single() {
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "var a");
JUnitTestCase.assertNotNull(declarationList.keyword);
JUnitTestCase.assertNull(declarationList.type);
EngineTestCase.assertSize(1, declarationList.variables);
}
- void test_parseVariableDeclarationList2_type() {
+ void test_parseVariableDeclarationListAfterType_type() {
TypeName type = new TypeName(new SimpleIdentifier(null), null);
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata(), null, type], "a");
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterType", <Object> [emptyCommentAndMetadata(), null, type], "a");
JUnitTestCase.assertNull(declarationList.keyword);
JUnitTestCase.assertEquals(type, declarationList.type);
EngineTestCase.assertSize(1, declarationList.variables);
}
- void test_parseVariableDeclarationList2_var() {
+ void test_parseVariableDeclarationListAfterType_var() {
Token keyword = TokenFactory.token(Keyword.VAR);
- VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationList", <Object> [emptyCommentAndMetadata(), keyword, null], "a, b, c");
+ VariableDeclarationList declarationList = ParserTestCase.parse("parseVariableDeclarationListAfterType", <Object> [emptyCommentAndMetadata(), keyword, null], "a, b, c");
JUnitTestCase.assertEquals(keyword, declarationList.keyword);
JUnitTestCase.assertNull(declarationList.type);
EngineTestCase.assertSize(3, declarationList.variables);
}
- void test_parseVariableDeclarationStatement_multiple() {
- VariableDeclarationStatement statement = ParserTestCase.parse("parseVariableDeclarationStatement", <Object> [emptyCommentAndMetadata()], "var x, y, z;");
+ void test_parseVariableDeclarationStatementAfterMetadata_multiple() {
+ VariableDeclarationStatement statement = ParserTestCase.parse("parseVariableDeclarationStatementAfterMetadata", <Object> [emptyCommentAndMetadata()], "var x, y, z;");
JUnitTestCase.assertNotNull(statement.semicolon);
VariableDeclarationList variableList = statement.variables;
JUnitTestCase.assertNotNull(variableList);
EngineTestCase.assertSize(3, variableList.variables);
}
- void test_parseVariableDeclarationStatement_single() {
- VariableDeclarationStatement statement = ParserTestCase.parse("parseVariableDeclarationStatement", <Object> [emptyCommentAndMetadata()], "var x;");
+ void test_parseVariableDeclarationStatementAfterMetadata_single() {
+ VariableDeclarationStatement statement = ParserTestCase.parse("parseVariableDeclarationStatementAfterMetadata", <Object> [emptyCommentAndMetadata()], "var x;");
JUnitTestCase.assertNotNull(statement.semicolon);
VariableDeclarationList variableList = statement.variables;
JUnitTestCase.assertNotNull(variableList);
@@ -4299,7 +4331,7 @@
}
void test_parseWhileStatement() {
- WhileStatement statement = ParserTestCase.parse5("parseWhileStatement", "while (x) {}", []);
+ WhileStatement statement = ParserTestCase.parse4("parseWhileStatement", "while (x) {}", []);
JUnitTestCase.assertNotNull(statement.keyword);
JUnitTestCase.assertNotNull(statement.leftParenthesis);
JUnitTestCase.assertNotNull(statement.condition);
@@ -4308,13 +4340,13 @@
}
void test_parseWithClause_multiple() {
- WithClause clause = ParserTestCase.parse5("parseWithClause", "with A, B, C", []);
+ WithClause clause = ParserTestCase.parse4("parseWithClause", "with A, B, C", []);
JUnitTestCase.assertNotNull(clause.withKeyword);
EngineTestCase.assertSize(3, clause.mixinTypes);
}
void test_parseWithClause_single() {
- WithClause clause = ParserTestCase.parse5("parseWithClause", "with M", []);
+ WithClause clause = ParserTestCase.parse4("parseWithClause", "with M", []);
JUnitTestCase.assertNotNull(clause.withKeyword);
EngineTestCase.assertSize(1, clause.mixinTypes);
}
@@ -5235,10 +5267,22 @@
final __test = new SimpleParserTest();
runJUnitTest(__test, __test.test_parseCommentReference_simple);
});
+ _ut.test('test_parseCommentReference_synthetic', () {
+ final __test = new SimpleParserTest();
+ runJUnitTest(__test, __test.test_parseCommentReference_synthetic);
+ });
_ut.test('test_parseCommentReferences_multiLine', () {
final __test = new SimpleParserTest();
runJUnitTest(__test, __test.test_parseCommentReferences_multiLine);
});
+ _ut.test('test_parseCommentReferences_notClosed_noIdentifier', () {
+ final __test = new SimpleParserTest();
+ runJUnitTest(__test, __test.test_parseCommentReferences_notClosed_noIdentifier);
+ });
+ _ut.test('test_parseCommentReferences_notClosed_withIdentifier', () {
+ final __test = new SimpleParserTest();
+ runJUnitTest(__test, __test.test_parseCommentReferences_notClosed_withIdentifier);
+ });
_ut.test('test_parseCommentReferences_singleLine', () {
final __test = new SimpleParserTest();
runJUnitTest(__test, __test.test_parseCommentReferences_singleLine);
@@ -6583,53 +6627,53 @@
final __test = new SimpleParserTest();
runJUnitTest(__test, __test.test_parseUnaryExpression_tilda_super);
});
- _ut.test('test_parseVariableDeclarationList2_type', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_const_noType', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList2_type);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_const_noType);
});
- _ut.test('test_parseVariableDeclarationList2_var', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_const_type', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList2_var);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_const_type);
});
- _ut.test('test_parseVariableDeclarationList_const_noType', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_final_noType', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_const_noType);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_final_noType);
});
- _ut.test('test_parseVariableDeclarationList_const_type', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_final_type', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_const_type);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_final_type);
});
- _ut.test('test_parseVariableDeclarationList_final_noType', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_type_multiple', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_final_noType);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_type_multiple);
});
- _ut.test('test_parseVariableDeclarationList_final_type', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_type_single', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_final_type);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_type_single);
});
- _ut.test('test_parseVariableDeclarationList_type_multiple', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_var_multiple', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_type_multiple);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_var_multiple);
});
- _ut.test('test_parseVariableDeclarationList_type_single', () {
+ _ut.test('test_parseVariableDeclarationListAfterMetadata_var_single', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_type_single);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetadata_var_single);
});
- _ut.test('test_parseVariableDeclarationList_var_multiple', () {
+ _ut.test('test_parseVariableDeclarationListAfterType_type', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_var_multiple);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterType_type);
});
- _ut.test('test_parseVariableDeclarationList_var_single', () {
+ _ut.test('test_parseVariableDeclarationListAfterType_var', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationList_var_single);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterType_var);
});
- _ut.test('test_parseVariableDeclarationStatement_multiple', () {
+ _ut.test('test_parseVariableDeclarationStatementAfterMetadata_multiple', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationStatement_multiple);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationStatementAfterMetadata_multiple);
});
- _ut.test('test_parseVariableDeclarationStatement_single', () {
+ _ut.test('test_parseVariableDeclarationStatementAfterMetadata_single', () {
final __test = new SimpleParserTest();
- runJUnitTest(__test, __test.test_parseVariableDeclarationStatement_single);
+ runJUnitTest(__test, __test.test_parseVariableDeclarationStatementAfterMetadata_single);
});
_ut.test('test_parseVariableDeclaration_equals', () {
final __test = new SimpleParserTest();
@@ -6762,33 +6806,33 @@
class ComplexParserTest extends ParserTestCase {
void test_additiveExpression_normal() {
BinaryExpression expression = ParserTestCase.parseExpression("x + y - z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_additiveExpression_noSpaces() {
BinaryExpression expression = ParserTestCase.parseExpression("i+1", []);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
- EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiteral, expression.rightOperand);
}
void test_additiveExpression_precedence_multiplicative_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x * y + z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_additiveExpression_precedence_multiplicative_left_withSuper() {
BinaryExpression expression = ParserTestCase.parseExpression("super * y - z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_additiveExpression_precedence_multiplicative_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x + y * z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_additiveExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super + y - z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_assignableExpression_arguments_normal_chain() {
@@ -6797,7 +6841,7 @@
//
// a(b)(c).d(e)
//
- MethodInvocation invocation2 = EngineTestCase.assertInstanceOf(MethodInvocation, propertyAccess1.target);
+ MethodInvocation invocation2 = EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvocation, propertyAccess1.target);
JUnitTestCase.assertEquals("d", invocation2.methodName.name);
ArgumentList argumentList2 = invocation2.argumentList;
JUnitTestCase.assertNotNull(argumentList2);
@@ -6805,14 +6849,14 @@
//
// a(b)(c)
//
- FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf(FunctionExpressionInvocation, invocation2.target);
+ FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpressionInvocation, FunctionExpressionInvocation, invocation2.target);
ArgumentList argumentList3 = invocation3.argumentList;
JUnitTestCase.assertNotNull(argumentList3);
EngineTestCase.assertSize(1, argumentList3.arguments);
//
// a(b)
//
- MethodInvocation invocation4 = EngineTestCase.assertInstanceOf(MethodInvocation, invocation3.function);
+ MethodInvocation invocation4 = EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvocation, invocation3.function);
JUnitTestCase.assertEquals("a", invocation4.methodName.name);
ArgumentList argumentList4 = invocation4.argumentList;
JUnitTestCase.assertNotNull(argumentList4);
@@ -6821,95 +6865,95 @@
void test_assignmentExpression_compound() {
AssignmentExpression expression = ParserTestCase.parseExpression("x = y = 0", []);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftHandSide);
- EngineTestCase.assertInstanceOf(AssignmentExpression, expression.rightHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is AssignmentExpression, AssignmentExpression, expression.rightHandSide);
}
void test_assignmentExpression_indexExpression() {
AssignmentExpression expression = ParserTestCase.parseExpression("x[1] = 0", []);
- EngineTestCase.assertInstanceOf(IndexExpression, expression.leftHandSide);
- EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is IndexExpression, IndexExpression, expression.leftHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiteral, expression.rightHandSide);
}
void test_assignmentExpression_prefixedIdentifier() {
AssignmentExpression expression = ParserTestCase.parseExpression("x.y = 0", []);
- EngineTestCase.assertInstanceOf(PrefixedIdentifier, expression.leftHandSide);
- EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is PrefixedIdentifier, PrefixedIdentifier, expression.leftHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiteral, expression.rightHandSide);
}
void test_assignmentExpression_propertyAccess() {
AssignmentExpression expression = ParserTestCase.parseExpression("super.y = 0", []);
- EngineTestCase.assertInstanceOf(PropertyAccess, expression.leftHandSide);
- EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccess, PropertyAccess, expression.leftHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiteral, expression.rightHandSide);
}
void test_bitwiseAndExpression_normal() {
BinaryExpression expression = ParserTestCase.parseExpression("x & y & z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseAndExpression_precedence_equality_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x == y && z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseAndExpression_precedence_equality_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x && y == z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_bitwiseAndExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super & y & z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseOrExpression_normal() {
BinaryExpression expression = ParserTestCase.parseExpression("x | y | z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseOrExpression_precedence_xor_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x ^ y | z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseOrExpression_precedence_xor_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x | y ^ z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_bitwiseOrExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super | y | z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseXorExpression_normal() {
BinaryExpression expression = ParserTestCase.parseExpression("x ^ y ^ z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseXorExpression_precedence_and_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x & y ^ z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseXorExpression_precedence_and_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x ^ y & z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_bitwiseXorExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super ^ y ^ z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_cascade_withAssignment() {
CascadeExpression cascade = ParserTestCase.parseExpression("new Map()..[3] = 4 ..[0] = 11;", []);
Expression target = cascade.target;
for (Expression section in cascade.cascadeSections) {
- EngineTestCase.assertInstanceOf(AssignmentExpression, section);
+ EngineTestCase.assertInstanceOf((obj) => obj is AssignmentExpression, AssignmentExpression, section);
Expression lhs = (section as AssignmentExpression).leftHandSide;
- EngineTestCase.assertInstanceOf(IndexExpression, lhs);
+ EngineTestCase.assertInstanceOf((obj) => obj is IndexExpression, IndexExpression, lhs);
IndexExpression index = lhs as IndexExpression;
JUnitTestCase.assertTrue(index.isCascaded);
JUnitTestCase.assertSame(target, index.realTarget);
@@ -6918,7 +6962,7 @@
void test_conditionalExpression_precedence_logicalOrExpression() {
ConditionalExpression expression = ParserTestCase.parseExpression("a | b ? y : z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.condition);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.condition);
}
void test_constructor_initializer_withParenthesizedExpression() {
@@ -6934,103 +6978,103 @@
void test_equalityExpression_normal() {
BinaryExpression expression = ParserTestCase.parseExpression("x == y != z", [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_equalityExpression_precedence_relational_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x is y == z", []);
- EngineTestCase.assertInstanceOf(IsExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression, expression.leftOperand);
}
void test_equalityExpression_precedence_relational_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x == y is z", []);
- EngineTestCase.assertInstanceOf(IsExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression, expression.rightOperand);
}
void test_equalityExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super == y != z", [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_logicalAndExpression() {
BinaryExpression expression = ParserTestCase.parseExpression("x && y && z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_logicalAndExpression_precedence_bitwiseOr_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x | y < z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_logicalAndExpression_precedence_bitwiseOr_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x < y | z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_logicalOrExpression() {
BinaryExpression expression = ParserTestCase.parseExpression("x || y || z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_logicalOrExpression_precedence_logicalAnd_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x && y || z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_logicalOrExpression_precedence_logicalAnd_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x || y && z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_multipleLabels_statement() {
LabeledStatement statement = ParserTestCase.parseStatement("a: b: c: return x;", []);
EngineTestCase.assertSize(3, statement.labels);
- EngineTestCase.assertInstanceOf(ReturnStatement, statement.statement);
+ EngineTestCase.assertInstanceOf((obj) => obj is ReturnStatement, ReturnStatement, statement.statement);
}
void test_multiplicativeExpression_normal() {
BinaryExpression expression = ParserTestCase.parseExpression("x * y / z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_multiplicativeExpression_precedence_unary_left() {
BinaryExpression expression = ParserTestCase.parseExpression("-x * y", []);
- EngineTestCase.assertInstanceOf(PrefixExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpression, expression.leftOperand);
}
void test_multiplicativeExpression_precedence_unary_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x * -y", []);
- EngineTestCase.assertInstanceOf(PrefixExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpression, expression.rightOperand);
}
void test_multiplicativeExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super * y / z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_relationalExpression_precedence_shift_right() {
IsExpression expression = ParserTestCase.parseExpression("x << y is z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.expression);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.expression);
}
void test_shiftExpression_normal() {
BinaryExpression expression = ParserTestCase.parseExpression("x >> 4 << 3", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_shiftExpression_precedence_additive_left() {
BinaryExpression expression = ParserTestCase.parseExpression("x + y << z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_shiftExpression_precedence_additive_right() {
BinaryExpression expression = ParserTestCase.parseExpression("x << y + z", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_shiftExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super >> 4 << 3", []);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_topLevelVariable_withMetadata() {
@@ -7231,78 +7275,6 @@
}
}
-/**
- * Instances of the class `ASTValidator` are used to validate the correct construction of an
- * AST structure.
- */
-class ASTValidator extends UnifyingASTVisitor<Object> {
- /**
- * A list containing the errors found while traversing the AST structure.
- */
- List<String> _errors = new List<String>();
-
- /**
- * Assert that no errors were found while traversing any of the AST structures that have been
- * visited.
- */
- void assertValid() {
- if (!_errors.isEmpty) {
- JavaStringBuilder builder = new JavaStringBuilder();
- builder.append("Invalid AST structure:");
- for (String message in _errors) {
- builder.append("\r\n ");
- builder.append(message);
- }
- JUnitTestCase.fail(builder.toString());
- }
- }
-
- Object visitNode(ASTNode node) {
- validate(node);
- return super.visitNode(node);
- }
-
- /**
- * Validate that the given AST node is correctly constructed.
- *
- * @param node the AST node being validated
- */
- void validate(ASTNode node) {
- ASTNode parent = node.parent;
- if (node is CompilationUnit) {
- if (parent != null) {
- _errors.add("Compilation units should not have a parent");
- }
- } else {
- if (parent == null) {
- _errors.add("No parent for ${node.runtimeType.toString()}");
- }
- }
- if (node.beginToken == null) {
- _errors.add("No begin token for ${node.runtimeType.toString()}");
- }
- if (node.endToken == null) {
- _errors.add("No end token for ${node.runtimeType.toString()}");
- }
- int nodeStart = node.offset;
- int nodeLength = node.length;
- if (nodeStart < 0 || nodeLength < 0) {
- _errors.add("No source info for ${node.runtimeType.toString()}");
- }
- if (parent != null) {
- int nodeEnd = nodeStart + nodeLength;
- int parentStart = parent.offset;
- int parentEnd = parentStart + parent.length;
- if (nodeStart < parentStart) {
- _errors.add("Invalid source start (${nodeStart}) for ${node.runtimeType.toString()} inside ${parent.runtimeType.toString()} (${parentStart})");
- }
- if (nodeEnd > parentEnd) {
- _errors.add("Invalid source end (${nodeEnd}) for ${node.runtimeType.toString()} inside ${parent.runtimeType.toString()} (${parentStart})");
- }
- }
- }
-}
-
class ParserTestCase extends EngineTestCase {
/**
* An empty array of objects used as arguments to zero-argument methods.
@@ -7328,7 +7300,7 @@
* @throws Exception if the method could not be invoked or throws an exception
* @throws AssertionFailedError if the result is `null` or if any errors are produced
*/
- static Object parse(String methodName, List<Object> objects, String source) => parse3(methodName, objects, source, new List<AnalysisError>(0));
+ static Object parse(String methodName, List<Object> objects, String source) => parse2(methodName, objects, source, new List<AnalysisError>(0));
/**
* Invoke a parse method in [Parser]. The method is assumed to have the given number and
@@ -7346,7 +7318,7 @@
* @throws AssertionFailedError if the result is `null` or the errors produced while
* scanning and parsing the source do not match the expected errors
*/
- static Object parse3(String methodName, List<Object> objects, String source, List<AnalysisError> errors) {
+ static Object parse2(String methodName, List<Object> objects, String source, List<AnalysisError> errors) {
GatheringErrorListener listener = new GatheringErrorListener();
Object result = invokeParserMethod(methodName, objects, source, listener);
listener.assertErrors(errors);
@@ -7369,7 +7341,7 @@
* @throws AssertionFailedError if the result is `null` or the errors produced while
* scanning and parsing the source do not match the expected errors
*/
- static Object parse4(String methodName, List<Object> objects, String source, List<ErrorCode> errorCodes) {
+ static Object parse3(String methodName, List<Object> objects, String source, List<ErrorCode> errorCodes) {
GatheringErrorListener listener = new GatheringErrorListener();
Object result = invokeParserMethod(methodName, objects, source, listener);
listener.assertErrors2(errorCodes);
@@ -7390,7 +7362,7 @@
* @throws AssertionFailedError if the result is `null` or the errors produced while
* scanning and parsing the source do not match the expected errors
*/
- static Object parse5(String methodName, String source, List<ErrorCode> errorCodes) => parse4(methodName, _EMPTY_ARGUMENTS, source, errorCodes);
+ static Object parse4(String methodName, String source, List<ErrorCode> errorCodes) => parse3(methodName, _EMPTY_ARGUMENTS, source, errorCodes);
/**
* Parse the given source as a compilation unit.
@@ -7565,44 +7537,116 @@
}
}
+/**
+ * Instances of the class `AstValidator` are used to validate the correct construction of an
+ * AST structure.
+ */
+class AstValidator extends UnifyingAstVisitor<Object> {
+ /**
+ * A list containing the errors found while traversing the AST structure.
+ */
+ List<String> _errors = new List<String>();
+
+ /**
+ * Assert that no errors were found while traversing any of the AST structures that have been
+ * visited.
+ */
+ void assertValid() {
+ if (!_errors.isEmpty) {
+ JavaStringBuilder builder = new JavaStringBuilder();
+ builder.append("Invalid AST structure:");
+ for (String message in _errors) {
+ builder.append("\r\n ");
+ builder.append(message);
+ }
+ JUnitTestCase.fail(builder.toString());
+ }
+ }
+
+ Object visitNode(AstNode node) {
+ validate(node);
+ return super.visitNode(node);
+ }
+
+ /**
+ * Validate that the given AST node is correctly constructed.
+ *
+ * @param node the AST node being validated
+ */
+ void validate(AstNode node) {
+ AstNode parent = node.parent;
+ if (node is CompilationUnit) {
+ if (parent != null) {
+ _errors.add("Compilation units should not have a parent");
+ }
+ } else {
+ if (parent == null) {
+ _errors.add("No parent for ${node.runtimeType.toString()}");
+ }
+ }
+ if (node.beginToken == null) {
+ _errors.add("No begin token for ${node.runtimeType.toString()}");
+ }
+ if (node.endToken == null) {
+ _errors.add("No end token for ${node.runtimeType.toString()}");
+ }
+ int nodeStart = node.offset;
+ int nodeLength = node.length;
+ if (nodeStart < 0 || nodeLength < 0) {
+ _errors.add("No source info for ${node.runtimeType.toString()}");
+ }
+ if (parent != null) {
+ int nodeEnd = nodeStart + nodeLength;
+ int parentStart = parent.offset;
+ int parentEnd = parentStart + parent.length;
+ if (nodeStart < parentStart) {
+ _errors.add("Invalid source start (${nodeStart}) for ${node.runtimeType.toString()} inside ${parent.runtimeType.toString()} (${parentStart})");
+ }
+ if (nodeEnd > parentEnd) {
+ _errors.add("Invalid source end (${nodeEnd}) for ${node.runtimeType.toString()} inside ${parent.runtimeType.toString()} (${parentStart})");
+ }
+ }
+ }
+}
+
class ResolutionCopierTest extends EngineTestCase {
void test_visitAnnotation() {
String annotationName = "proxy";
- Annotation fromNode = ASTFactory.annotation(ASTFactory.identifier3(annotationName));
+ Annotation fromNode = AstFactory.annotation(AstFactory.identifier3(annotationName));
Element element = ElementFactory.topLevelVariableElement2(annotationName);
fromNode.element = element;
- Annotation toNode = ASTFactory.annotation(ASTFactory.identifier3(annotationName));
+ Annotation toNode = AstFactory.annotation(AstFactory.identifier3(annotationName));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
}
void test_visitArgumentDefinitionTest() {
String identifier = "p";
- ArgumentDefinitionTest fromNode = ASTFactory.argumentDefinitionTest(identifier);
+ ArgumentDefinitionTest fromNode = AstFactory.argumentDefinitionTest(identifier);
Type2 propagatedType = ElementFactory.classElement2("A", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("B", []).type;
fromNode.staticType = staticType;
- ArgumentDefinitionTest toNode = ASTFactory.argumentDefinitionTest(identifier);
+ ArgumentDefinitionTest toNode = AstFactory.argumentDefinitionTest(identifier);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitAsExpression() {
- AsExpression fromNode = ASTFactory.asExpression(ASTFactory.identifier3("x"), ASTFactory.typeName4("A", []));
+ AsExpression fromNode = AstFactory.asExpression(AstFactory.identifier3("x"), AstFactory.typeName4("A", []));
Type2 propagatedType = ElementFactory.classElement2("A", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("B", []).type;
fromNode.staticType = staticType;
- AsExpression toNode = ASTFactory.asExpression(ASTFactory.identifier3("x"), ASTFactory.typeName4("A", []));
+ AsExpression toNode = AstFactory.asExpression(AstFactory.identifier3("x"), AstFactory.typeName4("A", []));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitAssignmentExpression() {
- AssignmentExpression fromNode = ASTFactory.assignmentExpression(ASTFactory.identifier3("a"), TokenType.PLUS_EQ, ASTFactory.identifier3("b"));
+ AssignmentExpression fromNode = AstFactory.assignmentExpression(AstFactory.identifier3("a"), TokenType.PLUS_EQ, AstFactory.identifier3("b"));
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
MethodElement propagatedElement = ElementFactory.methodElement("+", propagatedType, []);
fromNode.propagatedElement = propagatedElement;
@@ -7611,7 +7655,7 @@
MethodElement staticElement = ElementFactory.methodElement("+", staticType, []);
fromNode.staticElement = staticElement;
fromNode.staticType = staticType;
- AssignmentExpression toNode = ASTFactory.assignmentExpression(ASTFactory.identifier3("a"), TokenType.PLUS_EQ, ASTFactory.identifier3("b"));
+ AssignmentExpression toNode = AstFactory.assignmentExpression(AstFactory.identifier3("a"), TokenType.PLUS_EQ, AstFactory.identifier3("b"));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
@@ -7620,7 +7664,7 @@
}
void test_visitBinaryExpression() {
- BinaryExpression fromNode = ASTFactory.binaryExpression(ASTFactory.identifier3("a"), TokenType.PLUS, ASTFactory.identifier3("b"));
+ BinaryExpression fromNode = AstFactory.binaryExpression(AstFactory.identifier3("a"), TokenType.PLUS, AstFactory.identifier3("b"));
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
MethodElement propagatedElement = ElementFactory.methodElement("+", propagatedType, []);
fromNode.propagatedElement = propagatedElement;
@@ -7629,7 +7673,7 @@
MethodElement staticElement = ElementFactory.methodElement("+", staticType, []);
fromNode.staticElement = staticElement;
fromNode.staticType = staticType;
- BinaryExpression toNode = ASTFactory.binaryExpression(ASTFactory.identifier3("a"), TokenType.PLUS, ASTFactory.identifier3("b"));
+ BinaryExpression toNode = AstFactory.binaryExpression(AstFactory.identifier3("a"), TokenType.PLUS, AstFactory.identifier3("b"));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
@@ -7638,45 +7682,45 @@
}
void test_visitBooleanLiteral() {
- BooleanLiteral fromNode = ASTFactory.booleanLiteral(true);
+ BooleanLiteral fromNode = AstFactory.booleanLiteral(true);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- BooleanLiteral toNode = ASTFactory.booleanLiteral(true);
+ BooleanLiteral toNode = AstFactory.booleanLiteral(true);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitCascadeExpression() {
- CascadeExpression fromNode = ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [ASTFactory.identifier3("b")]);
+ CascadeExpression fromNode = AstFactory.cascadeExpression(AstFactory.identifier3("a"), [AstFactory.identifier3("b")]);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- CascadeExpression toNode = ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [ASTFactory.identifier3("b")]);
+ CascadeExpression toNode = AstFactory.cascadeExpression(AstFactory.identifier3("a"), [AstFactory.identifier3("b")]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitCompilationUnit() {
- CompilationUnit fromNode = ASTFactory.compilationUnit();
+ CompilationUnit fromNode = AstFactory.compilationUnit();
CompilationUnitElement element = new CompilationUnitElementImpl("test.dart");
fromNode.element = element;
- CompilationUnit toNode = ASTFactory.compilationUnit();
+ CompilationUnit toNode = AstFactory.compilationUnit();
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
}
void test_visitConditionalExpression() {
- ConditionalExpression fromNode = ASTFactory.conditionalExpression(ASTFactory.identifier3("c"), ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ ConditionalExpression fromNode = AstFactory.conditionalExpression(AstFactory.identifier3("c"), AstFactory.identifier3("a"), AstFactory.identifier3("b"));
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- ConditionalExpression toNode = ASTFactory.conditionalExpression(ASTFactory.identifier3("c"), ASTFactory.identifier3("a"), ASTFactory.identifier3("b"));
+ ConditionalExpression toNode = AstFactory.conditionalExpression(AstFactory.identifier3("c"), AstFactory.identifier3("a"), AstFactory.identifier3("b"));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
@@ -7685,53 +7729,53 @@
void test_visitConstructorDeclaration() {
String className = "A";
String constructorName = "c";
- ConstructorDeclaration fromNode = ASTFactory.constructorDeclaration(ASTFactory.identifier3(className), constructorName, ASTFactory.formalParameterList([]), null);
+ ConstructorDeclaration fromNode = AstFactory.constructorDeclaration(AstFactory.identifier3(className), constructorName, AstFactory.formalParameterList([]), null);
ConstructorElement element = ElementFactory.constructorElement2(ElementFactory.classElement2(className, []), constructorName, []);
fromNode.element = element;
- ConstructorDeclaration toNode = ASTFactory.constructorDeclaration(ASTFactory.identifier3(className), constructorName, ASTFactory.formalParameterList([]), null);
+ ConstructorDeclaration toNode = AstFactory.constructorDeclaration(AstFactory.identifier3(className), constructorName, AstFactory.formalParameterList([]), null);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
}
void test_visitConstructorName() {
- ConstructorName fromNode = ASTFactory.constructorName(ASTFactory.typeName4("A", []), "c");
+ ConstructorName fromNode = AstFactory.constructorName(AstFactory.typeName4("A", []), "c");
ConstructorElement staticElement = ElementFactory.constructorElement2(ElementFactory.classElement2("A", []), "c", []);
fromNode.staticElement = staticElement;
- ConstructorName toNode = ASTFactory.constructorName(ASTFactory.typeName4("A", []), "c");
+ ConstructorName toNode = AstFactory.constructorName(AstFactory.typeName4("A", []), "c");
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(staticElement, toNode.staticElement);
}
void test_visitDoubleLiteral() {
- DoubleLiteral fromNode = ASTFactory.doubleLiteral(1.0);
+ DoubleLiteral fromNode = AstFactory.doubleLiteral(1.0);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- DoubleLiteral toNode = ASTFactory.doubleLiteral(1.0);
+ DoubleLiteral toNode = AstFactory.doubleLiteral(1.0);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitExportDirective() {
- ExportDirective fromNode = ASTFactory.exportDirective2("dart:uri", []);
+ ExportDirective fromNode = AstFactory.exportDirective2("dart:uri", []);
ExportElement element = new ExportElementImpl();
fromNode.element = element;
- ExportDirective toNode = ASTFactory.exportDirective2("dart:uri", []);
+ ExportDirective toNode = AstFactory.exportDirective2("dart:uri", []);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
}
void test_visitFunctionExpression() {
- FunctionExpression fromNode = ASTFactory.functionExpression2(ASTFactory.formalParameterList([]), ASTFactory.emptyFunctionBody());
+ FunctionExpression fromNode = AstFactory.functionExpression2(AstFactory.formalParameterList([]), AstFactory.emptyFunctionBody());
MethodElement element = ElementFactory.methodElement("m", ElementFactory.classElement2("C", []).type, []);
fromNode.element = element;
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- FunctionExpression toNode = ASTFactory.functionExpression2(ASTFactory.formalParameterList([]), ASTFactory.emptyFunctionBody());
+ FunctionExpression toNode = AstFactory.functionExpression2(AstFactory.formalParameterList([]), AstFactory.emptyFunctionBody());
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
@@ -7739,7 +7783,7 @@
}
void test_visitFunctionExpressionInvocation() {
- FunctionExpressionInvocation fromNode = ASTFactory.functionExpressionInvocation(ASTFactory.identifier3("f"), []);
+ FunctionExpressionInvocation fromNode = AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"), []);
MethodElement propagatedElement = ElementFactory.methodElement("m", ElementFactory.classElement2("C", []).type, []);
fromNode.propagatedElement = propagatedElement;
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
@@ -7748,7 +7792,7 @@
fromNode.staticElement = staticElement;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- FunctionExpressionInvocation toNode = ASTFactory.functionExpressionInvocation(ASTFactory.identifier3("f"), []);
+ FunctionExpressionInvocation toNode = AstFactory.functionExpressionInvocation(AstFactory.identifier3("f"), []);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
@@ -7757,16 +7801,16 @@
}
void test_visitImportDirective() {
- ImportDirective fromNode = ASTFactory.importDirective2("dart:uri", null, []);
+ ImportDirective fromNode = AstFactory.importDirective2("dart:uri", null, []);
ImportElement element = new ImportElementImpl(0);
fromNode.element = element;
- ImportDirective toNode = ASTFactory.importDirective2("dart:uri", null, []);
+ ImportDirective toNode = AstFactory.importDirective2("dart:uri", null, []);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
}
void test_visitIndexExpression() {
- IndexExpression fromNode = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.integer(0));
+ IndexExpression fromNode = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.integer(0));
MethodElement propagatedElement = ElementFactory.methodElement("m", ElementFactory.classElement2("C", []).type, []);
MethodElement staticElement = ElementFactory.methodElement("m", ElementFactory.classElement2("C", []).type, []);
AuxiliaryElements auxiliaryElements = new AuxiliaryElements(staticElement, propagatedElement);
@@ -7777,7 +7821,7 @@
fromNode.staticElement = staticElement;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- IndexExpression toNode = ASTFactory.indexExpression(ASTFactory.identifier3("a"), ASTFactory.integer(0));
+ IndexExpression toNode = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.integer(0));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(auxiliaryElements, toNode.auxiliaryElements);
JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
@@ -7787,14 +7831,14 @@
}
void test_visitInstanceCreationExpression() {
- InstanceCreationExpression fromNode = ASTFactory.instanceCreationExpression2(Keyword.NEW, ASTFactory.typeName4("C", []), []);
+ InstanceCreationExpression fromNode = AstFactory.instanceCreationExpression2(Keyword.NEW, AstFactory.typeName4("C", []), []);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
ConstructorElement staticElement = ElementFactory.constructorElement2(ElementFactory.classElement2("C", []), null, []);
fromNode.staticElement = staticElement;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- InstanceCreationExpression toNode = ASTFactory.instanceCreationExpression2(Keyword.NEW, ASTFactory.typeName4("C", []), []);
+ InstanceCreationExpression toNode = AstFactory.instanceCreationExpression2(Keyword.NEW, AstFactory.typeName4("C", []), []);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticElement, toNode.staticElement);
@@ -7802,134 +7846,134 @@
}
void test_visitIntegerLiteral() {
- IntegerLiteral fromNode = ASTFactory.integer(2);
+ IntegerLiteral fromNode = AstFactory.integer(2);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- IntegerLiteral toNode = ASTFactory.integer(2);
+ IntegerLiteral toNode = AstFactory.integer(2);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitIsExpression() {
- IsExpression fromNode = ASTFactory.isExpression(ASTFactory.identifier3("x"), false, ASTFactory.typeName4("A", []));
+ IsExpression fromNode = AstFactory.isExpression(AstFactory.identifier3("x"), false, AstFactory.typeName4("A", []));
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- IsExpression toNode = ASTFactory.isExpression(ASTFactory.identifier3("x"), false, ASTFactory.typeName4("A", []));
+ IsExpression toNode = AstFactory.isExpression(AstFactory.identifier3("x"), false, AstFactory.typeName4("A", []));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitLibraryIdentifier() {
- LibraryIdentifier fromNode = ASTFactory.libraryIdentifier([ASTFactory.identifier3("lib")]);
+ LibraryIdentifier fromNode = AstFactory.libraryIdentifier([AstFactory.identifier3("lib")]);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- LibraryIdentifier toNode = ASTFactory.libraryIdentifier([ASTFactory.identifier3("lib")]);
+ LibraryIdentifier toNode = AstFactory.libraryIdentifier([AstFactory.identifier3("lib")]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitListLiteral() {
- ListLiteral fromNode = ASTFactory.listLiteral([]);
+ ListLiteral fromNode = AstFactory.listLiteral([]);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- ListLiteral toNode = ASTFactory.listLiteral([]);
+ ListLiteral toNode = AstFactory.listLiteral([]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitMapLiteral() {
- MapLiteral fromNode = ASTFactory.mapLiteral2([]);
+ MapLiteral fromNode = AstFactory.mapLiteral2([]);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- MapLiteral toNode = ASTFactory.mapLiteral2([]);
+ MapLiteral toNode = AstFactory.mapLiteral2([]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitMethodInvocation() {
- MethodInvocation fromNode = ASTFactory.methodInvocation2("m", []);
+ MethodInvocation fromNode = AstFactory.methodInvocation2("m", []);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- MethodInvocation toNode = ASTFactory.methodInvocation2("m", []);
+ MethodInvocation toNode = AstFactory.methodInvocation2("m", []);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitNamedExpression() {
- NamedExpression fromNode = ASTFactory.namedExpression2("n", ASTFactory.integer(0));
+ NamedExpression fromNode = AstFactory.namedExpression2("n", AstFactory.integer(0));
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- NamedExpression toNode = ASTFactory.namedExpression2("n", ASTFactory.integer(0));
+ NamedExpression toNode = AstFactory.namedExpression2("n", AstFactory.integer(0));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitNullLiteral() {
- NullLiteral fromNode = ASTFactory.nullLiteral();
+ NullLiteral fromNode = AstFactory.nullLiteral();
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- NullLiteral toNode = ASTFactory.nullLiteral();
+ NullLiteral toNode = AstFactory.nullLiteral();
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitParenthesizedExpression() {
- ParenthesizedExpression fromNode = ASTFactory.parenthesizedExpression(ASTFactory.integer(0));
+ ParenthesizedExpression fromNode = AstFactory.parenthesizedExpression(AstFactory.integer(0));
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- ParenthesizedExpression toNode = ASTFactory.parenthesizedExpression(ASTFactory.integer(0));
+ ParenthesizedExpression toNode = AstFactory.parenthesizedExpression(AstFactory.integer(0));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitPartDirective() {
- PartDirective fromNode = ASTFactory.partDirective2("part.dart");
- LibraryElement element = new LibraryElementImpl(null, ASTFactory.libraryIdentifier2(["lib"]));
+ PartDirective fromNode = AstFactory.partDirective2("part.dart");
+ LibraryElement element = new LibraryElementImpl(null, AstFactory.libraryIdentifier2(["lib"]));
fromNode.element = element;
- PartDirective toNode = ASTFactory.partDirective2("part.dart");
+ PartDirective toNode = AstFactory.partDirective2("part.dart");
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
}
void test_visitPartOfDirective() {
- PartOfDirective fromNode = ASTFactory.partOfDirective(ASTFactory.libraryIdentifier2(["lib"]));
- LibraryElement element = new LibraryElementImpl(null, ASTFactory.libraryIdentifier2(["lib"]));
+ PartOfDirective fromNode = AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"]));
+ LibraryElement element = new LibraryElementImpl(null, AstFactory.libraryIdentifier2(["lib"]));
fromNode.element = element;
- PartOfDirective toNode = ASTFactory.partOfDirective(ASTFactory.libraryIdentifier2(["lib"]));
+ PartOfDirective toNode = AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"]));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(element, toNode.element);
}
void test_visitPostfixExpression() {
String variableName = "x";
- PostfixExpression fromNode = ASTFactory.postfixExpression(ASTFactory.identifier3(variableName), TokenType.PLUS_PLUS);
+ PostfixExpression fromNode = AstFactory.postfixExpression(AstFactory.identifier3(variableName), TokenType.PLUS_PLUS);
MethodElement propagatedElement = ElementFactory.methodElement("+", ElementFactory.classElement2("C", []).type, []);
fromNode.propagatedElement = propagatedElement;
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
@@ -7938,7 +7982,7 @@
fromNode.staticElement = staticElement;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- PostfixExpression toNode = ASTFactory.postfixExpression(ASTFactory.identifier3(variableName), TokenType.PLUS_PLUS);
+ PostfixExpression toNode = AstFactory.postfixExpression(AstFactory.identifier3(variableName), TokenType.PLUS_PLUS);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
@@ -7947,19 +7991,19 @@
}
void test_visitPrefixedIdentifier() {
- PrefixedIdentifier fromNode = ASTFactory.identifier5("p", "f");
+ PrefixedIdentifier fromNode = AstFactory.identifier5("p", "f");
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- PrefixedIdentifier toNode = ASTFactory.identifier5("p", "f");
+ PrefixedIdentifier toNode = AstFactory.identifier5("p", "f");
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitPrefixExpression() {
- PrefixExpression fromNode = ASTFactory.prefixExpression(TokenType.PLUS_PLUS, ASTFactory.identifier3("x"));
+ PrefixExpression fromNode = AstFactory.prefixExpression(TokenType.PLUS_PLUS, AstFactory.identifier3("x"));
MethodElement propagatedElement = ElementFactory.methodElement("+", ElementFactory.classElement2("C", []).type, []);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedElement = propagatedElement;
@@ -7968,7 +8012,7 @@
MethodElement staticElement = ElementFactory.methodElement("+", ElementFactory.classElement2("C", []).type, []);
fromNode.staticElement = staticElement;
fromNode.staticType = staticType;
- PrefixExpression toNode = ASTFactory.prefixExpression(TokenType.PLUS_PLUS, ASTFactory.identifier3("x"));
+ PrefixExpression toNode = AstFactory.prefixExpression(TokenType.PLUS_PLUS, AstFactory.identifier3("x"));
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
@@ -7977,40 +8021,40 @@
}
void test_visitPropertyAccess() {
- PropertyAccess fromNode = ASTFactory.propertyAccess2(ASTFactory.identifier3("x"), "y");
+ PropertyAccess fromNode = AstFactory.propertyAccess2(AstFactory.identifier3("x"), "y");
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- PropertyAccess toNode = ASTFactory.propertyAccess2(ASTFactory.identifier3("x"), "y");
+ PropertyAccess toNode = AstFactory.propertyAccess2(AstFactory.identifier3("x"), "y");
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitRedirectingConstructorInvocation() {
- RedirectingConstructorInvocation fromNode = ASTFactory.redirectingConstructorInvocation([]);
+ RedirectingConstructorInvocation fromNode = AstFactory.redirectingConstructorInvocation([]);
ConstructorElement staticElement = ElementFactory.constructorElement2(ElementFactory.classElement2("C", []), null, []);
fromNode.staticElement = staticElement;
- RedirectingConstructorInvocation toNode = ASTFactory.redirectingConstructorInvocation([]);
+ RedirectingConstructorInvocation toNode = AstFactory.redirectingConstructorInvocation([]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(staticElement, toNode.staticElement);
}
void test_visitRethrowExpression() {
- RethrowExpression fromNode = ASTFactory.rethrowExpression();
+ RethrowExpression fromNode = AstFactory.rethrowExpression();
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- RethrowExpression toNode = ASTFactory.rethrowExpression();
+ RethrowExpression toNode = AstFactory.rethrowExpression();
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitSimpleIdentifier() {
- SimpleIdentifier fromNode = ASTFactory.identifier3("x");
+ SimpleIdentifier fromNode = AstFactory.identifier3("x");
MethodElement propagatedElement = ElementFactory.methodElement("m", ElementFactory.classElement2("C", []).type, []);
MethodElement staticElement = ElementFactory.methodElement("m", ElementFactory.classElement2("C", []).type, []);
AuxiliaryElements auxiliaryElements = new AuxiliaryElements(staticElement, propagatedElement);
@@ -8021,7 +8065,7 @@
fromNode.staticElement = staticElement;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- SimpleIdentifier toNode = ASTFactory.identifier3("x");
+ SimpleIdentifier toNode = AstFactory.identifier3("x");
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(auxiliaryElements, toNode.auxiliaryElements);
JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
@@ -8031,91 +8075,91 @@
}
void test_visitSimpleStringLiteral() {
- SimpleStringLiteral fromNode = ASTFactory.string2("abc");
+ SimpleStringLiteral fromNode = AstFactory.string2("abc");
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- SimpleStringLiteral toNode = ASTFactory.string2("abc");
+ SimpleStringLiteral toNode = AstFactory.string2("abc");
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitStringInterpolation() {
- StringInterpolation fromNode = ASTFactory.string([ASTFactory.interpolationString("a", "'a'")]);
+ StringInterpolation fromNode = AstFactory.string([AstFactory.interpolationString("a", "'a'")]);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- StringInterpolation toNode = ASTFactory.string([ASTFactory.interpolationString("a", "'a'")]);
+ StringInterpolation toNode = AstFactory.string([AstFactory.interpolationString("a", "'a'")]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitSuperConstructorInvocation() {
- SuperConstructorInvocation fromNode = ASTFactory.superConstructorInvocation([]);
+ SuperConstructorInvocation fromNode = AstFactory.superConstructorInvocation([]);
ConstructorElement staticElement = ElementFactory.constructorElement2(ElementFactory.classElement2("C", []), null, []);
fromNode.staticElement = staticElement;
- SuperConstructorInvocation toNode = ASTFactory.superConstructorInvocation([]);
+ SuperConstructorInvocation toNode = AstFactory.superConstructorInvocation([]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(staticElement, toNode.staticElement);
}
void test_visitSuperExpression() {
- SuperExpression fromNode = ASTFactory.superExpression();
+ SuperExpression fromNode = AstFactory.superExpression();
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- SuperExpression toNode = ASTFactory.superExpression();
+ SuperExpression toNode = AstFactory.superExpression();
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitSymbolLiteral() {
- SymbolLiteral fromNode = ASTFactory.symbolLiteral(["s"]);
+ SymbolLiteral fromNode = AstFactory.symbolLiteral(["s"]);
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- SymbolLiteral toNode = ASTFactory.symbolLiteral(["s"]);
+ SymbolLiteral toNode = AstFactory.symbolLiteral(["s"]);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitThisExpression() {
- ThisExpression fromNode = ASTFactory.thisExpression();
+ ThisExpression fromNode = AstFactory.thisExpression();
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- ThisExpression toNode = ASTFactory.thisExpression();
+ ThisExpression toNode = AstFactory.thisExpression();
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitThrowExpression() {
- ThrowExpression fromNode = ASTFactory.throwExpression();
+ ThrowExpression fromNode = AstFactory.throwExpression();
Type2 propagatedType = ElementFactory.classElement2("C", []).type;
fromNode.propagatedType = propagatedType;
Type2 staticType = ElementFactory.classElement2("C", []).type;
fromNode.staticType = staticType;
- ThrowExpression toNode = ASTFactory.throwExpression();
+ ThrowExpression toNode = AstFactory.throwExpression();
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
JUnitTestCase.assertSame(staticType, toNode.staticType);
}
void test_visitTypeName() {
- TypeName fromNode = ASTFactory.typeName4("C", []);
+ TypeName fromNode = AstFactory.typeName4("C", []);
Type2 type = ElementFactory.classElement2("C", []).type;
fromNode.type = type;
- TypeName toNode = ASTFactory.typeName4("C", []);
+ TypeName toNode = AstFactory.typeName4("C", []);
ResolutionCopier.copyResolutionData(fromNode, toNode);
JUnitTestCase.assertSame(type, toNode.type);
}
@@ -8321,7 +8365,7 @@
void test_additiveExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("+ y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8329,21 +8373,21 @@
BinaryExpression expression = ParserTestCase.parseExpression("+", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_additiveExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x +", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_additiveExpression_missing_RHS_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super +", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8352,7 +8396,7 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_additiveExpression_precedence_multiplicative_right() {
@@ -8360,52 +8404,52 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_additiveExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super + +", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_assignmentExpression_missing_compound1() {
AssignmentExpression expression = ParserTestCase.parseExpression("= y = 0", [ParserErrorCode.MISSING_IDENTIFIER]);
Expression syntheticExpression = expression.leftHandSide;
- EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, syntheticExpression);
JUnitTestCase.assertTrue(syntheticExpression.isSynthetic);
}
void test_assignmentExpression_missing_compound2() {
AssignmentExpression expression = ParserTestCase.parseExpression("x = = 0", [ParserErrorCode.MISSING_IDENTIFIER]);
Expression syntheticExpression = (expression.rightHandSide as AssignmentExpression).leftHandSide;
- EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, syntheticExpression);
JUnitTestCase.assertTrue(syntheticExpression.isSynthetic);
}
void test_assignmentExpression_missing_compound3() {
AssignmentExpression expression = ParserTestCase.parseExpression("x = y =", [ParserErrorCode.MISSING_IDENTIFIER]);
Expression syntheticExpression = (expression.rightHandSide as AssignmentExpression).rightHandSide;
- EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, syntheticExpression);
JUnitTestCase.assertTrue(syntheticExpression.isSynthetic);
}
void test_assignmentExpression_missing_LHS() {
AssignmentExpression expression = ParserTestCase.parseExpression("= 0", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftHandSide);
JUnitTestCase.assertTrue(expression.leftHandSide.isSynthetic);
}
void test_assignmentExpression_missing_RHS() {
AssignmentExpression expression = ParserTestCase.parseExpression("x =", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftHandSide);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftHandSide);
JUnitTestCase.assertTrue(expression.rightHandSide.isSynthetic);
}
void test_bitwiseAndExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("& y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8413,21 +8457,21 @@
BinaryExpression expression = ParserTestCase.parseExpression("&", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_bitwiseAndExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x &", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_bitwiseAndExpression_missing_RHS_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super &", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8436,7 +8480,7 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseAndExpression_precedence_equality_right() {
@@ -8444,19 +8488,19 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_bitwiseAndExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super & &", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseOrExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("| y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8464,21 +8508,21 @@
BinaryExpression expression = ParserTestCase.parseExpression("|", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_bitwiseOrExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x |", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_bitwiseOrExpression_missing_RHS_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super |", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8487,7 +8531,7 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseOrExpression_precedence_xor_right() {
@@ -8495,19 +8539,19 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_bitwiseOrExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super | |", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseXorExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("^ y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8515,21 +8559,21 @@
BinaryExpression expression = ParserTestCase.parseExpression("^", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_bitwiseXorExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x ^", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_bitwiseXorExpression_missing_RHS_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super ^", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8538,7 +8582,7 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_bitwiseXorExpression_precedence_and_right() {
@@ -8546,14 +8590,14 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_bitwiseXorExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super ^ ^", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_classTypeAlias_withBody() {
@@ -8561,20 +8605,20 @@
}
void test_conditionalExpression_missingElse() {
- ConditionalExpression expression = ParserTestCase.parse5("parseConditionalExpression", "x ? y :", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.elseExpression);
+ ConditionalExpression expression = ParserTestCase.parse4("parseConditionalExpression", "x ? y :", [ParserErrorCode.MISSING_IDENTIFIER]);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.elseExpression);
JUnitTestCase.assertTrue(expression.elseExpression.isSynthetic);
}
void test_conditionalExpression_missingThen() {
- ConditionalExpression expression = ParserTestCase.parse5("parseConditionalExpression", "x ? : z", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.thenExpression);
+ ConditionalExpression expression = ParserTestCase.parse4("parseConditionalExpression", "x ? : z", [ParserErrorCode.MISSING_IDENTIFIER]);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.thenExpression);
JUnitTestCase.assertTrue(expression.thenExpression.isSynthetic);
}
void test_equalityExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("== y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8582,21 +8626,21 @@
BinaryExpression expression = ParserTestCase.parseExpression("==", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_equalityExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x ==", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_equalityExpression_missing_RHS_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super ==", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8605,7 +8649,7 @@
ParserErrorCode.EXPECTED_TYPE_NAME,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(IsExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression, expression.leftOperand);
}
void test_equalityExpression_precedence_relational_right() {
@@ -8613,7 +8657,7 @@
ParserErrorCode.EXPECTED_TYPE_NAME,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(IsExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression, expression.rightOperand);
}
void test_equalityExpression_super() {
@@ -8621,30 +8665,30 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_expressionList_multiple_end() {
- List<Expression> result = ParserTestCase.parse5("parseExpressionList", ", 2, 3, 4", [ParserErrorCode.MISSING_IDENTIFIER]);
+ List<Expression> result = ParserTestCase.parse4("parseExpressionList", ", 2, 3, 4", [ParserErrorCode.MISSING_IDENTIFIER]);
EngineTestCase.assertSize(4, result);
Expression syntheticExpression = result[0];
- EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, syntheticExpression);
JUnitTestCase.assertTrue(syntheticExpression.isSynthetic);
}
void test_expressionList_multiple_middle() {
- List<Expression> result = ParserTestCase.parse5("parseExpressionList", "1, 2, , 4", [ParserErrorCode.MISSING_IDENTIFIER]);
+ List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1, 2, , 4", [ParserErrorCode.MISSING_IDENTIFIER]);
EngineTestCase.assertSize(4, result);
Expression syntheticExpression = result[2];
- EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, syntheticExpression);
JUnitTestCase.assertTrue(syntheticExpression.isSynthetic);
}
void test_expressionList_multiple_start() {
- List<Expression> result = ParserTestCase.parse5("parseExpressionList", "1, 2, 3,", [ParserErrorCode.MISSING_IDENTIFIER]);
+ List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1, 2, 3,", [ParserErrorCode.MISSING_IDENTIFIER]);
EngineTestCase.assertSize(4, result);
Expression syntheticExpression = result[3];
- EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, syntheticExpression);
JUnitTestCase.assertTrue(syntheticExpression.isSynthetic);
}
@@ -8653,7 +8697,7 @@
NodeList<CompilationUnitMember> declarations = unit.declarations;
EngineTestCase.assertSize(1, declarations);
CompilationUnitMember member = declarations[0];
- EngineTestCase.assertInstanceOf(TopLevelVariableDeclaration, member);
+ EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration, TopLevelVariableDeclaration, member);
NodeList<VariableDeclaration> variables = (member as TopLevelVariableDeclaration).variables.variables;
EngineTestCase.assertSize(1, variables);
SimpleIdentifier name = variables[0].name;
@@ -8676,12 +8720,12 @@
TypeName type = expression.type;
JUnitTestCase.assertNotNull(type);
JUnitTestCase.assertTrue(type.name.isSynthetic);
- EngineTestCase.assertInstanceOf(EmptyStatement, ifStatement.thenStatement);
+ EngineTestCase.assertInstanceOf((obj) => obj is EmptyStatement, EmptyStatement, ifStatement.thenStatement);
}
void test_logicalAndExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("&& y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8689,15 +8733,15 @@
BinaryExpression expression = ParserTestCase.parseExpression("&&", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_logicalAndExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x &&", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8706,7 +8750,7 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_logicalAndExpression_precedence_bitwiseOr_right() {
@@ -8714,12 +8758,12 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_logicalOrExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("|| y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8727,15 +8771,15 @@
BinaryExpression expression = ParserTestCase.parseExpression("||", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_logicalOrExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x ||", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8744,7 +8788,7 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_logicalOrExpression_precedence_logicalAnd_right() {
@@ -8752,12 +8796,20 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
+ }
+
+ void test_missingIdentifier_afterAnnotation() {
+ MethodDeclaration method = ParserTestCase.parse3("parseClassMember", <Object> ["C"], "@override }", [ParserErrorCode.EXPECTED_CLASS_MEMBER]);
+ JUnitTestCase.assertNull(method.documentationComment);
+ NodeList<Annotation> metadata = method.metadata;
+ EngineTestCase.assertSize(1, metadata);
+ JUnitTestCase.assertEquals("override", metadata[0].name.name);
}
void test_multiplicativeExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("* y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8765,32 +8817,32 @@
BinaryExpression expression = ParserTestCase.parseExpression("*", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_multiplicativeExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x *", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_multiplicativeExpression_missing_RHS_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super *", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_multiplicativeExpression_precedence_unary_left() {
BinaryExpression expression = ParserTestCase.parseExpression("-x *", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(PrefixExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpression, expression.leftOperand);
}
void test_multiplicativeExpression_precedence_unary_right() {
BinaryExpression expression = ParserTestCase.parseExpression("* -y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(PrefixExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpression, expression.rightOperand);
}
void test_multiplicativeExpression_super() {
@@ -8798,19 +8850,19 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_prefixExpression_missing_operand_minus() {
PrefixExpression expression = ParserTestCase.parseExpression("-", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.operand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.operand);
JUnitTestCase.assertTrue(expression.operand.isSynthetic);
JUnitTestCase.assertEquals(TokenType.MINUS, expression.operator.type);
}
void test_relationalExpression_missing_LHS() {
IsExpression expression = ParserTestCase.parseExpression("is y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.expression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.expression);
JUnitTestCase.assertTrue(expression.expression.isSynthetic);
}
@@ -8818,15 +8870,15 @@
IsExpression expression = ParserTestCase.parseExpression("is", [
ParserErrorCode.EXPECTED_TYPE_NAME,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.expression);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.expression);
JUnitTestCase.assertTrue(expression.expression.isSynthetic);
- EngineTestCase.assertInstanceOf(TypeName, expression.type);
+ EngineTestCase.assertInstanceOf((obj) => obj is TypeName, TypeName, expression.type);
JUnitTestCase.assertTrue(expression.type.isSynthetic);
}
void test_relationalExpression_missing_RHS() {
IsExpression expression = ParserTestCase.parseExpression("x is", [ParserErrorCode.EXPECTED_TYPE_NAME]);
- EngineTestCase.assertInstanceOf(TypeName, expression.type);
+ EngineTestCase.assertInstanceOf((obj) => obj is TypeName, TypeName, expression.type);
JUnitTestCase.assertTrue(expression.type.isSynthetic);
}
@@ -8835,12 +8887,12 @@
ParserErrorCode.EXPECTED_TYPE_NAME,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.expression);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.expression);
}
void test_shiftExpression_missing_LHS() {
BinaryExpression expression = ParserTestCase.parseExpression("<< y", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
}
@@ -8848,21 +8900,21 @@
BinaryExpression expression = ParserTestCase.parseExpression("<<", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.leftOperand);
JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_shiftExpression_missing_RHS() {
BinaryExpression expression = ParserTestCase.parseExpression("x <<", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
void test_shiftExpression_missing_RHS_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super <<", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.rightOperand);
JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
}
@@ -8871,7 +8923,7 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_shiftExpression_precedence_unary_right() {
@@ -8879,14 +8931,14 @@
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.rightOperand);
}
void test_shiftExpression_super() {
BinaryExpression expression = ParserTestCase.parseExpression("super << <<", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression.leftOperand);
}
void test_typedef_eof() {
@@ -8896,7 +8948,7 @@
NodeList<CompilationUnitMember> declarations = unit.declarations;
EngineTestCase.assertSize(1, declarations);
CompilationUnitMember member = declarations[0];
- EngineTestCase.assertInstanceOf(FunctionTypeAlias, member);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionTypeAlias, FunctionTypeAlias, member);
}
static dartSuite() {
@@ -9133,6 +9185,10 @@
final __test = new RecoveryParserTest();
runJUnitTest(__test, __test.test_logicalOrExpression_precedence_logicalAnd_right);
});
+ _ut.test('test_missingIdentifier_afterAnnotation', () {
+ final __test = new RecoveryParserTest();
+ runJUnitTest(__test, __test.test_missingIdentifier_afterAnnotation);
+ });
_ut.test('test_multiplicativeExpression_missing_LHS', () {
final __test = new RecoveryParserTest();
runJUnitTest(__test, __test.test_multiplicativeExpression_missing_LHS);
@@ -9284,6 +9340,12 @@
assertParse("class A {}", "", " class B {}", "");
}
+ void test_insert_insideClassBody() {
+ // "class C {C(); }"
+ // "class C { C(); }"
+ assertParse("class C {", "", " ", "C(); }");
+ }
+
void test_insert_insideIdentifier() {
// "f() => cob;"
// "f() => cow.b;"
@@ -9461,7 +9523,7 @@
// Validate that the results of the incremental parse are the same as the full parse of the
// modified source.
//
- JUnitTestCase.assertTrue(ASTComparator.equals4(modifiedUnit, incrementalUnit));
+ JUnitTestCase.assertTrue(AstComparator.equals4(modifiedUnit, incrementalUnit));
}
static dartSuite() {
@@ -9510,6 +9572,10 @@
final __test = new IncrementalParserTest();
runJUnitTest(__test, __test.test_insert_end);
});
+ _ut.test('test_insert_insideClassBody', () {
+ final __test = new IncrementalParserTest();
+ runJUnitTest(__test, __test.test_insert_insideClassBody);
+ });
_ut.test('test_insert_insideIdentifier', () {
final __test = new IncrementalParserTest();
runJUnitTest(__test, __test.test_insert_insideIdentifier);
@@ -9608,7 +9674,7 @@
// literal in this case, but isSynthetic() isn't overridden for ListLiteral. The problem is that
// the synthetic list literals that are being created are not always zero length (because they
// could have type parameters), which violates the contract of isSynthetic().
- TypedLiteral literal = ParserTestCase.parse4("parseListOrMapLiteral", <Object> [null], "1", [ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL]);
+ TypedLiteral literal = ParserTestCase.parse3("parseListOrMapLiteral", <Object> [null], "1", [ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL]);
JUnitTestCase.assertTrue(literal.isSynthetic);
}
@@ -9620,26 +9686,26 @@
void fail_invalidCommentReference__new_nonIdentifier() {
// This test fails because the method parseCommentReference returns null.
- ParserTestCase.parse4("parseCommentReference", <Object> ["new 42", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+ ParserTestCase.parse3("parseCommentReference", <Object> ["new 42", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
}
void fail_invalidCommentReference__new_tooMuch() {
- ParserTestCase.parse4("parseCommentReference", <Object> ["new a.b.c.d", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+ ParserTestCase.parse3("parseCommentReference", <Object> ["new a.b.c.d", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
}
void fail_invalidCommentReference__nonNew_nonIdentifier() {
// This test fails because the method parseCommentReference returns null.
- ParserTestCase.parse4("parseCommentReference", <Object> ["42", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+ ParserTestCase.parse3("parseCommentReference", <Object> ["42", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
}
void fail_invalidCommentReference__nonNew_tooMuch() {
- ParserTestCase.parse4("parseCommentReference", <Object> ["a.b.c.d", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+ ParserTestCase.parse3("parseCommentReference", <Object> ["a.b.c.d", 0], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
}
void fail_missingClosingParenthesis() {
// It is possible that it is not possible to generate this error (that it's being reported in
// code that cannot actually be reached), but that hasn't been proven yet.
- ParserTestCase.parse5("parseFormalParameterList", "(int a, int b ;", [ParserErrorCode.MISSING_CLOSING_PARENTHESIS]);
+ ParserTestCase.parse4("parseFormalParameterList", "(int a, int b ;", [ParserErrorCode.MISSING_CLOSING_PARENTHESIS]);
}
void fail_missingFunctionParameters_local_nonVoid_block() {
@@ -9655,8 +9721,8 @@
}
void fail_namedFunctionExpression() {
- Expression expression = ParserTestCase.parse5("parsePrimaryExpression", "f() {}", [ParserErrorCode.NAMED_FUNCTION_EXPRESSION]);
- EngineTestCase.assertInstanceOf(FunctionExpression, expression);
+ Expression expression = ParserTestCase.parse4("parsePrimaryExpression", "f() {}", [ParserErrorCode.NAMED_FUNCTION_EXPRESSION]);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, FunctionExpression, expression);
}
void fail_unexpectedToken_invalidPostfixExpression() {
@@ -9673,27 +9739,27 @@
void fail_varAndType_parameter() {
// This is currently reporting EXPECTED_TOKEN for a missing semicolon, but this would be a
// better error message.
- ParserTestCase.parse5("parseFormalParameterList", "(var int x)", [ParserErrorCode.VAR_AND_TYPE]);
+ ParserTestCase.parse4("parseFormalParameterList", "(var int x)", [ParserErrorCode.VAR_AND_TYPE]);
}
void test_abstractClassMember_constructor() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "abstract C.c();", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "abstract C.c();", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
}
void test_abstractClassMember_field() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "abstract C f;", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "abstract C f;", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
}
void test_abstractClassMember_getter() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "abstract get m;", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "abstract get m;", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
}
void test_abstractClassMember_method() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "abstract m();", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "abstract m();", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
}
void test_abstractClassMember_setter() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "abstract set m(v);", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "abstract set m(v);", [ParserErrorCode.ABSTRACT_CLASS_MEMBER]);
}
void test_abstractTopLevelFunction_function() {
@@ -9717,39 +9783,39 @@
}
void test_assertDoesNotTakeAssignment() {
- ParserTestCase.parse5("parseAssertStatement", "assert(b = true);", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT]);
+ ParserTestCase.parse4("parseAssertStatement", "assert(b = true);", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT]);
}
void test_assertDoesNotTakeCascades() {
- ParserTestCase.parse5("parseAssertStatement", "assert(new A()..m());", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE]);
+ ParserTestCase.parse4("parseAssertStatement", "assert(new A()..m());", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE]);
}
void test_assertDoesNotTakeRethrow() {
- ParserTestCase.parse5("parseAssertStatement", "assert(rethrow);", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW]);
+ ParserTestCase.parse4("parseAssertStatement", "assert(rethrow);", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW]);
}
void test_assertDoesNotTakeThrow() {
- ParserTestCase.parse5("parseAssertStatement", "assert(throw x);", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW]);
+ ParserTestCase.parse4("parseAssertStatement", "assert(throw x);", [ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW]);
}
void test_breakOutsideOfLoop_breakInDoStatement() {
- ParserTestCase.parse5("parseDoStatement", "do {break;} while (x);", []);
+ ParserTestCase.parse4("parseDoStatement", "do {break;} while (x);", []);
}
void test_breakOutsideOfLoop_breakInForStatement() {
- ParserTestCase.parse5("parseForStatement", "for (; x;) {break;}", []);
+ ParserTestCase.parse4("parseForStatement", "for (; x;) {break;}", []);
}
void test_breakOutsideOfLoop_breakInIfStatement() {
- ParserTestCase.parse5("parseIfStatement", "if (x) {break;}", [ParserErrorCode.BREAK_OUTSIDE_OF_LOOP]);
+ ParserTestCase.parse4("parseIfStatement", "if (x) {break;}", [ParserErrorCode.BREAK_OUTSIDE_OF_LOOP]);
}
void test_breakOutsideOfLoop_breakInSwitchStatement() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (x) {case 1: break;}", []);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (x) {case 1: break;}", []);
}
void test_breakOutsideOfLoop_breakInWhileStatement() {
- ParserTestCase.parse5("parseWhileStatement", "while (x) {break;}", []);
+ ParserTestCase.parse4("parseWhileStatement", "while (x) {break;}", []);
}
void test_breakOutsideOfLoop_functionExpression_inALoop() {
@@ -9761,11 +9827,11 @@
}
void test_constAndFinal() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const final int x;", [ParserErrorCode.CONST_AND_FINAL]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const final int x;", [ParserErrorCode.CONST_AND_FINAL]);
}
void test_constAndVar() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const var x;", [ParserErrorCode.CONST_AND_VAR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const var x;", [ParserErrorCode.CONST_AND_VAR]);
}
void test_constClass() {
@@ -9773,23 +9839,23 @@
}
void test_constConstructorWithBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const C() {}", [ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const C() {}", [ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY]);
}
void test_constFactory() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const factory C() {}", [ParserErrorCode.CONST_FACTORY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const factory C() {}", [ParserErrorCode.CONST_FACTORY]);
}
void test_constMethod() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const int m() {}", [ParserErrorCode.CONST_METHOD]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const int m() {}", [ParserErrorCode.CONST_METHOD]);
}
void test_constructorWithReturnType() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "C C() {}", [ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "C C() {}", [ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE]);
}
void test_constructorWithReturnType_var() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "var C() {}", [ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "var C() {}", [ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE]);
}
void test_constTypedef() {
@@ -9797,23 +9863,23 @@
}
void test_continueOutsideOfLoop_continueInDoStatement() {
- ParserTestCase.parse5("parseDoStatement", "do {continue;} while (x);", []);
+ ParserTestCase.parse4("parseDoStatement", "do {continue;} while (x);", []);
}
void test_continueOutsideOfLoop_continueInForStatement() {
- ParserTestCase.parse5("parseForStatement", "for (; x;) {continue;}", []);
+ ParserTestCase.parse4("parseForStatement", "for (; x;) {continue;}", []);
}
void test_continueOutsideOfLoop_continueInIfStatement() {
- ParserTestCase.parse5("parseIfStatement", "if (x) {continue;}", [ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP]);
+ ParserTestCase.parse4("parseIfStatement", "if (x) {continue;}", [ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP]);
}
void test_continueOutsideOfLoop_continueInSwitchStatement() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (x) {case 1: continue a;}", []);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (x) {case 1: continue a;}", []);
}
void test_continueOutsideOfLoop_continueInWhileStatement() {
- ParserTestCase.parse5("parseWhileStatement", "while (x) {continue;}", []);
+ ParserTestCase.parse4("parseWhileStatement", "while (x) {continue;}", []);
}
void test_continueOutsideOfLoop_functionExpression_inALoop() {
@@ -9825,15 +9891,15 @@
}
void test_continueWithoutLabelInCase_error() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (x) {case 1: continue;}", [ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE]);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (x) {case 1: continue;}", [ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE]);
}
void test_continueWithoutLabelInCase_noError() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (x) {case 1: continue a;}", []);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (x) {case 1: continue a;}", []);
}
void test_continueWithoutLabelInCase_noError_switchInLoop() {
- ParserTestCase.parse5("parseWhileStatement", "while (a) { switch (b) {default: continue;}}", []);
+ ParserTestCase.parse4("parseWhileStatement", "while (a) { switch (b) {default: continue;}}", []);
}
void test_deprecatedClassTypeAlias() {
@@ -9855,31 +9921,31 @@
}
void test_duplicatedModifier_const() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const const m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const const m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
}
void test_duplicatedModifier_external() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external external f();", [ParserErrorCode.DUPLICATED_MODIFIER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external external f();", [ParserErrorCode.DUPLICATED_MODIFIER]);
}
void test_duplicatedModifier_factory() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "factory factory C() {}", [ParserErrorCode.DUPLICATED_MODIFIER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "factory factory C() {}", [ParserErrorCode.DUPLICATED_MODIFIER]);
}
void test_duplicatedModifier_final() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "final final m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "final final m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
}
void test_duplicatedModifier_static() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "static static var m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "static static var m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
}
void test_duplicatedModifier_var() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "var var m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "var var m;", [ParserErrorCode.DUPLICATED_MODIFIER]);
}
void test_duplicateLabelInSwitchStatement() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (e) {l1: case 0: break; l1: case 1: break;}", [ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT]);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (e) {l1: case 0: break; l1: case 1: break;}", [ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT]);
}
void test_equalityCannotBeEqualityOperand_eq_eq() {
@@ -9895,44 +9961,44 @@
}
void test_expectedCaseOrDefault() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (e) {break;}", [ParserErrorCode.EXPECTED_CASE_OR_DEFAULT]);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (e) {break;}", [ParserErrorCode.EXPECTED_CASE_OR_DEFAULT]);
}
void test_expectedClassMember_inClass_afterType() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "heart 2 heart", [ParserErrorCode.EXPECTED_CLASS_MEMBER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "heart 2 heart", [ParserErrorCode.EXPECTED_CLASS_MEMBER]);
}
void test_expectedClassMember_inClass_beforeType() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "4 score", [ParserErrorCode.EXPECTED_CLASS_MEMBER]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "4 score", [ParserErrorCode.EXPECTED_CLASS_MEMBER]);
}
void test_expectedExecutable_inClass_afterVoid() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "void 2 void", [ParserErrorCode.EXPECTED_EXECUTABLE]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "void 2 void", [ParserErrorCode.EXPECTED_EXECUTABLE]);
}
void test_expectedExecutable_topLevel_afterType() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "heart 2 heart", [ParserErrorCode.EXPECTED_EXECUTABLE]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "heart 2 heart", [ParserErrorCode.EXPECTED_EXECUTABLE]);
}
void test_expectedExecutable_topLevel_afterVoid() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void 2 void", [ParserErrorCode.EXPECTED_EXECUTABLE]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void 2 void", [ParserErrorCode.EXPECTED_EXECUTABLE]);
}
void test_expectedExecutable_topLevel_beforeType() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "4 score", [ParserErrorCode.EXPECTED_EXECUTABLE]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "4 score", [ParserErrorCode.EXPECTED_EXECUTABLE]);
}
void test_expectedInterpolationIdentifier() {
- ParserTestCase.parse5("parseStringLiteral", "'\$x\$'", [ParserErrorCode.MISSING_IDENTIFIER]);
+ ParserTestCase.parse4("parseStringLiteral", "'\$x\$'", [ParserErrorCode.MISSING_IDENTIFIER]);
}
void test_expectedStringLiteral() {
- StringLiteral expression = ParserTestCase.parse5("parseStringLiteral", "1", [ParserErrorCode.EXPECTED_STRING_LITERAL]);
+ StringLiteral expression = ParserTestCase.parse4("parseStringLiteral", "1", [ParserErrorCode.EXPECTED_STRING_LITERAL]);
JUnitTestCase.assertTrue(expression.isSynthetic);
}
void test_expectedToken_commaMissingInArgumentList() {
- ParserTestCase.parse5("parseArgumentList", "(x, y z)", [ParserErrorCode.EXPECTED_TOKEN]);
+ ParserTestCase.parse4("parseArgumentList", "(x, y z)", [ParserErrorCode.EXPECTED_TOKEN]);
}
void test_expectedToken_parseStatement_afterVoid() {
@@ -9943,13 +10009,29 @@
void test_expectedToken_semicolonAfterClass() {
Token token = TokenFactory.token(Keyword.CLASS);
- ParserTestCase.parse4("parseClassTypeAlias", <Object> [emptyCommentAndMetadata(), null, token], "A = B", [ParserErrorCode.EXPECTED_TOKEN]);
+ ParserTestCase.parse3("parseClassTypeAlias", <Object> [emptyCommentAndMetadata(), null, token], "A = B", [ParserErrorCode.EXPECTED_TOKEN]);
+ }
+
+ void test_expectedToken_semicolonMissingAfterExport() {
+ CompilationUnit unit = ParserTestCase.parseCompilationUnit("export '' class A {}", [ParserErrorCode.EXPECTED_TOKEN]);
+ ExportDirective directive = unit.directives[0] as ExportDirective;
+ Token semicolon = directive.semicolon;
+ JUnitTestCase.assertNotNull(semicolon);
+ JUnitTestCase.assertTrue(semicolon.isSynthetic);
}
void test_expectedToken_semicolonMissingAfterExpression() {
ParserTestCase.parseStatement("x", [ParserErrorCode.EXPECTED_TOKEN]);
}
+ void test_expectedToken_semicolonMissingAfterImport() {
+ CompilationUnit unit = ParserTestCase.parseCompilationUnit("import '' class A {}", [ParserErrorCode.EXPECTED_TOKEN]);
+ ImportDirective directive = unit.directives[0] as ImportDirective;
+ Token semicolon = directive.semicolon;
+ JUnitTestCase.assertNotNull(semicolon);
+ JUnitTestCase.assertTrue(semicolon.isSynthetic);
+ }
+
void test_expectedToken_whileMissingInDoStatement() {
ParserTestCase.parseStatement("do {} (x);", [ParserErrorCode.EXPECTED_TOKEN]);
}
@@ -9963,15 +10045,15 @@
}
void test_externalAfterConst() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const external C();", [ParserErrorCode.EXTERNAL_AFTER_CONST]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const external C();", [ParserErrorCode.EXTERNAL_AFTER_CONST]);
}
void test_externalAfterFactory() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "factory external C();", [ParserErrorCode.EXTERNAL_AFTER_FACTORY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "factory external C();", [ParserErrorCode.EXTERNAL_AFTER_FACTORY]);
}
void test_externalAfterStatic() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "static external int m();", [ParserErrorCode.EXTERNAL_AFTER_STATIC]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "static external int m();", [ParserErrorCode.EXTERNAL_AFTER_STATIC]);
}
void test_externalClass() {
@@ -9979,47 +10061,47 @@
}
void test_externalConstructorWithBody_factory() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external factory C() {}", [ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external factory C() {}", [ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY]);
}
void test_externalConstructorWithBody_named() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external C.c() {}", [ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external C.c() {}", [ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY]);
}
void test_externalField_const() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external const A f;", [ParserErrorCode.EXTERNAL_FIELD]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external const A f;", [ParserErrorCode.EXTERNAL_FIELD]);
}
void test_externalField_final() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external final A f;", [ParserErrorCode.EXTERNAL_FIELD]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external final A f;", [ParserErrorCode.EXTERNAL_FIELD]);
}
void test_externalField_static() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external static A f;", [ParserErrorCode.EXTERNAL_FIELD]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external static A f;", [ParserErrorCode.EXTERNAL_FIELD]);
}
void test_externalField_typed() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external A f;", [ParserErrorCode.EXTERNAL_FIELD]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external A f;", [ParserErrorCode.EXTERNAL_FIELD]);
}
void test_externalField_untyped() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external var f;", [ParserErrorCode.EXTERNAL_FIELD]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external var f;", [ParserErrorCode.EXTERNAL_FIELD]);
}
void test_externalGetterWithBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external int get x {}", [ParserErrorCode.EXTERNAL_GETTER_WITH_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external int get x {}", [ParserErrorCode.EXTERNAL_GETTER_WITH_BODY]);
}
void test_externalMethodWithBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external m() {}", [ParserErrorCode.EXTERNAL_METHOD_WITH_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external m() {}", [ParserErrorCode.EXTERNAL_METHOD_WITH_BODY]);
}
void test_externalOperatorWithBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external operator +(int value) {}", [ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external operator +(int value) {}", [ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY]);
}
void test_externalSetterWithBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "external set x(int value) {}", [ParserErrorCode.EXTERNAL_SETTER_WITH_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "external set x(int value) {}", [ParserErrorCode.EXTERNAL_SETTER_WITH_BODY]);
}
void test_externalTypedef() {
@@ -10035,15 +10117,15 @@
}
void test_factoryWithoutBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "factory C();", [ParserErrorCode.FACTORY_WITHOUT_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "factory C();", [ParserErrorCode.FACTORY_WITHOUT_BODY]);
}
void test_fieldInitializerOutsideConstructor() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "void m(this.x);", [ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "void m(this.x);", [ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
}
void test_finalAndVar() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "final var x;", [ParserErrorCode.FINAL_AND_VAR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "final var x;", [ParserErrorCode.FINAL_AND_VAR]);
}
void test_finalClass() {
@@ -10051,11 +10133,11 @@
}
void test_finalConstructor() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "final C() {}", [ParserErrorCode.FINAL_CONSTRUCTOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "final C() {}", [ParserErrorCode.FINAL_CONSTRUCTOR]);
}
void test_finalMethod() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "final int m() {}", [ParserErrorCode.FINAL_METHOD]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "final int m() {}", [ParserErrorCode.FINAL_METHOD]);
}
void test_finalTypedef() {
@@ -10083,7 +10165,23 @@
}
void test_getterWithParameters() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "int get x() {}", [ParserErrorCode.GETTER_WITH_PARAMETERS]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "int get x() {}", [ParserErrorCode.GETTER_WITH_PARAMETERS]);
+ }
+
+ void test_illegalAssignmentToNonAssignable_postfix_minusMinus_literal() {
+ ParserTestCase.parseExpression("0--", [ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE]);
+ }
+
+ void test_illegalAssignmentToNonAssignable_postfix_plusPlus_literal() {
+ ParserTestCase.parseExpression("0++", [ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE]);
+ }
+
+ void test_illegalAssignmentToNonAssignable_postfix_plusPlus_parethesized() {
+ ParserTestCase.parseExpression("(x)++", [ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE]);
+ }
+
+ void test_illegalAssignmentToNonAssignable_primarySelectorPostfix() {
+ ParserTestCase.parseExpression("x(y)(z)++", [ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE]);
}
void test_illegalAssignmentToNonAssignable_superAssigned() {
@@ -10108,55 +10206,55 @@
}
void test_initializedVariableInForEach() {
- ParserTestCase.parse5("parseForStatement", "for (int a = 0 in foo) {}", [ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH]);
+ ParserTestCase.parse4("parseForStatement", "for (int a = 0 in foo) {}", [ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH]);
}
void test_invalidCodePoint() {
- ParserTestCase.parse5("parseStringLiteral", "'\\uD900'", [ParserErrorCode.INVALID_CODE_POINT]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\uD900'", [ParserErrorCode.INVALID_CODE_POINT]);
}
void test_invalidHexEscape_invalidDigit() {
- ParserTestCase.parse5("parseStringLiteral", "'\\x0 a'", [ParserErrorCode.INVALID_HEX_ESCAPE]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\x0 a'", [ParserErrorCode.INVALID_HEX_ESCAPE]);
}
void test_invalidHexEscape_tooFewDigits() {
- ParserTestCase.parse5("parseStringLiteral", "'\\x0'", [ParserErrorCode.INVALID_HEX_ESCAPE]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\x0'", [ParserErrorCode.INVALID_HEX_ESCAPE]);
}
void test_invalidInterpolationIdentifier_startWithDigit() {
- ParserTestCase.parse5("parseStringLiteral", "'\$1'", [ParserErrorCode.MISSING_IDENTIFIER]);
+ ParserTestCase.parse4("parseStringLiteral", "'\$1'", [ParserErrorCode.MISSING_IDENTIFIER]);
}
void test_invalidOperator() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "void operator ===(x) {}", [ParserErrorCode.INVALID_OPERATOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "void operator ===(x) {}", [ParserErrorCode.INVALID_OPERATOR]);
}
void test_invalidOperatorForSuper() {
- ParserTestCase.parse5("parseUnaryExpression", "++super", [ParserErrorCode.INVALID_OPERATOR_FOR_SUPER]);
+ ParserTestCase.parse4("parseUnaryExpression", "++super", [ParserErrorCode.INVALID_OPERATOR_FOR_SUPER]);
}
void test_invalidUnicodeEscape_incomplete_noDigits() {
- ParserTestCase.parse5("parseStringLiteral", "'\\u{'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\u{'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
}
void test_invalidUnicodeEscape_incomplete_someDigits() {
- ParserTestCase.parse5("parseStringLiteral", "'\\u{0A'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\u{0A'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
}
void test_invalidUnicodeEscape_invalidDigit() {
- ParserTestCase.parse5("parseStringLiteral", "'\\u0 a'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\u0 a'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
}
void test_invalidUnicodeEscape_tooFewDigits_fixed() {
- ParserTestCase.parse5("parseStringLiteral", "'\\u04'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\u04'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
}
void test_invalidUnicodeEscape_tooFewDigits_variable() {
- ParserTestCase.parse5("parseStringLiteral", "'\\u{}'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
+ ParserTestCase.parse4("parseStringLiteral", "'\\u{}'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
}
void test_invalidUnicodeEscape_tooManyDigits_variable() {
- ParserTestCase.parse5("parseStringLiteral", "'\\u{12345678}'", [
+ ParserTestCase.parse4("parseStringLiteral", "'\\u{12345678}'", [
ParserErrorCode.INVALID_UNICODE_ESCAPE,
ParserErrorCode.INVALID_CODE_POINT]);
}
@@ -10190,14 +10288,6 @@
ParserTestCase.parseExpression("x.y = y;", []);
}
- void test_missingAssignableSelector_postfix_minusMinus_literal() {
- ParserTestCase.parseExpression("0--", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR]);
- }
-
- void test_missingAssignableSelector_postfix_plusPlus_literal() {
- ParserTestCase.parseExpression("0++", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR]);
- }
-
void test_missingAssignableSelector_prefix_minusMinus_literal() {
ParserTestCase.parseExpression("--0", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR]);
}
@@ -10206,16 +10296,12 @@
ParserTestCase.parseExpression("++0", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR]);
}
- void test_missingAssignableSelector_primarySelectorPostfix() {
- ParserTestCase.parseExpression("x(y)(z)++", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR]);
- }
-
void test_missingAssignableSelector_selector() {
ParserTestCase.parseExpression("x(y)(z).a++", []);
}
void test_missingAssignableSelector_superPrimaryExpression() {
- SuperExpression expression = ParserTestCase.parse5("parsePrimaryExpression", "super", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR]);
+ SuperExpression expression = ParserTestCase.parse4("parsePrimaryExpression", "super", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR]);
JUnitTestCase.assertNotNull(expression.keyword);
}
@@ -10224,7 +10310,7 @@
}
void test_missingCatchOrFinally() {
- TryStatement statement = ParserTestCase.parse5("parseTryStatement", "try {}", [ParserErrorCode.MISSING_CATCH_OR_FINALLY]);
+ TryStatement statement = ParserTestCase.parse4("parseTryStatement", "try {}", [ParserErrorCode.MISSING_CATCH_OR_FINALLY]);
JUnitTestCase.assertNotNull(statement);
}
@@ -10237,23 +10323,23 @@
}
void test_missingConstFinalVarOrType_topLevel() {
- ParserTestCase.parse4("parseFinalConstVarOrType", <Object> [false], "a;", [ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE]);
+ ParserTestCase.parse3("parseFinalConstVarOrType", <Object> [false], "a;", [ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE]);
}
void test_missingExpressionInThrow_withCascade() {
- ParserTestCase.parse5("parseThrowExpression", "throw;", [ParserErrorCode.MISSING_EXPRESSION_IN_THROW]);
+ ParserTestCase.parse4("parseThrowExpression", "throw;", [ParserErrorCode.MISSING_EXPRESSION_IN_THROW]);
}
void test_missingExpressionInThrow_withoutCascade() {
- ParserTestCase.parse5("parseThrowExpressionWithoutCascade", "throw;", [ParserErrorCode.MISSING_EXPRESSION_IN_THROW]);
+ ParserTestCase.parse4("parseThrowExpressionWithoutCascade", "throw;", [ParserErrorCode.MISSING_EXPRESSION_IN_THROW]);
}
void test_missingFunctionBody_emptyNotAllowed() {
- ParserTestCase.parse4("parseFunctionBody", <Object> [false, ParserErrorCode.MISSING_FUNCTION_BODY, false], ";", [ParserErrorCode.MISSING_FUNCTION_BODY]);
+ ParserTestCase.parse3("parseFunctionBody", <Object> [false, ParserErrorCode.MISSING_FUNCTION_BODY, false], ";", [ParserErrorCode.MISSING_FUNCTION_BODY]);
}
void test_missingFunctionBody_invalid() {
- ParserTestCase.parse4("parseFunctionBody", <Object> [false, ParserErrorCode.MISSING_FUNCTION_BODY, false], "return 0;", [ParserErrorCode.MISSING_FUNCTION_BODY]);
+ ParserTestCase.parse3("parseFunctionBody", <Object> [false, ParserErrorCode.MISSING_FUNCTION_BODY, false], "return 0;", [ParserErrorCode.MISSING_FUNCTION_BODY]);
}
void test_missingFunctionParameters_local_void_block() {
@@ -10281,46 +10367,46 @@
}
void test_missingIdentifier_afterOperator() {
- ParserTestCase.parse5("parseMultiplicativeExpression", "1 *", [ParserErrorCode.MISSING_IDENTIFIER]);
+ ParserTestCase.parse4("parseMultiplicativeExpression", "1 *", [ParserErrorCode.MISSING_IDENTIFIER]);
}
void test_missingIdentifier_beforeClosingCurly() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "int}", [
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "int}", [
ParserErrorCode.MISSING_IDENTIFIER,
ParserErrorCode.EXPECTED_TOKEN]);
}
void test_missingIdentifier_functionDeclaration_returnTypeWithoutName() {
- ParserTestCase.parse5("parseFunctionDeclarationStatement", "A<T> () {}", [ParserErrorCode.MISSING_IDENTIFIER]);
+ ParserTestCase.parse4("parseFunctionDeclarationStatement", "A<T> () {}", [ParserErrorCode.MISSING_IDENTIFIER]);
}
void test_missingIdentifier_inSymbol_afterPeriod() {
- ParserTestCase.parse5("parseSymbolLiteral", "#a.", [ParserErrorCode.MISSING_IDENTIFIER]);
+ ParserTestCase.parse4("parseSymbolLiteral", "#a.", [ParserErrorCode.MISSING_IDENTIFIER]);
}
void test_missingIdentifier_inSymbol_first() {
- ParserTestCase.parse5("parseSymbolLiteral", "#", [ParserErrorCode.MISSING_IDENTIFIER]);
+ ParserTestCase.parse4("parseSymbolLiteral", "#", [ParserErrorCode.MISSING_IDENTIFIER]);
}
void test_missingIdentifier_number() {
- SimpleIdentifier expression = ParserTestCase.parse5("parseSimpleIdentifier", "1", [ParserErrorCode.MISSING_IDENTIFIER]);
+ SimpleIdentifier expression = ParserTestCase.parse4("parseSimpleIdentifier", "1", [ParserErrorCode.MISSING_IDENTIFIER]);
JUnitTestCase.assertTrue(expression.isSynthetic);
}
void test_missingKeywordOperator() {
- ParserTestCase.parse4("parseOperator", <Object> [emptyCommentAndMetadata(), null, null], "+(x) {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
+ ParserTestCase.parse3("parseOperator", <Object> [emptyCommentAndMetadata(), null, null], "+(x) {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
}
void test_missingKeywordOperator_parseClassMember() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "+() {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "+() {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
}
void test_missingKeywordOperator_parseClassMember_afterTypeName() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "int +() {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "int +() {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
}
void test_missingKeywordOperator_parseClassMember_afterVoid() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "void +() {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "void +() {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
}
void test_missingNameInLibraryDirective() {
@@ -10342,11 +10428,11 @@
}
void test_missingTerminatorForParameterGroup_named() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, {b: 0)", [ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, {b: 0)", [ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP]);
}
void test_missingTerminatorForParameterGroup_optional() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, [b = 0)", [ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, [b = 0)", [ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP]);
}
void test_missingTypedefParameters_nonVoid() {
@@ -10362,15 +10448,15 @@
}
void test_missingVariableInForEach() {
- ParserTestCase.parse5("parseForStatement", "for (a < b in foo) {}", [ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH]);
+ ParserTestCase.parse4("parseForStatement", "for (a < b in foo) {}", [ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH]);
}
void test_mixedParameterGroups_namedPositional() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, {b}, [c])", [ParserErrorCode.MIXED_PARAMETER_GROUPS]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, {b}, [c])", [ParserErrorCode.MIXED_PARAMETER_GROUPS]);
}
void test_mixedParameterGroups_positionalNamed() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, [b], {c})", [ParserErrorCode.MIXED_PARAMETER_GROUPS]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, [b], {c})", [ParserErrorCode.MIXED_PARAMETER_GROUPS]);
}
void test_multipleExtendsClauses() {
@@ -10386,7 +10472,7 @@
}
void test_multipleNamedParameterGroups() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, {b}, {c})", [ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, {b}, {c})", [ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS]);
}
void test_multiplePartOfDirectives() {
@@ -10394,11 +10480,11 @@
}
void test_multiplePositionalParameterGroups() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, [b], [c])", [ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, [b], [c])", [ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS]);
}
void test_multipleVariablesInForEach() {
- ParserTestCase.parse5("parseForStatement", "for (int a, b in foo) {}", [ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH]);
+ ParserTestCase.parse4("parseForStatement", "for (int a, b in foo) {}", [ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH]);
}
void test_multipleWithClauses() {
@@ -10406,15 +10492,15 @@
}
void test_namedParameterOutsideGroup() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, b : 0)", [ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, b : 0)", [ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP]);
}
void test_nonConstructorFactory_field() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "factory int x;", [ParserErrorCode.NON_CONSTRUCTOR_FACTORY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "factory int x;", [ParserErrorCode.NON_CONSTRUCTOR_FACTORY]);
}
void test_nonConstructorFactory_method() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "factory int m() {}", [ParserErrorCode.NON_CONSTRUCTOR_FACTORY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "factory int m() {}", [ParserErrorCode.NON_CONSTRUCTOR_FACTORY]);
}
void test_nonIdentifierLibraryName_library() {
@@ -10436,7 +10522,7 @@
}
void test_nonUserDefinableOperator() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "operator +=(int x) => x + 1;", [ParserErrorCode.NON_USER_DEFINABLE_OPERATOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "operator +=(int x) => x + 1;", [ParserErrorCode.NON_USER_DEFINABLE_OPERATOR]);
}
void test_optionalAfterNormalParameters_named() {
@@ -10448,22 +10534,22 @@
}
void test_parseCascadeSection_missingIdentifier() {
- MethodInvocation methodInvocation = ParserTestCase.parse5("parseCascadeSection", "..()", [ParserErrorCode.MISSING_IDENTIFIER]);
+ MethodInvocation methodInvocation = ParserTestCase.parse4("parseCascadeSection", "..()", [ParserErrorCode.MISSING_IDENTIFIER]);
JUnitTestCase.assertNull(methodInvocation.target);
JUnitTestCase.assertEquals("", methodInvocation.methodName.name);
EngineTestCase.assertSize(0, methodInvocation.argumentList.arguments);
}
void test_positionalAfterNamedArgument() {
- ParserTestCase.parse5("parseArgumentList", "(x: 1, 2)", [ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT]);
+ ParserTestCase.parse4("parseArgumentList", "(x: 1, 2)", [ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT]);
}
void test_positionalParameterOutsideGroup() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, b = 0)", [ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, b = 0)", [ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP]);
}
void test_redirectionInNonFactoryConstructor() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "C() = D;", [ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "C() = D;", [ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR]);
}
void test_setterInFunction_block() {
@@ -10475,35 +10561,35 @@
}
void test_staticAfterConst() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "final static int f;", [ParserErrorCode.STATIC_AFTER_FINAL]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "final static int f;", [ParserErrorCode.STATIC_AFTER_FINAL]);
}
void test_staticAfterFinal() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "const static int f;", [ParserErrorCode.STATIC_AFTER_CONST]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "const static int f;", [ParserErrorCode.STATIC_AFTER_CONST]);
}
void test_staticAfterVar() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "var static f;", [ParserErrorCode.STATIC_AFTER_VAR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "var static f;", [ParserErrorCode.STATIC_AFTER_VAR]);
}
void test_staticConstructor() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "static C.m() {}", [ParserErrorCode.STATIC_CONSTRUCTOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "static C.m() {}", [ParserErrorCode.STATIC_CONSTRUCTOR]);
}
void test_staticGetterWithoutBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "static get m;", [ParserErrorCode.STATIC_GETTER_WITHOUT_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "static get m;", [ParserErrorCode.STATIC_GETTER_WITHOUT_BODY]);
}
void test_staticOperator_noReturnType() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "static operator +(int x) => x + 1;", [ParserErrorCode.STATIC_OPERATOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "static operator +(int x) => x + 1;", [ParserErrorCode.STATIC_OPERATOR]);
}
void test_staticOperator_returnType() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "static int operator +(int x) => x + 1;", [ParserErrorCode.STATIC_OPERATOR]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "static int operator +(int x) => x + 1;", [ParserErrorCode.STATIC_OPERATOR]);
}
void test_staticSetterWithoutBody() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "static set m(x);", [ParserErrorCode.STATIC_SETTER_WITHOUT_BODY]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "static set m(x);", [ParserErrorCode.STATIC_SETTER_WITHOUT_BODY]);
}
void test_staticTopLevelDeclaration_class() {
@@ -10523,47 +10609,47 @@
}
void test_switchHasCaseAfterDefaultCase() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; case 1: return 1;}", [ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE]);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (a) {default: return 0; case 1: return 1;}", [ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE]);
}
void test_switchHasCaseAfterDefaultCase_repeated() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; case 1: return 1; case 2: return 2;}", [
+ ParserTestCase.parse4("parseSwitchStatement", "switch (a) {default: return 0; case 1: return 1; case 2: return 2;}", [
ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE]);
}
void test_switchHasMultipleDefaultCases() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; default: return 1;}", [ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES]);
+ ParserTestCase.parse4("parseSwitchStatement", "switch (a) {default: return 0; default: return 1;}", [ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES]);
}
void test_switchHasMultipleDefaultCases_repeated() {
- ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; default: return 1; default: return 2;}", [
+ ParserTestCase.parse4("parseSwitchStatement", "switch (a) {default: return 0; default: return 1; default: return 2;}", [
ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES]);
}
void test_topLevelOperator_withoutType() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "operator +(bool x, bool y) => x | y;", [ParserErrorCode.TOP_LEVEL_OPERATOR]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "operator +(bool x, bool y) => x | y;", [ParserErrorCode.TOP_LEVEL_OPERATOR]);
}
void test_topLevelOperator_withType() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "bool operator +(bool x, bool y) => x | y;", [ParserErrorCode.TOP_LEVEL_OPERATOR]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "bool operator +(bool x, bool y) => x | y;", [ParserErrorCode.TOP_LEVEL_OPERATOR]);
}
void test_topLevelOperator_withVoid() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void operator +(bool x, bool y) => x | y;", [ParserErrorCode.TOP_LEVEL_OPERATOR]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void operator +(bool x, bool y) => x | y;", [ParserErrorCode.TOP_LEVEL_OPERATOR]);
}
void test_unexpectedTerminatorForParameterGroup_named() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, b})", [ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, b})", [ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP]);
}
void test_unexpectedTerminatorForParameterGroup_optional() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, b])", [ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, b])", [ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP]);
}
void test_unexpectedToken_semicolonBetweenClassMembers() {
- ParserTestCase.parse4("parseClassDeclaration", <Object> [emptyCommentAndMetadata(), null], "class C { int x; ; int y;}", [ParserErrorCode.UNEXPECTED_TOKEN]);
+ ParserTestCase.parse3("parseClassDeclaration", <Object> [emptyCommentAndMetadata(), null], "class C { int x; ; int y;}", [ParserErrorCode.UNEXPECTED_TOKEN]);
}
void test_unexpectedToken_semicolonBetweenCompilationUnitMembers() {
@@ -10571,8 +10657,8 @@
}
void test_useOfUnaryPlusOperator() {
- SimpleIdentifier expression = ParserTestCase.parse5("parseUnaryExpression", "+x", [ParserErrorCode.MISSING_IDENTIFIER]);
- EngineTestCase.assertInstanceOf(SimpleIdentifier, expression);
+ SimpleIdentifier expression = ParserTestCase.parse4("parseUnaryExpression", "+x", [ParserErrorCode.MISSING_IDENTIFIER]);
+ EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIdentifier, expression);
JUnitTestCase.assertTrue(expression.isSynthetic);
}
@@ -10593,7 +10679,7 @@
}
void test_varReturnType() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "var m() {}", [ParserErrorCode.VAR_RETURN_TYPE]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "var m() {}", [ParserErrorCode.VAR_RETURN_TYPE]);
}
void test_varTypedef() {
@@ -10601,15 +10687,15 @@
}
void test_voidParameter() {
- ParserTestCase.parse5("parseNormalFormalParameter", "void a)", [ParserErrorCode.VOID_PARAMETER]);
+ ParserTestCase.parse4("parseNormalFormalParameter", "void a)", [ParserErrorCode.VOID_PARAMETER]);
}
void test_voidVariable_parseClassMember_initializer() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "void x = 0;", [ParserErrorCode.VOID_VARIABLE]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "void x = 0;", [ParserErrorCode.VOID_VARIABLE]);
}
void test_voidVariable_parseClassMember_noInitializer() {
- ParserTestCase.parse4("parseClassMember", <Object> ["C"], "void x;", [ParserErrorCode.VOID_VARIABLE]);
+ ParserTestCase.parse3("parseClassMember", <Object> ["C"], "void x;", [ParserErrorCode.VOID_VARIABLE]);
}
void test_voidVariable_parseCompilationUnit_initializer() {
@@ -10621,11 +10707,11 @@
}
void test_voidVariable_parseCompilationUnitMember_initializer() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void a = 0;", [ParserErrorCode.VOID_VARIABLE]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void a = 0;", [ParserErrorCode.VOID_VARIABLE]);
}
void test_voidVariable_parseCompilationUnitMember_noInitializer() {
- ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void a;", [ParserErrorCode.VOID_VARIABLE]);
+ ParserTestCase.parse3("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "void a;", [ParserErrorCode.VOID_VARIABLE]);
}
void test_voidVariable_statement_initializer() {
@@ -10645,23 +10731,23 @@
}
void test_withWithoutExtends() {
- ParserTestCase.parse4("parseClassDeclaration", <Object> [emptyCommentAndMetadata(), null], "class A with B, C {}", [ParserErrorCode.WITH_WITHOUT_EXTENDS]);
+ ParserTestCase.parse3("parseClassDeclaration", <Object> [emptyCommentAndMetadata(), null], "class A with B, C {}", [ParserErrorCode.WITH_WITHOUT_EXTENDS]);
}
void test_wrongSeparatorForNamedParameter() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, {b = 0})", [ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, {b = 0})", [ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER]);
}
void test_wrongSeparatorForPositionalParameter() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, [b : 0])", [ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, [b : 0])", [ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER]);
}
void test_wrongTerminatorForParameterGroup_named() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, {b, c])", [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, {b, c])", [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]);
}
void test_wrongTerminatorForParameterGroup_optional() {
- ParserTestCase.parse5("parseFormalParameterList", "(a, [b, c})", [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]);
+ ParserTestCase.parse4("parseFormalParameterList", "(a, [b, c})", [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]);
}
static dartSuite() {
@@ -10930,10 +11016,18 @@
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_expectedToken_semicolonAfterClass);
});
+ _ut.test('test_expectedToken_semicolonMissingAfterExport', () {
+ final __test = new ErrorParserTest();
+ runJUnitTest(__test, __test.test_expectedToken_semicolonMissingAfterExport);
+ });
_ut.test('test_expectedToken_semicolonMissingAfterExpression', () {
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_expectedToken_semicolonMissingAfterExpression);
});
+ _ut.test('test_expectedToken_semicolonMissingAfterImport', () {
+ final __test = new ErrorParserTest();
+ runJUnitTest(__test, __test.test_expectedToken_semicolonMissingAfterImport);
+ });
_ut.test('test_expectedToken_whileMissingInDoStatement', () {
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_expectedToken_whileMissingInDoStatement);
@@ -11070,6 +11164,22 @@
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_getterWithParameters);
});
+ _ut.test('test_illegalAssignmentToNonAssignable_postfix_minusMinus_literal', () {
+ final __test = new ErrorParserTest();
+ runJUnitTest(__test, __test.test_illegalAssignmentToNonAssignable_postfix_minusMinus_literal);
+ });
+ _ut.test('test_illegalAssignmentToNonAssignable_postfix_plusPlus_literal', () {
+ final __test = new ErrorParserTest();
+ runJUnitTest(__test, __test.test_illegalAssignmentToNonAssignable_postfix_plusPlus_literal);
+ });
+ _ut.test('test_illegalAssignmentToNonAssignable_postfix_plusPlus_parethesized', () {
+ final __test = new ErrorParserTest();
+ runJUnitTest(__test, __test.test_illegalAssignmentToNonAssignable_postfix_plusPlus_parethesized);
+ });
+ _ut.test('test_illegalAssignmentToNonAssignable_primarySelectorPostfix', () {
+ final __test = new ErrorParserTest();
+ runJUnitTest(__test, __test.test_illegalAssignmentToNonAssignable_primarySelectorPostfix);
+ });
_ut.test('test_illegalAssignmentToNonAssignable_superAssigned', () {
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_illegalAssignmentToNonAssignable_superAssigned);
@@ -11166,14 +11276,6 @@
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_missingAssignableSelector_identifiersAssigned);
});
- _ut.test('test_missingAssignableSelector_postfix_minusMinus_literal', () {
- final __test = new ErrorParserTest();
- runJUnitTest(__test, __test.test_missingAssignableSelector_postfix_minusMinus_literal);
- });
- _ut.test('test_missingAssignableSelector_postfix_plusPlus_literal', () {
- final __test = new ErrorParserTest();
- runJUnitTest(__test, __test.test_missingAssignableSelector_postfix_plusPlus_literal);
- });
_ut.test('test_missingAssignableSelector_prefix_minusMinus_literal', () {
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_missingAssignableSelector_prefix_minusMinus_literal);
@@ -11182,10 +11284,6 @@
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_missingAssignableSelector_prefix_plusPlus_literal);
});
- _ut.test('test_missingAssignableSelector_primarySelectorPostfix', () {
- final __test = new ErrorParserTest();
- runJUnitTest(__test, __test.test_missingAssignableSelector_primarySelectorPostfix);
- });
_ut.test('test_missingAssignableSelector_selector', () {
final __test = new ErrorParserTest();
runJUnitTest(__test, __test.test_missingAssignableSelector_selector);
@@ -11672,10 +11770,13 @@
'convertToFunctionDeclaration_1': new MethodTrampoline(1, (Parser target, arg0) => target.convertToFunctionDeclaration(arg0)),
'couldBeStartOfCompilationUnitMember_0': new MethodTrampoline(0, (Parser target) => target.couldBeStartOfCompilationUnitMember()),
'createSyntheticIdentifier_0': new MethodTrampoline(0, (Parser target) => target.createSyntheticIdentifier()),
+ 'createSyntheticKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => target.createSyntheticKeyword(arg0)),
'createSyntheticStringLiteral_0': new MethodTrampoline(0, (Parser target) => target.createSyntheticStringLiteral()),
'createSyntheticToken_1': new MethodTrampoline(1, (Parser target, arg0) => target.createSyntheticToken(arg0)),
'ensureAssignable_1': new MethodTrampoline(1, (Parser target, arg0) => target.ensureAssignable(arg0)),
'expect_1': new MethodTrampoline(1, (Parser target, arg0) => target.expect(arg0)),
+ 'expectKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => target.expectKeyword(arg0)),
+ 'expectSemicolon_0': new MethodTrampoline(0, (Parser target) => target.expectSemicolon()),
'findRange_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.findRange(arg0, arg1)),
'getCodeBlockRanges_1': new MethodTrampoline(1, (Parser target, arg0) => target.getCodeBlockRanges(arg0)),
'getEndToken_1': new MethodTrampoline(1, (Parser target, arg0) => target.getEndToken(arg0)),
@@ -11692,10 +11793,10 @@
'lexicallyFirst_1': new MethodTrampoline(1, (Parser target, arg0) => target.lexicallyFirst(arg0)),
'lockErrorListener_0': new MethodTrampoline(0, (Parser target) => target.lockErrorListener()),
'matches_1': new MethodTrampoline(1, (Parser target, arg0) => target.matches(arg0)),
- 'matches_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.matches3(arg0, arg1)),
'matchesAny_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.matchesAny(arg0, arg1)),
'matchesIdentifier_0': new MethodTrampoline(0, (Parser target) => target.matchesIdentifier()),
- 'matchesIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => target.matchesIdentifier2(arg0)),
+ 'matchesKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => target.matchesKeyword(arg0)),
+ 'matchesString_1': new MethodTrampoline(1, (Parser target, arg0) => target.matchesString(arg0)),
'optional_1': new MethodTrampoline(1, (Parser target, arg0) => target.optional(arg0)),
'parseAdditiveExpression_0': new MethodTrampoline(0, (Parser target) => target.parseAdditiveExpression()),
'parseArgumentDefinitionTest_0': new MethodTrampoline(0, (Parser target) => target.parseArgumentDefinitionTest()),
@@ -11731,7 +11832,7 @@
'parseFunctionBody_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.parseFunctionBody(arg0, arg1, arg2)),
'parseFunctionDeclaration_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.parseFunctionDeclaration(arg0, arg1, arg2)),
'parseFunctionDeclarationStatement_0': new MethodTrampoline(0, (Parser target) => target.parseFunctionDeclarationStatement()),
- 'parseFunctionDeclarationStatement_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.parseFunctionDeclarationStatement2(arg0, arg1)),
+ 'parseFunctionDeclarationStatementAfterReturnType_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.parseFunctionDeclarationStatementAfterReturnType(arg0, arg1)),
'parseFunctionTypeAlias_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.parseFunctionTypeAlias(arg0, arg1)),
'parseGetter_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg3) => target.parseGetter(arg0, arg1, arg2, arg3)),
'parseIdentifierList_0': new MethodTrampoline(0, (Parser target) => target.parseIdentifierList()),
@@ -11745,8 +11846,8 @@
'parseListOrMapLiteral_1': new MethodTrampoline(1, (Parser target, arg0) => target.parseListOrMapLiteral(arg0)),
'parseLogicalAndExpression_0': new MethodTrampoline(0, (Parser target) => target.parseLogicalAndExpression()),
'parseMapLiteral_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.parseMapLiteral(arg0, arg1)),
- 'parseMethodDeclaration_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg3) => target.parseMethodDeclaration(arg0, arg1, arg2, arg3)),
- 'parseMethodDeclaration_6': new MethodTrampoline(6, (Parser target, arg0, arg1, arg2, arg3, arg4, arg5) => target.parseMethodDeclaration2(arg0, arg1, arg2, arg3, arg4, arg5)),
+ 'parseMethodDeclarationAfterParameters_6': new MethodTrampoline(6, (Parser target, arg0, arg1, arg2, arg3, arg4, arg5) => target.parseMethodDeclarationAfterParameters(arg0, arg1, arg2, arg3, arg4, arg5)),
+ 'parseMethodDeclarationAfterReturnType_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg3) => target.parseMethodDeclarationAfterReturnType(arg0, arg1, arg2, arg3)),
'parseModifiers_0': new MethodTrampoline(0, (Parser target) => target.parseModifiers()),
'parseMultiplicativeExpression_0': new MethodTrampoline(0, (Parser target) => target.parseMultiplicativeExpression()),
'parseNativeClause_0': new MethodTrampoline(0, (Parser target) => target.parseNativeClause()),
@@ -11763,7 +11864,7 @@
'parseReturnStatement_0': new MethodTrampoline(0, (Parser target) => target.parseReturnStatement()),
'parseSetter_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg3) => target.parseSetter(arg0, arg1, arg2, arg3)),
'parseShiftExpression_0': new MethodTrampoline(0, (Parser target) => target.parseShiftExpression()),
- 'parseStatements_0': new MethodTrampoline(0, (Parser target) => target.parseStatements2()),
+ 'parseStatementList_0': new MethodTrampoline(0, (Parser target) => target.parseStatementList()),
'parseStringInterpolation_1': new MethodTrampoline(1, (Parser target, arg0) => target.parseStringInterpolation(arg0)),
'parseSuperConstructorInvocation_0': new MethodTrampoline(0, (Parser target) => target.parseSuperConstructorInvocation()),
'parseSwitchStatement_0': new MethodTrampoline(0, (Parser target) => target.parseSwitchStatement()),
@@ -11774,16 +11875,17 @@
'parseTypeAlias_1': new MethodTrampoline(1, (Parser target, arg0) => target.parseTypeAlias(arg0)),
'parseUnaryExpression_0': new MethodTrampoline(0, (Parser target) => target.parseUnaryExpression()),
'parseVariableDeclaration_0': new MethodTrampoline(0, (Parser target) => target.parseVariableDeclaration()),
- 'parseVariableDeclarationList_1': new MethodTrampoline(1, (Parser target, arg0) => target.parseVariableDeclarationList(arg0)),
- 'parseVariableDeclarationList_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.parseVariableDeclarationList2(arg0, arg1, arg2)),
- 'parseVariableDeclarationStatement_1': new MethodTrampoline(1, (Parser target, arg0) => target.parseVariableDeclarationStatement(arg0)),
- 'parseVariableDeclarationStatement_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.parseVariableDeclarationStatement2(arg0, arg1, arg2)),
+ 'parseVariableDeclarationListAfterMetadata_1': new MethodTrampoline(1, (Parser target, arg0) => target.parseVariableDeclarationListAfterMetadata(arg0)),
+ 'parseVariableDeclarationListAfterType_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.parseVariableDeclarationListAfterType(arg0, arg1, arg2)),
+ 'parseVariableDeclarationStatementAfterMetadata_1': new MethodTrampoline(1, (Parser target, arg0) => target.parseVariableDeclarationStatementAfterMetadata(arg0)),
+ 'parseVariableDeclarationStatementAfterType_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.parseVariableDeclarationStatementAfterType(arg0, arg1, arg2)),
'parseWhileStatement_0': new MethodTrampoline(0, (Parser target) => target.parseWhileStatement()),
'peek_0': new MethodTrampoline(0, (Parser target) => target.peek()),
'peek_1': new MethodTrampoline(1, (Parser target, arg0) => target.peek2(arg0)),
'reportError_1': new MethodTrampoline(1, (Parser target, arg0) => target.reportError(arg0)),
- 'reportError_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.reportError12(arg0, arg1, arg2)),
- 'reportError_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.reportError13(arg0, arg1)),
+ 'reportErrorForCurrentToken_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.reportErrorForCurrentToken(arg0, arg1)),
+ 'reportErrorForNode_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.reportErrorForNode(arg0, arg1, arg2)),
+ 'reportErrorForToken_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.reportErrorForToken(arg0, arg1, arg2)),
'skipBlock_0': new MethodTrampoline(0, (Parser target) => target.skipBlock()),
'skipFinalConstVarOrType_1': new MethodTrampoline(1, (Parser target, arg0) => target.skipFinalConstVarOrType(arg0)),
'skipFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0) => target.skipFormalParameterList(arg0)),
@@ -11796,6 +11898,9 @@
'skipTypeArgumentList_1': new MethodTrampoline(1, (Parser target, arg0) => target.skipTypeArgumentList(arg0)),
'skipTypeName_1': new MethodTrampoline(1, (Parser target, arg0) => target.skipTypeName(arg0)),
'skipTypeParameterList_1': new MethodTrampoline(1, (Parser target, arg0) => target.skipTypeParameterList(arg0)),
+ 'tokenMatches_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.tokenMatches(arg0, arg1)),
+ 'tokenMatchesIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => target.tokenMatchesIdentifier(arg0)),
+ 'tokenMatchesKeyword_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.tokenMatchesKeyword(arg0, arg1)),
'translateCharacter_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) => target.translateCharacter(arg0, arg1, arg2)),
'unlockErrorListener_0': new MethodTrampoline(0, (Parser target) => target.unlockErrorListener()),
'validateFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0) => target.validateFormalParameterList(arg0)),
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 878187a..3476dfa 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -9,6 +9,8 @@
import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/java_junit.dart';
+import 'package:analyzer/src/generated/java_engine.dart';
+import 'package:analyzer/src/generated/java_engine_io.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/scanner.dart';
@@ -17,12 +19,12 @@
import 'package:analyzer/src/generated/element.dart';
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/java_engine_io.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
import 'package:unittest/unittest.dart' as _ut;
import 'test_support.dart';
-import 'ast_test.dart' show ASTFactory;
+import 'ast_test.dart' show AstFactory;
import 'element_test.dart' show ElementFactory;
class TypePropagationTest extends ResolverTestCase {
@@ -119,12 +121,12 @@
InterfaceType stringType = typeProvider.stringType;
// in the declaration
{
- SimpleIdentifier identifier = EngineTestCase.findNode(unit, code, "e in", SimpleIdentifier);
+ SimpleIdentifier identifier = EngineTestCase.findNode(unit, code, "e in", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(stringType, identifier.propagatedType);
}
// in the loop body
{
- SimpleIdentifier identifier = EngineTestCase.findNode(unit, code, "e;", SimpleIdentifier);
+ SimpleIdentifier identifier = EngineTestCase.findNode(unit, code, "e;", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(stringType, identifier.propagatedType);
}
}
@@ -147,16 +149,16 @@
CompilationUnit unit = resolveCompilationUnit(source, library);
// k
Type2 intType = typeProvider.intType;
- FormalParameter kParameter = EngineTestCase.findNode(unit, code, "k, ", SimpleFormalParameter);
+ FormalParameter kParameter = EngineTestCase.findNode(unit, code, "k, ", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(intType, kParameter.identifier.propagatedType);
- SimpleIdentifier kIdentifier = EngineTestCase.findNode(unit, code, "k;", SimpleIdentifier);
+ SimpleIdentifier kIdentifier = EngineTestCase.findNode(unit, code, "k;", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(intType, kIdentifier.propagatedType);
JUnitTestCase.assertSame(typeProvider.dynamicType, kIdentifier.staticType);
// v
Type2 stringType = typeProvider.stringType;
- FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", SimpleFormalParameter);
+ FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(stringType, vParameter.identifier.propagatedType);
- SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", SimpleIdentifier);
+ SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(stringType, vIdentifier.propagatedType);
JUnitTestCase.assertSame(typeProvider.dynamicType, vIdentifier.staticType);
}
@@ -177,11 +179,11 @@
CompilationUnit unit = resolveCompilationUnit(source, library);
// k
Type2 intType = typeProvider.intType;
- FormalParameter kParameter = EngineTestCase.findNode(unit, code, "k, ", SimpleFormalParameter);
+ FormalParameter kParameter = EngineTestCase.findNode(unit, code, "k, ", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(intType, kParameter.identifier.propagatedType);
// v
Type2 stringType = typeProvider.stringType;
- FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", SimpleFormalParameter);
+ FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(stringType, vParameter.identifier.propagatedType);
}
@@ -200,10 +202,10 @@
// v
Type2 dynamicType = typeProvider.dynamicType;
Type2 stringType = typeProvider.stringType;
- FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", FormalParameter);
+ FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", (node) => node is FormalParameter);
JUnitTestCase.assertSame(stringType, vParameter.identifier.propagatedType);
JUnitTestCase.assertSame(dynamicType, vParameter.identifier.staticType);
- SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", SimpleIdentifier);
+ SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(stringType, vIdentifier.propagatedType);
JUnitTestCase.assertSame(dynamicType, vIdentifier.staticType);
}
@@ -225,10 +227,10 @@
CompilationUnit unit = resolveCompilationUnit(source, library);
// v
Type2 intType = typeProvider.intType;
- FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", SimpleFormalParameter);
+ FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(null, vParameter.identifier.propagatedType);
JUnitTestCase.assertSame(intType, vParameter.identifier.staticType);
- SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", SimpleIdentifier);
+ SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(intType, vIdentifier.staticType);
JUnitTestCase.assertSame(null, vIdentifier.propagatedType);
}
@@ -250,10 +252,10 @@
CompilationUnit unit = resolveCompilationUnit(source, library);
// v
Type2 stringType = typeProvider.stringType;
- FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", SimpleFormalParameter);
+ FormalParameter vParameter = EngineTestCase.findNode(unit, code, "v)", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(stringType, vParameter.identifier.propagatedType);
JUnitTestCase.assertSame(typeProvider.objectType, vParameter.identifier.staticType);
- SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", SimpleIdentifier);
+ SimpleIdentifier vIdentifier = EngineTestCase.findNode(unit, code, "v;", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(stringType, vIdentifier.propagatedType);
}
@@ -274,13 +276,13 @@
verify([source]);
CompilationUnit unit = resolveCompilationUnit(source, library);
// p1
- FormalParameter p1 = EngineTestCase.findNode(unit, code, "p1) {", SimpleFormalParameter);
+ FormalParameter p1 = EngineTestCase.findNode(unit, code, "p1) {", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(typeProvider.intType, p1.identifier.propagatedType);
// p2
- FormalParameter p2 = EngineTestCase.findNode(unit, code, "p2) {", SimpleFormalParameter);
+ FormalParameter p2 = EngineTestCase.findNode(unit, code, "p2) {", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(typeProvider.doubleType, p2.identifier.propagatedType);
// p3
- FormalParameter p3 = EngineTestCase.findNode(unit, code, "p3) {", SimpleFormalParameter);
+ FormalParameter p3 = EngineTestCase.findNode(unit, code, "p3) {", (node) => node is SimpleFormalParameter);
JUnitTestCase.assertSame(typeProvider.stringType, p3.identifier.propagatedType);
}
@@ -786,7 +788,7 @@
verify([source]);
CompilationUnit unit = resolveCompilationUnit(source, library);
//
- SimpleIdentifier identifier = EngineTestCase.findNode(unit, code, "v = ", SimpleIdentifier);
+ SimpleIdentifier identifier = EngineTestCase.findNode(unit, code, "v = ", (node) => node is SimpleIdentifier);
JUnitTestCase.assertSame(expectedStaticType, identifier.staticType);
JUnitTestCase.assertSame(expectedPropagatedType, identifier.propagatedType);
}
@@ -1237,8 +1239,8 @@
verify([source]);
CompilationUnit unit = analysisContext.parseCompilationUnit(source);
{
- SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p]", SimpleIdentifier);
- EngineTestCase.assertInstanceOf(ParameterElement, ref.staticElement);
+ SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p]", (node) => node is SimpleIdentifier);
+ EngineTestCase.assertInstanceOf((obj) => obj is ParameterElement, ParameterElement, ref.staticElement);
}
}
@@ -1249,8 +1251,8 @@
assertNoErrors(source);
verify([source]);
CompilationUnit unit = analysisContext.parseCompilationUnit(source);
- SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p]", SimpleIdentifier);
- EngineTestCase.assertInstanceOf(ParameterElement, ref.staticElement);
+ SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p]", (node) => node is SimpleIdentifier);
+ EngineTestCase.assertInstanceOf((obj) => obj is ParameterElement, ParameterElement, ref.staticElement);
}
void test_commentReference_beforeFunction_expressionBody() {
@@ -1260,8 +1262,8 @@
assertNoErrors(source);
verify([source]);
CompilationUnit unit = analysisContext.parseCompilationUnit(source);
- SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p]", SimpleIdentifier);
- EngineTestCase.assertInstanceOf(ParameterElement, ref.staticElement);
+ SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p]", (node) => node is SimpleIdentifier);
+ EngineTestCase.assertInstanceOf((obj) => obj is ParameterElement, ParameterElement, ref.staticElement);
}
void test_commentReference_beforeMethod() {
@@ -1278,12 +1280,12 @@
verify([source]);
CompilationUnit unit = analysisContext.parseCompilationUnit(source);
{
- SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p1]", SimpleIdentifier);
- EngineTestCase.assertInstanceOf(ParameterElement, ref.staticElement);
+ SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p1]", (node) => node is SimpleIdentifier);
+ EngineTestCase.assertInstanceOf((obj) => obj is ParameterElement, ParameterElement, ref.staticElement);
}
{
- SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p2]", SimpleIdentifier);
- EngineTestCase.assertInstanceOf(ParameterElement, ref.staticElement);
+ SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "p2]", (node) => node is SimpleIdentifier);
+ EngineTestCase.assertInstanceOf((obj) => obj is ParameterElement, ParameterElement, ref.staticElement);
}
}
@@ -1294,8 +1296,8 @@
assertNoErrors(source);
verify([source]);
CompilationUnit unit = analysisContext.parseCompilationUnit(source);
- SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "foo]", SimpleIdentifier);
- EngineTestCase.assertInstanceOf(MethodElement, ref.staticElement);
+ SimpleIdentifier ref = EngineTestCase.findNode(unit, code, "foo]", (node) => node is SimpleIdentifier);
+ EngineTestCase.assertInstanceOf((obj) => obj is MethodElement, MethodElement, ref.staticElement);
}
void test_concreteClassWithAbstractMember() {
@@ -1695,6 +1697,20 @@
verify([source]);
}
+ void test_extraPositionalArguments_implicitConstructor() {
+ Source source = addSource(EngineTestCase.createSource([
+ "class A<E extends num> {",
+ " A(E x, E y);",
+ "}",
+ "class B<E extends num> = A<E>;",
+ "void main() {",
+ " B<int> x = new B<int>(0,0);",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_extraPositionalArguments_typedef_local() {
Source source = addSource(EngineTestCase.createSource([
"typedef A(p1, p2);",
@@ -2941,6 +2957,94 @@
verify([source]);
}
+ void test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_getter() {
+ Source source = addSource(EngineTestCase.createSource([
+ "class A {",
+ " int get g => 0;",
+ "}",
+ "abstract class B extends A {",
+ " int get g;",
+ "}",
+ "class C extends B {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_method() {
+ Source source = addSource(EngineTestCase.createSource([
+ "class A {",
+ " m(p) {}",
+ "}",
+ "abstract class B extends A {",
+ " m(p);",
+ "}",
+ "class C extends B {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_setter() {
+ Source source = addSource(EngineTestCase.createSource([
+ "class A {",
+ " set s(v) {}",
+ "}",
+ "abstract class B extends A {",
+ " set s(v);",
+ "}",
+ "class C extends B {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_mixin_getter() {
+ // 17034
+ Source source = addSource(EngineTestCase.createSource([
+ "class A {",
+ " var a;",
+ "}",
+ "abstract class M {",
+ " get a;",
+ "}",
+ "class B extends A with M {}",
+ "class C extends B {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_mixin_method() {
+ Source source = addSource(EngineTestCase.createSource([
+ "class A {",
+ " m() {}",
+ "}",
+ "abstract class M {",
+ " m();",
+ "}",
+ "class B extends A with M {}",
+ "class C extends B {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_mixin_setter() {
+ Source source = addSource(EngineTestCase.createSource([
+ "class A {",
+ " var a;",
+ "}",
+ "abstract class M {",
+ " set a(dynamic v);",
+ "}",
+ "class B extends A with M {}",
+ "class C extends B {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_accessor() {
Source source = addSource(EngineTestCase.createSource([
"abstract class A {",
@@ -3469,6 +3573,73 @@
assertNoErrors(source);
}
+ void test_proxy_annotation_superclass() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library L;",
+ "class B extends A {",
+ " m() {",
+ " n();",
+ " var x = g;",
+ " s = 1;",
+ " var y = this + this;",
+ " }",
+ "}",
+ "@proxy",
+ "class A {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ }
+
+ void test_proxy_annotation_superclass_mixin() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library L;",
+ "class B extends Object with A {",
+ " m() {",
+ " n();",
+ " var x = g;",
+ " s = 1;",
+ " var y = this + this;",
+ " }",
+ "}",
+ "@proxy",
+ "class A {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ }
+
+ void test_proxy_annotation_superinterface() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library L;",
+ "class B implements A {",
+ " m() {",
+ " n();",
+ " var x = g;",
+ " s = 1;",
+ " var y = this + this;",
+ " }",
+ "}",
+ "@proxy",
+ "class A {}"]));
+ resolve(source);
+ assertNoErrors(source);
+ }
+
+ void test_proxy_annotation_superinterface_infiniteLoop() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library L;",
+ "class C implements A {",
+ " m() {",
+ " n();",
+ " var x = g;",
+ " s = 1;",
+ " var y = this + this;",
+ " }",
+ "}",
+ "class B implements A{}",
+ "class A implements B{}"]));
+ resolve(source);
+ }
+
void test_recursiveConstructorRedirect() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
@@ -4672,6 +4843,10 @@
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_extraPositionalArguments_function);
});
+ _ut.test('test_extraPositionalArguments_implicitConstructor', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_extraPositionalArguments_implicitConstructor);
+ });
_ut.test('test_extraPositionalArguments_typedef_local', () {
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_extraPositionalArguments_typedef_local);
@@ -5132,6 +5307,30 @@
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_newWithUndefinedConstructorDefault);
});
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_getter', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_getter);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_method', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_method);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_setter', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_setter);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_mixin_getter', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_mixin_getter);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_mixin_method', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_mixin_method);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_mixin_setter', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_mixin_setter);
+ });
_ut.test('test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_accessor', () {
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_accessor);
@@ -5312,6 +5511,22 @@
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_proxy_annotation_simple);
});
+ _ut.test('test_proxy_annotation_superclass', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_proxy_annotation_superclass);
+ });
+ _ut.test('test_proxy_annotation_superclass_mixin', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_proxy_annotation_superclass_mixin);
+ });
+ _ut.test('test_proxy_annotation_superinterface', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_proxy_annotation_superinterface);
+ });
+ _ut.test('test_proxy_annotation_superinterface_infiniteLoop', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_proxy_annotation_superinterface_infiniteLoop);
+ });
_ut.test('test_recursiveConstructorRedirect', () {
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_recursiveConstructorRedirect);
@@ -5654,7 +5869,7 @@
Library _library5;
void setUp() {
- _sourceFactory = new SourceFactory.con2([new FileUriResolver()]);
+ _sourceFactory = new SourceFactory([new FileUriResolver()]);
_analysisContext = new AnalysisContextImpl();
_analysisContext.sourceFactory = _sourceFactory;
_errorListener = new GatheringErrorListener();
@@ -5684,7 +5899,7 @@
}
void test_getLibraryScope() {
- LibraryElementImpl element = new LibraryElementImpl(_analysisContext, ASTFactory.libraryIdentifier2(["lib"]));
+ LibraryElementImpl element = new LibraryElementImpl(_analysisContext, AstFactory.libraryIdentifier2(["lib"]));
element.definingCompilationUnit = new CompilationUnitElementImpl("lib.dart");
_library5.libraryElement = element;
JUnitTestCase.assertNotNull(_library5.libraryScope);
@@ -5720,12 +5935,12 @@
}
void test_setLibraryElement() {
- LibraryElementImpl element = new LibraryElementImpl(_analysisContext, ASTFactory.libraryIdentifier2(["lib"]));
+ LibraryElementImpl element = new LibraryElementImpl(_analysisContext, AstFactory.libraryIdentifier2(["lib"]));
_library5.libraryElement = element;
JUnitTestCase.assertSame(element, _library5.libraryElement);
}
- Library library(String definingCompilationUnitPath) => new Library(_analysisContext, _errorListener, new FileBasedSource.con1(_sourceFactory.contentCache, FileUtilities2.createFile(definingCompilationUnitPath)));
+ Library library(String definingCompilationUnitPath) => new Library(_analysisContext, _errorListener, new FileBasedSource.con1(FileUtilities2.createFile(definingCompilationUnitPath)));
static dartSuite() {
_ut.group('LibraryTest', () {
@@ -6969,6 +7184,13 @@
verify([source]);
}
+ void test_wrongNumberOfTypeArguments_classAlias() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class B<F extends num> = A<F>;"]));
+ resolve(source);
+ assertErrors(source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+ verify([source]);
+ }
+
void test_wrongNumberOfTypeArguments_tooFew() {
Source source = addSource(EngineTestCase.createSource(["class A<E, F> {}", "A<A> a = null;"]));
resolve(source);
@@ -7409,6 +7631,10 @@
final __test = new StaticTypeWarningCodeTest();
runJUnitTest(__test, __test.test_unqualifiedReferenceToNonLocalStaticMember_setter);
});
+ _ut.test('test_wrongNumberOfTypeArguments_classAlias', () {
+ final __test = new StaticTypeWarningCodeTest();
+ runJUnitTest(__test, __test.test_wrongNumberOfTypeArguments_classAlias);
+ });
_ut.test('test_wrongNumberOfTypeArguments_tooFew', () {
final __test = new StaticTypeWarningCodeTest();
runJUnitTest(__test, __test.test_wrongNumberOfTypeArguments_tooFew);
@@ -8017,6 +8243,51 @@
verify([source]);
}
+ void test_overrideOnNonOverridingGetter_invalid() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ "}",
+ "class B extends A {",
+ " @override",
+ " int get m => 1;",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
+ verify([source]);
+ }
+
+ void test_overrideOnNonOverridingMethod_invalid() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ "}",
+ "class B extends A {",
+ " @override",
+ " int m() => 1;",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
+ verify([source]);
+ }
+
+ void test_overrideOnNonOverridingSetter_invalid() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ "}",
+ "class B extends A {",
+ " @override",
+ " set m(int x) {}",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
+ verify([source]);
+ }
+
void test_typeCheck_type_is_Null() {
Source source = addSource(EngineTestCase.createSource(["m(i) {", " bool b = i is Null;", "}"]));
resolve(source);
@@ -8541,6 +8812,18 @@
final __test = new HintCodeTest();
runJUnitTest(__test, __test.test_missingReturn_method);
});
+ _ut.test('test_overrideOnNonOverridingGetter_invalid', () {
+ final __test = new HintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingGetter_invalid);
+ });
+ _ut.test('test_overrideOnNonOverridingMethod_invalid', () {
+ final __test = new HintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingMethod_invalid);
+ });
+ _ut.test('test_overrideOnNonOverridingSetter_invalid', () {
+ final __test = new HintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingSetter_invalid);
+ });
_ut.test('test_typeCheck_type_is_Null', () {
final __test = new HintCodeTest();
runJUnitTest(__test, __test.test_typeCheck_type_is_Null);
@@ -8723,8 +9006,8 @@
void fail_visitVariableDeclaration() {
JUnitTestCase.fail("Not yet tested");
ClassElement type = ElementFactory.classElement2("A", []);
- VariableDeclaration node = ASTFactory.variableDeclaration("a");
- ASTFactory.variableDeclarationList(null, ASTFactory.typeName(type, []), [node]);
+ VariableDeclaration node = AstFactory.variableDeclaration("a");
+ AstFactory.variableDeclarationList(null, AstFactory.typeName(type, []), [node]);
//resolve(node);
JUnitTestCase.assertSame(type.type, node.name.staticType);
_listener.assertNoErrors();
@@ -8732,12 +9015,12 @@
void setUp() {
_listener = new GatheringErrorListener();
- SourceFactory factory = new SourceFactory.con2([new FileUriResolver()]);
+ SourceFactory factory = new SourceFactory([new FileUriResolver()]);
AnalysisContextImpl context = new AnalysisContextImpl();
context.sourceFactory = factory;
- Source librarySource = new FileBasedSource.con1(factory.contentCache, FileUtilities2.createFile("/lib.dart"));
+ Source librarySource = new FileBasedSource.con1(FileUtilities2.createFile("/lib.dart"));
_library = new Library(context, _listener, librarySource);
- LibraryElementImpl element = new LibraryElementImpl(context, ASTFactory.libraryIdentifier2(["lib"]));
+ LibraryElementImpl element = new LibraryElementImpl(context, AstFactory.libraryIdentifier2(["lib"]));
element.definingCompilationUnit = new CompilationUnitElementImpl("lib.dart");
_library.libraryElement = element;
_typeProvider = new TestTypeProvider();
@@ -8746,7 +9029,7 @@
void test_visitCatchClause_exception() {
// catch (e)
- CatchClause clause = ASTFactory.catchClause("e", []);
+ CatchClause clause = AstFactory.catchClause("e", []);
SimpleIdentifier exceptionParameter = clause.exceptionParameter;
exceptionParameter.staticElement = new LocalVariableElementImpl(exceptionParameter);
resolve(clause, _typeProvider.dynamicType, null, []);
@@ -8755,7 +9038,7 @@
void test_visitCatchClause_exception_stackTrace() {
// catch (e, s)
- CatchClause clause = ASTFactory.catchClause2("e", "s", []);
+ CatchClause clause = AstFactory.catchClause2("e", "s", []);
SimpleIdentifier exceptionParameter = clause.exceptionParameter;
exceptionParameter.staticElement = new LocalVariableElementImpl(exceptionParameter);
SimpleIdentifier stackTraceParameter = clause.stackTraceParameter;
@@ -8767,8 +9050,8 @@
void test_visitCatchClause_on_exception() {
// on E catch (e)
ClassElement exceptionElement = ElementFactory.classElement2("E", []);
- TypeName exceptionType = ASTFactory.typeName(exceptionElement, []);
- CatchClause clause = ASTFactory.catchClause4(exceptionType, "e", []);
+ TypeName exceptionType = AstFactory.typeName(exceptionElement, []);
+ CatchClause clause = AstFactory.catchClause4(exceptionType, "e", []);
SimpleIdentifier exceptionParameter = clause.exceptionParameter;
exceptionParameter.staticElement = new LocalVariableElementImpl(exceptionParameter);
resolve(clause, exceptionElement.type, null, [exceptionElement]);
@@ -8778,9 +9061,9 @@
void test_visitCatchClause_on_exception_stackTrace() {
// on E catch (e, s)
ClassElement exceptionElement = ElementFactory.classElement2("E", []);
- TypeName exceptionType = ASTFactory.typeName(exceptionElement, []);
+ TypeName exceptionType = AstFactory.typeName(exceptionElement, []);
(exceptionType.name as SimpleIdentifier).staticElement = exceptionElement;
- CatchClause clause = ASTFactory.catchClause5(exceptionType, "e", "s", []);
+ CatchClause clause = AstFactory.catchClause5(exceptionType, "e", "s", []);
SimpleIdentifier exceptionParameter = clause.exceptionParameter;
exceptionParameter.staticElement = new LocalVariableElementImpl(exceptionParameter);
SimpleIdentifier stackTraceParameter = clause.stackTraceParameter;
@@ -8795,10 +9078,10 @@
ClassElement elementB = ElementFactory.classElement2("B", []);
ClassElement elementC = ElementFactory.classElement2("C", []);
ClassElement elementD = ElementFactory.classElement2("D", []);
- ExtendsClause extendsClause = ASTFactory.extendsClause(ASTFactory.typeName(elementB, []));
- WithClause withClause = ASTFactory.withClause([ASTFactory.typeName(elementC, [])]);
- ImplementsClause implementsClause = ASTFactory.implementsClause([ASTFactory.typeName(elementD, [])]);
- ClassDeclaration declaration = ASTFactory.classDeclaration(null, "A", null, extendsClause, withClause, implementsClause, []);
+ ExtendsClause extendsClause = AstFactory.extendsClause(AstFactory.typeName(elementB, []));
+ WithClause withClause = AstFactory.withClause([AstFactory.typeName(elementC, [])]);
+ ImplementsClause implementsClause = AstFactory.implementsClause([AstFactory.typeName(elementD, [])]);
+ ClassDeclaration declaration = AstFactory.classDeclaration(null, "A", null, extendsClause, withClause, implementsClause, []);
declaration.name.staticElement = elementA;
resolveNode(declaration, [elementA, elementB, elementC, elementD]);
JUnitTestCase.assertSame(elementB.type, elementA.supertype);
@@ -8817,9 +9100,9 @@
ClassElement elementB = ElementFactory.classElement2("B", []);
ClassElement elementC = ElementFactory.classElement2("C", []);
ClassElement elementD = ElementFactory.classElement2("D", []);
- WithClause withClause = ASTFactory.withClause([ASTFactory.typeName(elementC, [])]);
- ImplementsClause implementsClause = ASTFactory.implementsClause([ASTFactory.typeName(elementD, [])]);
- ClassTypeAlias alias = ASTFactory.classTypeAlias("A", null, null, ASTFactory.typeName(elementB, []), withClause, implementsClause);
+ WithClause withClause = AstFactory.withClause([AstFactory.typeName(elementC, [])]);
+ ImplementsClause implementsClause = AstFactory.implementsClause([AstFactory.typeName(elementD, [])]);
+ ClassTypeAlias alias = AstFactory.classTypeAlias("A", null, null, AstFactory.typeName(elementB, []), withClause, implementsClause);
alias.name.staticElement = elementA;
resolveNode(alias, [elementA, elementB, elementC, elementD]);
JUnitTestCase.assertSame(elementB.type, elementA.supertype);
@@ -8834,15 +9117,15 @@
void test_visitFieldFormalParameter_functionType() {
InterfaceType intType = _typeProvider.intType;
- TypeName intTypeName = ASTFactory.typeName4("int", []);
+ TypeName intTypeName = AstFactory.typeName4("int", []);
String innerParameterName = "a";
- SimpleFormalParameter parameter = ASTFactory.simpleFormalParameter3(innerParameterName);
+ SimpleFormalParameter parameter = AstFactory.simpleFormalParameter3(innerParameterName);
parameter.identifier.staticElement = ElementFactory.requiredParameter(innerParameterName);
String outerParameterName = "p";
- FormalParameter node = ASTFactory.fieldFormalParameter2(null, intTypeName, outerParameterName, ASTFactory.formalParameterList([parameter]));
+ FormalParameter node = AstFactory.fieldFormalParameter2(null, intTypeName, outerParameterName, AstFactory.formalParameterList([parameter]));
node.identifier.staticElement = ElementFactory.requiredParameter(outerParameterName);
Type2 parameterType = resolve6(node, [intType.element]);
- EngineTestCase.assertInstanceOf(FunctionType, parameterType);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionType, FunctionType, parameterType);
FunctionType functionType = parameterType as FunctionType;
JUnitTestCase.assertSame(intType, functionType.returnType);
EngineTestCase.assertLength(1, functionType.parameters);
@@ -8851,7 +9134,7 @@
void test_visitFieldFormalParameter_noType() {
String parameterName = "p";
- FormalParameter node = ASTFactory.fieldFormalParameter(Keyword.VAR, null, parameterName);
+ FormalParameter node = AstFactory.fieldFormalParameter(Keyword.VAR, null, parameterName);
node.identifier.staticElement = ElementFactory.requiredParameter(parameterName);
JUnitTestCase.assertSame(_typeProvider.dynamicType, resolve6(node, []));
_listener.assertNoErrors();
@@ -8859,9 +9142,9 @@
void test_visitFieldFormalParameter_type() {
InterfaceType intType = _typeProvider.intType;
- TypeName intTypeName = ASTFactory.typeName4("int", []);
+ TypeName intTypeName = AstFactory.typeName4("int", []);
String parameterName = "p";
- FormalParameter node = ASTFactory.fieldFormalParameter(null, intTypeName, parameterName);
+ FormalParameter node = AstFactory.fieldFormalParameter(null, intTypeName, parameterName);
node.identifier.staticElement = ElementFactory.requiredParameter(parameterName);
JUnitTestCase.assertSame(intType, resolve6(node, [intType.element]));
_listener.assertNoErrors();
@@ -8869,8 +9152,8 @@
void test_visitSimpleFormalParameter_noType() {
// p
- FormalParameter node = ASTFactory.simpleFormalParameter3("p");
- node.identifier.staticElement = new ParameterElementImpl.con1(ASTFactory.identifier3("p"));
+ FormalParameter node = AstFactory.simpleFormalParameter3("p");
+ node.identifier.staticElement = new ParameterElementImpl.con1(AstFactory.identifier3("p"));
JUnitTestCase.assertSame(_typeProvider.dynamicType, resolve6(node, []));
_listener.assertNoErrors();
}
@@ -8879,7 +9162,7 @@
// int p
InterfaceType intType = _typeProvider.intType;
ClassElement intElement = intType.element;
- FormalParameter node = ASTFactory.simpleFormalParameter4(ASTFactory.typeName(intElement, []), "p");
+ FormalParameter node = AstFactory.simpleFormalParameter4(AstFactory.typeName(intElement, []), "p");
SimpleIdentifier identifier = node.identifier;
ParameterElementImpl element = new ParameterElementImpl.con1(identifier);
identifier.staticElement = element;
@@ -8889,7 +9172,7 @@
void test_visitTypeName_noParameters_noArguments() {
ClassElement classA = ElementFactory.classElement2("A", []);
- TypeName typeName = ASTFactory.typeName(classA, []);
+ TypeName typeName = AstFactory.typeName(classA, []);
typeName.type = null;
resolveNode(typeName, [classA]);
JUnitTestCase.assertSame(classA.type, typeName.type);
@@ -8899,7 +9182,7 @@
void test_visitTypeName_parameters_arguments() {
ClassElement classA = ElementFactory.classElement2("A", ["E"]);
ClassElement classB = ElementFactory.classElement2("B", []);
- TypeName typeName = ASTFactory.typeName(classA, [ASTFactory.typeName(classB, [])]);
+ TypeName typeName = AstFactory.typeName(classA, [AstFactory.typeName(classB, [])]);
typeName.type = null;
resolveNode(typeName, [classA, classB]);
InterfaceType resultType = typeName.type as InterfaceType;
@@ -8912,7 +9195,7 @@
void test_visitTypeName_parameters_noArguments() {
ClassElement classA = ElementFactory.classElement2("A", ["E"]);
- TypeName typeName = ASTFactory.typeName(classA, []);
+ TypeName typeName = AstFactory.typeName(classA, []);
typeName.type = null;
resolveNode(typeName, [classA]);
InterfaceType resultType = typeName.type as InterfaceType;
@@ -8925,7 +9208,7 @@
void test_visitTypeName_void() {
ClassElement classA = ElementFactory.classElement2("A", []);
- TypeName typeName = ASTFactory.typeName4("void", []);
+ TypeName typeName = AstFactory.typeName4("void", []);
resolveNode(typeName, [classA]);
JUnitTestCase.assertSame(VoidTypeImpl.instance, typeName.type);
_listener.assertNoErrors();
@@ -8977,7 +9260,7 @@
* being resolved
* @return the element to which the expression was resolved
*/
- void resolveNode(ASTNode node, List<Element> definedElements) {
+ void resolveNode(AstNode node, List<Element> definedElements) {
for (Element element in definedElements) {
_library.libraryScope.define(element);
}
@@ -9052,11 +9335,6 @@
class ResolverTestCase extends EngineTestCase {
/**
- * The source factory used to create [Source].
- */
- SourceFactory _sourceFactory;
-
- /**
* The analysis context used to parse the compilation units being resolved.
*/
AnalysisContextImpl _analysisContext;
@@ -9127,8 +9405,8 @@
* @return the source object representing the cached file
*/
Source cacheSource(String filePath, String contents) {
- Source source = new FileBasedSource.con1(_sourceFactory.contentCache, FileUtilities2.createFile(filePath));
- _sourceFactory.setContents(source, contents);
+ Source source = new FileBasedSource.con1(FileUtilities2.createFile(filePath));
+ _analysisContext.setContents(source, contents);
return source;
}
@@ -9152,7 +9430,7 @@
List<CompilationUnitElementImpl> sourcedCompilationUnits = new List<CompilationUnitElementImpl>(count);
for (int i = 0; i < count; i++) {
String typeName = typeNames[i];
- ClassElementImpl type = new ClassElementImpl(ASTFactory.identifier3(typeName));
+ ClassElementImpl type = new ClassElementImpl(AstFactory.identifier3(typeName));
String fileName = "${typeName}.dart";
CompilationUnitElementImpl compilationUnit = new CompilationUnitElementImpl(fileName);
compilationUnit.source = createSource2(fileName);
@@ -9162,7 +9440,7 @@
String fileName = "${libraryName}.dart";
CompilationUnitElementImpl compilationUnit = new CompilationUnitElementImpl(fileName);
compilationUnit.source = createSource2(fileName);
- LibraryElementImpl library = new LibraryElementImpl(context, ASTFactory.libraryIdentifier2([libraryName]));
+ LibraryElementImpl library = new LibraryElementImpl(context, AstFactory.libraryIdentifier2([libraryName]));
library.definingCompilationUnit = compilationUnit;
library.parts = sourcedCompilationUnits;
return library;
@@ -9170,8 +9448,6 @@
AnalysisContext get analysisContext => _analysisContext;
- SourceFactory get sourceFactory => _sourceFactory;
-
/**
* Return a type provider that can be used to test the results of resolution.
*
@@ -9186,7 +9462,6 @@
*/
void reset() {
_analysisContext = AnalysisContextFactory.contextWithCore();
- _sourceFactory = _analysisContext.sourceFactory;
}
/**
@@ -9234,8 +9509,8 @@
* @return the source that was created
*/
FileBasedSource createSource2(String fileName) {
- FileBasedSource source = new FileBasedSource.con1(_sourceFactory.contentCache, FileUtilities2.createFile(fileName));
- _sourceFactory.setContents(source, "");
+ FileBasedSource source = new FileBasedSource.con1(FileUtilities2.createFile(fileName));
+ _analysisContext.setContents(source, "");
return source;
}
@@ -9277,7 +9552,7 @@
stringType.element,
symbolType.element,
typeType.element];
- LibraryElementImpl library = new LibraryElementImpl(new AnalysisContextImpl(), ASTFactory.libraryIdentifier2(["lib"]));
+ LibraryElementImpl library = new LibraryElementImpl(new AnalysisContextImpl(), AstFactory.libraryIdentifier2(["lib"]));
library.definingCompilationUnit = unit;
//
// Create a type provider and ensure that it can return the expected types.
@@ -9299,7 +9574,7 @@
}
ClassElement classElement(String typeName, InterfaceType superclassType, List<String> parameterNames) {
- ClassElementImpl element = new ClassElementImpl(ASTFactory.identifier3(typeName));
+ ClassElementImpl element = new ClassElementImpl(AstFactory.identifier3(typeName));
element.supertype = superclassType;
InterfaceTypeImpl type = new InterfaceTypeImpl.con1(element);
element.type = type;
@@ -9308,7 +9583,7 @@
List<TypeParameterElementImpl> typeParameters = new List<TypeParameterElementImpl>(count);
List<TypeParameterTypeImpl> typeArguments = new List<TypeParameterTypeImpl>(count);
for (int i = 0; i < count; i++) {
- TypeParameterElementImpl typeParameter = new TypeParameterElementImpl(ASTFactory.identifier3(parameterNames[i]));
+ TypeParameterElementImpl typeParameter = new TypeParameterElementImpl(AstFactory.identifier3(parameterNames[i]));
typeParameters[i] = typeParameter;
typeArguments[i] = new TypeParameterTypeImpl(typeParameter);
typeParameter.type = typeArguments[i];
@@ -9358,6 +9633,8 @@
}
void test_getMapOfMembersInheritedFromClasses_accessor_extends() {
+ // class A { int get g; }
+ // class B extends A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String getterName = "g";
PropertyAccessorElement getterG = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
@@ -9373,6 +9650,8 @@
}
void test_getMapOfMembersInheritedFromClasses_accessor_implements() {
+ // class A { int get g; }
+ // class B implements A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String getterName = "g";
PropertyAccessorElement getterG = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
@@ -9389,6 +9668,8 @@
}
void test_getMapOfMembersInheritedFromClasses_accessor_with() {
+ // class A { int get g; }
+ // class B extends Object with A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String getterName = "g";
PropertyAccessorElement getterG = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
@@ -9404,7 +9685,17 @@
assertNoErrors(classB);
}
+ void test_getMapOfMembersInheritedFromClasses_implicitExtends() {
+ // class A {}
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromClasses(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject, mapA.size);
+ assertNoErrors(classA);
+ }
+
void test_getMapOfMembersInheritedFromClasses_method_extends() {
+ // class A { int g(); }
+ // class B extends A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String methodName = "m";
MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
@@ -9421,6 +9712,8 @@
}
void test_getMapOfMembersInheritedFromClasses_method_implements() {
+ // class A { int g(); }
+ // class B implements A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String methodName = "m";
MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
@@ -9437,6 +9730,8 @@
}
void test_getMapOfMembersInheritedFromClasses_method_with() {
+ // class A { int g(); }
+ // class B extends Object with A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String methodName = "m";
MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
@@ -9453,6 +9748,8 @@
}
void test_getMapOfMembersInheritedFromInterfaces_accessor_extends() {
+ // class A { int get g; }
+ // class B extends A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String getterName = "g";
PropertyAccessorElement getterG = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
@@ -9468,6 +9765,8 @@
}
void test_getMapOfMembersInheritedFromInterfaces_accessor_implements() {
+ // class A { int get g; }
+ // class B implements A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String getterName = "g";
PropertyAccessorElement getterG = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
@@ -9484,6 +9783,8 @@
}
void test_getMapOfMembersInheritedFromInterfaces_accessor_with() {
+ // class A { int get g; }
+ // class B extends Object with A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String getterName = "g";
PropertyAccessorElement getterG = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
@@ -9499,7 +9800,129 @@
assertNoErrors(classB);
}
+ void test_getMapOfMembersInheritedFromInterfaces_implicitExtends() {
+ // class A {}
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject, mapA.size);
+ assertNoErrors(classA);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_getter_method() {
+ // class I1 { int m(); }
+ // class I2 { int get m; }
+ // class A implements I2, I1 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ classI1.methods = <MethodElement> [methodM];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ PropertyAccessorElement getter = ElementFactory.getterElement(methodName, false, _typeProvider.intType);
+ classI2.accessors = <PropertyAccessorElement> [getter];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI2.type, classI1.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject, mapA.size);
+ JUnitTestCase.assertNull(mapA.get(methodName));
+ assertErrors(classA, [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str() {
+ // class I1 { int m(); }
+ // class I2 { String m(); }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElement methodM1 = ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElement methodM2 = ElementFactory.methodElement(methodName, null, [_typeProvider.stringType]);
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject, mapA.size);
+ JUnitTestCase.assertNull(mapA.get(methodName));
+ assertErrors(classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_method_getter() {
+ // class I1 { int m(); }
+ // class I2 { int get m; }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ classI1.methods = <MethodElement> [methodM];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ PropertyAccessorElement getter = ElementFactory.getterElement(methodName, false, _typeProvider.intType);
+ classI2.accessors = <PropertyAccessorElement> [getter];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject, mapA.size);
+ JUnitTestCase.assertNull(mapA.get(methodName));
+ assertErrors(classA, [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams() {
+ // class I1 { dynamic m(int, [int]); }
+ // class I2 { dynamic m(int, int, int); }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElementImpl methodM1 = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, []);
+ ParameterElementImpl parameter1 = new ParameterElementImpl.con1(AstFactory.identifier3("a1"));
+ parameter1.type = _typeProvider.intType;
+ parameter1.parameterKind = ParameterKind.REQUIRED;
+ ParameterElementImpl parameter2 = new ParameterElementImpl.con1(AstFactory.identifier3("a2"));
+ parameter2.type = _typeProvider.intType;
+ parameter2.parameterKind = ParameterKind.POSITIONAL;
+ methodM1.parameters = <ParameterElement> [parameter1, parameter2];
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElementImpl methodM2 = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, []);
+ ParameterElementImpl parameter3 = new ParameterElementImpl.con1(AstFactory.identifier3("a3"));
+ parameter3.type = _typeProvider.intType;
+ parameter3.parameterKind = ParameterKind.REQUIRED;
+ ParameterElementImpl parameter4 = new ParameterElementImpl.con1(AstFactory.identifier3("a4"));
+ parameter4.type = _typeProvider.intType;
+ parameter4.parameterKind = ParameterKind.REQUIRED;
+ ParameterElementImpl parameter5 = new ParameterElementImpl.con1(AstFactory.identifier3("a5"));
+ parameter5.type = _typeProvider.intType;
+ parameter5.parameterKind = ParameterKind.REQUIRED;
+ methodM2.parameters = <ParameterElement> [parameter3, parameter4, parameter5];
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject, mapA.size);
+ JUnitTestCase.assertNull(mapA.get(methodName));
+ assertErrors(classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_str_int() {
+ // class I1 { int m(); }
+ // class I2 { String m(); }
+ // class A implements I2, I1 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElement methodM1 = ElementFactory.methodElement(methodName, null, [_typeProvider.stringType]);
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElement methodM2 = ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI2.type, classI1.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject, mapA.size);
+ JUnitTestCase.assertNull(mapA.get(methodName));
+ assertErrors(classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+ }
+
void test_getMapOfMembersInheritedFromInterfaces_method_extends() {
+ // class A { int g(); }
+ // class B extends A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String methodName = "m";
MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
@@ -9515,6 +9938,8 @@
}
void test_getMapOfMembersInheritedFromInterfaces_method_implements() {
+ // class A { int g(); }
+ // class B implements A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String methodName = "m";
MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
@@ -9531,6 +9956,8 @@
}
void test_getMapOfMembersInheritedFromInterfaces_method_with() {
+ // class A { int g(); }
+ // class B extends Object with A {}
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String methodName = "m";
MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
@@ -9546,6 +9973,294 @@
assertNoErrors(classB);
}
+ void test_getMapOfMembersInheritedFromInterfaces_union_differentNames() {
+ // class I1 { int m1(); }
+ // class I2 { int m2(); }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName1 = "m1";
+ MethodElement methodM1 = ElementFactory.methodElement(methodName1, _typeProvider.intType, []);
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ String methodName2 = "m2";
+ MethodElement methodM2 = ElementFactory.methodElement(methodName2, _typeProvider.intType, []);
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 2, mapA.size);
+ JUnitTestCase.assertSame(methodM1, mapA.get(methodName1));
+ JUnitTestCase.assertSame(methodM2, mapA.get(methodName2));
+ assertNoErrors(classA);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_getters() {
+ // class I1 { int get g; }
+ // class I2 { num get g; }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String accessorName = "g";
+ PropertyAccessorElement getter1 = ElementFactory.getterElement(accessorName, false, _typeProvider.intType);
+ classI1.accessors = <PropertyAccessorElement> [getter1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ PropertyAccessorElement getter2 = ElementFactory.getterElement(accessorName, false, _typeProvider.numType);
+ classI2.accessors = <PropertyAccessorElement> [getter2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size);
+ PropertyAccessorElement syntheticAccessor = ElementFactory.getterElement(accessorName, false, _typeProvider.dynamicType);
+ JUnitTestCase.assertEquals(syntheticAccessor.type, mapA.get(accessorName).type);
+ assertNoErrors(classA);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_methods() {
+ // class I1 { dynamic m(int); }
+ // class I2 { dynamic m(num); }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElementImpl methodM1 = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, []);
+ ParameterElementImpl parameter1 = new ParameterElementImpl.con1(AstFactory.identifier3("a0"));
+ parameter1.type = _typeProvider.intType;
+ parameter1.parameterKind = ParameterKind.REQUIRED;
+ methodM1.parameters = <ParameterElement> [parameter1];
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElementImpl methodM2 = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, []);
+ ParameterElementImpl parameter2 = new ParameterElementImpl.con1(AstFactory.identifier3("a0"));
+ parameter2.type = _typeProvider.numType;
+ parameter2.parameterKind = ParameterKind.REQUIRED;
+ methodM2.parameters = <ParameterElement> [parameter2];
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size);
+ MethodElement syntheticMethod = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, [_typeProvider.dynamicType]);
+ JUnitTestCase.assertEquals(syntheticMethod.type, mapA.get(methodName).type);
+ assertNoErrors(classA);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_setters() {
+ // class I1 { set s(int); }
+ // class I2 { set s(num); }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String accessorName = "s";
+ PropertyAccessorElement setter1 = ElementFactory.setterElement(accessorName, false, _typeProvider.intType);
+ classI1.accessors = <PropertyAccessorElement> [setter1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ PropertyAccessorElement setter2 = ElementFactory.setterElement(accessorName, false, _typeProvider.numType);
+ classI2.accessors = <PropertyAccessorElement> [setter2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size);
+ PropertyAccessorElementImpl syntheticAccessor = ElementFactory.setterElement(accessorName, false, _typeProvider.dynamicType);
+ syntheticAccessor.returnType = _typeProvider.dynamicType;
+ JUnitTestCase.assertEquals(syntheticAccessor.type, mapA.get("${accessorName}=").type);
+ assertNoErrors(classA);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_getters() {
+ // class A {}
+ // class B extends A {}
+ // class C extends B {}
+ // class I1 { A get g; }
+ // class I2 { B get g; }
+ // class I3 { C get g; }
+ // class D implements I1, I2, I3 {}
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []);
+ ClassElementImpl classC = ElementFactory.classElement("C", classB.type, []);
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String accessorName = "g";
+ PropertyAccessorElement getter1 = ElementFactory.getterElement(accessorName, false, classA.type);
+ classI1.accessors = <PropertyAccessorElement> [getter1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ PropertyAccessorElement getter2 = ElementFactory.getterElement(accessorName, false, classB.type);
+ classI2.accessors = <PropertyAccessorElement> [getter2];
+ ClassElementImpl classI3 = ElementFactory.classElement2("I3", []);
+ PropertyAccessorElement getter3 = ElementFactory.getterElement(accessorName, false, classC.type);
+ classI3.accessors = <PropertyAccessorElement> [getter3];
+ ClassElementImpl classD = ElementFactory.classElement2("D", []);
+ classD.interfaces = <InterfaceType> [classI1.type, classI2.type, classI3.type];
+ MemberMap mapD = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapD.size);
+ PropertyAccessorElement syntheticAccessor = ElementFactory.getterElement(accessorName, false, _typeProvider.dynamicType);
+ JUnitTestCase.assertEquals(syntheticAccessor.type, mapD.get(accessorName).type);
+ assertNoErrors(classD);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_methods() {
+ // class A {}
+ // class B extends A {}
+ // class C extends B {}
+ // class I1 { dynamic m(A a); }
+ // class I2 { dynamic m(B b); }
+ // class I3 { dynamic m(C c); }
+ // class D implements I1, I2, I3 {}
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []);
+ ClassElementImpl classC = ElementFactory.classElement("C", classB.type, []);
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElementImpl methodM1 = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, []);
+ ParameterElementImpl parameter1 = new ParameterElementImpl.con1(AstFactory.identifier3("a0"));
+ parameter1.type = classA.type;
+ parameter1.parameterKind = ParameterKind.REQUIRED;
+ methodM1.parameters = <ParameterElement> [parameter1];
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElementImpl methodM2 = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, []);
+ ParameterElementImpl parameter2 = new ParameterElementImpl.con1(AstFactory.identifier3("a0"));
+ parameter2.type = classB.type;
+ parameter2.parameterKind = ParameterKind.REQUIRED;
+ methodM2.parameters = <ParameterElement> [parameter2];
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classI3 = ElementFactory.classElement2("I3", []);
+ MethodElementImpl methodM3 = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, []);
+ ParameterElementImpl parameter3 = new ParameterElementImpl.con1(AstFactory.identifier3("a0"));
+ parameter3.type = classC.type;
+ parameter3.parameterKind = ParameterKind.REQUIRED;
+ methodM3.parameters = <ParameterElement> [parameter3];
+ classI3.methods = <MethodElement> [methodM3];
+ ClassElementImpl classD = ElementFactory.classElement2("D", []);
+ classD.interfaces = <InterfaceType> [classI1.type, classI2.type, classI3.type];
+ MemberMap mapD = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapD.size);
+ MethodElement syntheticMethod = ElementFactory.methodElement(methodName, _typeProvider.dynamicType, [_typeProvider.dynamicType]);
+ JUnitTestCase.assertEquals(syntheticMethod.type, mapD.get(methodName).type);
+ assertNoErrors(classD);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_setters() {
+ // class A {}
+ // class B extends A {}
+ // class C extends B {}
+ // class I1 { set s(A); }
+ // class I2 { set s(B); }
+ // class I3 { set s(C); }
+ // class D implements I1, I2, I3 {}
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []);
+ ClassElementImpl classC = ElementFactory.classElement("C", classB.type, []);
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String accessorName = "s";
+ PropertyAccessorElement setter1 = ElementFactory.setterElement(accessorName, false, classA.type);
+ classI1.accessors = <PropertyAccessorElement> [setter1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ PropertyAccessorElement setter2 = ElementFactory.setterElement(accessorName, false, classB.type);
+ classI2.accessors = <PropertyAccessorElement> [setter2];
+ ClassElementImpl classI3 = ElementFactory.classElement2("I3", []);
+ PropertyAccessorElement setter3 = ElementFactory.setterElement(accessorName, false, classC.type);
+ classI3.accessors = <PropertyAccessorElement> [setter3];
+ ClassElementImpl classD = ElementFactory.classElement2("D", []);
+ classD.interfaces = <InterfaceType> [classI1.type, classI2.type, classI3.type];
+ MemberMap mapD = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classD);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapD.size);
+ PropertyAccessorElementImpl syntheticAccessor = ElementFactory.setterElement(accessorName, false, _typeProvider.dynamicType);
+ syntheticAccessor.returnType = _typeProvider.dynamicType;
+ JUnitTestCase.assertEquals(syntheticAccessor.type, mapD.get("${accessorName}=").type);
+ assertNoErrors(classD);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods() {
+ // class I1 { int m(); }
+ // class I2 { int m([int]); }
+ // class A implements I1, I2 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElement methodM1 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElementImpl methodM2 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ ParameterElementImpl parameter1 = new ParameterElementImpl.con1(AstFactory.identifier3("a1"));
+ parameter1.type = _typeProvider.intType;
+ parameter1.parameterKind = ParameterKind.POSITIONAL;
+ methodM2.parameters = <ParameterElement> [parameter1];
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size);
+ JUnitTestCase.assertSame(methodM2, mapA.get(methodName));
+ assertNoErrors(classA);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_3_methods() {
+ // class I1 { int m(); }
+ // class I2 { int m([int]); }
+ // class I3 { int m([int, int]); }
+ // class A implements I1, I2, I3 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElementImpl methodM1 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElementImpl methodM2 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ ParameterElementImpl parameter1 = new ParameterElementImpl.con1(AstFactory.identifier3("a1"));
+ parameter1.type = _typeProvider.intType;
+ parameter1.parameterKind = ParameterKind.POSITIONAL;
+ methodM1.parameters = <ParameterElement> [parameter1];
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classI3 = ElementFactory.classElement2("I3", []);
+ MethodElementImpl methodM3 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ ParameterElementImpl parameter2 = new ParameterElementImpl.con1(AstFactory.identifier3("a2"));
+ parameter2.type = _typeProvider.intType;
+ parameter2.parameterKind = ParameterKind.POSITIONAL;
+ ParameterElementImpl parameter3 = new ParameterElementImpl.con1(AstFactory.identifier3("a3"));
+ parameter3.type = _typeProvider.intType;
+ parameter3.parameterKind = ParameterKind.POSITIONAL;
+ methodM3.parameters = <ParameterElement> [parameter2, parameter3];
+ classI3.methods = <MethodElement> [methodM3];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type, classI3.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size);
+ JUnitTestCase.assertSame(methodM3, mapA.get(methodName));
+ assertNoErrors(classA);
+ }
+
+ void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_4_methods() {
+ // class I1 { int m(); }
+ // class I2 { int m(); }
+ // class I3 { int m([int]); }
+ // class I4 { int m([int, int]); }
+ // class A implements I1, I2, I3, I4 {}
+ ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
+ String methodName = "m";
+ MethodElement methodM1 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ classI1.methods = <MethodElement> [methodM1];
+ ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
+ MethodElement methodM2 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ classI2.methods = <MethodElement> [methodM2];
+ ClassElementImpl classI3 = ElementFactory.classElement2("I3", []);
+ MethodElementImpl methodM3 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ ParameterElementImpl parameter1 = new ParameterElementImpl.con1(AstFactory.identifier3("a1"));
+ parameter1.type = _typeProvider.intType;
+ parameter1.parameterKind = ParameterKind.POSITIONAL;
+ methodM3.parameters = <ParameterElement> [parameter1];
+ classI3.methods = <MethodElement> [methodM3];
+ ClassElementImpl classI4 = ElementFactory.classElement2("I4", []);
+ MethodElementImpl methodM4 = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
+ ParameterElementImpl parameter2 = new ParameterElementImpl.con1(AstFactory.identifier3("a2"));
+ parameter2.type = _typeProvider.intType;
+ parameter2.parameterKind = ParameterKind.POSITIONAL;
+ ParameterElementImpl parameter3 = new ParameterElementImpl.con1(AstFactory.identifier3("a3"));
+ parameter3.type = _typeProvider.intType;
+ parameter3.parameterKind = ParameterKind.POSITIONAL;
+ methodM4.parameters = <ParameterElement> [parameter2, parameter3];
+ classI4.methods = <MethodElement> [methodM4];
+ ClassElementImpl classA = ElementFactory.classElement2("A", []);
+ classA.interfaces = <InterfaceType> [classI1.type, classI2.type, classI3.type, classI4.type];
+ MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
+ JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size);
+ JUnitTestCase.assertSame(methodM4, mapA.get(methodName));
+ assertNoErrors(classA);
+ }
+
void test_lookupInheritance_interface_getter() {
ClassElementImpl classA = ElementFactory.classElement2("A", []);
String getterName = "g";
@@ -9612,56 +10327,6 @@
assertNoErrors(classB);
}
- void test_lookupInheritance_interfaces_STWC_inconsistentMethodInheritance() {
- ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
- String methodName = "m";
- MethodElement methodM1 = ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
- classI1.methods = <MethodElement> [methodM1];
- ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
- MethodElement methodM2 = ElementFactory.methodElement(methodName, null, [_typeProvider.stringType]);
- classI2.methods = <MethodElement> [methodM2];
- ClassElementImpl classA = ElementFactory.classElement2("A", []);
- classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
- JUnitTestCase.assertNull(_inheritanceManager.lookupInheritance(classA, methodName));
- assertNoErrors(classI1);
- assertNoErrors(classI2);
- assertErrors(classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
- }
-
- void test_lookupInheritance_interfaces_SWC_inconsistentMethodInheritance() {
- ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
- String methodName = "m";
- MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvider.intType, []);
- classI1.methods = <MethodElement> [methodM];
- ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
- PropertyAccessorElement getter = ElementFactory.getterElement(methodName, false, _typeProvider.intType);
- classI2.accessors = <PropertyAccessorElement> [getter];
- ClassElementImpl classA = ElementFactory.classElement2("A", []);
- classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
- JUnitTestCase.assertNull(_inheritanceManager.lookupInheritance(classA, methodName));
- assertNoErrors(classI1);
- assertNoErrors(classI2);
- assertErrors(classA, [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
- }
-
- void test_lookupInheritance_interfaces_union1() {
- ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
- String methodName1 = "m1";
- MethodElement methodM1 = ElementFactory.methodElement(methodName1, _typeProvider.intType, []);
- classI1.methods = <MethodElement> [methodM1];
- ClassElementImpl classI2 = ElementFactory.classElement2("I2", []);
- String methodName2 = "m2";
- MethodElement methodM2 = ElementFactory.methodElement(methodName2, _typeProvider.intType, []);
- classI2.methods = <MethodElement> [methodM2];
- ClassElementImpl classA = ElementFactory.classElement2("A", []);
- classA.interfaces = <InterfaceType> [classI1.type, classI2.type];
- JUnitTestCase.assertSame(methodM1, _inheritanceManager.lookupInheritance(classA, methodName1));
- JUnitTestCase.assertSame(methodM2, _inheritanceManager.lookupInheritance(classA, methodName2));
- assertNoErrors(classI1);
- assertNoErrors(classI2);
- assertNoErrors(classA);
- }
-
void test_lookupInheritance_interfaces_union2() {
ClassElementImpl classI1 = ElementFactory.classElement2("I1", []);
String methodName1 = "m1";
@@ -9881,7 +10546,7 @@
*/
InheritanceManager createInheritanceManager() {
AnalysisContextImpl context = AnalysisContextFactory.contextWithCore();
- FileBasedSource source = new FileBasedSource.con1(new ContentCache(), FileUtilities2.createFile("/test.dart"));
+ FileBasedSource source = new FileBasedSource.con1(FileUtilities2.createFile("/test.dart"));
CompilationUnitElementImpl definingCompilationUnit = new CompilationUnitElementImpl("test.dart");
definingCompilationUnit.source = source;
_definingLibrary = ElementFactory.library(context, "test");
@@ -9903,6 +10568,10 @@
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromClasses_accessor_with);
});
+ _ut.test('test_getMapOfMembersInheritedFromClasses_implicitExtends', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromClasses_implicitExtends);
+ });
_ut.test('test_getMapOfMembersInheritedFromClasses_method_extends', () {
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromClasses_method_extends);
@@ -9927,6 +10596,30 @@
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_accessor_with);
});
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_implicitExtends', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_implicitExtends);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_getter_method', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_getter_method);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_method_getter', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_method_getter);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_str_int', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_str_int);
+ });
_ut.test('test_getMapOfMembersInheritedFromInterfaces_method_extends', () {
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_method_extends);
@@ -9939,6 +10632,46 @@
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_method_with);
});
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_differentNames', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_differentNames);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_getters', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_getters);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_methods', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_methods);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_setters', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_setters);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_getters', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_getters);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_methods', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_methods);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_setters', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_setters);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_3_methods', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_3_methods);
+ });
+ _ut.test('test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_4_methods', () {
+ final __test = new InheritanceManagerTest();
+ runJUnitTest(__test, __test.test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_4_methods);
+ });
_ut.test('test_lookupInheritance_interface_getter', () {
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_lookupInheritance_interface_getter);
@@ -9955,14 +10688,6 @@
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_lookupInheritance_interface_staticMember);
});
- _ut.test('test_lookupInheritance_interfaces_STWC_inconsistentMethodInheritance', () {
- final __test = new InheritanceManagerTest();
- runJUnitTest(__test, __test.test_lookupInheritance_interfaces_STWC_inconsistentMethodInheritance);
- });
- _ut.test('test_lookupInheritance_interfaces_SWC_inconsistentMethodInheritance', () {
- final __test = new InheritanceManagerTest();
- runJUnitTest(__test, __test.test_lookupInheritance_interfaces_SWC_inconsistentMethodInheritance);
- });
_ut.test('test_lookupInheritance_interfaces_infiniteLoop', () {
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_lookupInheritance_interfaces_infiniteLoop);
@@ -9971,10 +10696,6 @@
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_lookupInheritance_interfaces_infiniteLoop2);
});
- _ut.test('test_lookupInheritance_interfaces_union1', () {
- final __test = new InheritanceManagerTest();
- runJUnitTest(__test, __test.test_lookupInheritance_interfaces_union1);
- });
_ut.test('test_lookupInheritance_interfaces_union2', () {
final __test = new InheritanceManagerTest();
runJUnitTest(__test, __test.test_lookupInheritance_interfaces_union2);
@@ -14493,7 +15214,7 @@
* Instances of the class `StaticTypeVerifier` verify that all of the nodes in an AST
* structure that should have a static type associated with them do have a static type.
*/
-class StaticTypeVerifier extends GeneralizingASTVisitor<Object> {
+class StaticTypeVerifier extends GeneralizingAstVisitor<Object> {
/**
* A list containing all of the AST Expression nodes that were not resolved.
*/
@@ -14635,7 +15356,7 @@
Object visitSimpleIdentifier(SimpleIdentifier node) {
// In cases where identifiers are being used for something other than an expressions,
// then they can be ignored.
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is MethodInvocation && identical(node, parent.methodName)) {
return null;
} else if (parent is RedirectingConstructorInvocation && identical(node, parent.constructorName)) {
@@ -14664,11 +15385,11 @@
return null;
}
- String getFileName(ASTNode node) {
+ String getFileName(AstNode node) {
// TODO (jwren) there are two copies of this method, one here and one in ResolutionVerifier,
// they should be resolved into a single method
if (node != null) {
- ASTNode root = node.root;
+ AstNode root = node.root;
if (root is CompilationUnit) {
CompilationUnit rootCU = root;
if (rootCU.element != null) {
@@ -14917,7 +15638,7 @@
void fail_visitExportDirective_combinators() {
JUnitTestCase.fail("Not yet tested");
// Need to set up the exported library so that the identifier can be resolved
- ExportDirective directive = ASTFactory.exportDirective2(null, [ASTFactory.hideCombinator2(["A"])]);
+ ExportDirective directive = AstFactory.exportDirective2(null, [AstFactory.hideCombinator2(["A"])]);
resolveNode(directive, []);
_listener.assertNoErrors();
}
@@ -14930,7 +15651,7 @@
void fail_visitImportDirective_combinators_noPrefix() {
JUnitTestCase.fail("Not yet tested");
// Need to set up the imported library so that the identifier can be resolved
- ImportDirective directive = ASTFactory.importDirective2(null, null, [ASTFactory.showCombinator2(["A"])]);
+ ImportDirective directive = AstFactory.importDirective2(null, null, [AstFactory.showCombinator2(["A"])]);
resolveNode(directive, []);
_listener.assertNoErrors();
}
@@ -14940,9 +15661,9 @@
// Need to set up the imported library so that the identifiers can be resolved
String prefixName = "p";
_definingLibrary.imports = <ImportElement> [ElementFactory.importFor(null, ElementFactory.prefix(prefixName), [])];
- ImportDirective directive = ASTFactory.importDirective2(null, prefixName, [
- ASTFactory.showCombinator2(["A"]),
- ASTFactory.hideCombinator2(["B"])]);
+ ImportDirective directive = AstFactory.importDirective2(null, prefixName, [
+ AstFactory.showCombinator2(["A"]),
+ AstFactory.hideCombinator2(["B"])]);
resolveNode(directive, []);
_listener.assertNoErrors();
}
@@ -14984,25 +15705,25 @@
// D a;
// a[i];
//
- SimpleIdentifier array = ASTFactory.identifier3("a");
+ SimpleIdentifier array = AstFactory.identifier3("a");
array.staticType = classD.type;
- IndexExpression expression = ASTFactory.indexExpression(array, ASTFactory.identifier3("i"));
+ IndexExpression expression = AstFactory.indexExpression(array, AstFactory.identifier3("i"));
JUnitTestCase.assertSame(operator, resolve5(expression, []));
_listener.assertNoErrors();
}
void test_visitAssignmentExpression_compound() {
InterfaceType intType = _typeProvider.intType;
- SimpleIdentifier leftHandSide = ASTFactory.identifier3("a");
+ SimpleIdentifier leftHandSide = AstFactory.identifier3("a");
leftHandSide.staticType = intType;
- AssignmentExpression assignment = ASTFactory.assignmentExpression(leftHandSide, TokenType.PLUS_EQ, ASTFactory.integer(1));
+ AssignmentExpression assignment = AstFactory.assignmentExpression(leftHandSide, TokenType.PLUS_EQ, AstFactory.integer(1));
resolveNode(assignment, []);
JUnitTestCase.assertSame(getMethod(_typeProvider.numType, "+"), assignment.staticElement);
_listener.assertNoErrors();
}
void test_visitAssignmentExpression_simple() {
- AssignmentExpression expression = ASTFactory.assignmentExpression(ASTFactory.identifier3("x"), TokenType.EQ, ASTFactory.integer(0));
+ AssignmentExpression expression = AstFactory.assignmentExpression(AstFactory.identifier3("x"), TokenType.EQ, AstFactory.integer(0));
resolveNode(expression, []);
JUnitTestCase.assertNull(expression.staticElement);
_listener.assertNoErrors();
@@ -15010,9 +15731,9 @@
void test_visitBinaryExpression() {
InterfaceType numType = _typeProvider.numType;
- SimpleIdentifier left = ASTFactory.identifier3("i");
+ SimpleIdentifier left = AstFactory.identifier3("i");
left.staticType = numType;
- BinaryExpression expression = ASTFactory.binaryExpression(left, TokenType.PLUS, ASTFactory.identifier3("j"));
+ BinaryExpression expression = AstFactory.binaryExpression(left, TokenType.PLUS, AstFactory.identifier3("j"));
resolveNode(expression, []);
JUnitTestCase.assertEquals(getMethod(numType, "+"), expression.staticElement);
_listener.assertNoErrors();
@@ -15020,14 +15741,14 @@
void test_visitBreakStatement_withLabel() {
String label = "loop";
- LabelElementImpl labelElement = new LabelElementImpl(ASTFactory.identifier3(label), false, false);
- BreakStatement statement = ASTFactory.breakStatement2(label);
+ LabelElementImpl labelElement = new LabelElementImpl(AstFactory.identifier3(label), false, false);
+ BreakStatement statement = AstFactory.breakStatement2(label);
JUnitTestCase.assertSame(labelElement, resolve(statement, labelElement));
_listener.assertNoErrors();
}
void test_visitBreakStatement_withoutLabel() {
- BreakStatement statement = ASTFactory.breakStatement();
+ BreakStatement statement = AstFactory.breakStatement();
resolveStatement(statement, null);
_listener.assertNoErrors();
}
@@ -15037,7 +15758,7 @@
String constructorName = "a";
ConstructorElement constructor = ElementFactory.constructorElement2(classA, constructorName, []);
classA.constructors = <ConstructorElement> [constructor];
- ConstructorName name = ASTFactory.constructorName(ASTFactory.typeName(classA, []), constructorName);
+ ConstructorName name = AstFactory.constructorName(AstFactory.typeName(classA, []), constructorName);
resolveNode(name, []);
JUnitTestCase.assertSame(constructor, name.staticElement);
_listener.assertNoErrors();
@@ -15048,7 +15769,7 @@
String constructorName = null;
ConstructorElement constructor = ElementFactory.constructorElement2(classA, constructorName, []);
classA.constructors = <ConstructorElement> [constructor];
- ConstructorName name = ASTFactory.constructorName(ASTFactory.typeName(classA, []), constructorName);
+ ConstructorName name = AstFactory.constructorName(AstFactory.typeName(classA, []), constructorName);
resolveNode(name, []);
JUnitTestCase.assertSame(constructor, name.staticElement);
_listener.assertNoErrors();
@@ -15056,20 +15777,20 @@
void test_visitContinueStatement_withLabel() {
String label = "loop";
- LabelElementImpl labelElement = new LabelElementImpl(ASTFactory.identifier3(label), false, false);
- ContinueStatement statement = ASTFactory.continueStatement2(label);
+ LabelElementImpl labelElement = new LabelElementImpl(AstFactory.identifier3(label), false, false);
+ ContinueStatement statement = AstFactory.continueStatement2(label);
JUnitTestCase.assertSame(labelElement, resolve3(statement, labelElement));
_listener.assertNoErrors();
}
void test_visitContinueStatement_withoutLabel() {
- ContinueStatement statement = ASTFactory.continueStatement();
+ ContinueStatement statement = AstFactory.continueStatement();
resolveStatement(statement, null);
_listener.assertNoErrors();
}
void test_visitExportDirective_noCombinators() {
- ExportDirective directive = ASTFactory.exportDirective2(null, []);
+ ExportDirective directive = AstFactory.exportDirective2(null, []);
directive.element = ElementFactory.exportFor(ElementFactory.library(_definingLibrary.context, "lib"), []);
resolveNode(directive, []);
_listener.assertNoErrors();
@@ -15081,7 +15802,7 @@
FieldElementImpl fieldElement = ElementFactory.fieldElement(fieldName, false, false, false, intType);
ClassElementImpl classA = ElementFactory.classElement2("A", []);
classA.fields = <FieldElement> [fieldElement];
- FieldFormalParameter parameter = ASTFactory.fieldFormalParameter3(fieldName);
+ FieldFormalParameter parameter = AstFactory.fieldFormalParameter3(fieldName);
FieldFormalParameterElementImpl parameterElement = ElementFactory.fieldFormalParameter(parameter.identifier);
parameterElement.field = fieldElement;
parameterElement.type = intType;
@@ -15091,7 +15812,7 @@
}
void test_visitImportDirective_noCombinators_noPrefix() {
- ImportDirective directive = ASTFactory.importDirective2(null, null, []);
+ ImportDirective directive = AstFactory.importDirective2(null, null, []);
directive.element = ElementFactory.importFor(ElementFactory.library(_definingLibrary.context, "lib"), null, []);
resolveNode(directive, []);
_listener.assertNoErrors();
@@ -15101,7 +15822,7 @@
String prefixName = "p";
ImportElement importElement = ElementFactory.importFor(ElementFactory.library(_definingLibrary.context, "lib"), ElementFactory.prefix(prefixName), []);
_definingLibrary.imports = <ImportElement> [importElement];
- ImportDirective directive = ASTFactory.importDirective2(null, prefixName, []);
+ ImportDirective directive = AstFactory.importDirective2(null, prefixName, []);
directive.element = importElement;
resolveNode(directive, []);
_listener.assertNoErrors();
@@ -15112,9 +15833,9 @@
InterfaceType intType = _typeProvider.intType;
MethodElement getter = ElementFactory.methodElement("[]", intType, [intType]);
classA.methods = <MethodElement> [getter];
- SimpleIdentifier array = ASTFactory.identifier3("a");
+ SimpleIdentifier array = AstFactory.identifier3("a");
array.staticType = classA.type;
- IndexExpression expression = ASTFactory.indexExpression(array, ASTFactory.identifier3("i"));
+ IndexExpression expression = AstFactory.indexExpression(array, AstFactory.identifier3("i"));
JUnitTestCase.assertSame(getter, resolve5(expression, []));
_listener.assertNoErrors();
}
@@ -15124,10 +15845,10 @@
InterfaceType intType = _typeProvider.intType;
MethodElement setter = ElementFactory.methodElement("[]=", intType, [intType]);
classA.methods = <MethodElement> [setter];
- SimpleIdentifier array = ASTFactory.identifier3("a");
+ SimpleIdentifier array = AstFactory.identifier3("a");
array.staticType = classA.type;
- IndexExpression expression = ASTFactory.indexExpression(array, ASTFactory.identifier3("i"));
- ASTFactory.assignmentExpression(expression, TokenType.EQ, ASTFactory.integer(0));
+ IndexExpression expression = AstFactory.indexExpression(array, AstFactory.identifier3("i"));
+ AstFactory.assignmentExpression(expression, TokenType.EQ, AstFactory.integer(0));
JUnitTestCase.assertSame(setter, resolve5(expression, []));
_listener.assertNoErrors();
}
@@ -15137,9 +15858,9 @@
String constructorName = "a";
ConstructorElement constructor = ElementFactory.constructorElement2(classA, constructorName, []);
classA.constructors = <ConstructorElement> [constructor];
- ConstructorName name = ASTFactory.constructorName(ASTFactory.typeName(classA, []), constructorName);
+ ConstructorName name = AstFactory.constructorName(AstFactory.typeName(classA, []), constructorName);
name.staticElement = constructor;
- InstanceCreationExpression creation = ASTFactory.instanceCreationExpression(Keyword.NEW, name, []);
+ InstanceCreationExpression creation = AstFactory.instanceCreationExpression(Keyword.NEW, name, []);
resolveNode(creation, []);
JUnitTestCase.assertSame(constructor, creation.staticElement);
_listener.assertNoErrors();
@@ -15150,9 +15871,9 @@
String constructorName = null;
ConstructorElement constructor = ElementFactory.constructorElement2(classA, constructorName, []);
classA.constructors = <ConstructorElement> [constructor];
- ConstructorName name = ASTFactory.constructorName(ASTFactory.typeName(classA, []), constructorName);
+ ConstructorName name = AstFactory.constructorName(AstFactory.typeName(classA, []), constructorName);
name.staticElement = constructor;
- InstanceCreationExpression creation = ASTFactory.instanceCreationExpression(Keyword.NEW, name, []);
+ InstanceCreationExpression creation = AstFactory.instanceCreationExpression(Keyword.NEW, name, []);
resolveNode(creation, []);
JUnitTestCase.assertSame(constructor, creation.staticElement);
_listener.assertNoErrors();
@@ -15166,9 +15887,9 @@
ParameterElement parameter = ElementFactory.namedParameter(parameterName);
constructor.parameters = <ParameterElement> [parameter];
classA.constructors = <ConstructorElement> [constructor];
- ConstructorName name = ASTFactory.constructorName(ASTFactory.typeName(classA, []), constructorName);
+ ConstructorName name = AstFactory.constructorName(AstFactory.typeName(classA, []), constructorName);
name.staticElement = constructor;
- InstanceCreationExpression creation = ASTFactory.instanceCreationExpression(Keyword.NEW, name, [ASTFactory.namedExpression2(parameterName, ASTFactory.integer(0))]);
+ InstanceCreationExpression creation = AstFactory.instanceCreationExpression(Keyword.NEW, name, [AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
resolveNode(creation, []);
JUnitTestCase.assertSame(constructor, creation.staticElement);
JUnitTestCase.assertSame(parameter, (creation.argumentList.arguments[0] as NamedExpression).name.label.staticElement);
@@ -15177,10 +15898,10 @@
void test_visitMethodInvocation() {
InterfaceType numType = _typeProvider.numType;
- SimpleIdentifier left = ASTFactory.identifier3("i");
+ SimpleIdentifier left = AstFactory.identifier3("i");
left.staticType = numType;
String methodName = "abs";
- MethodInvocation invocation = ASTFactory.methodInvocation(left, methodName, []);
+ MethodInvocation invocation = AstFactory.methodInvocation(left, methodName, []);
resolveNode(invocation, []);
JUnitTestCase.assertSame(getMethod(numType, methodName), invocation.methodName.staticElement);
_listener.assertNoErrors();
@@ -15194,9 +15915,9 @@
ParameterElement parameter = ElementFactory.namedParameter(parameterName);
method.parameters = <ParameterElement> [parameter];
classA.methods = <MethodElement> [method];
- SimpleIdentifier left = ASTFactory.identifier3("i");
+ SimpleIdentifier left = AstFactory.identifier3("i");
left.staticType = classA.type;
- MethodInvocation invocation = ASTFactory.methodInvocation(left, methodName, [ASTFactory.namedExpression2(parameterName, ASTFactory.integer(0))]);
+ MethodInvocation invocation = AstFactory.methodInvocation(left, methodName, [AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
resolveNode(invocation, []);
JUnitTestCase.assertSame(method, invocation.methodName.staticElement);
JUnitTestCase.assertSame(parameter, (invocation.argumentList.arguments[0] as NamedExpression).name.label.staticElement);
@@ -15205,9 +15926,9 @@
void test_visitPostfixExpression() {
InterfaceType numType = _typeProvider.numType;
- SimpleIdentifier operand = ASTFactory.identifier3("i");
+ SimpleIdentifier operand = AstFactory.identifier3("i");
operand.staticType = numType;
- PostfixExpression expression = ASTFactory.postfixExpression(operand, TokenType.PLUS_PLUS);
+ PostfixExpression expression = AstFactory.postfixExpression(operand, TokenType.PLUS_PLUS);
resolveNode(expression, []);
JUnitTestCase.assertEquals(getMethod(numType, "+"), expression.staticElement);
_listener.assertNoErrors();
@@ -15215,12 +15936,12 @@
void test_visitPrefixedIdentifier_dynamic() {
Type2 dynamicType = _typeProvider.dynamicType;
- SimpleIdentifier target = ASTFactory.identifier3("a");
+ SimpleIdentifier target = AstFactory.identifier3("a");
VariableElementImpl variable = ElementFactory.localVariableElement(target);
variable.type = dynamicType;
target.staticElement = variable;
target.staticType = dynamicType;
- PrefixedIdentifier identifier = ASTFactory.identifier(target, ASTFactory.identifier3("b"));
+ PrefixedIdentifier identifier = AstFactory.identifier(target, AstFactory.identifier3("b"));
resolveNode(identifier, []);
JUnitTestCase.assertNull(identifier.staticElement);
JUnitTestCase.assertNull(identifier.identifier.staticElement);
@@ -15232,12 +15953,12 @@
String getterName = "b";
PropertyAccessorElement getter = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
classA.accessors = <PropertyAccessorElement> [getter];
- SimpleIdentifier target = ASTFactory.identifier3("a");
+ SimpleIdentifier target = AstFactory.identifier3("a");
VariableElementImpl variable = ElementFactory.localVariableElement(target);
variable.type = classA.type;
target.staticElement = variable;
target.staticType = classA.type;
- PrefixedIdentifier identifier = ASTFactory.identifier(target, ASTFactory.identifier3(getterName));
+ PrefixedIdentifier identifier = AstFactory.identifier(target, AstFactory.identifier3(getterName));
resolveNode(identifier, []);
JUnitTestCase.assertSame(getter, identifier.staticElement);
JUnitTestCase.assertSame(getter, identifier.identifier.staticElement);
@@ -15252,10 +15973,10 @@
PropertyAccessorElement setter = ElementFactory.setterElement(propName, false, _typeProvider.intType);
classA.accessors = <PropertyAccessorElement> [getter, setter];
// prepare "A.m"
- SimpleIdentifier target = ASTFactory.identifier3("A");
+ SimpleIdentifier target = AstFactory.identifier3("A");
target.staticElement = classA;
target.staticType = classA.type;
- PrefixedIdentifier identifier = ASTFactory.identifier(target, ASTFactory.identifier3(propName));
+ PrefixedIdentifier identifier = AstFactory.identifier(target, AstFactory.identifier3(propName));
// resolve
resolveNode(identifier, []);
JUnitTestCase.assertSame(getter, identifier.staticElement);
@@ -15273,11 +15994,11 @@
MethodElement method = ElementFactory.methodElement("m", _typeProvider.intType, []);
classA.methods = <MethodElement> [method];
// prepare "A.m"
- SimpleIdentifier target = ASTFactory.identifier3("A");
+ SimpleIdentifier target = AstFactory.identifier3("A");
target.staticElement = classA;
target.staticType = classA.type;
- PrefixedIdentifier identifier = ASTFactory.identifier(target, ASTFactory.identifier3(propName));
- ASTFactory.assignmentExpression(identifier, TokenType.EQ, ASTFactory.nullLiteral());
+ PrefixedIdentifier identifier = AstFactory.identifier(target, AstFactory.identifier3(propName));
+ AstFactory.assignmentExpression(identifier, TokenType.EQ, AstFactory.nullLiteral());
// resolve
resolveNode(identifier, []);
JUnitTestCase.assertSame(method, identifier.staticElement);
@@ -15293,11 +16014,11 @@
PropertyAccessorElement setter = ElementFactory.setterElement(propName, false, _typeProvider.intType);
classA.accessors = <PropertyAccessorElement> [getter, setter];
// prepare "A.b = null"
- SimpleIdentifier target = ASTFactory.identifier3("A");
+ SimpleIdentifier target = AstFactory.identifier3("A");
target.staticElement = classA;
target.staticType = classA.type;
- PrefixedIdentifier identifier = ASTFactory.identifier(target, ASTFactory.identifier3(propName));
- ASTFactory.assignmentExpression(identifier, TokenType.EQ, ASTFactory.nullLiteral());
+ PrefixedIdentifier identifier = AstFactory.identifier(target, AstFactory.identifier3(propName));
+ AstFactory.assignmentExpression(identifier, TokenType.EQ, AstFactory.nullLiteral());
// resolve
resolveNode(identifier, []);
JUnitTestCase.assertSame(setter, identifier.staticElement);
@@ -15307,9 +16028,9 @@
void test_visitPrefixExpression() {
InterfaceType numType = _typeProvider.numType;
- SimpleIdentifier operand = ASTFactory.identifier3("i");
+ SimpleIdentifier operand = AstFactory.identifier3("i");
operand.staticType = numType;
- PrefixExpression expression = ASTFactory.prefixExpression(TokenType.PLUS_PLUS, operand);
+ PrefixExpression expression = AstFactory.prefixExpression(TokenType.PLUS_PLUS, operand);
resolveNode(expression, []);
JUnitTestCase.assertEquals(getMethod(numType, "+"), expression.staticElement);
_listener.assertNoErrors();
@@ -15320,9 +16041,9 @@
String getterName = "b";
PropertyAccessorElement getter = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
classA.accessors = <PropertyAccessorElement> [getter];
- SimpleIdentifier target = ASTFactory.identifier3("a");
+ SimpleIdentifier target = AstFactory.identifier3("a");
target.staticType = classA.type;
- PropertyAccess access = ASTFactory.propertyAccess2(target, getterName);
+ PropertyAccess access = AstFactory.propertyAccess2(target, getterName);
resolveNode(access, []);
JUnitTestCase.assertSame(getter, access.propertyName.staticElement);
_listener.assertNoErrors();
@@ -15341,10 +16062,10 @@
String getterName = "b";
PropertyAccessorElement getter = ElementFactory.getterElement(getterName, false, _typeProvider.intType);
classA.accessors = <PropertyAccessorElement> [getter];
- SuperExpression target = ASTFactory.superExpression();
+ SuperExpression target = AstFactory.superExpression();
target.staticType = ElementFactory.classElement("B", classA.type, []).type;
- PropertyAccess access = ASTFactory.propertyAccess2(target, getterName);
- ASTFactory.methodDeclaration2(null, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([]), ASTFactory.expressionFunctionBody(access));
+ PropertyAccess access = AstFactory.propertyAccess2(target, getterName);
+ AstFactory.methodDeclaration2(null, null, null, null, AstFactory.identifier3("m"), AstFactory.formalParameterList([]), AstFactory.expressionFunctionBody(access));
resolveNode(access, []);
JUnitTestCase.assertSame(getter, access.propertyName.staticElement);
_listener.assertNoErrors();
@@ -15355,10 +16076,10 @@
String setterName = "b";
PropertyAccessorElement setter = ElementFactory.setterElement(setterName, false, _typeProvider.intType);
classA.accessors = <PropertyAccessorElement> [setter];
- ThisExpression target = ASTFactory.thisExpression();
+ ThisExpression target = AstFactory.thisExpression();
target.staticType = classA.type;
- PropertyAccess access = ASTFactory.propertyAccess2(target, setterName);
- ASTFactory.assignmentExpression(access, TokenType.EQ, ASTFactory.integer(0));
+ PropertyAccess access = AstFactory.propertyAccess2(target, setterName);
+ AstFactory.assignmentExpression(access, TokenType.EQ, AstFactory.integer(0));
resolveNode(access, []);
JUnitTestCase.assertSame(setter, access.propertyName.staticElement);
_listener.assertNoErrors();
@@ -15367,14 +16088,14 @@
void test_visitSimpleIdentifier_classScope() {
InterfaceType doubleType = _typeProvider.doubleType;
String fieldName = "NAN";
- SimpleIdentifier node = ASTFactory.identifier3(fieldName);
+ SimpleIdentifier node = AstFactory.identifier3(fieldName);
resolveInClass(node, doubleType.element);
JUnitTestCase.assertEquals(getGetter(doubleType, fieldName), node.staticElement);
_listener.assertNoErrors();
}
void test_visitSimpleIdentifier_dynamic() {
- SimpleIdentifier node = ASTFactory.identifier3("dynamic");
+ SimpleIdentifier node = AstFactory.identifier3("dynamic");
resolve4(node, []);
JUnitTestCase.assertSame(_typeProvider.dynamicType.element, node.staticElement);
JUnitTestCase.assertSame(_typeProvider.typeType, node.staticType);
@@ -15382,7 +16103,7 @@
}
void test_visitSimpleIdentifier_lexicalScope() {
- SimpleIdentifier node = ASTFactory.identifier3("i");
+ SimpleIdentifier node = AstFactory.identifier3("i");
VariableElementImpl element = ElementFactory.localVariableElement(node);
JUnitTestCase.assertSame(element, resolve4(node, [element]));
_listener.assertNoErrors();
@@ -15395,11 +16116,11 @@
FieldElement field = ElementFactory.fieldElement(fieldName, false, false, false, intType);
classA.fields = <FieldElement> [field];
classA.accessors = <PropertyAccessorElement> [field.getter, field.setter];
- SimpleIdentifier node = ASTFactory.identifier3(fieldName);
- ASTFactory.assignmentExpression(node, TokenType.EQ, ASTFactory.integer(0));
+ SimpleIdentifier node = AstFactory.identifier3(fieldName);
+ AstFactory.assignmentExpression(node, TokenType.EQ, AstFactory.integer(0));
resolveInClass(node, classA);
Element element = node.staticElement;
- EngineTestCase.assertInstanceOf(PropertyAccessorElement, element);
+ EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccessorElement, PropertyAccessorElement, element);
JUnitTestCase.assertTrue((element as PropertyAccessorElement).isSetter);
_listener.assertNoErrors();
}
@@ -15411,7 +16132,7 @@
ClassElementImpl subclass = ElementFactory.classElement("B", superclass.type, []);
ConstructorElementImpl subConstructor = ElementFactory.constructorElement2(subclass, null, []);
subclass.constructors = <ConstructorElement> [subConstructor];
- SuperConstructorInvocation invocation = ASTFactory.superConstructorInvocation([]);
+ SuperConstructorInvocation invocation = AstFactory.superConstructorInvocation([]);
resolveInClass(invocation, subclass);
JUnitTestCase.assertEquals(superConstructor, invocation.staticElement);
_listener.assertNoErrors();
@@ -15427,7 +16148,7 @@
ClassElementImpl subclass = ElementFactory.classElement("B", superclass.type, []);
ConstructorElementImpl subConstructor = ElementFactory.constructorElement2(subclass, null, []);
subclass.constructors = <ConstructorElement> [subConstructor];
- SuperConstructorInvocation invocation = ASTFactory.superConstructorInvocation([ASTFactory.namedExpression2(parameterName, ASTFactory.integer(0))]);
+ SuperConstructorInvocation invocation = AstFactory.superConstructorInvocation([AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
resolveInClass(invocation, subclass);
JUnitTestCase.assertEquals(superConstructor, invocation.staticElement);
JUnitTestCase.assertSame(parameter, (invocation.argumentList.arguments[0] as NamedExpression).name.label.staticElement);
@@ -15441,10 +16162,9 @@
*/
ElementResolver createResolver() {
AnalysisContextImpl context = new AnalysisContextImpl();
- ContentCache contentCache = new ContentCache();
- SourceFactory sourceFactory = new SourceFactory.con1(contentCache, [new DartUriResolver(DirectoryBasedDartSdk.defaultSdk)]);
+ SourceFactory sourceFactory = new SourceFactory([new DartUriResolver(DirectoryBasedDartSdk.defaultSdk)]);
context.sourceFactory = sourceFactory;
- FileBasedSource source = new FileBasedSource.con1(contentCache, FileUtilities2.createFile("/test.dart"));
+ FileBasedSource source = new FileBasedSource.con1(FileUtilities2.createFile("/test.dart"));
CompilationUnitElementImpl definingCompilationUnit = new CompilationUnitElementImpl("test.dart");
definingCompilationUnit.source = source;
_definingLibrary = ElementFactory.library(context, "test");
@@ -15521,7 +16241,7 @@
* @param enclosingClass the element representing the class enclosing the identifier
* @return the element to which the expression was resolved
*/
- void resolveInClass(ASTNode node, ClassElement enclosingClass) {
+ void resolveInClass(AstNode node, ClassElement enclosingClass) {
try {
Scope outerScope = _visitor.nameScope_J2DAccessor as Scope;
try {
@@ -15547,7 +16267,7 @@
* being resolved
* @return the element to which the expression was resolved
*/
- void resolveNode(ASTNode node, List<Element> definedElements) {
+ void resolveNode(AstNode node, List<Element> definedElements) {
try {
Scope outerScope = _visitor.nameScope_J2DAccessor as Scope;
try {
@@ -17078,6 +17798,24 @@
verify([source]);
}
+ void test_invalidGetterOverrideReturnType_twoInterfaces() {
+ // test from language/override_inheritance_field_test_11.dart
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class I {",
+ " int get getter => null;",
+ "}",
+ "abstract class J {",
+ " num get getter => null;",
+ "}",
+ "abstract class A implements I, J {}",
+ "class B extends A {",
+ " String get getter => null;",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE]);
+ verify([source]);
+ }
+
void test_invalidMethodOverrideNamedParamType() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
@@ -17104,6 +17842,23 @@
verify([source]);
}
+ void test_invalidMethodOverrideNormalParamType_twoInterfaces() {
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class I {",
+ " m(int n);",
+ "}",
+ "abstract class J {",
+ " m(num n);",
+ "}",
+ "abstract class A implements I, J {}",
+ "class B extends A {",
+ " m(String n) {}",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE]);
+ verify([source]);
+ }
+
void test_invalidMethodOverrideOptionalParamType() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
@@ -17117,6 +17872,23 @@
verify([source]);
}
+ void test_invalidMethodOverrideOptionalParamType_twoInterfaces() {
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class I {",
+ " m([int n]);",
+ "}",
+ "abstract class J {",
+ " m([num n]);",
+ "}",
+ "abstract class A implements I, J {}",
+ "class B extends A {",
+ " m([String n]) {}",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE]);
+ verify([source]);
+ }
+
void test_invalidMethodOverrideReturnType_interface() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
@@ -17130,7 +17902,7 @@
verify([source]);
}
- void test_invalidMethodOverrideReturnType_interface2() {
+ void test_invalidMethodOverrideReturnType_interface_grandparent() {
Source source = addSource(EngineTestCase.createSource([
"abstract class A {",
" int m();",
@@ -17171,7 +17943,7 @@
verify([source]);
}
- void test_invalidMethodOverrideReturnType_superclass2() {
+ void test_invalidMethodOverrideReturnType_superclass_grandparent() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
" int m() { return 0; }",
@@ -17186,6 +17958,23 @@
verify([source]);
}
+ void test_invalidMethodOverrideReturnType_twoInterfaces() {
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class I {",
+ " int m();",
+ "}",
+ "abstract class J {",
+ " num m();",
+ "}",
+ "abstract class A implements I, J {}",
+ "class B extends A {",
+ " String m() => '';",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE]);
+ verify([source]);
+ }
+
void test_invalidMethodOverrideReturnType_void() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
@@ -17316,6 +18105,24 @@
verify([source]);
}
+ void test_invalidSetterOverrideNormalParamType_twoInterfaces() {
+ // test from language/override_inheritance_field_test_34.dart
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class I {",
+ " set setter14(int _) => null;",
+ "}",
+ "abstract class J {",
+ " set setter14(num _) => null;",
+ "}",
+ "abstract class A implements I, J {}",
+ "class B extends A {",
+ " set setter14(String _) => null;",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]);
+ verify([source]);
+ }
+
void test_listElementTypeNotAssignable() {
Source source = addSource(EngineTestCase.createSource(["var v = <String> [42];"]));
resolve(source);
@@ -17394,7 +18201,9 @@
" }",
"}"]));
resolve(source);
- assertErrors(source, [StaticWarningCode.MIXED_RETURN_TYPES]);
+ assertErrors(source, [
+ StaticWarningCode.MIXED_RETURN_TYPES,
+ StaticWarningCode.MIXED_RETURN_TYPES]);
verify([source]);
}
@@ -17409,7 +18218,9 @@
" }",
"}"]));
resolve(source);
- assertErrors(source, [StaticWarningCode.MIXED_RETURN_TYPES]);
+ assertErrors(source, [
+ StaticWarningCode.MIXED_RETURN_TYPES,
+ StaticWarningCode.MIXED_RETURN_TYPES]);
verify([source]);
}
@@ -17422,7 +18233,9 @@
" return 0;",
"}"]));
resolve(source);
- assertErrors(source, [StaticWarningCode.MIXED_RETURN_TYPES]);
+ assertErrors(source, [
+ StaticWarningCode.MIXED_RETURN_TYPES,
+ StaticWarningCode.MIXED_RETURN_TYPES]);
verify([source]);
}
@@ -17545,36 +18358,8 @@
verify([source]);
}
- void test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_accessor() {
- Source source = addSource(EngineTestCase.createSource([
- "class A {",
- " int get g => 0;",
- "}",
- "abstract class B extends A {",
- " int get g;",
- "}",
- "class C extends B {}"]));
- resolve(source);
- assertErrors(source, [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- verify([source]);
- }
-
- void test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_method() {
- Source source = addSource(EngineTestCase.createSource([
- "class A {",
- " m(p) {}",
- "}",
- "abstract class B extends A {",
- " m(p);",
- "}",
- "class C extends B {}"]));
- resolve(source);
- assertErrors(source, [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- verify([source]);
- }
-
void test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation() {
- // bug 15028
+ // 15028
Source source = addSource(EngineTestCase.createSource([
"class C {",
" foo(int x) => x;",
@@ -17652,6 +18437,53 @@
verify([source]);
}
+ void test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_getter() {
+ // 15001
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class A { get g1; get g2; }",
+ "abstract class B implements A { get g1 => 1; }",
+ "class C extends Object with B {}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_method() {
+ // 15001
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class A { m1(); m2(); }",
+ "abstract class B implements A { m1() => 1; }",
+ "class C extends Object with B {}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_setter() {
+ // 15001
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class A { set s1(v); set s2(v); }",
+ "abstract class B implements A { set s1(v) {} }",
+ "class C extends Object with B {}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
+ }
+
+ void test_nonAbstractClassInheritsAbstractMemberOne_setter_and_implicitSetter() {
+ // test from language/override_inheritance_abstract_test_14.dart
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class A {",
+ " set field(_);",
+ "}",
+ "abstract class I {",
+ " var field;",
+ "}",
+ "class B extends A implements I {",
+ " get field => 0;",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
+ verify([source]);
+ }
+
void test_nonAbstractClassInheritsAbstractMemberOne_setter_fromInterface() {
Source source = addSource(EngineTestCase.createSource([
"class I {",
@@ -18542,6 +19374,10 @@
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_invalidGetterOverrideReturnType_implicit);
});
+ _ut.test('test_invalidGetterOverrideReturnType_twoInterfaces', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_invalidGetterOverrideReturnType_twoInterfaces);
+ });
_ut.test('test_invalidMethodOverrideNamedParamType', () {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_invalidMethodOverrideNamedParamType);
@@ -18550,17 +19386,25 @@
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_invalidMethodOverrideNormalParamType);
});
+ _ut.test('test_invalidMethodOverrideNormalParamType_twoInterfaces', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_invalidMethodOverrideNormalParamType_twoInterfaces);
+ });
_ut.test('test_invalidMethodOverrideOptionalParamType', () {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_invalidMethodOverrideOptionalParamType);
});
+ _ut.test('test_invalidMethodOverrideOptionalParamType_twoInterfaces', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_invalidMethodOverrideOptionalParamType_twoInterfaces);
+ });
_ut.test('test_invalidMethodOverrideReturnType_interface', () {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_invalidMethodOverrideReturnType_interface);
});
- _ut.test('test_invalidMethodOverrideReturnType_interface2', () {
+ _ut.test('test_invalidMethodOverrideReturnType_interface_grandparent', () {
final __test = new StaticWarningCodeTest();
- runJUnitTest(__test, __test.test_invalidMethodOverrideReturnType_interface2);
+ runJUnitTest(__test, __test.test_invalidMethodOverrideReturnType_interface_grandparent);
});
_ut.test('test_invalidMethodOverrideReturnType_mixin', () {
final __test = new StaticWarningCodeTest();
@@ -18570,9 +19414,13 @@
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_invalidMethodOverrideReturnType_superclass);
});
- _ut.test('test_invalidMethodOverrideReturnType_superclass2', () {
+ _ut.test('test_invalidMethodOverrideReturnType_superclass_grandparent', () {
final __test = new StaticWarningCodeTest();
- runJUnitTest(__test, __test.test_invalidMethodOverrideReturnType_superclass2);
+ runJUnitTest(__test, __test.test_invalidMethodOverrideReturnType_superclass_grandparent);
+ });
+ _ut.test('test_invalidMethodOverrideReturnType_twoInterfaces', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_invalidMethodOverrideReturnType_twoInterfaces);
});
_ut.test('test_invalidMethodOverrideReturnType_void', () {
final __test = new StaticWarningCodeTest();
@@ -18614,6 +19462,10 @@
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_invalidSetterOverrideNormalParamType);
});
+ _ut.test('test_invalidSetterOverrideNormalParamType_twoInterfaces', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_invalidSetterOverrideNormalParamType_twoInterfaces);
+ });
_ut.test('test_listElementTypeNotAssignable', () {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_listElementTypeNotAssignable);
@@ -18694,14 +19546,6 @@
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberFour);
});
- _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_accessor', () {
- final __test = new StaticWarningCodeTest();
- runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_accessor);
- });
- _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_method', () {
- final __test = new StaticWarningCodeTest();
- runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_method);
- });
_ut.test('test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation', () {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation);
@@ -18726,6 +19570,22 @@
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_method_optionalParamCount);
});
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_getter', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_getter);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_method', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_method);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_setter', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_setter);
+ });
+ _ut.test('test_nonAbstractClassInheritsAbstractMemberOne_setter_and_implicitSetter', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_setter_and_implicitSetter);
+ });
_ut.test('test_nonAbstractClassInheritsAbstractMemberOne_setter_fromInterface', () {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_nonAbstractClassInheritsAbstractMemberOne_setter_fromInterface);
@@ -18952,29 +19812,18 @@
class AnalysisContextHelper {
AnalysisContext context;
- SourceFactory _sourceFactory;
-
- ContentCache _cache;
-
/**
* Creates new [AnalysisContext] using [AnalysisContextFactory#contextWithCore].
*/
AnalysisContextHelper() {
context = AnalysisContextFactory.contextWithCore();
- _sourceFactory = context.sourceFactory;
- _cache = _sourceFactory.contentCache;
}
Source addSource(String path, String code) {
- Source source = new FileBasedSource.con1(_cache, FileUtilities2.createFile(path));
- // add source
- {
- _sourceFactory.setContents(source, "");
- ChangeSet changeSet = new ChangeSet();
- changeSet.added(source);
- context.applyChanges(changeSet);
- }
- // update source
+ Source source = new FileBasedSource.con1(FileUtilities2.createFile(path));
+ ChangeSet changeSet = new ChangeSet();
+ changeSet.added(source);
+ context.applyChanges(changeSet);
context.setContents(source, code);
return source;
}
@@ -19229,7 +20078,12 @@
if (_mapType == null) {
ClassElementImpl mapElement = ElementFactory.classElement2("Map", ["K", "V"]);
_mapType = mapElement.type;
+ Type2 kType = mapElement.typeParameters[0].type;
+ Type2 vType = mapElement.typeParameters[1].type;
mapElement.accessors = <PropertyAccessorElement> [ElementFactory.getterElement("length", false, intType)];
+ mapElement.methods = <MethodElement> [
+ ElementFactory.methodElement("[]", vType, [objectType]),
+ ElementFactory.methodElement("[]=", VoidTypeImpl.instance, [kType, vType])];
propagateTypeArguments(mapElement);
}
return _mapType;
@@ -19471,7 +20325,7 @@
deprecatedTopLevelVariableElt.getter,
deprecatedTopLevelVariableElt.setter];
coreUnit.topLevelVariables = <TopLevelVariableElement> [proxyTopLevelVariableElt, deprecatedTopLevelVariableElt];
- LibraryElementImpl coreLibrary = new LibraryElementImpl(sdkContext, ASTFactory.libraryIdentifier2(["dart", "core"]));
+ LibraryElementImpl coreLibrary = new LibraryElementImpl(sdkContext, AstFactory.libraryIdentifier2(["dart", "core"]));
coreLibrary.definingCompilationUnit = coreUnit;
//
// dart:html
@@ -19499,13 +20353,13 @@
TopLevelVariableElementImpl document = ElementFactory.topLevelVariableElement3("document", false, true, htmlDocumentElement.type);
htmlUnit.topLevelVariables = <TopLevelVariableElement> [document];
htmlUnit.accessors = <PropertyAccessorElement> [document.getter];
- LibraryElementImpl htmlLibrary = new LibraryElementImpl(sdkContext, ASTFactory.libraryIdentifier2(["dart", "dom", "html"]));
+ LibraryElementImpl htmlLibrary = new LibraryElementImpl(sdkContext, AstFactory.libraryIdentifier2(["dart", "dom", "html"]));
htmlLibrary.definingCompilationUnit = htmlUnit;
Map<Source, LibraryElement> elementMap = new Map<Source, LibraryElement>();
elementMap[coreSource] = coreLibrary;
elementMap[htmlSource] = htmlLibrary;
(sdkContext as AnalysisContextImpl).recordLibraryElements(elementMap);
- sourceFactory = new SourceFactory.con2([
+ sourceFactory = new SourceFactory([
new DartUriResolver(sdkContext.sourceFactory.dartSdk),
new FileUriResolver()]);
context.sourceFactory = sourceFactory;
@@ -19516,6 +20370,7 @@
class LibraryImportScopeTest extends ResolverTestCase {
void test_conflictingImports() {
AnalysisContext context = new AnalysisContextImpl();
+ context.sourceFactory = new SourceFactory([]);
String typeNameA = "A";
String typeNameB = "B";
String typeNameC = "C";
@@ -19534,13 +20389,13 @@
{
GatheringErrorListener errorListener = new GatheringErrorListener();
Scope scope = new LibraryImportScope(importingLibrary, errorListener);
- JUnitTestCase.assertEquals(typeA, scope.lookup(ASTFactory.identifier3(typeNameA), importingLibrary));
+ JUnitTestCase.assertEquals(typeA, scope.lookup(AstFactory.identifier3(typeNameA), importingLibrary));
errorListener.assertNoErrors();
- JUnitTestCase.assertEquals(typeC, scope.lookup(ASTFactory.identifier3(typeNameC), importingLibrary));
+ JUnitTestCase.assertEquals(typeC, scope.lookup(AstFactory.identifier3(typeNameC), importingLibrary));
errorListener.assertNoErrors();
- Element element = scope.lookup(ASTFactory.identifier3(typeNameB), importingLibrary);
+ Element element = scope.lookup(AstFactory.identifier3(typeNameB), importingLibrary);
errorListener.assertErrors2([StaticWarningCode.AMBIGUOUS_IMPORT]);
- EngineTestCase.assertInstanceOf(MultiplyDefinedElement, element);
+ EngineTestCase.assertInstanceOf((obj) => obj is MultiplyDefinedElement, MultiplyDefinedElement, element);
List<Element> conflictingElements = (element as MultiplyDefinedElement).conflictingElements;
EngineTestCase.assertLength(2, conflictingElements);
if (identical(conflictingElements[0], typeB1)) {
@@ -19554,11 +20409,11 @@
{
GatheringErrorListener errorListener = new GatheringErrorListener();
Scope scope = new LibraryImportScope(importingLibrary, errorListener);
- Identifier identifier = ASTFactory.identifier3(typeNameB);
- ASTFactory.methodDeclaration(null, ASTFactory.typeName3(identifier, []), null, null, ASTFactory.identifier3("foo"), null);
+ Identifier identifier = AstFactory.identifier3(typeNameB);
+ AstFactory.methodDeclaration(null, AstFactory.typeName3(identifier, []), null, null, AstFactory.identifier3("foo"), null);
Element element = scope.lookup(identifier, importingLibrary);
errorListener.assertErrors2([StaticWarningCode.AMBIGUOUS_IMPORT]);
- EngineTestCase.assertInstanceOf(MultiplyDefinedElement, element);
+ EngineTestCase.assertInstanceOf((obj) => obj is MultiplyDefinedElement, MultiplyDefinedElement, element);
}
}
@@ -19570,8 +20425,9 @@
void test_creation_nonEmpty() {
AnalysisContext context = new AnalysisContextImpl();
+ context.sourceFactory = new SourceFactory([]);
String importedTypeName = "A";
- ClassElement importedType = new ClassElementImpl(ASTFactory.identifier3(importedTypeName));
+ ClassElement importedType = new ClassElementImpl(AstFactory.identifier3(importedTypeName));
LibraryElement importedLibrary = createTestLibrary2(context, "imported", []);
(importedLibrary.definingCompilationUnit as CompilationUnitElementImpl).types = <ClassElement> [importedType];
LibraryElementImpl definingLibrary = createTestLibrary2(context, "importing", []);
@@ -19580,7 +20436,7 @@
definingLibrary.imports = <ImportElement> [importElement];
GatheringErrorListener errorListener = new GatheringErrorListener();
Scope scope = new LibraryImportScope(definingLibrary, errorListener);
- JUnitTestCase.assertEquals(importedType, scope.lookup(ASTFactory.identifier3(importedTypeName), definingLibrary));
+ JUnitTestCase.assertEquals(importedType, scope.lookup(AstFactory.identifier3(importedTypeName), definingLibrary));
}
void test_getErrorListener() {
@@ -19602,12 +20458,13 @@
importingLibrary.imports = <ImportElement> [importCore, importLib];
GatheringErrorListener errorListener = new GatheringErrorListener();
Scope scope = new LibraryImportScope(importingLibrary, errorListener);
- JUnitTestCase.assertEquals(type, scope.lookup(ASTFactory.identifier3(typeName), importingLibrary));
+ JUnitTestCase.assertEquals(type, scope.lookup(AstFactory.identifier3(typeName), importingLibrary));
errorListener.assertErrors2([StaticWarningCode.CONFLICTING_DART_IMPORT]);
}
void test_nonConflictingImports_sameElement() {
AnalysisContext context = new AnalysisContextImpl();
+ context.sourceFactory = new SourceFactory([]);
String typeNameA = "A";
String typeNameB = "B";
ClassElement typeA = ElementFactory.classElement2(typeNameA, []);
@@ -19620,14 +20477,15 @@
importingLibrary.imports = <ImportElement> [import1, import2];
GatheringErrorListener errorListener = new GatheringErrorListener();
Scope scope = new LibraryImportScope(importingLibrary, errorListener);
- JUnitTestCase.assertEquals(typeA, scope.lookup(ASTFactory.identifier3(typeNameA), importingLibrary));
+ JUnitTestCase.assertEquals(typeA, scope.lookup(AstFactory.identifier3(typeNameA), importingLibrary));
errorListener.assertNoErrors();
- JUnitTestCase.assertEquals(typeB, scope.lookup(ASTFactory.identifier3(typeNameB), importingLibrary));
+ JUnitTestCase.assertEquals(typeB, scope.lookup(AstFactory.identifier3(typeNameB), importingLibrary));
errorListener.assertNoErrors();
}
void test_prefixedAndNonPrefixed() {
AnalysisContext context = new AnalysisContextImpl();
+ context.sourceFactory = new SourceFactory([]);
String typeName = "C";
String prefixName = "p";
ClassElement prefixedType = ElementFactory.classElement2(typeName, []);
@@ -19642,10 +20500,10 @@
importingLibrary.imports = <ImportElement> [prefixedImport, nonPrefixedImport];
GatheringErrorListener errorListener = new GatheringErrorListener();
Scope scope = new LibraryImportScope(importingLibrary, errorListener);
- Element prefixedElement = scope.lookup(ASTFactory.identifier5(prefixName, typeName), importingLibrary);
+ Element prefixedElement = scope.lookup(AstFactory.identifier5(prefixName, typeName), importingLibrary);
errorListener.assertNoErrors();
JUnitTestCase.assertSame(prefixedType, prefixedElement);
- Element nonPrefixedElement = scope.lookup(ASTFactory.identifier3(typeName), importingLibrary);
+ Element nonPrefixedElement = scope.lookup(AstFactory.identifier3(typeName), importingLibrary);
errorListener.assertNoErrors();
JUnitTestCase.assertSame(nonPrefixedType, nonPrefixedElement);
}
@@ -19730,22 +20588,22 @@
* Instances of the class `ResolutionVerifier` verify that all of the nodes in an AST
* structure that should have been resolved were resolved.
*/
-class ResolutionVerifier extends RecursiveASTVisitor<Object> {
+class ResolutionVerifier extends RecursiveAstVisitor<Object> {
/**
* A set containing nodes that are known to not be resolvable and should therefore not cause the
* test to fail.
*/
- Set<ASTNode> _knownExceptions;
+ Set<AstNode> _knownExceptions;
/**
* A list containing all of the AST nodes that were not resolved.
*/
- List<ASTNode> _unresolvedNodes = new List<ASTNode>();
+ List<AstNode> _unresolvedNodes = new List<AstNode>();
/**
* A list containing all of the AST nodes that were resolved to an element of the wrong type.
*/
- List<ASTNode> _wrongTypedNodes = new List<ASTNode>();
+ List<AstNode> _wrongTypedNodes = new List<AstNode>();
/**
* Initialize a newly created verifier to verify that all of the nodes in the visited AST
@@ -19762,7 +20620,7 @@
* @param knownExceptions a set containing nodes that are known to not be resolvable and should
* therefore not cause the test to fail
**/
- ResolutionVerifier.con1(Set<ASTNode> knownExceptions) {
+ ResolutionVerifier.con1(Set<AstNode> knownExceptions) {
this._knownExceptions = knownExceptions;
}
@@ -19797,17 +20655,17 @@
if (operandType == null || operandType.isDynamic) {
return null;
}
- return checkResolved2(node, node.staticElement, MethodElement);
+ return checkResolved(node, node.staticElement, (node) => node is MethodElement);
}
Object visitCommentReference(CommentReference node) => null;
Object visitCompilationUnit(CompilationUnit node) {
node.visitChildren(this);
- return checkResolved2(node, node.element, CompilationUnitElement);
+ return checkResolved(node, node.element, (node) => node is CompilationUnitElement);
}
- Object visitExportDirective(ExportDirective node) => checkResolved2(node, node.element, ExportElement);
+ Object visitExportDirective(ExportDirective node) => checkResolved(node, node.element, (node) => node is ExportElement);
Object visitFunctionDeclaration(FunctionDeclaration node) {
node.visitChildren(this);
@@ -19826,12 +20684,12 @@
Object visitImportDirective(ImportDirective node) {
// Not sure how to test the combinators given that it isn't an error if the names are not defined.
- checkResolved2(node, node.element, ImportElement);
+ checkResolved(node, node.element, (node) => node is ImportElement);
SimpleIdentifier prefix = node.prefix;
if (prefix == null) {
return null;
}
- return checkResolved2(prefix, prefix.staticElement, PrefixElement);
+ return checkResolved(prefix, prefix.staticElement, (node) => node is PrefixElement);
}
Object visitIndexExpression(IndexExpression node) {
@@ -19840,16 +20698,16 @@
if (targetType == null || targetType.isDynamic) {
return null;
}
- return checkResolved2(node, node.staticElement, MethodElement);
+ return checkResolved(node, node.staticElement, (node) => node is MethodElement);
}
- Object visitLibraryDirective(LibraryDirective node) => checkResolved2(node, node.element, LibraryElement);
+ Object visitLibraryDirective(LibraryDirective node) => checkResolved(node, node.element, (node) => node is LibraryElement);
Object visitNamedExpression(NamedExpression node) => node.expression.accept(this);
- Object visitPartDirective(PartDirective node) => checkResolved2(node, node.element, CompilationUnitElement);
+ Object visitPartDirective(PartDirective node) => checkResolved(node, node.element, (node) => node is CompilationUnitElement);
- Object visitPartOfDirective(PartOfDirective node) => checkResolved2(node, node.element, LibraryElement);
+ Object visitPartOfDirective(PartOfDirective node) => checkResolved(node, node.element, (node) => node is LibraryElement);
Object visitPostfixExpression(PostfixExpression node) {
node.visitChildren(this);
@@ -19860,7 +20718,7 @@
if (operandType == null || operandType.isDynamic) {
return null;
}
- return checkResolved2(node, node.staticElement, MethodElement);
+ return checkResolved(node, node.staticElement, (node) => node is MethodElement);
}
Object visitPrefixedIdentifier(PrefixedIdentifier node) {
@@ -19870,7 +20728,7 @@
if (prefixType == null || prefixType.isDynamic) {
return null;
}
- return checkResolved(node, node.staticElement);
+ return checkResolved(node, node.staticElement, null);
}
Object visitPrefixExpression(PrefixExpression node) {
@@ -19882,7 +20740,7 @@
if (operandType == null || operandType.isDynamic) {
return null;
}
- return checkResolved2(node, node.staticElement, MethodElement);
+ return checkResolved(node, node.staticElement, (node) => node is MethodElement);
}
Object visitPropertyAccess(PropertyAccess node) {
@@ -19899,7 +20757,7 @@
if (node.name == "void") {
return null;
}
- ASTNode parent = node.parent;
+ AstNode parent = node.parent;
if (parent is MethodInvocation) {
MethodInvocation invocation = parent;
if (identical(invocation.methodName, node)) {
@@ -19910,29 +20768,27 @@
}
}
}
- return checkResolved(node, node.staticElement);
+ return checkResolved(node, node.staticElement, null);
}
- Object checkResolved(ASTNode node, Element element) => checkResolved2(node, element, null);
-
- Object checkResolved2(ASTNode node, Element element, Type expectedClass) {
+ Object checkResolved(AstNode node, Element element, Predicate<Element> predicate) {
if (element == null) {
if (_knownExceptions == null || !_knownExceptions.contains(node)) {
_unresolvedNodes.add(node);
}
- } else if (expectedClass != null) {
- if (!isInstanceOf(element, expectedClass)) {
+ } else if (predicate != null) {
+ if (!predicate(element)) {
_wrongTypedNodes.add(node);
}
}
return null;
}
- String getFileName(ASTNode node) {
+ String getFileName(AstNode node) {
// TODO (jwren) there are two copies of this method, one here and one in StaticTypeVerifier,
// they should be resolved into a single method
if (node != null) {
- ASTNode root = node.root;
+ AstNode root = node.root;
if (root is CompilationUnit) {
CompilationUnit rootCU = root;
if (rootCU.element != null) {
@@ -19947,8 +20803,8 @@
return "<unknown file- ASTNode is null>";
}
- void printNodes(PrintStringWriter writer, List<ASTNode> nodes) {
- for (ASTNode identifier in nodes) {
+ void printNodes(PrintStringWriter writer, List<AstNode> nodes) {
+ for (AstNode identifier in nodes) {
writer.print(" ");
writer.print(identifier.toString());
writer.print(" (");
@@ -20031,8 +20887,9 @@
void test_creation_nonEmpty() {
AnalysisContext context = new AnalysisContextImpl();
+ context.sourceFactory = new SourceFactory([]);
String importedTypeName = "A";
- ClassElement importedType = new ClassElementImpl(ASTFactory.identifier3(importedTypeName));
+ ClassElement importedType = new ClassElementImpl(AstFactory.identifier3(importedTypeName));
LibraryElement importedLibrary = createTestLibrary2(context, "imported", []);
(importedLibrary.definingCompilationUnit as CompilationUnitElementImpl).types = <ClassElement> [importedType];
LibraryElementImpl definingLibrary = createTestLibrary2(context, "importing", []);
@@ -20041,7 +20898,7 @@
definingLibrary.imports = <ImportElement> [importElement];
GatheringErrorListener errorListener = new GatheringErrorListener();
Scope scope = new LibraryScope(definingLibrary, errorListener);
- JUnitTestCase.assertEquals(importedType, scope.lookup(ASTFactory.identifier3(importedTypeName), definingLibrary));
+ JUnitTestCase.assertEquals(importedType, scope.lookup(AstFactory.identifier3(importedTypeName), definingLibrary));
}
void test_getErrorListener() {
@@ -20113,14 +20970,14 @@
void test_visitAdjacentStrings() {
// "a" "b"
- Expression node = ASTFactory.adjacentStrings([resolvedString("a"), resolvedString("b")]);
+ Expression node = AstFactory.adjacentStrings([resolvedString("a"), resolvedString("b")]);
JUnitTestCase.assertSame(_typeProvider.stringType, analyze(node));
_listener.assertNoErrors();
}
void test_visitArgumentDefinitionTest() {
// ?p
- Expression node = ASTFactory.argumentDefinitionTest("p");
+ Expression node = AstFactory.argumentDefinitionTest("p");
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
@@ -20131,8 +20988,8 @@
ClassElement superclass = ElementFactory.classElement2("A", []);
InterfaceType superclassType = superclass.type;
ClassElement subclass = ElementFactory.classElement("B", superclassType, []);
- Expression node = ASTFactory.asExpression(ASTFactory.thisExpression(), ASTFactory.typeName(subclass, []));
- JUnitTestCase.assertSame(subclass.type, analyze2(node, superclassType));
+ Expression node = AstFactory.asExpression(AstFactory.thisExpression(), AstFactory.typeName(subclass, []));
+ JUnitTestCase.assertSame(subclass.type, analyze3(node, superclassType));
_listener.assertNoErrors();
}
@@ -20140,7 +20997,7 @@
// i += 1
InterfaceType numType = _typeProvider.numType;
SimpleIdentifier identifier = resolvedVariable(_typeProvider.intType, "i");
- AssignmentExpression node = ASTFactory.assignmentExpression(identifier, TokenType.PLUS_EQ, resolvedInteger(1));
+ AssignmentExpression node = AstFactory.assignmentExpression(identifier, TokenType.PLUS_EQ, resolvedInteger(1));
MethodElement plusMethod = getMethod(numType, "+");
node.staticElement = plusMethod;
JUnitTestCase.assertSame(numType, analyze(node));
@@ -20150,42 +21007,42 @@
void test_visitAssignmentExpression_simple() {
// i = 0
InterfaceType intType = _typeProvider.intType;
- Expression node = ASTFactory.assignmentExpression(resolvedVariable(intType, "i"), TokenType.EQ, resolvedInteger(0));
+ Expression node = AstFactory.assignmentExpression(resolvedVariable(intType, "i"), TokenType.EQ, resolvedInteger(0));
JUnitTestCase.assertSame(intType, analyze(node));
_listener.assertNoErrors();
}
void test_visitBinaryExpression_equals() {
// 2 == 3
- Expression node = ASTFactory.binaryExpression(resolvedInteger(2), TokenType.EQ_EQ, resolvedInteger(3));
+ Expression node = AstFactory.binaryExpression(resolvedInteger(2), TokenType.EQ_EQ, resolvedInteger(3));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitBinaryExpression_logicalAnd() {
// false && true
- Expression node = ASTFactory.binaryExpression(ASTFactory.booleanLiteral(false), TokenType.AMPERSAND_AMPERSAND, ASTFactory.booleanLiteral(true));
+ Expression node = AstFactory.binaryExpression(AstFactory.booleanLiteral(false), TokenType.AMPERSAND_AMPERSAND, AstFactory.booleanLiteral(true));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitBinaryExpression_logicalOr() {
// false || true
- Expression node = ASTFactory.binaryExpression(ASTFactory.booleanLiteral(false), TokenType.BAR_BAR, ASTFactory.booleanLiteral(true));
+ Expression node = AstFactory.binaryExpression(AstFactory.booleanLiteral(false), TokenType.BAR_BAR, AstFactory.booleanLiteral(true));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitBinaryExpression_notEquals() {
// 2 != 3
- Expression node = ASTFactory.binaryExpression(resolvedInteger(2), TokenType.BANG_EQ, resolvedInteger(3));
+ Expression node = AstFactory.binaryExpression(resolvedInteger(2), TokenType.BANG_EQ, resolvedInteger(3));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitBinaryExpression_plusID() {
// 1 + 2.0
- BinaryExpression node = ASTFactory.binaryExpression(resolvedInteger(1), TokenType.PLUS, resolvedDouble(2.0));
+ BinaryExpression node = AstFactory.binaryExpression(resolvedInteger(1), TokenType.PLUS, resolvedDouble(2.0));
node.staticElement = getMethod(_typeProvider.numType, "+");
JUnitTestCase.assertSame(_typeProvider.doubleType, analyze(node));
_listener.assertNoErrors();
@@ -20193,7 +21050,7 @@
void test_visitBinaryExpression_plusII() {
// 1 + 2
- BinaryExpression node = ASTFactory.binaryExpression(resolvedInteger(1), TokenType.PLUS, resolvedInteger(2));
+ BinaryExpression node = AstFactory.binaryExpression(resolvedInteger(1), TokenType.PLUS, resolvedInteger(2));
node.staticElement = getMethod(_typeProvider.numType, "+");
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
_listener.assertNoErrors();
@@ -20201,7 +21058,7 @@
void test_visitBinaryExpression_slash() {
// 2 / 2
- BinaryExpression node = ASTFactory.binaryExpression(resolvedInteger(2), TokenType.SLASH, resolvedInteger(2));
+ BinaryExpression node = AstFactory.binaryExpression(resolvedInteger(2), TokenType.SLASH, resolvedInteger(2));
node.staticElement = getMethod(_typeProvider.numType, "/");
JUnitTestCase.assertSame(_typeProvider.doubleType, analyze(node));
_listener.assertNoErrors();
@@ -20216,7 +21073,7 @@
InterfaceType typeA = classA.type;
MethodElement operator = ElementFactory.methodElement("*", typeA, [_typeProvider.doubleType]);
classA.methods = <MethodElement> [operator];
- BinaryExpression node = ASTFactory.binaryExpression(ASTFactory.asExpression(ASTFactory.identifier3("a"), ASTFactory.typeName(classA, [])), TokenType.PLUS, resolvedDouble(2.0));
+ BinaryExpression node = AstFactory.binaryExpression(AstFactory.asExpression(AstFactory.identifier3("a"), AstFactory.typeName(classA, [])), TokenType.PLUS, resolvedDouble(2.0));
node.staticElement = operator;
JUnitTestCase.assertSame(typeA, analyze(node));
_listener.assertNoErrors();
@@ -20224,7 +21081,7 @@
void test_visitBinaryExpression_starID() {
// 1 * 2.0
- BinaryExpression node = ASTFactory.binaryExpression(resolvedInteger(1), TokenType.PLUS, resolvedDouble(2.0));
+ BinaryExpression node = AstFactory.binaryExpression(resolvedInteger(1), TokenType.PLUS, resolvedDouble(2.0));
node.staticElement = getMethod(_typeProvider.numType, "*");
JUnitTestCase.assertSame(_typeProvider.doubleType, analyze(node));
_listener.assertNoErrors();
@@ -20232,42 +21089,42 @@
void test_visitBooleanLiteral_false() {
// false
- Expression node = ASTFactory.booleanLiteral(false);
+ Expression node = AstFactory.booleanLiteral(false);
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitBooleanLiteral_true() {
// true
- Expression node = ASTFactory.booleanLiteral(true);
+ Expression node = AstFactory.booleanLiteral(true);
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitCascadeExpression() {
// a..length
- Expression node = ASTFactory.cascadeExpression(resolvedString("a"), [ASTFactory.propertyAccess2(null, "length")]);
+ Expression node = AstFactory.cascadeExpression(resolvedString("a"), [AstFactory.propertyAccess2(null, "length")]);
JUnitTestCase.assertSame(_typeProvider.stringType, analyze(node));
_listener.assertNoErrors();
}
void test_visitConditionalExpression_differentTypes() {
// true ? 1.0 : 0
- Expression node = ASTFactory.conditionalExpression(ASTFactory.booleanLiteral(true), resolvedDouble(1.0), resolvedInteger(0));
+ Expression node = AstFactory.conditionalExpression(AstFactory.booleanLiteral(true), resolvedDouble(1.0), resolvedInteger(0));
JUnitTestCase.assertSame(_typeProvider.numType, analyze(node));
_listener.assertNoErrors();
}
void test_visitConditionalExpression_sameTypes() {
// true ? 1 : 0
- Expression node = ASTFactory.conditionalExpression(ASTFactory.booleanLiteral(true), resolvedInteger(1), resolvedInteger(0));
+ Expression node = AstFactory.conditionalExpression(AstFactory.booleanLiteral(true), resolvedInteger(1), resolvedInteger(0));
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
_listener.assertNoErrors();
}
void test_visitDoubleLiteral() {
// 4.33
- Expression node = ASTFactory.doubleLiteral(4.33);
+ Expression node = AstFactory.doubleLiteral(4.33);
JUnitTestCase.assertSame(_typeProvider.doubleType, analyze(node));
_listener.assertNoErrors();
}
@@ -20275,13 +21132,13 @@
void test_visitFunctionExpression_named_block() {
// ({p1 : 0, p2 : 0}) {}
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p1 = ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("p1"), resolvedInteger(0));
+ FormalParameter p1 = AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("p1"), resolvedInteger(0));
setType(p1, dynamicType);
- FormalParameter p2 = ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
+ FormalParameter p2 = AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
setType(p2, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p1, p2]), ASTFactory.blockFunctionBody2([]));
- analyze3(p1);
- analyze3(p2);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p1, p2]), AstFactory.blockFunctionBody2([]));
+ analyze5(p1);
+ analyze5(p2);
Type2 resultType = analyze(node);
Map<String, Type2> expectedNamedTypes = new Map<String, Type2>();
expectedNamedTypes["p1"] = dynamicType;
@@ -20293,10 +21150,10 @@
void test_visitFunctionExpression_named_expression() {
// ({p : 0}) -> 0;
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p = ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("p"), resolvedInteger(0));
+ FormalParameter p = AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("p"), resolvedInteger(0));
setType(p, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p]), ASTFactory.expressionFunctionBody(resolvedInteger(0)));
- analyze3(p);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p]), AstFactory.expressionFunctionBody(resolvedInteger(0)));
+ analyze5(p);
Type2 resultType = analyze(node);
Map<String, Type2> expectedNamedTypes = new Map<String, Type2>();
expectedNamedTypes["p"] = dynamicType;
@@ -20307,13 +21164,13 @@
void test_visitFunctionExpression_normal_block() {
// (p1, p2) {}
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p1 = ASTFactory.simpleFormalParameter3("p1");
+ FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
setType(p1, dynamicType);
- FormalParameter p2 = ASTFactory.simpleFormalParameter3("p2");
+ FormalParameter p2 = AstFactory.simpleFormalParameter3("p2");
setType(p2, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p1, p2]), ASTFactory.blockFunctionBody2([]));
- analyze3(p1);
- analyze3(p2);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p1, p2]), AstFactory.blockFunctionBody2([]));
+ analyze5(p1);
+ analyze5(p2);
Type2 resultType = analyze(node);
assertFunctionType(dynamicType, <Type2> [dynamicType, dynamicType], null, null, resultType);
_listener.assertNoErrors();
@@ -20322,10 +21179,10 @@
void test_visitFunctionExpression_normal_expression() {
// (p1, p2) -> 0
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p = ASTFactory.simpleFormalParameter3("p");
+ FormalParameter p = AstFactory.simpleFormalParameter3("p");
setType(p, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p]), ASTFactory.expressionFunctionBody(resolvedInteger(0)));
- analyze3(p);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p]), AstFactory.expressionFunctionBody(resolvedInteger(0)));
+ analyze5(p);
Type2 resultType = analyze(node);
assertFunctionType(_typeProvider.intType, <Type2> [dynamicType], null, null, resultType);
_listener.assertNoErrors();
@@ -20334,12 +21191,12 @@
void test_visitFunctionExpression_normalAndNamed_block() {
// (p1, {p2 : 0}) {}
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p1 = ASTFactory.simpleFormalParameter3("p1");
+ FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
setType(p1, dynamicType);
- FormalParameter p2 = ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
+ FormalParameter p2 = AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
setType(p2, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p1, p2]), ASTFactory.blockFunctionBody2([]));
- analyze3(p2);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p1, p2]), AstFactory.blockFunctionBody2([]));
+ analyze5(p2);
Type2 resultType = analyze(node);
Map<String, Type2> expectedNamedTypes = new Map<String, Type2>();
expectedNamedTypes["p2"] = dynamicType;
@@ -20350,12 +21207,12 @@
void test_visitFunctionExpression_normalAndNamed_expression() {
// (p1, {p2 : 0}) -> 0
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p1 = ASTFactory.simpleFormalParameter3("p1");
+ FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
setType(p1, dynamicType);
- FormalParameter p2 = ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
+ FormalParameter p2 = AstFactory.namedFormalParameter(AstFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
setType(p2, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p1, p2]), ASTFactory.expressionFunctionBody(resolvedInteger(0)));
- analyze3(p2);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p1, p2]), AstFactory.expressionFunctionBody(resolvedInteger(0)));
+ analyze5(p2);
Type2 resultType = analyze(node);
Map<String, Type2> expectedNamedTypes = new Map<String, Type2>();
expectedNamedTypes["p2"] = dynamicType;
@@ -20366,13 +21223,13 @@
void test_visitFunctionExpression_normalAndPositional_block() {
// (p1, [p2 = 0]) {}
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p1 = ASTFactory.simpleFormalParameter3("p1");
+ FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
setType(p1, dynamicType);
- FormalParameter p2 = ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
+ FormalParameter p2 = AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
setType(p2, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p1, p2]), ASTFactory.blockFunctionBody2([]));
- analyze3(p1);
- analyze3(p2);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p1, p2]), AstFactory.blockFunctionBody2([]));
+ analyze5(p1);
+ analyze5(p2);
Type2 resultType = analyze(node);
assertFunctionType(dynamicType, <Type2> [dynamicType], <Type2> [dynamicType], null, resultType);
_listener.assertNoErrors();
@@ -20381,13 +21238,13 @@
void test_visitFunctionExpression_normalAndPositional_expression() {
// (p1, [p2 = 0]) -> 0
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p1 = ASTFactory.simpleFormalParameter3("p1");
+ FormalParameter p1 = AstFactory.simpleFormalParameter3("p1");
setType(p1, dynamicType);
- FormalParameter p2 = ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
+ FormalParameter p2 = AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
setType(p2, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p1, p2]), ASTFactory.expressionFunctionBody(resolvedInteger(0)));
- analyze3(p1);
- analyze3(p2);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p1, p2]), AstFactory.expressionFunctionBody(resolvedInteger(0)));
+ analyze5(p1);
+ analyze5(p2);
Type2 resultType = analyze(node);
assertFunctionType(_typeProvider.intType, <Type2> [dynamicType], <Type2> [dynamicType], null, resultType);
_listener.assertNoErrors();
@@ -20396,13 +21253,13 @@
void test_visitFunctionExpression_positional_block() {
// ([p1 = 0, p2 = 0]) {}
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p1 = ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("p1"), resolvedInteger(0));
+ FormalParameter p1 = AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("p1"), resolvedInteger(0));
setType(p1, dynamicType);
- FormalParameter p2 = ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
+ FormalParameter p2 = AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("p2"), resolvedInteger(0));
setType(p2, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p1, p2]), ASTFactory.blockFunctionBody2([]));
- analyze3(p1);
- analyze3(p2);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p1, p2]), AstFactory.blockFunctionBody2([]));
+ analyze5(p1);
+ analyze5(p2);
Type2 resultType = analyze(node);
assertFunctionType(dynamicType, null, <Type2> [dynamicType, dynamicType], null, resultType);
_listener.assertNoErrors();
@@ -20411,10 +21268,10 @@
void test_visitFunctionExpression_positional_expression() {
// ([p1 = 0, p2 = 0]) -> 0
Type2 dynamicType = _typeProvider.dynamicType;
- FormalParameter p = ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("p"), resolvedInteger(0));
+ FormalParameter p = AstFactory.positionalFormalParameter(AstFactory.simpleFormalParameter3("p"), resolvedInteger(0));
setType(p, dynamicType);
- FunctionExpression node = resolvedFunctionExpression(ASTFactory.formalParameterList([p]), ASTFactory.expressionFunctionBody(resolvedInteger(0)));
- analyze3(p);
+ FunctionExpression node = resolvedFunctionExpression(AstFactory.formalParameterList([p]), AstFactory.expressionFunctionBody(resolvedInteger(0)));
+ analyze5(p);
Type2 resultType = analyze(node);
assertFunctionType(_typeProvider.intType, null, <Type2> [dynamicType], null, resultType);
_listener.assertNoErrors();
@@ -20425,7 +21282,7 @@
// a[2]
InterfaceType listType = _typeProvider.listType;
SimpleIdentifier identifier = resolvedVariable(listType, "a");
- IndexExpression node = ASTFactory.indexExpression(identifier, resolvedInteger(2));
+ IndexExpression node = AstFactory.indexExpression(identifier, resolvedInteger(2));
MethodElement indexMethod = listType.element.methods[0];
node.staticElement = indexMethod;
JUnitTestCase.assertSame(listType.typeArguments[0], analyze(node));
@@ -20437,10 +21294,10 @@
// a[2] = 0
InterfaceType listType = _typeProvider.listType;
SimpleIdentifier identifier = resolvedVariable(listType, "a");
- IndexExpression node = ASTFactory.indexExpression(identifier, resolvedInteger(2));
+ IndexExpression node = AstFactory.indexExpression(identifier, resolvedInteger(2));
MethodElement indexMethod = listType.element.methods[1];
node.staticElement = indexMethod;
- ASTFactory.assignmentExpression(node, TokenType.EQ, ASTFactory.integer(0));
+ AstFactory.assignmentExpression(node, TokenType.EQ, AstFactory.integer(0));
JUnitTestCase.assertSame(listType.typeArguments[0], analyze(node));
_listener.assertNoErrors();
}
@@ -20453,11 +21310,11 @@
// (int) -> E
MethodElement methodElement = getMethod(listType, "[]");
// "list" has type List<int>
- SimpleIdentifier identifier = ASTFactory.identifier3("list");
+ SimpleIdentifier identifier = AstFactory.identifier3("list");
InterfaceType listOfIntType = listType.substitute4(<Type2> [intType]);
identifier.staticType = listOfIntType;
// list[0] has MethodElement element (int) -> E
- IndexExpression indexExpression = ASTFactory.indexExpression(identifier, ASTFactory.integer(0));
+ IndexExpression indexExpression = AstFactory.indexExpression(identifier, AstFactory.integer(0));
MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
indexExpression.staticElement = indexMethod;
// analyze and assert result of the index expression
@@ -20473,15 +21330,15 @@
// (int, E) -> void
MethodElement methodElement = getMethod(listType, "[]=");
// "list" has type List<int>
- SimpleIdentifier identifier = ASTFactory.identifier3("list");
+ SimpleIdentifier identifier = AstFactory.identifier3("list");
InterfaceType listOfIntType = listType.substitute4(<Type2> [intType]);
identifier.staticType = listOfIntType;
// list[0] has MethodElement element (int) -> E
- IndexExpression indexExpression = ASTFactory.indexExpression(identifier, ASTFactory.integer(0));
+ IndexExpression indexExpression = AstFactory.indexExpression(identifier, AstFactory.integer(0));
MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
indexExpression.staticElement = indexMethod;
// list[0] should be in a setter context
- ASTFactory.assignmentExpression(indexExpression, TokenType.EQ, ASTFactory.integer(0));
+ AstFactory.assignmentExpression(indexExpression, TokenType.EQ, AstFactory.integer(0));
// analyze and assert result of the index expression
JUnitTestCase.assertSame(intType, analyze(indexExpression));
_listener.assertNoErrors();
@@ -20496,7 +21353,7 @@
FunctionTypeImpl constructorType = new FunctionTypeImpl.con1(constructor);
constructor.type = constructorType;
classElement.constructors = <ConstructorElement> [constructor];
- InstanceCreationExpression node = ASTFactory.instanceCreationExpression2(null, ASTFactory.typeName(classElement, []), [ASTFactory.identifier3(constructorName)]);
+ InstanceCreationExpression node = AstFactory.instanceCreationExpression2(null, AstFactory.typeName(classElement, []), [AstFactory.identifier3(constructorName)]);
node.staticElement = constructor;
JUnitTestCase.assertSame(classElement.type, analyze(node));
_listener.assertNoErrors();
@@ -20511,9 +21368,9 @@
constructor.returnType = elementC.type;
FunctionTypeImpl constructorType = new FunctionTypeImpl.con1(constructor);
constructor.type = constructorType;
- TypeName typeName = ASTFactory.typeName(elementC, [ASTFactory.typeName(elementI, [])]);
+ TypeName typeName = AstFactory.typeName(elementC, [AstFactory.typeName(elementI, [])]);
typeName.type = elementC.type.substitute4(<Type2> [elementI.type]);
- InstanceCreationExpression node = ASTFactory.instanceCreationExpression2(null, typeName, []);
+ InstanceCreationExpression node = AstFactory.instanceCreationExpression2(null, typeName, []);
node.staticElement = constructor;
InterfaceType interfaceType = analyze(node) as InterfaceType;
List<Type2> typeArgs = interfaceType.typeArguments;
@@ -20530,7 +21387,7 @@
FunctionTypeImpl constructorType = new FunctionTypeImpl.con1(constructor);
constructor.type = constructorType;
classElement.constructors = <ConstructorElement> [constructor];
- InstanceCreationExpression node = ASTFactory.instanceCreationExpression2(null, ASTFactory.typeName(classElement, []), []);
+ InstanceCreationExpression node = AstFactory.instanceCreationExpression2(null, AstFactory.typeName(classElement, []), []);
node.staticElement = constructor;
JUnitTestCase.assertSame(classElement.type, analyze(node));
_listener.assertNoErrors();
@@ -20545,21 +21402,21 @@
void test_visitIsExpression_negated() {
// a is! String
- Expression node = ASTFactory.isExpression(resolvedString("a"), true, ASTFactory.typeName4("String", []));
+ Expression node = AstFactory.isExpression(resolvedString("a"), true, AstFactory.typeName4("String", []));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitIsExpression_notNegated() {
// a is String
- Expression node = ASTFactory.isExpression(resolvedString("a"), false, ASTFactory.typeName4("String", []));
+ Expression node = AstFactory.isExpression(resolvedString("a"), false, AstFactory.typeName4("String", []));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitListLiteral_empty() {
// []
- Expression node = ASTFactory.listLiteral([]);
+ Expression node = AstFactory.listLiteral([]);
Type2 resultType = analyze(node);
assertType2(_typeProvider.listType.substitute4(<Type2> [_typeProvider.dynamicType]), resultType);
_listener.assertNoErrors();
@@ -20567,7 +21424,7 @@
void test_visitListLiteral_nonEmpty() {
// [0]
- Expression node = ASTFactory.listLiteral([resolvedInteger(0)]);
+ Expression node = AstFactory.listLiteral([resolvedInteger(0)]);
Type2 resultType = analyze(node);
assertType2(_typeProvider.listType.substitute4(<Type2> [_typeProvider.dynamicType]), resultType);
_listener.assertNoErrors();
@@ -20575,7 +21432,7 @@
void test_visitMapLiteral_empty() {
// {}
- Expression node = ASTFactory.mapLiteral2([]);
+ Expression node = AstFactory.mapLiteral2([]);
Type2 resultType = analyze(node);
assertType2(_typeProvider.mapType.substitute4(<Type2> [_typeProvider.dynamicType, _typeProvider.dynamicType]), resultType);
_listener.assertNoErrors();
@@ -20583,7 +21440,7 @@
void test_visitMapLiteral_nonEmpty() {
// {"k" : 0}
- Expression node = ASTFactory.mapLiteral2([ASTFactory.mapLiteralEntry("k", resolvedInteger(0))]);
+ Expression node = AstFactory.mapLiteral2([AstFactory.mapLiteralEntry("k", resolvedInteger(0))]);
Type2 resultType = analyze(node);
assertType2(_typeProvider.mapType.substitute4(<Type2> [_typeProvider.dynamicType, _typeProvider.dynamicType]), resultType);
_listener.assertNoErrors();
@@ -20591,42 +21448,42 @@
void test_visitMethodInvocation_then() {
// then()
- Expression node = ASTFactory.methodInvocation(null, "then", []);
+ Expression node = AstFactory.methodInvocation(null, "then", []);
analyze(node);
_listener.assertNoErrors();
}
void test_visitNamedExpression() {
// n: a
- Expression node = ASTFactory.namedExpression2("n", resolvedString("a"));
+ Expression node = AstFactory.namedExpression2("n", resolvedString("a"));
JUnitTestCase.assertSame(_typeProvider.stringType, analyze(node));
_listener.assertNoErrors();
}
void test_visitNullLiteral() {
// null
- Expression node = ASTFactory.nullLiteral();
+ Expression node = AstFactory.nullLiteral();
JUnitTestCase.assertSame(_typeProvider.bottomType, analyze(node));
_listener.assertNoErrors();
}
void test_visitParenthesizedExpression() {
// (0)
- Expression node = ASTFactory.parenthesizedExpression(resolvedInteger(0));
+ Expression node = AstFactory.parenthesizedExpression(resolvedInteger(0));
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
_listener.assertNoErrors();
}
void test_visitPostfixExpression_minusMinus() {
// 0--
- PostfixExpression node = ASTFactory.postfixExpression(resolvedInteger(0), TokenType.MINUS_MINUS);
+ PostfixExpression node = AstFactory.postfixExpression(resolvedInteger(0), TokenType.MINUS_MINUS);
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
_listener.assertNoErrors();
}
void test_visitPostfixExpression_plusPlus() {
// 0++
- PostfixExpression node = ASTFactory.postfixExpression(resolvedInteger(0), TokenType.PLUS_PLUS);
+ PostfixExpression node = AstFactory.postfixExpression(resolvedInteger(0), TokenType.PLUS_PLUS);
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
_listener.assertNoErrors();
}
@@ -20634,7 +21491,7 @@
void test_visitPrefixedIdentifier_getter() {
Type2 boolType = _typeProvider.boolType;
PropertyAccessorElementImpl getter = ElementFactory.getterElement("b", false, boolType);
- PrefixedIdentifier node = ASTFactory.identifier5("a", "b");
+ PrefixedIdentifier node = AstFactory.identifier5("a", "b");
node.identifier.staticElement = getter;
JUnitTestCase.assertSame(boolType, analyze(node));
_listener.assertNoErrors();
@@ -20644,7 +21501,7 @@
Type2 boolType = _typeProvider.boolType;
FieldElementImpl field = ElementFactory.fieldElement("b", false, false, false, boolType);
PropertyAccessorElement setter = field.setter;
- PrefixedIdentifier node = ASTFactory.identifier5("a", "b");
+ PrefixedIdentifier node = AstFactory.identifier5("a", "b");
node.identifier.staticElement = setter;
JUnitTestCase.assertSame(boolType, analyze(node));
_listener.assertNoErrors();
@@ -20653,7 +21510,7 @@
void test_visitPrefixedIdentifier_variable() {
VariableElementImpl variable = ElementFactory.localVariableElement2("b");
variable.type = _typeProvider.boolType;
- PrefixedIdentifier node = ASTFactory.identifier5("a", "b");
+ PrefixedIdentifier node = AstFactory.identifier5("a", "b");
node.identifier.staticElement = variable;
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
@@ -20661,14 +21518,14 @@
void test_visitPrefixExpression_bang() {
// !0
- PrefixExpression node = ASTFactory.prefixExpression(TokenType.BANG, resolvedInteger(0));
+ PrefixExpression node = AstFactory.prefixExpression(TokenType.BANG, resolvedInteger(0));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitPrefixExpression_minus() {
// -0
- PrefixExpression node = ASTFactory.prefixExpression(TokenType.MINUS, resolvedInteger(0));
+ PrefixExpression node = AstFactory.prefixExpression(TokenType.MINUS, resolvedInteger(0));
MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
node.staticElement = minusMethod;
JUnitTestCase.assertSame(_typeProvider.numType, analyze(node));
@@ -20677,7 +21534,7 @@
void test_visitPrefixExpression_minusMinus() {
// --0
- PrefixExpression node = ASTFactory.prefixExpression(TokenType.MINUS_MINUS, resolvedInteger(0));
+ PrefixExpression node = AstFactory.prefixExpression(TokenType.MINUS_MINUS, resolvedInteger(0));
MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
node.staticElement = minusMethod;
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
@@ -20686,14 +21543,14 @@
void test_visitPrefixExpression_not() {
// !true
- Expression node = ASTFactory.prefixExpression(TokenType.BANG, ASTFactory.booleanLiteral(true));
+ Expression node = AstFactory.prefixExpression(TokenType.BANG, AstFactory.booleanLiteral(true));
JUnitTestCase.assertSame(_typeProvider.boolType, analyze(node));
_listener.assertNoErrors();
}
void test_visitPrefixExpression_plusPlus() {
// ++0
- PrefixExpression node = ASTFactory.prefixExpression(TokenType.PLUS_PLUS, resolvedInteger(0));
+ PrefixExpression node = AstFactory.prefixExpression(TokenType.PLUS_PLUS, resolvedInteger(0));
MethodElement plusMethod = getMethod(_typeProvider.numType, "+");
node.staticElement = plusMethod;
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
@@ -20702,27 +21559,46 @@
void test_visitPrefixExpression_tilde() {
// ~0
- PrefixExpression node = ASTFactory.prefixExpression(TokenType.TILDE, resolvedInteger(0));
+ PrefixExpression node = AstFactory.prefixExpression(TokenType.TILDE, resolvedInteger(0));
MethodElement tildeMethod = getMethod(_typeProvider.intType, "~");
node.staticElement = tildeMethod;
JUnitTestCase.assertSame(_typeProvider.intType, analyze(node));
_listener.assertNoErrors();
}
- void test_visitPropertyAccess_getter() {
+ void test_visitPropertyAccess_propagated_getter() {
Type2 boolType = _typeProvider.boolType;
PropertyAccessorElementImpl getter = ElementFactory.getterElement("b", false, boolType);
- PropertyAccess node = ASTFactory.propertyAccess2(ASTFactory.identifier3("a"), "b");
+ PropertyAccess node = AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+ node.propertyName.propagatedElement = getter;
+ JUnitTestCase.assertSame(boolType, analyze2(node, false));
+ _listener.assertNoErrors();
+ }
+
+ void test_visitPropertyAccess_propagated_setter() {
+ Type2 boolType = _typeProvider.boolType;
+ FieldElementImpl field = ElementFactory.fieldElement("b", false, false, false, boolType);
+ PropertyAccessorElement setter = field.setter;
+ PropertyAccess node = AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+ node.propertyName.propagatedElement = setter;
+ JUnitTestCase.assertSame(boolType, analyze2(node, false));
+ _listener.assertNoErrors();
+ }
+
+ void test_visitPropertyAccess_static_getter() {
+ Type2 boolType = _typeProvider.boolType;
+ PropertyAccessorElementImpl getter = ElementFactory.getterElement("b", false, boolType);
+ PropertyAccess node = AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
node.propertyName.staticElement = getter;
JUnitTestCase.assertSame(boolType, analyze(node));
_listener.assertNoErrors();
}
- void test_visitPropertyAccess_setter() {
+ void test_visitPropertyAccess_static_setter() {
Type2 boolType = _typeProvider.boolType;
FieldElementImpl field = ElementFactory.fieldElement("b", false, false, false, boolType);
PropertyAccessorElement setter = field.setter;
- PropertyAccess node = ASTFactory.propertyAccess2(ASTFactory.identifier3("a"), "b");
+ PropertyAccess node = AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
node.propertyName.staticElement = setter;
JUnitTestCase.assertSame(boolType, analyze(node));
_listener.assertNoErrors();
@@ -20737,10 +21613,10 @@
void test_visitStringInterpolation() {
// "a${'b'}c"
- Expression node = ASTFactory.string([
- ASTFactory.interpolationString("a", "a"),
- ASTFactory.interpolationExpression(resolvedString("b")),
- ASTFactory.interpolationString("c", "c")]);
+ Expression node = AstFactory.string([
+ AstFactory.interpolationString("a", "a"),
+ AstFactory.interpolationExpression(resolvedString("b")),
+ AstFactory.interpolationString("c", "c")]);
JUnitTestCase.assertSame(_typeProvider.stringType, analyze(node));
_listener.assertNoErrors();
}
@@ -20749,33 +21625,33 @@
// super
InterfaceType superType = ElementFactory.classElement2("A", []).type;
InterfaceType thisType = ElementFactory.classElement("B", superType, []).type;
- Expression node = ASTFactory.superExpression();
- JUnitTestCase.assertSame(thisType, analyze2(node, thisType));
+ Expression node = AstFactory.superExpression();
+ JUnitTestCase.assertSame(thisType, analyze3(node, thisType));
_listener.assertNoErrors();
}
void test_visitSymbolLiteral() {
- JUnitTestCase.assertSame(_typeProvider.symbolType, analyze(ASTFactory.symbolLiteral(["a"])));
+ JUnitTestCase.assertSame(_typeProvider.symbolType, analyze(AstFactory.symbolLiteral(["a"])));
}
void test_visitThisExpression() {
// this
InterfaceType thisType = ElementFactory.classElement("B", ElementFactory.classElement2("A", []).type, []).type;
- Expression node = ASTFactory.thisExpression();
- JUnitTestCase.assertSame(thisType, analyze2(node, thisType));
+ Expression node = AstFactory.thisExpression();
+ JUnitTestCase.assertSame(thisType, analyze3(node, thisType));
_listener.assertNoErrors();
}
void test_visitThrowExpression_withoutValue() {
// throw
- Expression node = ASTFactory.throwExpression();
+ Expression node = AstFactory.throwExpression();
JUnitTestCase.assertSame(_typeProvider.bottomType, analyze(node));
_listener.assertNoErrors();
}
void test_visitThrowExpression_withValue() {
// throw 0
- Expression node = ASTFactory.throwExpression2(resolvedInteger(0));
+ Expression node = AstFactory.throwExpression2(resolvedInteger(0));
JUnitTestCase.assertSame(_typeProvider.bottomType, analyze(node));
_listener.assertNoErrors();
}
@@ -20787,7 +21663,18 @@
* @param node the expression with which the type is associated
* @return the type associated with the expression
*/
- Type2 analyze(Expression node) => analyze2(node, null);
+ Type2 analyze(Expression node) => analyze4(node, null, true);
+
+ /**
+ * Return the type associated with the given expression after the static or propagated type
+ * analyzer has computed a type for it.
+ *
+ * @param node the expression with which the type is associated
+ * @param useStaticType `true` if the static type is being requested, and `false` if
+ * the propagated type is being requested
+ * @return the type associated with the expression
+ */
+ Type2 analyze2(Expression node, bool useStaticType) => analyze4(node, null, useStaticType);
/**
* Return the type associated with the given expression after the static type analyzer has
@@ -20797,14 +21684,30 @@
* @param thisType the type of 'this'
* @return the type associated with the expression
*/
- Type2 analyze2(Expression node, InterfaceType thisType) {
+ Type2 analyze3(Expression node, InterfaceType thisType) => analyze4(node, thisType, true);
+
+ /**
+ * Return the type associated with the given expression after the static type analyzer has
+ * computed a type for it.
+ *
+ * @param node the expression with which the type is associated
+ * @param thisType the type of 'this'
+ * @param useStaticType `true` if the static type is being requested, and `false` if
+ * the propagated type is being requested
+ * @return the type associated with the expression
+ */
+ Type2 analyze4(Expression node, InterfaceType thisType, bool useStaticType) {
try {
_analyzer.thisType_J2DAccessor = thisType;
} on JavaException catch (exception) {
throw new IllegalArgumentException("Could not set type of 'this'", exception);
}
node.accept(_analyzer);
- return node.staticType;
+ if (useStaticType) {
+ return node.staticType;
+ } else {
+ return node.propagatedType;
+ }
}
/**
@@ -20814,7 +21717,7 @@
* @param node the parameter with which the type is associated
* @return the type associated with the parameter
*/
- Type2 analyze3(FormalParameter node) {
+ Type2 analyze5(FormalParameter node) {
node.accept(_analyzer);
return (node.identifier.staticElement as ParameterElement).type;
}
@@ -20829,7 +21732,7 @@
* @param actualType the type being tested
*/
void assertFunctionType(Type2 expectedReturnType, List<Type2> expectedNormalTypes, List<Type2> expectedOptionalTypes, Map<String, Type2> expectedNamedTypes, Type2 actualType) {
- EngineTestCase.assertInstanceOf(FunctionType, actualType);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionType, FunctionType, actualType);
FunctionType functionType = actualType as FunctionType;
List<Type2> normalTypes = functionType.normalParameterTypes;
if (expectedNormalTypes == null) {
@@ -20877,7 +21780,7 @@
void assertType2(Type2 expectedType, Type2 actualType) {
if (expectedType is InterfaceTypeImpl) {
- EngineTestCase.assertInstanceOf(InterfaceTypeImpl, actualType);
+ EngineTestCase.assertInstanceOf((obj) => obj is InterfaceTypeImpl, InterfaceTypeImpl, actualType);
assertType(expectedType, actualType as InterfaceTypeImpl);
}
}
@@ -20889,9 +21792,9 @@
*/
StaticTypeAnalyzer createAnalyzer() {
AnalysisContextImpl context = new AnalysisContextImpl();
- SourceFactory sourceFactory = new SourceFactory.con2([new DartUriResolver(DirectoryBasedDartSdk.defaultSdk)]);
+ SourceFactory sourceFactory = new SourceFactory([new DartUriResolver(DirectoryBasedDartSdk.defaultSdk)]);
context.sourceFactory = sourceFactory;
- FileBasedSource source = new FileBasedSource.con1(sourceFactory.contentCache, FileUtilities2.createFile("/lib.dart"));
+ FileBasedSource source = new FileBasedSource.con1(FileUtilities2.createFile("/lib.dart"));
CompilationUnitElementImpl definingCompilationUnit = new CompilationUnitElementImpl("lib.dart");
definingCompilationUnit.source = source;
LibraryElementImpl definingLibrary = new LibraryElementImpl(context, null);
@@ -20914,7 +21817,7 @@
* @return an integer literal that has been resolved to the correct type
*/
DoubleLiteral resolvedDouble(double value) {
- DoubleLiteral literal = ASTFactory.doubleLiteral(value);
+ DoubleLiteral literal = AstFactory.doubleLiteral(value);
literal.staticType = _typeProvider.doubleType;
return literal;
}
@@ -20938,7 +21841,7 @@
parameter.identifier.staticElement = element;
parameterElements.add(element);
}
- FunctionExpression node = ASTFactory.functionExpression2(parameters, body);
+ FunctionExpression node = AstFactory.functionExpression2(parameters, body);
FunctionElementImpl element = new FunctionElementImpl.con1(null);
element.parameters = new List.from(parameterElements);
element.type = new FunctionTypeImpl.con1(element);
@@ -20953,7 +21856,7 @@
* @return an integer literal that has been resolved to the correct type
*/
IntegerLiteral resolvedInteger(int value) {
- IntegerLiteral literal = ASTFactory.integer(value);
+ IntegerLiteral literal = AstFactory.integer(value);
literal.staticType = _typeProvider.intType;
return literal;
}
@@ -20965,7 +21868,7 @@
* @return a string literal that has been resolved to the correct type
*/
SimpleStringLiteral resolvedString(String value) {
- SimpleStringLiteral string = ASTFactory.string2(value);
+ SimpleStringLiteral string = AstFactory.string2(value);
string.staticType = _typeProvider.stringType;
return string;
}
@@ -20978,7 +21881,7 @@
* @return a simple identifier that has been resolved to a variable element with the given type
*/
SimpleIdentifier resolvedVariable(InterfaceType type, String variableName) {
- SimpleIdentifier identifier = ASTFactory.identifier3(variableName);
+ SimpleIdentifier identifier = AstFactory.identifier3(variableName);
VariableElementImpl element = ElementFactory.localVariableElement(identifier);
element.type = type;
identifier.staticElement = element;
@@ -21240,13 +22143,21 @@
final __test = new StaticTypeAnalyzerTest();
runJUnitTest(__test, __test.test_visitPrefixedIdentifier_variable);
});
- _ut.test('test_visitPropertyAccess_getter', () {
+ _ut.test('test_visitPropertyAccess_propagated_getter', () {
final __test = new StaticTypeAnalyzerTest();
- runJUnitTest(__test, __test.test_visitPropertyAccess_getter);
+ runJUnitTest(__test, __test.test_visitPropertyAccess_propagated_getter);
});
- _ut.test('test_visitPropertyAccess_setter', () {
+ _ut.test('test_visitPropertyAccess_propagated_setter', () {
final __test = new StaticTypeAnalyzerTest();
- runJUnitTest(__test, __test.test_visitPropertyAccess_setter);
+ runJUnitTest(__test, __test.test_visitPropertyAccess_propagated_setter);
+ });
+ _ut.test('test_visitPropertyAccess_static_getter', () {
+ final __test = new StaticTypeAnalyzerTest();
+ runJUnitTest(__test, __test.test_visitPropertyAccess_static_getter);
+ });
+ _ut.test('test_visitPropertyAccess_static_setter', () {
+ final __test = new StaticTypeAnalyzerTest();
+ runJUnitTest(__test, __test.test_visitPropertyAccess_static_setter);
});
_ut.test('test_visitSimpleStringLiteral', () {
final __test = new StaticTypeAnalyzerTest();
@@ -21535,6 +22446,102 @@
verify([source]);
}
+ void test_overrideOnNonOverridingGetter_inInterface() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ " int get m => 0;",
+ "}",
+ "class B implements A {",
+ " @override",
+ " int get m => 1;",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_overrideOnNonOverridingGetter_inSuperclass() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ " int get m => 0;",
+ "}",
+ "class B extends A {",
+ " @override",
+ " int get m => 1;",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_overrideOnNonOverridingMethod_inInterface() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ " int m() => 0;",
+ "}",
+ "class B implements A {",
+ " @override",
+ " int m() => 1;",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_overrideOnNonOverridingMethod_inSuperclass() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ " int m() => 0;",
+ "}",
+ "class B extends A {",
+ " @override",
+ " int m() => 1;",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_overrideOnNonOverridingSetter_inInterface() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ " set m(int x) {}",
+ "}",
+ "class B implements A {",
+ " @override",
+ " set m(int x) {}",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_overrideOnNonOverridingSetter_inSuperclass() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library dart.core;",
+ "const override = null;",
+ "class A {",
+ " set m(int x) {}",
+ "}",
+ "class B extends A {",
+ " @override",
+ " set m(int x) {}",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_proxy_annotation_prefixed() {
Source source = addSource(EngineTestCase.createSource([
"library L;",
@@ -21948,6 +22955,30 @@
final __test = new NonHintCodeTest();
runJUnitTest(__test, __test.test_overrideEqualsButNotHashCode);
});
+ _ut.test('test_overrideOnNonOverridingGetter_inInterface', () {
+ final __test = new NonHintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingGetter_inInterface);
+ });
+ _ut.test('test_overrideOnNonOverridingGetter_inSuperclass', () {
+ final __test = new NonHintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingGetter_inSuperclass);
+ });
+ _ut.test('test_overrideOnNonOverridingMethod_inInterface', () {
+ final __test = new NonHintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingMethod_inInterface);
+ });
+ _ut.test('test_overrideOnNonOverridingMethod_inSuperclass', () {
+ final __test = new NonHintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingMethod_inSuperclass);
+ });
+ _ut.test('test_overrideOnNonOverridingSetter_inInterface', () {
+ final __test = new NonHintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingSetter_inInterface);
+ });
+ _ut.test('test_overrideOnNonOverridingSetter_inSuperclass', () {
+ final __test = new NonHintCodeTest();
+ runJUnitTest(__test, __test.test_overrideOnNonOverridingSetter_inSuperclass);
+ });
_ut.test('test_proxy_annotation_prefixed', () {
final __test = new NonHintCodeTest();
runJUnitTest(__test, __test.test_proxy_annotation_prefixed);
@@ -22053,8 +23084,8 @@
GatheringErrorListener errorListener2 = new GatheringErrorListener();
Scope rootScope = new Scope_EnclosedScopeTest_test_define_duplicate(errorListener2);
EnclosedScope scope = new EnclosedScope(rootScope);
- VariableElement element1 = ElementFactory.localVariableElement(ASTFactory.identifier3("v1"));
- VariableElement element2 = ElementFactory.localVariableElement(ASTFactory.identifier3("v1"));
+ VariableElement element1 = ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
+ VariableElement element2 = ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
scope.define(element1);
scope.define(element2);
errorListener2.assertErrors3([ErrorSeverity.ERROR]);
@@ -22065,8 +23096,8 @@
Scope rootScope = new Scope_EnclosedScopeTest_test_define_normal(errorListener3);
EnclosedScope outerScope = new EnclosedScope(rootScope);
EnclosedScope innerScope = new EnclosedScope(outerScope);
- VariableElement element1 = ElementFactory.localVariableElement(ASTFactory.identifier3("v1"));
- VariableElement element2 = ElementFactory.localVariableElement(ASTFactory.identifier3("v2"));
+ VariableElement element1 = ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
+ VariableElement element2 = ElementFactory.localVariableElement(AstFactory.identifier3("v2"));
outerScope.define(element1);
innerScope.define(element2);
errorListener3.assertNoErrors();
@@ -22108,12 +23139,16 @@
class LibraryElementBuilderTest extends EngineTestCase {
/**
- * The source factory used to create [Source].
+ * The analysis context used to analyze sources.
*/
- SourceFactory _sourceFactory;
+ AnalysisContextImpl _context;
void setUp() {
- _sourceFactory = new SourceFactory.con2([new FileUriResolver()]);
+ SourceFactory sourceFactory = new SourceFactory([
+ new DartUriResolver(DirectoryBasedDartSdk.defaultSdk),
+ new FileUriResolver()]);
+ _context = new AnalysisContextImpl();
+ _context.sourceFactory = sourceFactory;
}
void test_accessorsAcrossFiles() {
@@ -22214,8 +23249,8 @@
* @return the source object representing the added file
*/
Source addSource(String filePath, String contents) {
- Source source = new FileBasedSource.con1(_sourceFactory.contentCache, FileUtilities2.createFile(filePath));
- _sourceFactory.setContents(source, contents);
+ Source source = new FileBasedSource.con1(FileUtilities2.createFile(filePath));
+ _context.setContents(source, contents);
return source;
}
@@ -22254,11 +23289,7 @@
* @throws Exception if the element model could not be built
*/
LibraryElement buildLibrary(Source librarySource, List<ErrorCode> expectedErrorCodes) {
- AnalysisContextImpl context = new AnalysisContextImpl();
- context.sourceFactory = new SourceFactory.con2([
- new DartUriResolver(DirectoryBasedDartSdk.defaultSdk),
- new FileUriResolver()]);
- LibraryResolver resolver = new LibraryResolver(context);
+ LibraryResolver resolver = new LibraryResolver(_context);
LibraryElementBuilder builder = new LibraryElementBuilder(resolver);
Library library = resolver.createLibrary(librarySource);
LibraryElement element = builder.buildLibrary(library);
@@ -22306,8 +23337,8 @@
void test_define_duplicate() {
GatheringErrorListener errorListener = new GatheringErrorListener();
ScopeTest_TestScope scope = new ScopeTest_TestScope(errorListener);
- VariableElement element1 = ElementFactory.localVariableElement(ASTFactory.identifier3("v1"));
- VariableElement element2 = ElementFactory.localVariableElement(ASTFactory.identifier3("v1"));
+ VariableElement element1 = ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
+ VariableElement element2 = ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
scope.define(element1);
scope.define(element2);
errorListener.assertErrors3([ErrorSeverity.ERROR]);
@@ -22316,8 +23347,8 @@
void test_define_normal() {
GatheringErrorListener errorListener = new GatheringErrorListener();
ScopeTest_TestScope scope = new ScopeTest_TestScope(errorListener);
- VariableElement element1 = ElementFactory.localVariableElement(ASTFactory.identifier3("v1"));
- VariableElement element2 = ElementFactory.localVariableElement(ASTFactory.identifier3("v2"));
+ VariableElement element1 = ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
+ VariableElement element2 = ElementFactory.localVariableElement(AstFactory.identifier3("v2"));
scope.define(element1);
scope.define(element2);
errorListener.assertNoErrors();
@@ -22556,6 +23587,38 @@
verify([source]);
}
+ void test_entryPoint_exported() {
+ addSource2("/two.dart", EngineTestCase.createSource(["library two;", "main() {}"]));
+ Source source = addSource2("/one.dart", EngineTestCase.createSource(["library one;", "export 'two.dart';"]));
+ LibraryElement library = resolve(source);
+ JUnitTestCase.assertNotNull(library);
+ FunctionElement main = library.entryPoint;
+ JUnitTestCase.assertNotNull(main);
+ JUnitTestCase.assertNotSame(library, main.library);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_entryPoint_local() {
+ Source source = addSource2("/one.dart", EngineTestCase.createSource(["library one;", "main() {}"]));
+ LibraryElement library = resolve(source);
+ JUnitTestCase.assertNotNull(library);
+ FunctionElement main = library.entryPoint;
+ JUnitTestCase.assertNotNull(main);
+ JUnitTestCase.assertSame(library, main.library);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_entryPoint_none() {
+ Source source = addSource2("/one.dart", EngineTestCase.createSource(["library one;"]));
+ LibraryElement library = resolve(source);
+ JUnitTestCase.assertNotNull(library);
+ JUnitTestCase.assertNull(library.entryPoint);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_extractedMethodAsConstant() {
Source source = addSource(EngineTestCase.createSource([
"abstract class Comparable<T> {",
@@ -22831,7 +23894,7 @@
JUnitTestCase.assertNotNull(unit);
List<bool> found = [false];
List<AnalysisException> thrownException = new List<AnalysisException>(1);
- unit.accept(new RecursiveASTVisitor_SimpleResolverTest_test_localVariable_types_invoked(this, found, thrownException));
+ unit.accept(new RecursiveAstVisitor_SimpleResolverTest_test_localVariable_types_invoked(this, found, thrownException));
if (thrownException[0] != null) {
throw new AnalysisException.con3(thrownException[0]);
}
@@ -23203,6 +24266,18 @@
final __test = new SimpleResolverTest();
runJUnitTest(__test, __test.test_empty);
});
+ _ut.test('test_entryPoint_exported', () {
+ final __test = new SimpleResolverTest();
+ runJUnitTest(__test, __test.test_entryPoint_exported);
+ });
+ _ut.test('test_entryPoint_local', () {
+ final __test = new SimpleResolverTest();
+ runJUnitTest(__test, __test.test_entryPoint_local);
+ });
+ _ut.test('test_entryPoint_none', () {
+ final __test = new SimpleResolverTest();
+ runJUnitTest(__test, __test.test_entryPoint_none);
+ });
_ut.test('test_extractedMethodAsConstant', () {
final __test = new SimpleResolverTest();
runJUnitTest(__test, __test.test_extractedMethodAsConstant);
@@ -23355,14 +24430,14 @@
}
}
-class RecursiveASTVisitor_SimpleResolverTest_test_localVariable_types_invoked extends RecursiveASTVisitor<Object> {
+class RecursiveAstVisitor_SimpleResolverTest_test_localVariable_types_invoked extends RecursiveAstVisitor<Object> {
final SimpleResolverTest SimpleResolverTest_this;
List<bool> found;
List<AnalysisException> thrownException;
- RecursiveASTVisitor_SimpleResolverTest_test_localVariable_types_invoked(this.SimpleResolverTest_this, this.found, this.thrownException) : super();
+ RecursiveAstVisitor_SimpleResolverTest_test_localVariable_types_invoked(this.SimpleResolverTest_this, this.found, this.thrownException) : super();
Object visitSimpleIdentifier(SimpleIdentifier node) {
if (node.name == "myVar" && node.parent is MethodInvocation) {
@@ -23459,7 +24534,7 @@
void setUp() {
super.setUp();
AnalysisContextImpl context = AnalysisContextFactory.contextWithCore();
- FileBasedSource source = new FileBasedSource.con1(new ContentCache(), FileUtilities2.createFile("/test.dart"));
+ FileBasedSource source = new FileBasedSource.con1(FileUtilities2.createFile("/test.dart"));
_definingCompilationUnit = new CompilationUnitElementImpl("test.dart");
_definingCompilationUnit.source = source;
LibraryElementImpl definingLibrary = ElementFactory.library(context, "test");
@@ -23493,73 +24568,73 @@
void test_scopeFor_ClassDeclaration() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedClassDeclaration(), listener);
- EngineTestCase.assertInstanceOf(LibraryScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is LibraryScope, LibraryScope, scope);
}
void test_scopeFor_ClassTypeAlias() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedClassTypeAlias(), listener);
- EngineTestCase.assertInstanceOf(LibraryScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is LibraryScope, LibraryScope, scope);
}
void test_scopeFor_CompilationUnit() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedCompilationUnit(), listener);
- EngineTestCase.assertInstanceOf(LibraryScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is LibraryScope, LibraryScope, scope);
}
void test_scopeFor_ConstructorDeclaration() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedConstructorDeclaration(), listener);
- EngineTestCase.assertInstanceOf(ClassScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is ClassScope, ClassScope, scope);
}
void test_scopeFor_ConstructorDeclaration_parameters() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedConstructorDeclaration().parameters, listener);
- EngineTestCase.assertInstanceOf(FunctionScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionScope, FunctionScope, scope);
}
void test_scopeFor_FunctionDeclaration() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedFunctionDeclaration(), listener);
- EngineTestCase.assertInstanceOf(LibraryScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is LibraryScope, LibraryScope, scope);
}
void test_scopeFor_FunctionDeclaration_parameters() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedFunctionDeclaration().functionExpression.parameters, listener);
- EngineTestCase.assertInstanceOf(FunctionScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionScope, FunctionScope, scope);
}
void test_scopeFor_FunctionTypeAlias() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedFunctionTypeAlias(), listener);
- EngineTestCase.assertInstanceOf(LibraryScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is LibraryScope, LibraryScope, scope);
}
void test_scopeFor_FunctionTypeAlias_parameters() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedFunctionTypeAlias().parameters, listener);
- EngineTestCase.assertInstanceOf(FunctionTypeScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionTypeScope, FunctionTypeScope, scope);
}
void test_scopeFor_MethodDeclaration() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedMethodDeclaration(), listener);
- EngineTestCase.assertInstanceOf(ClassScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is ClassScope, ClassScope, scope);
}
void test_scopeFor_MethodDeclaration_body() {
GatheringErrorListener listener = new GatheringErrorListener();
Scope scope = ScopeBuilder.scopeFor(createResolvedMethodDeclaration().body, listener);
- EngineTestCase.assertInstanceOf(FunctionScope, scope);
+ EngineTestCase.assertInstanceOf((obj) => obj is FunctionScope, FunctionScope, scope);
}
void test_scopeFor_notInCompilationUnit() {
GatheringErrorListener listener = new GatheringErrorListener();
try {
- ScopeBuilder.scopeFor(ASTFactory.identifier3("x"), listener);
+ ScopeBuilder.scopeFor(AstFactory.identifier3("x"), listener);
JUnitTestCase.fail("Expected AnalysisException");
} on AnalysisException catch (exception) {
}
@@ -23577,7 +24652,7 @@
void test_scopeFor_unresolved() {
GatheringErrorListener listener = new GatheringErrorListener();
try {
- ScopeBuilder.scopeFor(ASTFactory.compilationUnit(), listener);
+ ScopeBuilder.scopeFor(AstFactory.compilationUnit(), listener);
JUnitTestCase.fail("Expected AnalysisException");
} on AnalysisException catch (exception) {
}
@@ -23586,7 +24661,7 @@
ClassDeclaration createResolvedClassDeclaration() {
CompilationUnit unit = createResolvedCompilationUnit();
String className = "C";
- ClassDeclaration classNode = ASTFactory.classDeclaration(null, className, ASTFactory.typeParameterList([]), null, null, null, []);
+ ClassDeclaration classNode = AstFactory.classDeclaration(null, className, AstFactory.typeParameterList([]), null, null, null, []);
unit.declarations.add(classNode);
ClassElement classElement = ElementFactory.classElement2(className, []);
classNode.name.staticElement = classElement;
@@ -23597,7 +24672,7 @@
ClassTypeAlias createResolvedClassTypeAlias() {
CompilationUnit unit = createResolvedCompilationUnit();
String className = "C";
- ClassTypeAlias classNode = ASTFactory.classTypeAlias(className, ASTFactory.typeParameterList([]), null, null, null, null);
+ ClassTypeAlias classNode = AstFactory.classTypeAlias(className, AstFactory.typeParameterList([]), null, null, null, null);
unit.declarations.add(classNode);
ClassElement classElement = ElementFactory.classElement2(className, []);
classNode.name.staticElement = classElement;
@@ -23606,7 +24681,7 @@
}
CompilationUnit createResolvedCompilationUnit() {
- CompilationUnit unit = ASTFactory.compilationUnit();
+ CompilationUnit unit = AstFactory.compilationUnit();
LibraryElementImpl library = ElementFactory.library(AnalysisContextFactory.contextWithCore(), "lib");
unit.element = library.definingCompilationUnit;
return unit;
@@ -23615,7 +24690,7 @@
ConstructorDeclaration createResolvedConstructorDeclaration() {
ClassDeclaration classNode = createResolvedClassDeclaration();
String constructorName = "f";
- ConstructorDeclaration constructorNode = ASTFactory.constructorDeclaration(ASTFactory.identifier3(constructorName), null, ASTFactory.formalParameterList([]), null);
+ ConstructorDeclaration constructorNode = AstFactory.constructorDeclaration(AstFactory.identifier3(constructorName), null, AstFactory.formalParameterList([]), null);
classNode.members.add(constructorNode);
ConstructorElement constructorElement = ElementFactory.constructorElement2(classNode.element, null, []);
constructorNode.element = constructorElement;
@@ -23626,7 +24701,7 @@
FunctionDeclaration createResolvedFunctionDeclaration() {
CompilationUnit unit = createResolvedCompilationUnit();
String functionName = "f";
- FunctionDeclaration functionNode = ASTFactory.functionDeclaration(null, null, functionName, ASTFactory.functionExpression());
+ FunctionDeclaration functionNode = AstFactory.functionDeclaration(null, null, functionName, AstFactory.functionExpression());
unit.declarations.add(functionNode);
FunctionElement functionElement = ElementFactory.functionElement(functionName);
functionNode.name.staticElement = functionElement;
@@ -23636,7 +24711,7 @@
FunctionTypeAlias createResolvedFunctionTypeAlias() {
CompilationUnit unit = createResolvedCompilationUnit();
- FunctionTypeAlias aliasNode = ASTFactory.typeAlias(ASTFactory.typeName4("A", []), "F", ASTFactory.typeParameterList([]), ASTFactory.formalParameterList([]));
+ FunctionTypeAlias aliasNode = AstFactory.typeAlias(AstFactory.typeName4("A", []), "F", AstFactory.typeParameterList([]), AstFactory.formalParameterList([]));
unit.declarations.add(aliasNode);
SimpleIdentifier aliasName = aliasNode.name;
FunctionTypeAliasElement aliasElement = new FunctionTypeAliasElementImpl(aliasName);
@@ -23648,7 +24723,7 @@
MethodDeclaration createResolvedMethodDeclaration() {
ClassDeclaration classNode = createResolvedClassDeclaration();
String methodName = "f";
- MethodDeclaration methodNode = ASTFactory.methodDeclaration(null, null, null, null, ASTFactory.identifier3(methodName), ASTFactory.formalParameterList([]));
+ MethodDeclaration methodNode = AstFactory.methodDeclaration(null, null, null, null, AstFactory.identifier3(methodName), AstFactory.formalParameterList([]));
classNode.members.add(methodNode);
MethodElement methodElement = ElementFactory.methodElement(methodName, null, []);
methodNode.name.staticElement = methodElement;
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 2e1b72b..2263acd 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -9,12 +9,13 @@
import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/java_junit.dart';
+import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/scanner.dart';
-import 'package:analyzer/src/generated/ast.dart' show ASTNode, NodeLocator;
+import 'package:analyzer/src/generated/ast.dart' show AstNode, NodeLocator;
import 'package:analyzer/src/generated/element.dart' show InterfaceType, MethodElement, PropertyAccessorElement;
-import 'package:analyzer/src/generated/engine.dart' show AnalysisContext, AnalysisContextImpl, RecordingErrorListener;
+import 'package:analyzer/src/generated/engine.dart';
import 'package:unittest/unittest.dart' as _ut;
/**
@@ -617,8 +618,8 @@
* @return the object that was being tested
* @throws Exception if the object is not an instance of the expected class
*/
- static Object assertInstanceOf(Type expectedClass, Object object) {
- if (!isInstanceOf(object, expectedClass)) {
+ static Object assertInstanceOf(Predicate<Object> predicate, Type expectedClass, Object object) {
+ if (!predicate(object)) {
JUnitTestCase.fail("Expected instance of ${expectedClass.toString()}, found ${(object == null ? "null" : object.runtimeType.toString())}");
}
return object;
@@ -651,10 +652,10 @@
static void assertMatches(Token expectedToken, Token actualToken) {
JUnitTestCase.assertEquals(expectedToken.type, actualToken.type);
if (expectedToken is KeywordToken) {
- assertInstanceOf(KeywordToken, actualToken);
+ assertInstanceOf((obj) => obj is KeywordToken, KeywordToken, actualToken);
JUnitTestCase.assertEquals(expectedToken.keyword, (actualToken as KeywordToken).keyword);
} else if (expectedToken is StringToken) {
- assertInstanceOf(StringToken, actualToken);
+ assertInstanceOf((obj) => obj is StringToken, StringToken, actualToken);
JUnitTestCase.assertEquals(expectedToken.lexeme, (actualToken as StringToken).lexeme);
}
}
@@ -722,15 +723,15 @@
}
/**
- * @return the [ASTNode] with requested type at offset of the "prefix".
+ * @return the [AstNode] with requested type at offset of the "prefix".
*/
- static ASTNode findNode(ASTNode root, String code, String prefix, Type clazz) {
+ static AstNode findNode(AstNode root, String code, String prefix, Predicate<AstNode> predicate) {
int offset = code.indexOf(prefix);
if (offset == -1) {
throw new IllegalArgumentException("Not found '${prefix}'.");
}
- ASTNode node = new NodeLocator.con1(offset).searchWithin(root);
- return node.getAncestor(clazz);
+ AstNode node = new NodeLocator.con1(offset).searchWithin(root);
+ return node.getAncestor(predicate);
}
static void assertContains2(List<Object> array, List<bool> found, Object element) {
@@ -781,7 +782,7 @@
AnalysisContextImpl createAnalysisContext() {
AnalysisContextImpl context = new AnalysisContextImpl();
- context.sourceFactory = new SourceFactory.con2([]);
+ context.sourceFactory = new SourceFactory([]);
return context;
}
@@ -836,7 +837,7 @@
AnalysisContext get context {
throw new UnsupportedOperationException();
}
- void getContents(Source_ContentReceiver receiver) {
+ void getContentsToReceiver(Source_ContentReceiver receiver) {
throw new UnsupportedOperationException();
}
String get fullName {
@@ -864,6 +865,9 @@
UriKind get uriKind {
throw new UnsupportedOperationException();
}
+ TimestampedData<String> get contents {
+ throw new UnsupportedOperationException();
+ }
}
/**
diff --git a/pkg/analyzer/test/services/test_utils.dart b/pkg/analyzer/test/services/test_utils.dart
index 2a95fb3..b67ad1f 100644
--- a/pkg/analyzer/test/services/test_utils.dart
+++ b/pkg/analyzer/test/services/test_utils.dart
@@ -6,7 +6,7 @@
import 'package:unittest/unittest.dart';
-import 'package:analyzer/src/generated/engine.dart' show AnalysisContext, AnalysisContextImpl;
+import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/scanner.dart';
@@ -162,7 +162,7 @@
AnalysisContext get context => _unsupported();
- void getContents(Source_ContentReceiver receiver) => _unsupported();
+ void getContentsToReceiver(Source_ContentReceiver receiver) => _unsupported();
String get fullName => _unsupported();
@@ -182,6 +182,7 @@
Source resolveRelative(Uri uri) => _unsupported();
+ TimestampedData<String> get contents => _unsupported();
}
diff --git a/pkg/barback/lib/src/asset_cascade.dart b/pkg/barback/lib/src/asset_cascade.dart
index 16b4090..8c30be3 100644
--- a/pkg/barback/lib/src/asset_cascade.dart
+++ b/pkg/barback/lib/src/asset_cascade.dart
@@ -274,17 +274,6 @@
// TODO(rnystrom): Put some useful data in here.
_resultsController.add(
new BuildResult(_accumulatedErrors));
- }).catchError((error, stackTrace) {
- // If we get here, it's an unexpected error. Runtime errors like missing
- // assets should be handled earlier. Errors from transformers or other
- // external code that barback calls into should be caught at that API
- // boundary.
- //
- // On the off chance we get here, pipe the error to the results stream
- // as an error. That will let applications handle it without it appearing
- // in the same path as "normal" errors that get reported.
- _resultsController.addError(error, stackTrace);
- }).whenComplete(() {
_processDone = null;
_accumulatedErrors = null;
});
diff --git a/pkg/barback/lib/src/package_graph.dart b/pkg/barback/lib/src/package_graph.dart
index 6765cf3..6e259e6 100644
--- a/pkg/barback/lib/src/package_graph.dart
+++ b/pkg/barback/lib/src/package_graph.dart
@@ -71,53 +71,24 @@
/// Creates a new [PackageGraph] that will transform assets in all packages
/// made available by [provider].
PackageGraph(this.provider) {
- for (var package in provider.packages) {
- var cascade = new AssetCascade(this, package);
- // The initial result for each cascade is "success" since the cascade
- // doesn't start building until some source in that graph is updated.
- _cascadeResults[package] = new BuildResult.success();
- _cascades[package] = cascade;
- cascade.onDirty.listen((_) {
- _cascadeResults[package] = null;
- });
+ _inErrorZone(() {
+ for (var package in provider.packages) {
+ var cascade = new AssetCascade(this, package);
+ // The initial result for each cascade is "success" since the cascade
+ // doesn't start building until some source in that graph is updated.
+ _cascadeResults[package] = new BuildResult.success();
+ _cascades[package] = cascade;
+ cascade.onDirty.listen((_) {
+ _cascadeResults[package] = null;
+ });
- cascade.onLog.listen((entry) {
- if (_logController.hasListener) {
- _logController.add(entry);
- } else if (entry.level != LogLevel.FINE) {
- // No listeners, so just print entry.
- var buffer = new StringBuffer();
- buffer.write("[${entry.level} ${entry.transform}] ");
+ cascade.onLog.listen(_onLog);
+ _handleResults(cascade);
+ }
- if (entry.span != null) {
- buffer.write(entry.span.getLocationMessage(entry.message));
- } else {
- buffer.write(entry.message);
- }
-
- print(buffer);
- }
- });
-
- cascade.results.listen((result) {
- _cascadeResults[cascade.package] = result;
- // If any cascade hasn't yet finished, the overall build isn't finished
- // either.
- if (_cascadeResults.values.any((result) => result == null)) return;
-
- // Include all build errors for all cascades. If no cascades have
- // errors, the result will automatically be considered a success.
- _resultsController.add(
- new BuildResult.aggregate(_cascadeResults.values));
- }, onError: (error, stackTrace) {
- _lastUnexpectedError = error;
- _lastUnexpectedErrorTrace = stackTrace;
- _resultsController.addError(error, stackTrace);
- });
- }
-
- _errors = mergeStreams(_cascades.values.map((cascade) => cascade.errors),
- broadcast: true);
+ _errors = mergeStreams(_cascades.values.map((cascade) => cascade.errors),
+ broadcast: true);
+ });
}
/// Gets the asset node identified by [id].
@@ -128,9 +99,11 @@
///
/// If the asset cannot be found, returns null.
Future<AssetNode> getAssetNode(AssetId id) {
- var cascade = _cascades[id.package];
- if (cascade != null) return cascade.getAssetNode(id);
- return new Future.value(null);
+ return _inErrorZone(() {
+ var cascade = _cascades[id.package];
+ if (cascade != null) return cascade.getAssetNode(id);
+ return new Future.value(null);
+ });
}
/// Gets all output assets.
@@ -143,7 +116,7 @@
/// concrete outputs, and those outputs will be returned.
Future<AssetSet> getAllAssets() {
for (var cascade in _cascades.values) {
- cascade.forceAllTransforms();
+ _inErrorZone(() => cascade.forceAllTransforms());
}
if (_cascadeResults.values.contains(null)) {
@@ -180,7 +153,7 @@
groupBy(sources, (id) => id.package).forEach((package, ids) {
var cascade = _cascades[package];
if (cascade == null) throw new ArgumentError("Unknown package $package.");
- cascade.updateSources(ids);
+ _inErrorZone(() => cascade.updateSources(ids));
});
}
@@ -189,12 +162,67 @@
groupBy(sources, (id) => id.package).forEach((package, ids) {
var cascade = _cascades[package];
if (cascade == null) throw new ArgumentError("Unknown package $package.");
- cascade.removeSources(ids);
+ _inErrorZone(() => cascade.removeSources(ids));
});
}
void updateTransformers(String package,
Iterable<Iterable<Transformer>> transformers) {
- _cascades[package].updateTransformers(transformers);
+ _inErrorZone(() => _cascades[package].updateTransformers(transformers));
+ }
+
+ /// A handler for a log entry from an [AssetCascade].
+ void _onLog(LogEntry entry) {
+ if (_logController.hasListener) {
+ _logController.add(entry);
+ } else if (entry.level != LogLevel.FINE) {
+ // No listeners, so just print entry.
+ var buffer = new StringBuffer();
+ buffer.write("[${entry.level} ${entry.transform}] ");
+
+ if (entry.span != null) {
+ buffer.write(entry.span.getLocationMessage(entry.message));
+ } else {
+ buffer.write(entry.message);
+ }
+
+ print(buffer);
+ }
+ }
+
+ /// Listens to and handles the build results from [cascade].
+ void _handleResults(AssetCascade cascade) {
+ cascade.results.listen((result) {
+ _cascadeResults[cascade.package] = result;
+ // If any cascade hasn't yet finished, the overall build isn't finished
+ // either.
+ if (_cascadeResults.values.any((result) => result == null)) return;
+
+ // Include all build errors for all cascades. If no cascades have
+ // errors, the result will automatically be considered a success.
+ _resultsController.add(new BuildResult.aggregate(_cascadeResults.values));
+ });
+ }
+
+ /// Run [body] in an error-handling [Zone] and pipe any unexpected errors to
+ /// the error channel of [results].
+ ///
+ /// [body] can return a value or a [Future] that will be piped to the returned
+ /// [Future]. If it throws a [BarbackException], that exception will be piped
+ /// to the returned [Future] as well. Any other exceptions will be piped to
+ /// [results].
+ Future _inErrorZone(body()) {
+ var completer = new Completer.sync();
+ runZoned(() {
+ syncFuture(body).then(completer.complete).catchError((error, stackTrace) {
+ if (error is! BarbackException) throw error;
+ completer.completeError(error, stackTrace);
+ });
+ }, onError: (error, stackTrace) {
+ _lastUnexpectedError = error;
+ _lastUnexpectedErrorTrace = stackTrace;
+ _resultsController.addError(error, stackTrace);
+ });
+ return completer.future;
}
}
diff --git a/pkg/barback/lib/src/phase_input.dart b/pkg/barback/lib/src/phase_input.dart
index 3506560..d89aeda 100644
--- a/pkg/barback/lib/src/phase_input.dart
+++ b/pkg/barback/lib/src/phase_input.dart
@@ -193,10 +193,6 @@
}).whenComplete(() {
_adjustTransformersFuture = null;
});
-
- // Don't top-level errors coming from the input processing. Any errors will
- // eventually be piped through [process]'s returned Future.
- _adjustTransformersFuture.catchError((_) {});
}
// Remove any old transforms that used to have [asset] as a primary asset but
diff --git a/pkg/browser/pubspec.yaml b/pkg/browser/pubspec.yaml
index 87bc727..e51235f 100644
--- a/pkg/browser/pubspec.yaml
+++ b/pkg/browser/pubspec.yaml
@@ -1,8 +1,8 @@
name: browser
-version: 0.10.0-dev
-authors: ["Dart Team <misc@dartlang.org>"]
+version: 0.10.0
+author: "Dart Team <misc@dartlang.org>"
homepage: http://www.dartlang.org
description: >
The bootstrap dart.js script for Dart apps running in the browser.
environment:
- sdk: ">=1.2.0-dev.6.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/pkg/code_transformers/lib/resolver.dart b/pkg/code_transformers/lib/resolver.dart
index 739dd5a..91ce8c3 100644
--- a/pkg/code_transformers/lib/resolver.dart
+++ b/pkg/code_transformers/lib/resolver.dart
@@ -5,6 +5,6 @@
/// Tools for working with resolved ASTs from Barback transformers.
library code_transformers.resolver;
-export 'src/resolver_transformer.dart';
+export 'src/resolvers.dart';
export 'src/resolver.dart';
export 'src/dart_sdk.dart';
diff --git a/pkg/code_transformers/lib/src/resolver.dart b/pkg/code_transformers/lib/src/resolver.dart
index 80e385f..b944a4e 100644
--- a/pkg/code_transformers/lib/src/resolver.dart
+++ b/pkg/code_transformers/lib/src/resolver.dart
@@ -4,6 +4,8 @@
library code_transformer.src.resolver;
+import 'dart:async';
+
import 'package:analyzer/src/generated/element.dart';
import 'package:barback/barback.dart';
import 'package:source_maps/refactor.dart';
@@ -15,6 +17,16 @@
/// The Dart entry point file where parsing begins.
AssetId get entryPoint;
+ /// Update the status of all the sources referenced by the entryPoint and
+ /// update the resolved library.
+ ///
+ /// [release] must be called when done handling this Resolver to allow it
+ /// to be used by later phases.
+ Future<Resolver> resolve(Transform transform);
+
+ /// Release this resolver so it can be updated by following transforms.
+ void release();
+
/// Gets the resolved Dart library for the entry asset, or null if
/// the AST has not been resolved.
///
diff --git a/pkg/code_transformers/lib/src/resolver_impl.dart b/pkg/code_transformers/lib/src/resolver_impl.dart
index fe9f6d9..9f6ce06 100644
--- a/pkg/code_transformers/lib/src/resolver_impl.dart
+++ b/pkg/code_transformers/lib/src/resolver_impl.dart
@@ -8,10 +8,7 @@
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/element.dart';
import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/java_io.dart';
-import 'package:analyzer/src/generated/parser.dart' show Parser;
-import 'package:analyzer/src/generated/scanner.dart';
import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
import 'package:analyzer/src/generated/source.dart';
@@ -46,6 +43,12 @@
/// The currently resolved library, or null if unresolved.
LibraryElement _entryLibrary;
+ /// Future indicating when this resolver is done in the current phase.
+ Future _lastPhaseComplete = new Future.value();
+
+ /// Completer for wrapping up the current phase.
+ Completer _currentPhaseComplete;
+
/// Handler for all Dart SDK (dart:) sources.
DirectoryBasedDartSdk _dartSdk;
@@ -66,26 +69,43 @@
_dartSdk = new _DirectoryBasedDartSdkProxy(new JavaFile(sdkDir));
_dartSdk.context.analysisOptions = options;
- _context.sourceFactory = new SourceFactory.con2([
+ _context.sourceFactory = new SourceFactory([
new DartUriResolverProxy(_dartSdk),
new _AssetUriResolver(this)]);
}
LibraryElement get entryLibrary => _entryLibrary;
+ Future<Resolver> resolve(Transform transform) {
+ // Can only have one resolve in progress at a time, so chain the current
+ // resolution to be after the last one.
+ var phaseComplete = new Completer();
+ var future = _lastPhaseComplete.then((_) {
+ _currentPhaseComplete = phaseComplete;
- /// Update the status of all the sources referenced by the entryPoint and
- /// update the resolved library.
- ///
- /// This will be invoked automatically by [ResolverTransformer]. Only one
- /// transformer may update this at a time.
- Future updateSources(Transform transform) {
+ return _performResolve(transform);
+ }).then((_) => this);
+ // Advance the lastPhaseComplete to be done when this phase is all done.
+ _lastPhaseComplete = phaseComplete.future;
+ return future;
+ }
+
+ void release() {
+ if (_currentPhaseComplete == null) {
+ throw new StateError('Releasing without current lock.');
+ }
+ _currentPhaseComplete.complete(null);
+ _currentPhaseComplete = null;
+
+ // Clear out the entry lib since it should not be referenced after release.
+ _entryLibrary = null;
+ }
+
+ Future _performResolve(Transform transform) {
if (_currentTransform != null) {
throw new StateError('Cannot be accessed by concurrent transforms');
}
_currentTransform = transform;
- // Clear this out and update once all asset changes have been processed.
- _entryLibrary = null;
// Basic approach is to start at the first file, update it's contents
// and see if it changed, then walk all files accessed by it.
@@ -221,7 +241,7 @@
var sourceFile = _getSourceFile(element);
if (sourceFile == null) return null;
- return new TextEditTransaction(source.contents, sourceFile);
+ return new TextEditTransaction(source.rawContents, sourceFile);
}
/// Gets the SourceFile for the source of the element.
@@ -231,7 +251,7 @@
var importUri = _getSourceUri(element, from: entryPoint);
var spanPath = importUri != null ? importUri.toString() : assetId.path;
- return new SourceFile.text(spanPath, sources[assetId].contents);
+ return new SourceFile.text(spanPath, sources[assetId].rawContents);
}
}
@@ -283,7 +303,11 @@
}
/// Contents of the file.
- String get contents => _contents;
+ TimestampedData<String> get contents =>
+ new TimestampedData<String>(modificationStamp, _contents);
+
+ /// Contents of the file.
+ String get rawContents => _contents;
/// Logger for the current transform.
///
@@ -300,8 +324,8 @@
int get hashCode => assetId.hashCode;
- void getContents(Source_ContentReceiver receiver) {
- receiver.accept(contents, modificationStamp);
+ void getContentsToReceiver(Source_ContentReceiver receiver) {
+ receiver.accept(rawContents, modificationStamp);
}
String get encoding =>
@@ -333,13 +357,13 @@
}
/// For logging errors.
- Span _getSpan(ASTNode node) => _sourceFile.span(node.offset, node.end);
+ Span _getSpan(AstNode node) => _sourceFile.span(node.offset, node.end);
/// For logging errors.
SourceFile get _sourceFile {
var uri = getSourceUri(_resolver.entryPoint);
var path = uri != null ? uri.toString() : assetId.path;
- return new SourceFile.text(path, contents);
+ return new SourceFile.text(path, rawContents);
}
/// Gets a URI which would be appropriate for importing this file.
@@ -364,7 +388,7 @@
final ResolverImpl _resolver;
_AssetUriResolver(this._resolver);
- Source resolveAbsolute(ContentCache contentCache, Uri uri) {
+ Source resolveAbsolute(Uri uri) {
var assetId = _resolve(null, uri.toString(), logger, null);
var source = _resolver.sources[assetId];
/// All resolved assets should be available by this point.
@@ -374,7 +398,7 @@
return source;
}
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) =>
+ Source fromEncoding(UriKind kind, Uri uri) =>
throw new UnsupportedError('fromEncoding is not supported');
Uri restoreAbsolute(Source source) =>
@@ -403,12 +427,12 @@
DartUriResolverProxy(DirectoryBasedDartSdk sdk) :
_proxy = new DartUriResolver(sdk);
- Source resolveAbsolute(ContentCache contentCache, Uri uri) =>
- _DartSourceProxy.wrap(_proxy.resolveAbsolute(contentCache, uri), uri);
+ Source resolveAbsolute(Uri uri) =>
+ _DartSourceProxy.wrap(_proxy.resolveAbsolute(uri), uri);
DartSdk get dartSdk => _proxy.dartSdk;
- Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) =>
+ Source fromEncoding(UriKind kind, Uri uri) =>
throw new UnsupportedError('fromEncoding is not supported');
Uri restoreAbsolute(Source source) =>
@@ -448,10 +472,12 @@
int get hashCode => _proxy.hashCode;
- void getContents(Source_ContentReceiver receiver) {
- _proxy.getContents(receiver);
+ void getContentsToReceiver(Source_ContentReceiver receiver) {
+ _proxy.getContentsToReceiver(receiver);
}
+ TimestampedData<String> get contents => _proxy.contents;
+
String get encoding => _proxy.encoding;
String get fullName => _proxy.fullName;
@@ -471,6 +497,13 @@
if (url == null || url == '') return null;
var uri = Uri.parse(url);
+ // Workaround for dartbug.com/17156- pub transforms package: imports from
+ // files of the transformers package to have absolute /packages/ URIs.
+ if (uri.scheme == '' && path.isAbsolute(url)
+ && uri.pathSegments[0] == 'packages') {
+ uri = Uri.parse('package:${uri.pathSegments.skip(1).join(path.separator)}');
+ }
+
if (uri.scheme == 'package') {
var segments = new List.from(uri.pathSegments);
var package = segments[0];
diff --git a/pkg/code_transformers/lib/src/resolver_transformer.dart b/pkg/code_transformers/lib/src/resolver_transformer.dart
deleted file mode 100644
index ed8325a..0000000
--- a/pkg/code_transformers/lib/src/resolver_transformer.dart
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library code_transformers.src.resolver_transformer;
-
-import 'dart:async';
-import 'package:barback/barback.dart';
-
-import 'resolver.dart';
-import 'resolver_impl.dart';
-
-/// Filter for whether the specified asset is an entry point to the Dart
-/// application.
-typedef EntryPointFilter(Asset input);
-
-/// Transformer which maintains up-to-date resolved ASTs for the specified
-/// code entry points.
-///
-/// This can used by transformers dependent on resolved ASTs which can reference
-/// this transformer to get the resolver needed.
-///
-/// This transformer must be in a phase before any dependent transformers. The
-/// resolve AST is automatically updated any time any dependent assets are
-/// changed.
-///
-/// This will only resolve the AST for code beginning from assets which are
-/// accepted by [entryPointFilter].
-///
-/// If multiple transformers rely on a resolved AST they should (ideally) share
-/// the same ResolverTransformer to avoid re-parsing the AST.
-class ResolverTransformer extends Transformer {
- final Map<AssetId, Resolver> _resolvers = {};
- final EntryPointFilter entryPointFilter;
- final String dartSdkDirectory;
-
- ResolverTransformer(this.dartSdkDirectory, this.entryPointFilter);
-
- Future<bool> isPrimary(Asset input) =>
- new Future.value(entryPointFilter(input));
-
- /// Updates the resolved AST for the primary input of the transform.
- Future apply(Transform transform) {
- var resolver = getResolver(transform.primaryInput.id);
-
- return resolver.updateSources(transform).then((_) {
- transform.addOutput(transform.primaryInput);
- return null;
- });
- }
-
- /// Get a resolver for the AST starting from [id].
- Resolver getResolver(AssetId id) =>
- _resolvers.putIfAbsent(id, () => new ResolverImpl(id, dartSdkDirectory));
-}
diff --git a/pkg/code_transformers/lib/src/resolvers.dart b/pkg/code_transformers/lib/src/resolvers.dart
new file mode 100644
index 0000000..b98e587
--- /dev/null
+++ b/pkg/code_transformers/lib/src/resolvers.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library code_transformers.src.resolvers;
+
+import 'dart:async';
+import 'package:barback/barback.dart' show AssetId, Transformer, Transform;
+
+import 'resolver.dart';
+import 'resolver_impl.dart';
+
+/// Barback-based code resolvers which maintains up-to-date resolved ASTs for
+/// the specified code entry points.
+///
+/// This can used by transformers dependent on resolved ASTs to handle the
+/// resolution of the AST and cache the results between compilations.
+///
+/// If multiple transformers rely on a resolved AST they should (ideally) share
+/// the same Resolvers object to minimize re-parsing the AST.
+class Resolvers {
+ final Map<AssetId, ResolverImpl> _resolvers = {};
+ final String dartSdkDirectory;
+
+ Resolvers(this.dartSdkDirectory);
+
+ /// Get a resolver for the AST starting from [id].
+ ///
+ /// [Resolver.release] must be called once it's done being used, or
+ /// [ResolverTransformer] should be used to automatically release the
+ /// resolver.
+ Future<Resolver> get(Transform transform) {
+ var id = transform.primaryInput.id;
+ var resolver = _resolvers.putIfAbsent(id,
+ () => new ResolverImpl(id, dartSdkDirectory));
+ return resolver.resolve(transform);
+ }
+}
+
+/// Transformer mixin which automatically gets and releases resolvers.
+///
+/// To use mix this class in, set the resolvers field and override
+/// [applyResolver].
+abstract class ResolverTransformer implements Transformer {
+ /// The cache of resolvers- must be set from subclass.
+ Resolvers resolvers;
+
+ Future apply(Transform transform) {
+ return resolvers.get(transform).then((resolver) {
+ return new Future.value(applyResolver(transform, resolver)).then((_) {
+ resolver.release();
+ });
+ });
+ }
+
+ /// Invoked when the resolver is ready to be processed.
+ ///
+ /// Return a Future to indicate when apply is completed.
+ applyResolver(Transform transform, Resolver resolver);
+}
diff --git a/pkg/code_transformers/pubspec.yaml b/pkg/code_transformers/pubspec.yaml
index c70470a..ad730ea 100644
--- a/pkg/code_transformers/pubspec.yaml
+++ b/pkg/code_transformers/pubspec.yaml
@@ -1,10 +1,10 @@
name: code_transformers
-version: 0.0.1-dev
+version: 0.0.1-dev.1
author: "Dart Team <misc@dartlang.org>"
description: Collection of utilities related to creating barback transformers.
homepage: http://www.dartlang.org
dependencies:
- analyzer: ">=0.12.0 <0.13.0"
+ analyzer: "0.13.0-dev.3"
barback: ">=0.11.0 <0.12.0"
path: ">=0.9.0 <2.0.0"
source_maps: ">=0.9.0 <0.10.0"
diff --git a/pkg/code_transformers/test/resolver_test.dart b/pkg/code_transformers/test/resolver_test.dart
index ab88291..73f50f1 100644
--- a/pkg/code_transformers/test/resolver_test.dart
+++ b/pkg/code_transformers/test/resolver_test.dart
@@ -4,6 +4,7 @@
library code_transformers.test.resolver_test;
+import 'dart:async';
import 'dart:io' show File, Platform;
import 'package:barback/barback.dart';
@@ -25,19 +26,24 @@
}
var entryPoint = new AssetId('a', 'web/main.dart');
- var transformer = new ResolverTransformer(sdkDir,
- (asset) => asset.id == entryPoint);
+ var resolvers = new Resolvers(sdkDir);
- var phases = [[transformer]];
+ Future validateResolver({Map<String, String> inputs, void validator(Resolver),
+ List<String> messages: const[]}) {
+ return applyTransformers(
+ [[new TestTransformer(resolvers, entryPoint, validator)]],
+ inputs: inputs,
+ messages: messages);
+ }
group('Resolver', () {
test('should handle empty files', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '',
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
+ },
+ validator: (resolver) {
var source = resolver.sources[entryPoint];
expect(source.modificationStamp, 1);
@@ -48,11 +54,11 @@
});
test('should update when sources change', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': ''' main() {} ''',
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
+ },
+ validator: (resolver) {
var source = resolver.sources[entryPoint];
expect(source.modificationStamp, 2);
@@ -63,7 +69,7 @@
});
test('should follow imports', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
import 'a.dart';
@@ -73,8 +79,8 @@
'a|web/a.dart': '''
library a;
''',
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
+ },
+ validator: (resolver) {
var lib = resolver.entryLibrary;
expect(lib.importedLibraries.length, 2);
var libA = lib.importedLibraries.where((l) => l.name == 'a').single;
@@ -83,7 +89,7 @@
});
test('should update changed imports', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
import 'a.dart';
@@ -94,8 +100,9 @@
library a;
class Foo {}
''',
- }).then((_) {
- var lib = transformer.getResolver(entryPoint).entryLibrary;
+ },
+ validator: (resolver) {
+ var lib = resolver.entryLibrary;
expect(lib.importedLibraries.length, 2);
var libA = lib.importedLibraries.where((l) => l.name == 'a').single;
expect(libA.getType('Foo'), isNotNull);
@@ -103,7 +110,7 @@
});
test('should follow package imports', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
import 'package:b/b.dart';
@@ -113,8 +120,9 @@
'b|lib/b.dart': '''
library b;
''',
- }).then((_) {
- var lib = transformer.getResolver(entryPoint).entryLibrary;
+ },
+ validator: (resolver) {
+ var lib = resolver.entryLibrary;
expect(lib.importedLibraries.length, 2);
var libB = lib.importedLibraries.where((l) => l.name == 'b').single;
expect(libB.getType('Foo'), isNull);
@@ -122,7 +130,7 @@
});
test('should update on changed package imports', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
import 'package:b/b.dart';
@@ -133,8 +141,9 @@
library b;
class Bar {}
''',
- }).then((_) {
- var lib = transformer.getResolver(entryPoint).entryLibrary;
+ },
+ validator: (resolver) {
+ var lib = resolver.entryLibrary;
expect(lib.importedLibraries.length, 2);
var libB = lib.importedLibraries.where((l) => l.name == 'b').single;
expect(libB.getType('Bar'), isNotNull);
@@ -142,7 +151,7 @@
});
test('should handle deleted files', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
import 'package:b/b.dart';
@@ -153,14 +162,15 @@
messages: [
'error: Unable to find asset for "package:b/b.dart"',
'error: Unable to find asset for "package:b/b.dart"',
- ]).then((_) {
- var lib = transformer.getResolver(entryPoint).entryLibrary;
+ ],
+ validator: (resolver) {
+ var lib = resolver.entryLibrary;
expect(lib.importedLibraries.length, 1);
});
});
test('should fail on absolute URIs', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
import '/b.dart';
@@ -174,14 +184,15 @@
// Then two from the resolver.
'error: absolute paths not allowed: "/b.dart"',
'error: absolute paths not allowed: "/b.dart"',
- ]).then((_) {
- var lib = transformer.getResolver(entryPoint).entryLibrary;
+ ],
+ validator: (resolver) {
+ var lib = resolver.entryLibrary;
expect(lib.importedLibraries.length, 1);
});
});
test('should list all libraries', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
library a.main;
@@ -191,8 +202,8 @@
'a|lib/a.dart': 'library a.a;\n import "package:a/c.dart";',
'a|lib/b.dart': 'library a.b;\n import "c.dart";',
'a|lib/c.dart': 'library a.c;'
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
+ },
+ validator: (resolver) {
var libs = resolver.libraries.where((l) => !l.isInSdk);
expect(libs.map((l) => l.name), unorderedEquals([
'a.main',
@@ -204,7 +215,7 @@
});
test('should resolve types and library uris', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
import 'dart:core';
@@ -223,9 +234,8 @@
library a.web.sub_dir.d;
class Baz{}
''',
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
-
+ },
+ validator: (resolver) {
var a = resolver.getLibraryByName('a.a');
expect(a, isNotNull);
expect(resolver.getImportUri(a).toString(),
@@ -264,35 +274,35 @@
});
test('deleted files should be removed', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''import 'package:a/a.dart';''',
'a|lib/a.dart': '''import 'package:a/b.dart';''',
'a|lib/b.dart': '''class Engine{}''',
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
+ },
+ validator: (resolver) {
var engine = resolver.getType('Engine');
var uri = resolver.getImportUri(engine.library);
expect(uri.toString(), 'package:a/b.dart');
}).then((_) {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''import 'package:a/a.dart';''',
'a|lib/a.dart': '''lib a;\n class Engine{}'''
- });
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
- var engine = resolver.getType('Engine');
- var uri = resolver.getImportUri(engine.library);
- expect(uri.toString(), 'package:a/a.dart');
+ },
+ validator: (resolver) {
+ var engine = resolver.getType('Engine');
+ var uri = resolver.getImportUri(engine.library);
+ expect(uri.toString(), 'package:a/a.dart');
- // Make sure that we haven't leaked any sources.
- expect(resolver.sources.length, 2);
+ // Make sure that we haven't leaked any sources.
+ expect(resolver.sources.length, 2);
+ });
});
});
test('handles circular imports', () {
- return applyTransformers(phases,
+ return validateResolver(
inputs: {
'a|web/main.dart': '''
library main;
@@ -303,13 +313,49 @@
'a|lib/b.dart': '''
library b;
import 'package:a/a.dart'; ''',
- }).then((_) {
- var resolver = transformer.getResolver(entryPoint);
-
+ },
+ validator: (resolver) {
var libs = resolver.libraries.map((lib) => lib.name);
expect(libs.contains('a'), isTrue);
expect(libs.contains('b'), isTrue);
});
});
+
+ test('handles parallel resolves', () {
+ return Future.wait([
+ validateResolver(
+ inputs: {
+ 'a|web/main.dart': '''
+ library foo;'''
+ },
+ validator: (resolver) {
+ expect(resolver.entryLibrary.name, 'foo');
+ }),
+ validateResolver(
+ inputs: {
+ 'a|web/main.dart': '''
+ library bar;'''
+ },
+ validator: (resolver) {
+ expect(resolver.entryLibrary.name, 'bar');
+ }),
+ ]);
+ });
});
}
+
+class TestTransformer extends Transformer with ResolverTransformer {
+ final AssetId primary;
+ final Function validator;
+
+ TestTransformer(Resolvers resolvers, this.primary, this.validator) {
+ this.resolvers = resolvers;
+ }
+
+ Future<bool> isPrimary(Asset input) =>
+ new Future.value(input.id == primary);
+
+ applyResolver(Transform transform, Resolver resolver) {
+ return validator(resolver);
+ }
+}
diff --git a/pkg/custom_element/pubspec.yaml b/pkg/custom_element/pubspec.yaml
index 3568402..1f1eb80 100644
--- a/pkg/custom_element/pubspec.yaml
+++ b/pkg/custom_element/pubspec.yaml
@@ -1,11 +1,11 @@
name: custom_element
-version: 0.10.0-dev
+version: 0.10.0
author: "Polymer.dart Team <web-ui-dev@dartlang.org>"
homepage: http://www.dartlang.org/
description: >
*Deprecated* newer version is in web_components package. This is for backwards
- compat with polymer.dart 0.4.x (web_ui package)
+ compatibility with polymer.dart 0.4.x (web_ui package).
dev_dependencies:
- unittest: ">=0.9.0 <0.10.0"
+ unittest: ">=0.10.0 <0.11.0"
environment:
- sdk: ">=1.2.0-dev.4.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index 2ec9f60..cd7c797 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -444,8 +444,10 @@
// Outputs all the qualified names documented with their type.
// This will help generate search results.
- _writeToFile(filteredEntities.map((e) =>
- '${e.qualifiedName} ${e.typeName}').join('\n') + '\n',
+ var sortedEntities = filteredEntities.map((e) =>
+ '${e.qualifiedName} ${e.typeName}').toList()..sort();
+
+ _writeToFile(sortedEntities.join('\n') + '\n',
'index.txt', append: append);
var index = new Map.fromIterables(
filteredEntities.map((e) => e.qualifiedName),
diff --git a/pkg/docgen/test/generate_json_test.dart b/pkg/docgen/test/generate_json_test.dart
index 7b603ee..522758c 100644
--- a/pkg/docgen/test/generate_json_test.dart
+++ b/pkg/docgen/test/generate_json_test.dart
@@ -28,8 +28,6 @@
});
test('json output', () {
- print(d.defaultRoot);
-
schedule(() {
var codeDir = getMultiLibraryCodePath();
expect(FileSystemEntity.isDirectorySync(codeDir), isTrue);
@@ -38,7 +36,7 @@
d.dir('docs', [
d.matcherFile('index.json', _isJsonMap),
- d.matcherFile('index.txt', isNotNull),
+ d.matcherFile('index.txt', _hasSortedLines),
d.matcherFile('library_list.json', _isJsonMap),
d.matcherFile('testLib-bar.C.json', _isJsonMap),
d.matcherFile('testLib-bar.json', _isJsonMap),
@@ -49,9 +47,19 @@
d.matcherFile('testLib2-foo.B.json', _isJsonMap),
d.matcherFile('testLib2-foo.json', _isJsonMap)
]).validate();
+
});
}
+final Matcher _hasSortedLines = predicate((String input) {
+ var lines = new LineSplitter().convert(input);
+
+ var sortedLines = new List.from(lines)..sort();
+
+ var orderedMatcher = orderedEquals(sortedLines);
+ return orderedMatcher.matches(lines, {});
+}, 'String has sorted lines');
+
final Matcher _isJsonMap = predicate((input) {
try {
return JSON.decode(input) is Map;
diff --git a/pkg/intl/lib/extract_messages.dart b/pkg/intl/lib/extract_messages.dart
index 4464cf7..972ab4a8 100644
--- a/pkg/intl/lib/extract_messages.dart
+++ b/pkg/intl/lib/extract_messages.dart
@@ -73,7 +73,7 @@
*/
String _origin;
-String _reportErrorLocation(ASTNode node) {
+String _reportErrorLocation(AstNode node) {
var result = new StringBuffer();
if (_origin != null) result.write(" from $_origin");
var info = _root.lineInfo;
@@ -90,7 +90,7 @@
* IntlMessage objects. We have to find both the enclosing function, and
* the Intl.message invocation.
*/
-class MessageFindingVisitor extends GeneralizingASTVisitor {
+class MessageFindingVisitor extends GeneralizingAstVisitor {
MessageFindingVisitor();
@@ -293,12 +293,12 @@
* simple variable substitutions or else Intl.plural/gender calls,
* and keep track of the pieces of text so that other parts
* of the program can deal with the simple string sections and the generated
- * parts separately. Note that this is a SimpleASTVisitor, so it only
+ * parts separately. Note that this is a SimpleAstVisitor, so it only
* traverses one level of children rather than automatically recursing. If we
* find a plural or gender, which requires recursion, we do it with a separate
* special-purpose visitor.
*/
-class InterpolationVisitor extends SimpleASTVisitor {
+class InterpolationVisitor extends SimpleAstVisitor {
final Message message;
InterpolationVisitor(this.message);
@@ -360,10 +360,10 @@
/**
* A visitor to extract information from Intl.plural/gender sends. Note that
- * this is a SimpleASTVisitor, so it doesn't automatically recurse. So this
+ * this is a SimpleAstVisitor, so it doesn't automatically recurse. So this
* needs to be called where we expect a plural or gender immediately below.
*/
-class PluralAndGenderVisitor extends SimpleASTVisitor {
+class PluralAndGenderVisitor extends SimpleAstVisitor {
/**
* A plural or gender always exists in the context of a parent message,
* which could in turn also be a plural or gender.
diff --git a/pkg/intl/lib/generate_localized.dart b/pkg/intl/lib/generate_localized.dart
index b5ccd28..457f7c7 100644
--- a/pkg/intl/lib/generate_localized.dart
+++ b/pkg/intl/lib/generate_localized.dart
@@ -68,11 +68,20 @@
*/
final String id;
- /** Our translated version of [originalMessage]. */
+ /** Our translated version of all the [originalMessages]. */
final Message translated;
- /** The original message that we are a translation of. */
- MainMessage originalMessage;
+ /**
+ * The original messages that we are a translation of. There can
+ * be more than one original message for the same translation.
+ */
+ List<MainMessage> originalMessages;
+
+ /**
+ * For backward compatibility, we still have the originalMessage API.
+ */
+ MainMessage get originalMessage => originalMessages.first;
+ set originalMessage(MainMessage m) => originalMessages = [m];
TranslatedMessage(this.id, this.translated);
@@ -99,21 +108,26 @@
// Exclude messages with no translation and translations with no matching
// original message (e.g. if we're using some messages from a larger catalog)
var usableTranslations = translations.where(
- (each) => each.originalMessage != null && each.message != null).toList();
+ (each) => each.originalMessages != null && each.message != null).toList();
for (var each in usableTranslations) {
- each.originalMessage.addTranslation(locale, each.message);
+ for (var original in each.originalMessages) {
+ original.addTranslation(locale, each.message);
+ }
}
usableTranslations.sort((a, b) =>
- a.originalMessage.name.compareTo(b.originalMessage.name));
+ a.originalMessages.first.name.compareTo(b.originalMessages.first.name));
for (var translation in usableTranslations) {
- result
- ..write(" ")
- ..write(translation.originalMessage.toCodeForLocale(locale))
- ..write("\n\n");
+ for (var original in translation.originalMessages) {
+ result
+ ..write(" ")
+ ..write(original.toCodeForLocale(locale))
+ ..write("\n\n");
+ }
}
result.write("\n final messages = const {\n");
var entries = usableTranslations
- .map((translation) => translation.originalMessage.name)
+ .expand((translation) => translation.originalMessages)
+ .map((original) => original.name)
.map((name) => " \"$name\" : $name");
result
..write(entries.join(",\n"))
diff --git a/pkg/intl/pubspec.yaml b/pkg/intl/pubspec.yaml
index 448be7f..1bc9b0f 100644
--- a/pkg/intl/pubspec.yaml
+++ b/pkg/intl/pubspec.yaml
@@ -5,7 +5,7 @@
homepage: http://www.dartlang.org
documentation: http://api.dartlang.org/docs/pkg/intl
dependencies:
- analyzer: ">=0.11.5 <0.12.0"
+ analyzer: "0.13.0-dev.3"
path: ">=0.9.0 <2.0.0"
dev_dependencies:
serialization: ">=0.9.0 <0.10.0"
diff --git a/pkg/intl/test/message_extraction/foo_messages_all.dart b/pkg/intl/test/message_extraction/foo_messages_all.dart
index 98e47e8..4cd228e 100644
--- a/pkg/intl/test/message_extraction/foo_messages_all.dart
+++ b/pkg/intl/test/message_extraction/foo_messages_all.dart
@@ -11,14 +11,14 @@
import 'package:intl/src/intl_helpers.dart';
import 'package:intl/intl.dart';
-import 'foo_messages_fr.dart' as messages_fr;
import 'foo_messages_de_DE.dart' as messages_de_DE;
+import 'foo_messages_fr.dart' as messages_fr;
MessageLookupByLibrary _findExact(localeName) {
switch (localeName) {
- case 'fr' : return messages_fr.messages;
case 'de_DE' : return messages_de_DE.messages;
+ case 'fr' : return messages_fr.messages;
default: return null;
}
}
diff --git a/pkg/intl/test/message_extraction/foo_messages_de_DE.dart b/pkg/intl/test/message_extraction/foo_messages_de_DE.dart
index 20b7a68..f4c55ed 100644
--- a/pkg/intl/test/message_extraction/foo_messages_de_DE.dart
+++ b/pkg/intl/test/message_extraction/foo_messages_de_DE.dart
@@ -16,6 +16,8 @@
get localeName => 'de_DE';
static alwaysTranslated() => "Diese Zeichenkette wird immer übersetzt";
+ static differentNameSameContents() => "Hallo Welt";
+
static escapable() => "Escapes: \n\r\f\b\t\v.";
static leadingQuotes() => "\"Sogenannt\"";
@@ -50,6 +52,8 @@
static plurals(num) => "${Intl.plural(num, zero: 'Ist Null Plural?', one: 'Dies ist einmalig', other: 'Dies ist Plural ($num).')}";
+ static sameContentsDifferentName() => "Hallo Welt";
+
static rentAsVerb() => "mieten";
static rentToBePaid() => "Miete";
@@ -65,6 +69,7 @@
final messages = const {
"alwaysTranslated" : alwaysTranslated,
+ "differentNameSameContents" : differentNameSameContents,
"escapable" : escapable,
"leadingQuotes" : leadingQuotes,
"message1" : message1,
@@ -82,6 +87,7 @@
"outerSelect" : outerSelect,
"pluralThatFailsParsing" : pluralThatFailsParsing,
"plurals" : plurals,
+ "sameContentsDifferentName" : sameContentsDifferentName,
"rentAsVerb" : rentAsVerb,
"rentToBePaid" : rentToBePaid,
"staticMessage" : staticMessage,
diff --git a/pkg/intl/test/message_extraction/foo_messages_fr.dart b/pkg/intl/test/message_extraction/foo_messages_fr.dart
index fdc1937..7be3c2a 100644
--- a/pkg/intl/test/message_extraction/foo_messages_fr.dart
+++ b/pkg/intl/test/message_extraction/foo_messages_fr.dart
@@ -16,6 +16,8 @@
get localeName => 'fr';
static alwaysTranslated() => "Cette chaîne est toujours traduit";
+ static differentNameSameContents() => "Bonjour tout le monde";
+
static escapable() => "Escapes: \n\r\f\b\t\v.";
static leadingQuotes() => "\"Soi-disant\"";
@@ -52,6 +54,8 @@
static plurals(num) => "${Intl.plural(num, zero: 'Est-ce que nulle est pluriel?', one: 'C\'est singulier', other: 'C\'est pluriel ($num).')}";
+ static sameContentsDifferentName() => "Bonjour tout le monde";
+
static rentAsVerb() => "louer";
static rentToBePaid() => "loyer";
@@ -67,6 +71,7 @@
final messages = const {
"alwaysTranslated" : alwaysTranslated,
+ "differentNameSameContents" : differentNameSameContents,
"escapable" : escapable,
"leadingQuotes" : leadingQuotes,
"message1" : message1,
@@ -85,6 +90,7 @@
"outerSelect" : outerSelect,
"pluralThatFailsParsing" : pluralThatFailsParsing,
"plurals" : plurals,
+ "sameContentsDifferentName" : sameContentsDifferentName,
"rentAsVerb" : rentAsVerb,
"rentToBePaid" : rentToBePaid,
"staticMessage" : staticMessage,
diff --git a/pkg/intl/test/message_extraction/generate_from_json.dart b/pkg/intl/test/message_extraction/generate_from_json.dart
index 320326c..c3ed803 100644
--- a/pkg/intl/test/message_extraction/generate_from_json.dart
+++ b/pkg/intl/test/message_extraction/generate_from_json.dart
@@ -28,7 +28,7 @@
* Keeps track of all the messages we have processed so far, keyed by message
* name.
*/
-Map<String, MainMessage> messages;
+Map<String, List<MainMessage>> messages;
main(List<String> args) {
var targetDir;
@@ -56,7 +56,8 @@
messages = new Map();
for (var eachMap in allMessages) {
- eachMap.forEach((key, value) => messages[key] = value);
+ eachMap.forEach((key, value) =>
+ messages.putIfAbsent(key, () => []).add(value));
}
for (var arg in jsonFiles) {
var file = new File(arg);
@@ -106,16 +107,16 @@
/**
* A TranslatedMessage that just uses the name as the id and knows how to look
- * up its original message in our [messages].
+ * up its original messages in our [messages].
*/
class BasicTranslatedMessage extends TranslatedMessage {
BasicTranslatedMessage(String name, translated) :
super(name, translated);
- MainMessage get originalMessage =>
- (super.originalMessage == null) ? _findOriginal() : super.originalMessage;
+ List<MainMessage> get originalMessages => (super.originalMessages == null) ?
+ _findOriginals() : super.originalMessages;
// We know that our [id] is the name of the message, which is used as the
//key in [messages].
- MainMessage _findOriginal() => originalMessage = messages[id];
+ List<MainMessage> _findOriginals() => originalMessages = messages[id];
}
diff --git a/pkg/intl/test/message_extraction/make_hardcoded_translation.dart b/pkg/intl/test/message_extraction/make_hardcoded_translation.dart
index d1b271d..f145075 100644
--- a/pkg/intl/test/message_extraction/make_hardcoded_translation.dart
+++ b/pkg/intl/test/message_extraction/make_hardcoded_translation.dart
@@ -53,6 +53,8 @@
"thisNameIsNotInTheOriginal" : "Could this lead to something malicious?",
"originalNotInBMP" : "Anciens caractères grecs jeux du pendu: 𐅆𐅇.",
"escapable" : "Escapes: \n\r\f\b\t\v.",
+ "sameContentsDifferentName" : "Bonjour tout le monde",
+ "differentNameSameContents" : "Bonjour tout le monde",
"rentToBePaid" : "loyer",
"rentAsVerb" : "louer",
"plurals" : writer.write(new Plural.from("num",
@@ -145,6 +147,8 @@
"staticMessage" : "Dies ergibt sich aus einer statischen Methode",
"originalNotInBMP" : "Antike griechische Galgenmännchen Zeichen: 𐅆𐅇",
"escapable" : "Escapes: \n\r\f\b\t\v.",
+ "sameContentsDifferentName" : "Hallo Welt",
+ "differentNameSameContents" : "Hallo Welt",
"rentToBePaid" : "Miete",
"rentAsVerb" : "mieten",
"plurals" : writer.write(new Plural.from("num",
diff --git a/pkg/intl/test/message_extraction/sample_with_messages.dart b/pkg/intl/test/message_extraction/sample_with_messages.dart
index d47c639..2dbdf77 100644
--- a/pkg/intl/test/message_extraction/sample_with_messages.dart
+++ b/pkg/intl/test/message_extraction/sample_with_messages.dart
@@ -110,6 +110,14 @@
name: 'nestedOuter',
args: [number, gen]);
+sameContentsDifferentName() => Intl.message("Hello World",
+ name: "sameContentsDifferentName",
+ desc: "One of two messages with the same contents, but different names");
+
+differentNameSameContents() => Intl.message("Hello World",
+ name: "differentNameSameContents",
+ desc: "One of two messages with the same contents, but different names");
+
/// Distinguish two messages with identical text using the meaning parameter.
rentToBePaid() => Intl.message("rent", name: "rentToBePaid",
meaning: 'Money for rent', desc: "Money to be paid for rent");
@@ -200,6 +208,8 @@
printOut(nestedSelect("CDN", 2));
printOut(pluralThatFailsParsing(1));
printOut(pluralThatFailsParsing(2));
+ printOut(differentNameSameContents());
+ printOut(sameContentsDifferentName());
printOut(rentAsVerb());
printOut(rentToBePaid());
});
diff --git a/pkg/intl/test/message_extraction/verify_messages.dart b/pkg/intl/test/message_extraction/verify_messages.dart
index b5af54f..1458284 100644
--- a/pkg/intl/test/message_extraction/verify_messages.dart
+++ b/pkg/intl/test/message_extraction/verify_messages.dart
@@ -66,6 +66,8 @@
verify('2 Canadian dollars');
verify('1 thing:');
verify('2 things:');
+ verify('Hello World');
+ verify('Hello World');
verify('rent');
verify('rent');
@@ -130,10 +132,11 @@
verify('2 dollars Canadiens');
verify('1 chose:');
verify('2 choses:');
+ verify('Bonjour tout le monde');
+ verify('Bonjour tout le monde');
verify('louer');
verify('loyer');
-
var de_lines = fr_lines.skip(1).skipWhile(
(line) => !line.contains('----')).toList();
lineIterator = de_lines.iterator..moveNext();
@@ -195,6 +198,8 @@
verify('2 Kanadischen dollar');
verify('eins:');
verify('2 Dinge:');
+ verify('Hallo Welt');
+ verify('Hallo Welt');
verify('mieten');
verify('Miete');
}
diff --git a/pkg/mutation_observer/pubspec.yaml b/pkg/mutation_observer/pubspec.yaml
index 631de39..fb49473 100644
--- a/pkg/mutation_observer/pubspec.yaml
+++ b/pkg/mutation_observer/pubspec.yaml
@@ -1,11 +1,11 @@
name: mutation_observer
-version: 0.9.0
+version: 0.9.0+1
author: "Polymer.dart Team <web-ui-dev@dartlang.org>"
homepage: https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/pkg/mutation_observer/
documentation: https://api.dartlang.org/docs/releases/latest/dart_html/MutationObserver.html
description: >
- Mutation Observers provide a way to react to changes in the DOM.
+ *Deprecated* newer version is in web_components package.
dev_dependencies:
- unittest: ">=0.9.0 <0.10.0"
+ unittest: ">=0.9.0 <0.11.0"
environment:
sdk: ">=1.0.0 <2.0.0"
diff --git a/pkg/observe/lib/transformer.dart b/pkg/observe/lib/transformer.dart
index 18173bc..2c5a17e 100644
--- a/pkg/observe/lib/transformer.dart
+++ b/pkg/observe/lib/transformer.dart
@@ -123,7 +123,7 @@
onError(error) => errors.add(error);
}
-_getSpan(SourceFile file, ASTNode node) => file.span(node.offset, node.end);
+_getSpan(SourceFile file, AstNode node) => file.span(node.offset, node.end);
/// True if the node has the `@observable` or `@published` annotation.
// TODO(jmesserly): it is not good to be hard coding Polymer support here.
@@ -282,7 +282,7 @@
bool _hasKeyword(Token token, Keyword keyword) =>
token is KeywordToken && token.keyword == keyword;
-String _getOriginalCode(TextEditTransaction code, ASTNode node) =>
+String _getOriginalCode(TextEditTransaction code, AstNode node) =>
code.original.substring(node.offset, node.end);
void _fixConstructor(ConstructorDeclaration ctor, TextEditTransaction code,
diff --git a/pkg/observe/pubspec.yaml b/pkg/observe/pubspec.yaml
index b50f4bc8..646027e 100644
--- a/pkg/observe/pubspec.yaml
+++ b/pkg/observe/pubspec.yaml
@@ -1,21 +1,21 @@
name: observe
-version: 0.10.0-dev
+version: 0.10.0-pre.0
author: Polymer.dart Authors <web-ui-dev@dartlang.org>
description: >
- Observable properties and objects for use in Model-Driven-Views (MDV).
- MDV extends HTML and the DOM APIs to support a sensible separation between the
- UI (DOM) of a document or application and its underlying data (model).
- Updates to the model are reflected in the DOM and user input into the DOM is
- immediately assigned to the model.
+ Observable properties and objects for use in template_binding.
+ Template Binding extends HTML and the DOM APIs to support a sensible
+ separation between the UI (DOM) of a document or application and its
+ underlying data (model). Updates to the model are reflected in the DOM and
+ user input into the DOM is immediately assigned to the model.
homepage: https://www.dartlang.org/polymer-dart/
dependencies:
- analyzer: ">=0.10.1 <0.11.0"
+ analyzer: "0.13.0-dev.3"
barback: ">=0.9.0 <0.13.0"
logging: ">=0.9.0 <0.10.0"
path: ">=0.9.0 <2.0.0"
- smoke: ">=0.1.0-dev <0.2.0"
+ smoke: ">=0.1.0-pre.0 <0.2.0"
source_maps: ">=0.9.0 <0.10.0"
dev_dependencies:
- unittest: ">=0.9.0 <0.10.0"
+ unittest: ">=0.10.0 <0.11.0"
environment:
- sdk: ">=1.0.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/pkg/pkgbuild.status b/pkg/pkgbuild.status
index 617f9f0..c73abe9 100644
--- a/pkg/pkgbuild.status
+++ b/pkg/pkgbuild.status
@@ -12,11 +12,12 @@
[ $use_repository_packages ]
pkg/analyzer: PubGetError
pkg/args: PubGetError
+pkg/browser: PubGetError
[ $use_public_packages ]
pkg/template_binding: Pass, PubGetError # Issue 16026
-pkg/polymer: PubGetError # Issue 16026
-pkg/polymer_expressions: PubGetError # Issue 16026
+pkg/polymer: Pass, PubGetError # Issue 16026
+pkg/polymer_expressions: Pass, PubGetError # Issue 16026
pkg/observe: Pass, PubGetError # Issue 16026
[ $builder_tag == russian ]
diff --git a/pkg/polymer/lib/src/build/import_inliner.dart b/pkg/polymer/lib/src/build/import_inliner.dart
index 8b019de..f7bf7ea 100644
--- a/pkg/polymer/lib/src/build/import_inliner.dart
+++ b/pkg/polymer/lib/src/build/import_inliner.dart
@@ -388,4 +388,4 @@
// video
];
-_getSpan(SourceFile file, ASTNode node) => file.span(node.offset, node.end);
+_getSpan(SourceFile file, AstNode node) => file.span(node.offset, node.end);
diff --git a/pkg/polymer/lib/src/build/script_compactor.dart b/pkg/polymer/lib/src/build/script_compactor.dart
index ac03e83..9f26e22 100644
--- a/pkg/polymer/lib/src/build/script_compactor.dart
+++ b/pkg/polymer/lib/src/build/script_compactor.dart
@@ -250,7 +250,7 @@
"() => Polymer.register('$tagName', $prefix.$typeName)";
}
-_getSpan(SourceFile file, ASTNode node) => file.span(node.offset, node.end);
+_getSpan(SourceFile file, AstNode node) => file.span(node.offset, node.end);
const MAIN_HEADER = """
library app_bootstrap;
diff --git a/pkg/polymer/pubspec.yaml b/pkg/polymer/pubspec.yaml
index a57e7a6..a18b691 100644
--- a/pkg/polymer/pubspec.yaml
+++ b/pkg/polymer/pubspec.yaml
@@ -1,5 +1,5 @@
name: polymer
-version: 0.10.0-dev
+version: 0.10.0-pre.0
author: Polymer.dart Authors <web-ui-dev@dartlang.org>
description: >
Polymer.dart is a new type of library for the web, built on top of Web
@@ -7,19 +7,19 @@
browsers.
homepage: https://www.dartlang.org/polymer-dart/
dependencies:
- analyzer: ">=0.12.0 <0.13.0"
- args: ">=0.9.0 <0.11.0"
+ analyzer: "0.13.0-dev.3"
+ args: ">=0.10.0 <0.11.0"
barback: ">=0.9.0 <0.13.0"
- browser: ">=0.9.0 <0.10.0"
- html5lib: ">=0.9.2-dev <0.10.0"
+ browser: ">=0.10.0 <0.11.0"
+ html5lib: ">=0.9.2 <0.10.0"
logging: ">=0.9.0 <0.10.0"
- observe: ">=0.10.0-dev <0.11.0"
+ observe: ">=0.10.0-pre.0 <0.11.0"
path: ">=0.9.0 <2.0.0"
- polymer_expressions: ">=0.10.0-dev <0.11.0"
- smoke: ">=0.1.0-dev <0.2.0"
+ polymer_expressions: ">=0.10.0-pre.0 <0.11.0"
+ smoke: ">=0.1.0-pre.0 <0.2.0"
source_maps: ">=0.9.0 <0.10.0"
- template_binding: ">=0.10.0-dev <0.11.0"
- web_components: ">=0.3.0 <0.4.0"
+ template_binding: ">=0.10.0-pre.0 <0.11.0"
+ web_components: ">=0.3.1 <0.4.0"
yaml: ">=0.9.0 <0.10.0"
transformers:
- observe:
@@ -27,4 +27,4 @@
dev_dependencies:
unittest: ">=0.10.0 <0.11.0"
environment:
- sdk: ">=1.1.0-dev.5.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/pkg/polymer_expressions/pubspec.yaml b/pkg/polymer_expressions/pubspec.yaml
index d996a3b..83ab912 100644
--- a/pkg/polymer_expressions/pubspec.yaml
+++ b/pkg/polymer_expressions/pubspec.yaml
@@ -1,14 +1,14 @@
name: polymer_expressions
-version: 0.10.0-dev
-author: Web UI Authors <html-dev@dartlang.org>
-description: An expressive custom binding syntax for MDV templates
+version: 0.10.0-pre.0
+author: Polymer.dart Authors <web-ui-dev@dartlang.org>
+description: An expressive custom binding syntax for HTML templates
homepage: http://www.dartlang.org/polymer-dart/
dependencies:
- browser: ">=0.9.0 <0.10.0"
- observe: ">=0.9.0 <0.10.0"
- template_binding: ">=0.10.0-dev <0.11.0"
+ browser: ">=0.10.0 <0.11.0"
+ observe: ">=0.10.0-pre.0 <0.11.0"
+ template_binding: ">=0.10.0-pre.0 <0.11.0"
dev_dependencies:
- unittest: ">=0.9.0 <0.10.0"
+ unittest: ">=0.10.0 <0.11.0"
benchmark_harness: ">=1.0.0 <2.0.0"
environment:
- sdk: ">=1.0.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/pkg/smoke/pubspec.yaml b/pkg/smoke/pubspec.yaml
index 194a3aa..4332d339 100644
--- a/pkg/smoke/pubspec.yaml
+++ b/pkg/smoke/pubspec.yaml
@@ -1,6 +1,7 @@
name: smoke
-version: 0.1.0-dev
+version: 0.1.0-pre.0
author: Polymer.dart Authors <web-ui-dev@dartlang.org>
+homepage: "https://api.dartlang.org/apidocs/channels/be/#smoke"
description: >
A restricted reflective system that uses mirrors at development time, but that
can be replaced with non-reflective calls using code generation. See README.md
@@ -13,6 +14,6 @@
# application package.
#transformers: [smoke/src/default_transformer]
dev_dependencies:
- unittest: ">=0.9.0 <0.10.0"
+ unittest: ">=0.10.0 <0.11.0"
environment:
- sdk: ">=1.1.0-dev.5.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/pkg/template_binding/pubspec.yaml b/pkg/template_binding/pubspec.yaml
index b4a1685..2bd4c1d 100644
--- a/pkg/template_binding/pubspec.yaml
+++ b/pkg/template_binding/pubspec.yaml
@@ -1,5 +1,5 @@
name: template_binding
-version: 0.10.0-dev
+version: 0.10.0-pre.0
author: Polymer.dart Team <web-ui-dev@dartlang.org>
description: >
Extends the capabilities of the HTML Template Element by enabling it to
@@ -7,10 +7,9 @@
homepage: https://www.dartlang.org/polymer-dart/
dependencies:
logging: ">=0.9.0 <0.10.0"
- mutation_observer: ">=0.9.0 <0.10.0"
- observe: ">=0.10.0-dev <0.11.0"
+ observe: ">=0.10.0-pre.0 <0.11.0"
dev_dependencies:
- custom_element: ">=0.9.1 <0.10.0"
- unittest: ">=0.9.0 <0.10.0"
+ web_components: ">=0.3.1 <0.4.0"
+ unittest: ">=0.10.0 <0.11.0"
environment:
- sdk: ">=1.0.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/pkg/third_party/html5lib/pubspec.yaml b/pkg/third_party/html5lib/pubspec.yaml
index 1ce6624..79f76ba 100644
--- a/pkg/third_party/html5lib/pubspec.yaml
+++ b/pkg/third_party/html5lib/pubspec.yaml
@@ -1,14 +1,13 @@
name: html5lib
-version: 0.9.2-dev
+version: 0.9.2
author: Dart Team <misc@dartlang.org>
description: A library for working with HTML documents.
homepage: http://pub.dartlang.org/packages/html5lib
environment:
- sdk: '>=1.0.0 <2.0.0'
+ sdk: '>=1.2.0 <2.0.0'
dependencies:
source_maps: '>=0.9.0 <0.10.0'
utf: '>=0.9.0 <0.10.0'
dev_dependencies:
- browser: '>=0.9.0 <0.10.0'
path: '>=0.9.0 <2.0.0'
- unittest: '>=0.9.0 <0.11.0'
+ unittest: '>=0.10.0 <0.11.0'
diff --git a/pkg/unittest/CHANGELOG.md b/pkg/unittest/CHANGELOG.md
index be796e4..d6c4619 100644
--- a/pkg/unittest/CHANGELOG.md
+++ b/pkg/unittest/CHANGELOG.md
@@ -1,6 +1,10 @@
# Changelog - unittest
-##0.10.0-dev
+##0.10.1-dev
+
+* `equals` now allows a nested matcher as an expected list element or map value when doing deep matching.
+
+##0.10.0
* Each test is run in a separate `Zone`. This ensures that any exceptions that
occur is async operations are reported back to the source test case.
diff --git a/pkg/unittest/lib/compact_vm_config.dart b/pkg/unittest/lib/compact_vm_config.dart
index c531d80..8c6ba12 100644
--- a/pkg/unittest/lib/compact_vm_config.dart
+++ b/pkg/unittest/lib/compact_vm_config.dart
@@ -56,13 +56,13 @@
} else {
_fail++;
_progressLine(_start, _pass, _fail, test.description);
- print('');
+ _print();
if (test.message != '') {
- print(indent(test.message));
+ _print(indent(test.message));
}
if (test.stackTrace != null) {
- print(indent(test.stackTrace.toString()));
+ _print(indent(test.stackTrace.toString()));
}
}
}
@@ -71,13 +71,13 @@
_pass--;
_fail++;
_progressLine(_start, _pass, _fail, test.description);
- print('');
+ _print();
if (test.message != '') {
- print(indent(test.message));
+ _print(indent(test.message));
}
if (test.stackTrace != null) {
- print(indent(test.stackTrace.toString()));
+ _print(indent(test.stackTrace.toString()));
}
}
@@ -94,18 +94,18 @@
String uncaughtError) {
var success = false;
if (passed == 0 && failed == 0 && errors == 0 && uncaughtError == null) {
- print('\nNo tests ran.');
+ _print('\nNo tests ran.');
} else if (failed == 0 && errors == 0 && uncaughtError == null) {
_progressLine(_start, _pass, _fail, 'All tests passed!', _NONE);
- print('');
+ _print();
success = true;
} else {
_progressLine(_start, _pass, _fail, 'Some tests failed.', _RED);
- print('');
+ _print();
if (uncaughtError != null) {
- print('Top-level uncaught error: $uncaughtError');
+ _print('Top-level uncaught error: $uncaughtError');
}
- print('$passed PASSED, $failed FAILED, $errors ERRORS');
+ _print('$passed PASSED, $failed FAILED, $errors ERRORS');
}
}
@@ -201,6 +201,9 @@
}
}
+// TODO(sigmund): delete when dartbug.com/17269 is fixed (use `print` instead).
+_print([value = '']) => stdout.write('$value\n');
+
void useCompactVMConfiguration() {
// If the test is running on the Dart buildbots, we don't want to use this
// config since it's output may not be what the bots expect.
diff --git a/pkg/unittest/lib/src/core_matchers.dart b/pkg/unittest/lib/src/core_matchers.dart
index 86f51f3..e55738d 100644
--- a/pkg/unittest/lib/src/core_matchers.dart
+++ b/pkg/unittest/lib/src/core_matchers.dart
@@ -67,7 +67,7 @@
/**
* Returns a matches that matches if the value is the same instance
- * as [object] (`===`).
+ * as [expected], using [identical].
*/
Matcher same(expected) => new _IsSameAs(expected);
@@ -81,9 +81,15 @@
}
/**
- * Returns a matcher that does a deep recursive match. This only works
- * with scalars, Maps and Iterables. To handle cyclic structures a
- * recursion depth [limit] can be provided. The default limit is 100.
+ * Returns a matcher that matches if the value is structurally equal to
+ * [expected].
+ *
+ * If [expected] is a [Matcher], then it matches using that. Otherwise it tests
+ * for equality using `==` on the expected value.
+ *
+ * For [Iterable]s and [Map]s, this will recursively match the elements. To
+ * handle cyclic structures a recursion depth [limit] can be provided. The
+ * default limit is 100.
*/
Matcher equals(expected, [limit=100]) =>
expected is String
@@ -99,106 +105,99 @@
// Returns a pair (reason, location)
List _compareIterables(expected, actual, matcher, depth, location) {
- if (actual is! Iterable) {
- return ['is not Iterable', location];
- }
+ if (actual is! Iterable) return ['is not Iterable', location];
+
var expectedIterator = expected.iterator;
var actualIterator = actual.iterator;
- var index = 0;
- while (true) {
+ for (var index = 0;; index++) {
+ // Advance in lockstep.
+ var expectedNext = expectedIterator.moveNext();
+ var actualNext = actualIterator.moveNext();
+
+ // If we reached the end of both, we succeeded.
+ if (!expectedNext && !actualNext) return null;
+
+ // Fail if their lengths are different.
var newLocation = '${location}[${index}]';
- if (expectedIterator.moveNext()) {
- if (actualIterator.moveNext()) {
- var rp = matcher(expectedIterator.current,
- actualIterator.current, newLocation,
- depth);
- if (rp != null) return rp;
- ++index;
- } else {
- return ['shorter than expected', newLocation];
- }
- } else if (actualIterator.moveNext()) {
- return ['longer than expected', newLocation];
- } else {
- return null;
- }
+ if (!expectedNext) return ['longer than expected', newLocation];
+ if (!actualNext) return ['shorter than expected', newLocation];
+
+ // Match the elements.
+ var rp = matcher(expectedIterator.current, actualIterator.current,
+ newLocation, depth);
+ if (rp != null) return rp;
}
- return null;
}
List _recursiveMatch(expected, actual, String location, int depth) {
- String reason = null;
- // If _limit is 1 we can only recurse one level into object.
- bool canRecurse = depth == 0 || _limit > 1;
- bool equal;
- try {
- equal = (expected == actual);
- } catch (e, s) {
- // TODO(gram): Add a test for this case.
- reason = '== threw "$e"';
- return [reason, location];
- }
- if (equal) {
- // Do nothing.
- } else if (depth > _limit) {
- reason = 'recursion depth limit exceeded';
+ // If the expected value is a matcher, try to match it.
+ if (expected is Matcher) {
+ var matchState = {};
+ if (expected.matches(actual, matchState)) return null;
+
+ var description = new StringDescription();
+ expected.describe(description);
+ return ['does not match $description', location];
} else {
- if (expected is Iterable && canRecurse) {
- List result = _compareIterables(expected, actual,
- _recursiveMatch, depth + 1, location);
- if (result != null) {
- reason = result[0];
- location = result[1];
- }
- } else if (expected is Map && canRecurse) {
- if (actual is! Map) {
- reason = 'expected a map';
- } else {
- var err = (expected.length == actual.length) ? '' :
- 'has different length and ';
- for (var key in expected.keys) {
- if (!actual.containsKey(key)) {
- reason = '${err}is missing map key \'$key\'';
- break;
- }
- }
- if (reason == null) {
- for (var key in actual.keys) {
- if (!expected.containsKey(key)) {
- reason = '${err}has extra map key \'$key\'';
- break;
- }
- }
- if (reason == null) {
- for (var key in expected.keys) {
- var rp = _recursiveMatch(expected[key], actual[key],
- "${location}['${key}']", depth + 1);
- if (rp != null) {
- reason = rp[0];
- location = rp[1];
- break;
- }
- }
- }
- }
- }
- } else {
- var description = new StringDescription();
- // If we have recursed, show the expected value too; if not,
- // expect() will show it for us.
- if (depth > 0) {
- description.add('was ').
- addDescriptionOf(actual).
- add(' instead of ').
- addDescriptionOf(expected);
- reason = description.toString();
- } else {
- reason = ''; // We're not adding any value to the actual value.
- }
+ // Otherwise, test for equality.
+ try {
+ if (expected == actual) return null;
+ } catch (e, s) {
+ // TODO(gram): Add a test for this case.
+ return ['== threw "$e"', location];
}
}
- if (reason == null) return null;
- return [reason, location];
+
+ if (depth > _limit) return ['recursion depth limit exceeded', location];
+
+ // If _limit is 1 we can only recurse one level into object.
+ bool canRecurse = depth == 0 || _limit > 1;
+
+ if (expected is Iterable && canRecurse) {
+ return _compareIterables(expected, actual, _recursiveMatch, depth + 1,
+ location);
+ }
+
+ if (expected is Map && canRecurse) {
+ if (actual is! Map) return ['expected a map', location];
+
+ var err = (expected.length == actual.length) ? '' :
+ 'has different length and ';
+ for (var key in expected.keys) {
+ if (!actual.containsKey(key)) {
+ return ["${err}is missing map key '$key'", location];
+ }
+ }
+
+ for (var key in actual.keys) {
+ if (!expected.containsKey(key)) {
+ return ["${err}has extra map key '$key'", location];
+ }
+ }
+
+ for (var key in expected.keys) {
+ var rp = _recursiveMatch(expected[key], actual[key],
+ "${location}['${key}']", depth + 1);
+ if (rp != null) return rp;
+ }
+
+ return null;
+ }
+
+ var description = new StringDescription();
+
+ // If we have recursed, show the expected value too; if not, expect() will
+ // show it for us.
+ if (depth > 0) {
+ description.add('was ').
+ addDescriptionOf(actual).
+ add(' instead of ').
+ addDescriptionOf(expected);
+ return [description.toString(), location];
+ }
+
+ // We're not adding any value to the actual value.
+ return ["", location];
}
String _match(expected, actual, Map matchState) {
diff --git a/pkg/unittest/lib/src/pretty_print.dart b/pkg/unittest/lib/src/pretty_print.dart
index 14a0bb1..a748ec3 100644
--- a/pkg/unittest/lib/src/pretty_print.dart
+++ b/pkg/unittest/lib/src/pretty_print.dart
@@ -4,6 +4,7 @@
library unittest.pretty_print;
+import '../matcher.dart';
import 'utils.dart';
/**
@@ -19,6 +20,13 @@
*/
String prettyPrint(object, {int maxLineLength, int maxItems}) {
String _prettyPrint(object, int indent, Set seen, bool top) {
+ // If the object is a matcher, use its description.
+ if (object is Matcher) {
+ var description = new StringDescription();
+ object.describe(description);
+ return "<$description>";
+ }
+
// Avoid looping infinitely on recursively-nested data structures.
if (seen.contains(object)) return "(recursive)";
seen = seen.union(new Set.from([object]));
diff --git a/pkg/unittest/test/matchers_test.dart b/pkg/unittest/test/matchers_test.dart
index 9f8e121..dc2b37a 100644
--- a/pkg/unittest/test/matchers_test.dart
+++ b/pkg/unittest/test/matchers_test.dart
@@ -401,6 +401,15 @@
"Actual: [1, 2]");
});
+ test('equals with matcher element', () {
+ var d = ['foo', 'bar'];
+ shouldPass(d, equals(['foo', startsWith('ba')]));
+ shouldFail(d, equals(['foo', endsWith('ba')]),
+ "Expected: ['foo', <a string ending with 'ba'>] "
+ "Actual: ['foo', 'bar'] "
+ "Which: does not match a string ending with 'ba' at location [1]");
+ });
+
test('isIn', () {
var d = [1, 2];
shouldPass(1, isIn(d));
@@ -593,6 +602,17 @@
"Which: has different length and is missing map key 'foo'");
});
+ test('equals with matcher value', () {
+ var a = new Map();
+ a['foo'] = 'bar';
+ shouldPass(a, equals({'foo': startsWith('ba')}));
+ shouldFail(a, equals({'foo': endsWith('ba')}),
+ "Expected: {'foo': <a string ending with 'ba'>} "
+ "Actual: {'foo': 'bar'} "
+ "Which: does not match a string ending with 'ba' "
+ "at location ['foo']");
+ });
+
test('contains', () {
var a = new Map();
a['foo'] = 'bar';
diff --git a/pkg/unittest/test/pretty_print_test.dart b/pkg/unittest/test/pretty_print_test.dart
index a0608ac..826c345 100644
--- a/pkg/unittest/test/pretty_print_test.dart
+++ b/pkg/unittest/test/pretty_print_test.dart
@@ -48,6 +48,11 @@
"]"));
});
+ test('containing a matcher', () {
+ expect(prettyPrint(['foo', endsWith('qux')]),
+ equals("['foo', <a string ending with 'qux'>]"));
+ });
+
test("that's under maxLineLength", () {
expect(prettyPrint([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], maxLineLength: 30),
equals("[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]"));
@@ -138,6 +143,16 @@
"}"));
});
+ test('containing a matcher key', () {
+ expect(prettyPrint({endsWith('bar'): 'qux'}),
+ equals("{<a string ending with 'bar'>: 'qux'}"));
+ });
+
+ test('containing a matcher value', () {
+ expect(prettyPrint({'foo': endsWith('qux')}),
+ equals("{'foo': <a string ending with 'qux'>}"));
+ });
+
test("that's under maxLineLength", () {
expect(prettyPrint({'0': 1, '2': 3, '4': 5, '6': 7}, maxLineLength: 32),
equals("{'0': 1, '2': 3, '4': 5, '6': 7}"));
diff --git a/pkg/web_components/pubspec.yaml b/pkg/web_components/pubspec.yaml
index 92762ff..7dc6f80 100644
--- a/pkg/web_components/pubspec.yaml
+++ b/pkg/web_components/pubspec.yaml
@@ -8,4 +8,4 @@
standard tag. Shadow DOM is designed to provide encapsulation for custom
elements, by hiding DOM subtrees under shadow roots.
environment:
- sdk: ">=1.2.0-dev.4.0 <2.0.0"
+ sdk: ">=1.2.0 <2.0.0"
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index 590d37e..b53f94b 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -540,58 +540,6 @@
],
},
{
- 'target_name': 'run_vm_tests.host',
- 'type': 'executable',
- 'toolsets':['host'],
- 'dependencies': [
- 'libdart_withcore',
- 'libdart_builtin',
- 'libdart_io',
- 'generate_snapshot_file#host',
- 'generate_snapshot_test_dat_file#host',
- ],
- 'include_dirs': [
- '..',
- '<(gen_source_dir)',
- ],
- 'sources': [
- 'run_vm_tests.cc',
- 'builtin_natives.cc',
- 'builtin_nolib.cc',
- 'builtin.h',
- 'io_natives.h',
- # Include generated source files.
- '<(snapshot_cc_file)',
- '<(builtin_cc_file)',
- '<(io_cc_file)',
- '<(io_patch_cc_file)',
- ],
- 'includes': [
- 'builtin_impl_sources.gypi',
- '../platform/platform_sources.gypi',
- '../vm/vm_sources.gypi',
- ],
- 'defines': [
- 'TESTING',
- ],
- # Only include _test.[cc|h] files.
- 'sources/': [
- ['exclude', '\\.(cc|h)$'],
- ['include', 'run_vm_tests.cc'],
- ['include', 'builtin_nolib.cc'],
- ['include', 'builtin_natives.cc'],
- ['include', '_gen\\.cc$'],
- ['include', '_test\\.(cc|h)$'],
- ],
- 'conditions': [
- ['OS=="win"', {
- 'link_settings': {
- 'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ],
- },
- }],
- ],
- },
- {
'target_name': 'test_extension',
'type': 'shared_library',
'dependencies': [
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 99e80ca..be17c3f 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -205,34 +205,17 @@
return _entryPointScript.toString();
}
+const _DART_EXT = 'dart-ext:';
String _resolveUri(String base, String userString) {
- var baseUri = Uri.parse(base);
_logResolution('# Resolving: $userString from $base');
-
- var uri = Uri.parse(userString);
- var resolved;
- if ('dart-ext' == uri.scheme) {
- // Relative URIs with scheme dart-ext should be resolved as if with no
- // scheme.
- resolved = baseUri.resolve(uri.path);
- if (resolved.scheme == 'package') {
- // If we are resolving relative to a package URI we go directly to the
- // file path and keep the dart-ext scheme. Otherwise, we will lose the
- // package URI path part.
- var path = _filePathFromPackageUri(resolved);
- if (path.startsWith('http:')) {
- throw "Native extensions not supported in "
- "packages loaded over http: %path";
- }
- resolved = new Uri.file(path);
- }
- resolved = new Uri(scheme: 'dart-ext', path: resolved.path);
+ var baseUri = Uri.parse(base);
+ if (userString.startsWith(_DART_EXT)) {
+ var uri = userString.substring(_DART_EXT.length);
+ return '$_DART_EXT${baseUri.resolve(uri)}';
} else {
- resolved = baseUri.resolve(userString);
+ return '${baseUri.resolve(userString)}';
}
- _logResolution('# Resolved to: $resolved');
- return resolved.toString();
}
@@ -247,20 +230,13 @@
case 'file':
return uri.toFilePath();
break;
- case 'dart-ext':
- // Relative file URIs don't start with file:///.
- var scheme = (uri.path.startsWith('/') ? 'file' : '');
- return new Uri(scheme: scheme,
- host: uri.host,
- path: uri.path).toFilePath();
- break;
case 'package':
return _filePathFromPackageUri(uri);
break;
case 'http':
return uri.toString();
default:
- // Only handling file, dart-ext, http, and package URIs
+ // Only handling file, http, and package URIs
// in standalone binary.
_logResolution('# Unknown scheme (${uri.scheme}) in $uri.');
throw 'Not a known scheme: $uri';
@@ -270,7 +246,7 @@
String _filePathFromPackageUri(Uri uri) {
if (!uri.host.isEmpty) {
- var path = (uri.path != '') ? '${uri.host}${uri.path}' : uri.host;
+ var path = '${uri.host}${uri.path}';
var right = 'package:$path';
var wrong = 'package://$path';
@@ -283,3 +259,50 @@
_packageRoot;
return _filePathFromUri(packageRoot.resolve(uri.path).toString());
}
+
+
+// Returns the directory part, the filename part, and the name
+// of a native extension URL as a list [directory, filename, name].
+// The directory part is either a file system path or an HTTP(S) URL.
+// The filename part is the extension name, with the platform-dependent
+// prefixes and extensions added.
+_extensionPathFromUri(String userUri) {
+ if (!userUri.startsWith(_DART_EXT)) {
+ throw 'Unexpected internal error: Extension URI $userUri missing dart-ext:';
+ }
+ userUri = userUri.substring(_DART_EXT.length);
+
+ if (userUri.contains('\\')) {
+ throw 'Unexpected internal error: Extension URI $userUri contains \\';
+ }
+
+ String filename;
+ String name;
+ String path; // Will end in '/'.
+ int index = userUri.lastIndexOf('/');
+ if (index == -1) {
+ name = userUri;
+ path = './';
+ } else if (index == userUri.length - 1) {
+ throw 'Extension name missing in $extensionUri';
+ } else {
+ name = userUri.substring(index + 1);
+ path = userUri.substring(0, index + 1);
+ }
+
+ path = _filePathFromUri(path);
+
+ if (Platform.isLinux || Platform.isAndroid) {
+ filename = 'lib$name.so';
+ } else if (Platform.isMacOS) {
+ filename = 'lib$name.dylib';
+ } else if (Platform.isWindows) {
+ filename = '$name.dll';
+ } else {
+ _logResolution(
+ 'Native extensions not supported on ${Platform.operatingSystem}');
+ throw 'Native extensions not supported on ${Platform.operatingSystem}';
+ }
+
+ return [path, filename, name];
+}
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 1c096ac..9201f5c 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -113,7 +113,9 @@
// interrupt.
fprintf(stdout, "%s\n", Dart_GetError(result));
} else {
- fprintf(stdout, "%.*s\n", static_cast<int>(length), chars);
+ // Uses fwrite to support printing NUL bytes.
+ fwrite(chars, 1, length, stdout);
+ fputs("\n", stdout);
}
fflush(stdout);
}
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 8bc5aea..f87f882 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -440,6 +440,18 @@
}
+Dart_Handle DartUtils::ExtensionPathFromUri(Dart_Handle extension_uri,
+ Dart_Handle builtin_lib) {
+ const int kNumArgs = 1;
+ Dart_Handle dart_args[kNumArgs];
+ dart_args[0] = extension_uri;
+ return Dart_Invoke(builtin_lib,
+ NewString("_extensionPathFromUri"),
+ kNumArgs,
+ dart_args);
+}
+
+
Dart_Handle DartUtils::ResolveUri(Dart_Handle library_url,
Dart_Handle url,
Dart_Handle builtin_lib) {
@@ -475,7 +487,6 @@
bool is_dart_scheme_url = DartUtils::IsDartSchemeURL(url_string);
bool is_io_library = DartUtils::IsDartIOLibURL(library_url_string);
- bool is_dart_extension_url = DartUtils::IsDartExtensionSchemeURL(url_string);
// Handle URI canonicalization requests.
if (tag == Dart_kCanonicalizeUrl) {
@@ -520,27 +531,44 @@
}
}
- // Handle 'import' or 'part' requests for all other URIs.
- // Get the file path out of the url.
Dart_Handle builtin_lib =
Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
- Dart_Handle file_path = FilePathFromUri(url, builtin_lib);
- if (Dart_IsError(file_path)) {
- return file_path;
- }
- Dart_StringToCString(file_path, &url_string);
- if (is_dart_extension_url) {
+ if (DartUtils::IsDartExtensionSchemeURL(url_string)) {
+ // Load a native code shared library to use in a native extension
if (tag != Dart_kImportTag) {
return NewError("Dart extensions must use import: '%s'", url_string);
}
- return Extensions::LoadExtension(url_string, library);
+ Dart_Handle path_parts = DartUtils::ExtensionPathFromUri(url, builtin_lib);
+ if (Dart_IsError(path_parts)) {
+ return path_parts;
+ }
+ const char* extension_directory = NULL;
+ Dart_StringToCString(Dart_ListGetAt(path_parts, 0), &extension_directory);
+ const char* extension_filename = NULL;
+ Dart_StringToCString(Dart_ListGetAt(path_parts, 1), &extension_filename);
+ const char* extension_name = NULL;
+ Dart_StringToCString(Dart_ListGetAt(path_parts, 2), &extension_name);
+
+ return Extensions::LoadExtension(extension_directory,
+ extension_filename,
+ extension_name,
+ library);
+ } else {
+ // Handle 'import' or 'part' requests for all other URIs.
+ // Get the file path out of the url.
+ Dart_Handle file_path = DartUtils::FilePathFromUri(url, builtin_lib);
+ if (Dart_IsError(file_path)) {
+ return file_path;
+ }
+ const char* final_path = NULL;
+ Dart_StringToCString(file_path, &final_path);
+ result = DartUtils::LoadSource(NULL,
+ library,
+ url,
+ tag,
+ final_path);
+ return result;
}
- result = DartUtils::LoadSource(NULL,
- library,
- url,
- tag,
- url_string);
- return result;
}
@@ -1053,7 +1081,9 @@
void CObject::FreeIOBufferData(Dart_CObject* cobject) {
ASSERT(cobject->type == Dart_CObject_kExternalTypedData);
cobject->value.as_external_typed_data.callback(
- NULL, cobject->value.as_external_typed_data.peer);
+ NULL,
+ NULL,
+ cobject->value.as_external_typed_data.peer);
cobject->value.as_external_typed_data.data = NULL;
}
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 608700e..87aedea 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -185,6 +185,9 @@
static Dart_Handle FilePathFromUri(Dart_Handle script_uri,
Dart_Handle builtin_lib);
+ static Dart_Handle ExtensionPathFromUri(Dart_Handle extension_uri,
+ Dart_Handle builtin_lib);
+
static Dart_Handle ResolveUri(Dart_Handle library_url,
Dart_Handle url,
Dart_Handle builtin_lib);
diff --git a/runtime/bin/extensions.cc b/runtime/bin/extensions.cc
index bdfd587..3b02971 100644
--- a/runtime/bin/extensions.cc
+++ b/runtime/bin/extensions.cc
@@ -16,30 +16,19 @@
namespace dart {
namespace bin {
-Dart_Handle Extensions::LoadExtension(const char* extension_path,
+Dart_Handle Extensions::LoadExtension(const char* extension_directory,
+ const char* extension_file,
+ const char* extension_name,
Dart_Handle parent_library) {
- char* library_path = strdup(extension_path);
-
- if (library_path == NULL) {
- return Dart_NewApiError("Out of memory in LoadExtension");
+ if (strncmp(extension_directory, "http://", 7) == 0 ||
+ strncmp(extension_directory, "https://", 8) == 0) {
+ return Dart_NewApiError("Cannot load native extensions over http:");
}
-
- // Extract the directory and the extension name from the path.
- char* last_path_separator = strrchr(library_path, '/');
- if (last_path_separator == NULL) {
- last_path_separator = strrchr(library_path, '\\');
- }
- if (last_path_separator == NULL) {
- free(library_path);
- return Dart_NewApiError("Cannot find extension library directory");
- }
- char* extension_name = last_path_separator + 1;
-
- *last_path_separator = '\0'; // Terminate library_path at last separator.
-
- void* library_handle = LoadExtensionLibrary(library_path, extension_name);
+ const char* library_strings[] = { extension_directory, extension_file, NULL };
+ char* library_file = Concatenate(library_strings);
+ void* library_handle = LoadExtensionLibrary(library_file);
+ free(library_file);
if (library_handle == NULL) {
- free(library_path);
return Dart_NewApiError("Cannot find extension library");
}
@@ -49,7 +38,6 @@
InitFunctionType fn = reinterpret_cast<InitFunctionType>(
ResolveSymbol(library_handle, init_function_name));
free(init_function_name);
- free(library_path);
if (fn == NULL) {
return Dart_NewApiError("Cannot find initialization function in extension");
diff --git a/runtime/bin/extensions.h b/runtime/bin/extensions.h
index 6f3853c..2b4e19b 100644
--- a/runtime/bin/extensions.h
+++ b/runtime/bin/extensions.h
@@ -16,7 +16,9 @@
public:
// TODO(whesse): Make extension load from a relative path relative to
// the library it is in. Currently loads from current working directory.
- static Dart_Handle LoadExtension(const char* extension_url,
+ static Dart_Handle LoadExtension(const char* extension_directory,
+ const char* extension_filename,
+ const char* extension_name,
Dart_Handle parent_library);
private:
@@ -24,8 +26,7 @@
static char* Concatenate(const char** strings);
// Platform-specific implementations.
- static void* LoadExtensionLibrary(const char* library_path,
- const char* extension_name);
+ static void* LoadExtensionLibrary(const char* library_file);
static void* ResolveSymbol(void* lib_handle, const char* symbol);
DISALLOW_ALLOCATION();
diff --git a/runtime/bin/extensions_android.cc b/runtime/bin/extensions_android.cc
index 72c757f..3d2688b 100644
--- a/runtime/bin/extensions_android.cc
+++ b/runtime/bin/extensions_android.cc
@@ -12,14 +12,8 @@
namespace dart {
namespace bin {
-void* Extensions::LoadExtensionLibrary(const char* library_path,
- const char* extension_name) {
- const char* strings[] = { library_path, "/lib",
- extension_name, ".so", NULL };
- char* library_file = Concatenate(strings);
- void* lib_handle = dlopen(library_file, RTLD_LAZY);
- free(library_file);
- return lib_handle;
+void* Extensions::LoadExtensionLibrary(const char* library_file) {
+ return dlopen(library_file, RTLD_LAZY);
}
void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
diff --git a/runtime/bin/extensions_linux.cc b/runtime/bin/extensions_linux.cc
index 3920ade..c42024a 100644
--- a/runtime/bin/extensions_linux.cc
+++ b/runtime/bin/extensions_linux.cc
@@ -12,14 +12,8 @@
namespace dart {
namespace bin {
-void* Extensions::LoadExtensionLibrary(const char* library_path,
- const char* extension_name) {
- const char* strings[] = { library_path, "/lib",
- extension_name, ".so", NULL };
- char* library_file = Concatenate(strings);
- void* lib_handle = dlopen(library_file, RTLD_LAZY);
- free(library_file);
- return lib_handle;
+void* Extensions::LoadExtensionLibrary(const char* library_file) {
+ return dlopen(library_file, RTLD_LAZY);
}
void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
diff --git a/runtime/bin/extensions_macos.cc b/runtime/bin/extensions_macos.cc
index bfda5e7..814f935 100644
--- a/runtime/bin/extensions_macos.cc
+++ b/runtime/bin/extensions_macos.cc
@@ -12,14 +12,8 @@
namespace dart {
namespace bin {
-void* Extensions::LoadExtensionLibrary(const char* library_path,
- const char* extension_name) {
- const char* strings[] = { library_path, "/lib",
- extension_name, ".dylib", NULL };
- char* library_file = Concatenate(strings);
- void* lib_handle = dlopen(library_file, RTLD_LAZY);
- free(library_file);
- return lib_handle;
+void* Extensions::LoadExtensionLibrary(const char* library_file) {
+ return dlopen(library_file, RTLD_LAZY);
}
void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
diff --git a/runtime/bin/extensions_win.cc b/runtime/bin/extensions_win.cc
index 0f764d3..dea586c 100644
--- a/runtime/bin/extensions_win.cc
+++ b/runtime/bin/extensions_win.cc
@@ -12,15 +12,8 @@
namespace dart {
namespace bin {
-void* Extensions::LoadExtensionLibrary(const char* library_path,
- const char* extension_name) {
- const char* strings[] = { library_path, "/", extension_name, ".dll", NULL };
- char* library_file = Concatenate(strings);
- wchar_t* unicode_library_file = StringUtils::Utf8ToWide(library_file);
- void* lib_handle = LoadLibraryW(unicode_library_file);
- free(unicode_library_file);
- free(library_file);
- return lib_handle;
+void* Extensions::LoadExtensionLibrary(const char* library_file) {
+ return LoadLibraryW(StringUtils::Utf8ToWide(library_file));
}
void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
diff --git a/runtime/bin/filter.cc b/runtime/bin/filter.cc
index 34c0ee2..f537606 100644
--- a/runtime/bin/filter.cc
+++ b/runtime/bin/filter.cc
@@ -8,18 +8,15 @@
#include "include/dart_api.h"
-
namespace dart {
namespace bin {
-const int kZlibFlagMemUsage = 8;
-const int kZLibFlagWindowBits = 15;
const int kZLibFlagUseGZipHeader = 16;
const int kZLibFlagAcceptAnyHeader = 32;
static const int kFilterPointerNativeField = 0;
-Filter* GetFilter(Dart_Handle filter_obj) {
+static Filter* GetFilter(Dart_Handle filter_obj) {
Filter* filter;
Dart_Handle result = Filter::GetFilterPointerNativeField(filter_obj, &filter);
if (Dart_IsError(result)) {
@@ -31,15 +28,67 @@
return filter;
}
-void EndFilter(Dart_Handle filter_obj, Filter* filter) {
+static void EndFilter(Dart_Handle filter_obj, Filter* filter) {
Filter::SetFilterPointerNativeField(filter_obj, NULL);
delete filter;
}
+static uint8_t* copyDictionary(Dart_Handle dictionary_obj) {
+ uint8_t* src = NULL;
+ intptr_t size;
+ Dart_TypedData_Type type;
+
+ if (Dart_IsError(Dart_ListLength(dictionary_obj, &size))) {
+ Dart_ThrowException(DartUtils::NewInternalError(
+ "Failed to get the zlib dictionary length"));
+ }
+
+ uint8_t* dictionary = new uint8_t[size];
+
+ if (dictionary == NULL) {
+ Dart_ThrowException(DartUtils::NewInternalError(
+ "Failed to allocate buffer for the zlib dictionary"));
+ }
+
+ Dart_Handle result = Dart_TypedDataAcquireData(
+ dictionary_obj, &type, reinterpret_cast<void**>(&src), &size);
+ if (!Dart_IsError(result)) {
+ memmove(dictionary, src, size);
+ Dart_TypedDataReleaseData(dictionary_obj);
+ } else {
+ if (Dart_IsError(Dart_ListGetAsBytes(dictionary_obj, 0, dictionary,
+ size))) {
+ Dart_ThrowException(DartUtils::NewInternalError(
+ "Failed to get the zlib dictionary"));
+ }
+ }
+
+ return dictionary;
+}
+
void FUNCTION_NAME(Filter_CreateZLibInflate)(Dart_NativeArguments args) {
Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
- Filter* filter = new ZLibInflateFilter();
- if (filter == NULL || !filter->Init()) {
+ Dart_Handle window_bits_obj = Dart_GetNativeArgument(args, 1);
+ int64_t window_bits = DartUtils::GetIntegerValue(window_bits_obj);
+ Dart_Handle dict_obj = Dart_GetNativeArgument(args, 2);
+ uint8_t* dictionary = NULL;
+ intptr_t dictionary_length = 0;
+ if (!Dart_IsNull(dict_obj)) {
+ dictionary = copyDictionary(dict_obj);
+ if (dictionary != NULL) {
+ dictionary_length = 0;
+ Dart_ListLength(dict_obj, &dictionary_length);
+ }
+ }
+ Dart_Handle raw_obj = Dart_GetNativeArgument(args, 3);
+ bool raw;
+ if (Dart_IsError(Dart_BooleanValue(raw_obj, &raw))) {
+ Dart_ThrowException(DartUtils::NewInternalError(
+ "Failed to get 'raw' parameter"));
+ }
+ Filter* filter = new ZLibInflateFilter(static_cast<int32_t>(window_bits),
+ dictionary, dictionary_length, raw);
+ if (!filter->Init()) {
delete filter;
Dart_ThrowException(DartUtils::NewInternalError(
"Failed to create ZLibInflateFilter"));
@@ -54,25 +103,39 @@
void FUNCTION_NAME(Filter_CreateZLibDeflate)(Dart_NativeArguments args) {
Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
Dart_Handle gzip_obj = Dart_GetNativeArgument(args, 1);
+ bool gzip = DartUtils::GetBooleanValue(gzip_obj);
Dart_Handle level_obj = Dart_GetNativeArgument(args, 2);
- bool gzip;
- if (Dart_IsError(Dart_BooleanValue(gzip_obj, &gzip))) {
- Dart_ThrowException(DartUtils::NewInternalError(
- "Failed to get 'gzip' parameter"));
+ int64_t level = DartUtils::GetInt64ValueCheckRange(level_obj, kMinInt32,
+ kMaxInt32);
+ Dart_Handle window_bits_obj = Dart_GetNativeArgument(args, 3);
+ int64_t window_bits = DartUtils::GetIntegerValue(window_bits_obj);
+ Dart_Handle mLevel_obj = Dart_GetNativeArgument(args, 4);
+ int64_t mem_level = DartUtils::GetIntegerValue(mLevel_obj);
+ Dart_Handle strategy_obj = Dart_GetNativeArgument(args, 5);
+ int64_t strategy = DartUtils::GetIntegerValue(strategy_obj);
+ Dart_Handle dict_obj = Dart_GetNativeArgument(args, 6);
+ uint8_t* dictionary = NULL;
+ intptr_t dictionary_length = 0;
+ if (!Dart_IsNull(dict_obj)) {
+ dictionary = copyDictionary(dict_obj);
+ if (dictionary != NULL) {
+ dictionary_length = 0;
+ Dart_ListLength(dict_obj, &dictionary_length);
+ }
}
- int64_t level = 0;
- Dart_Handle result = Dart_IntegerToInt64(level_obj, &level);
- if (Dart_IsError(result) || (level < kMinInt32) || (level > kMaxInt32)) {
- Dart_ThrowException(DartUtils::NewInternalError(
- "Failed to get 'level' parameter"));
- }
- Filter* filter = new ZLibDeflateFilter(gzip, static_cast<int32_t>(level));
- if (filter == NULL || !filter->Init()) {
+ Dart_Handle raw_obj = Dart_GetNativeArgument(args, 7);
+ bool raw = DartUtils::GetBooleanValue(raw_obj);
+ Filter* filter = new ZLibDeflateFilter(gzip, static_cast<int32_t>(level),
+ static_cast<int32_t>(window_bits),
+ static_cast<int32_t>(mem_level),
+ static_cast<int32_t>(strategy),
+ dictionary, dictionary_length, raw);
+ if (!filter->Init()) {
delete filter;
Dart_ThrowException(DartUtils::NewInternalError(
"Failed to create ZLibDeflateFilter"));
}
- result = Filter::SetFilterPointerNativeField(filter_obj, filter);
+ Dart_Handle result = Filter::SetFilterPointerNativeField(filter_obj, filter);
if (Dart_IsError(result)) {
delete filter;
Dart_PropagateError(result);
@@ -185,27 +248,38 @@
ZLibDeflateFilter::~ZLibDeflateFilter() {
+ delete[] dictionary_;
delete[] current_buffer_;
if (initialized()) deflateEnd(&stream_);
}
bool ZLibDeflateFilter::Init() {
+ int window_bits = window_bits_;
+ if (raw_) {
+ window_bits = -window_bits;
+ } else if (gzip_) {
+ window_bits += kZLibFlagUseGZipHeader;
+ }
+ stream_.next_in = Z_NULL;
stream_.zalloc = Z_NULL;
stream_.zfree = Z_NULL;
stream_.opaque = Z_NULL;
- int result = deflateInit2(
- &stream_,
- level_,
- Z_DEFLATED,
- kZLibFlagWindowBits | (gzip_ ? kZLibFlagUseGZipHeader : 0),
- kZlibFlagMemUsage,
- Z_DEFAULT_STRATEGY);
- if (result == Z_OK) {
- set_initialized(true);
- return true;
+ int result = deflateInit2(&stream_, level_, Z_DEFLATED, window_bits,
+ mem_level_, strategy_);
+ if (result != Z_OK) {
+ return false;
}
- return false;
+ if (dictionary_ != NULL && !gzip_ && !raw_) {
+ result = deflateSetDictionary(&stream_, dictionary_, dictionary_length_);
+ delete[] dictionary_;
+ dictionary_ = NULL;
+ if (result != Z_OK) {
+ return false;
+ }
+ }
+ set_initialized(true);
+ return true;
}
@@ -222,6 +296,7 @@
bool end) {
stream_.avail_out = length;
stream_.next_out = buffer;
+ bool error = false;
switch (deflate(&stream_,
end ? Z_FINISH : flush ? Z_SYNC_FLUSH : Z_NO_FLUSH)) {
case Z_STREAM_END:
@@ -229,42 +304,46 @@
case Z_OK: {
intptr_t processed = length - stream_.avail_out;
if (processed == 0) {
- delete[] current_buffer_;
- current_buffer_ = NULL;
- return 0;
- } else {
- // We processed data, should be called again.
- return processed;
+ break;
}
+ return processed;
}
default:
case Z_STREAM_ERROR:
- // An error occoured.
- delete[] current_buffer_;
- current_buffer_ = NULL;
- return -1;
+ error = true;
}
+
+ delete[] current_buffer_;
+ current_buffer_ = NULL;
+ // Either 0 Byte processed or error
+ return error ? -1 : 0;
}
ZLibInflateFilter::~ZLibInflateFilter() {
+ delete[] dictionary_;
delete[] current_buffer_;
if (initialized()) inflateEnd(&stream_);
}
bool ZLibInflateFilter::Init() {
+ int window_bits = raw_ ?
+ -window_bits_ :
+ window_bits_ | kZLibFlagAcceptAnyHeader;
+
+ stream_.next_in = Z_NULL;
+ stream_.avail_in = 0;
stream_.zalloc = Z_NULL;
stream_.zfree = Z_NULL;
stream_.opaque = Z_NULL;
- int result = inflateInit2(&stream_,
- kZLibFlagWindowBits | kZLibFlagAcceptAnyHeader);
- if (result == Z_OK) {
- set_initialized(true);
- return true;
+ int result = inflateInit2(&stream_, window_bits);
+ if (result != Z_OK) {
+ return false;
}
- return false;
+ set_initialized(true);
+ return true;
}
@@ -282,32 +361,47 @@
bool end) {
stream_.avail_out = length;
stream_.next_out = buffer;
- switch (inflate(&stream_,
+ bool error = false;
+ int v;
+ switch (v = inflate(&stream_,
end ? Z_FINISH : flush ? Z_SYNC_FLUSH : Z_NO_FLUSH)) {
case Z_STREAM_END:
case Z_BUF_ERROR:
case Z_OK: {
intptr_t processed = length - stream_.avail_out;
if (processed == 0) {
- delete[] current_buffer_;
- current_buffer_ = NULL;
- return 0;
- } else {
- // We processed data, should be called again.
- return processed;
+ break;
}
+ return processed;
}
+ case Z_NEED_DICT:
+ if (dictionary_ == NULL) {
+ error = true;
+ } else {
+ int result = inflateSetDictionary(&stream_, dictionary_,
+ dictionary_length_);
+ delete[] dictionary_;
+ dictionary_ = NULL;
+ error = result != Z_OK;
+ }
+ if (error) {
+ break;
+ } else {
+ return Processed(buffer, length, flush, end);
+ }
+
default:
case Z_MEM_ERROR:
- case Z_NEED_DICT:
case Z_DATA_ERROR:
case Z_STREAM_ERROR:
- // An error occoured.
- delete[] current_buffer_;
- current_buffer_ = NULL;
- return -1;
+ error = true;
}
+
+ delete[] current_buffer_;
+ current_buffer_ = NULL;
+ // Either 0 Byte processed or error
+ return error ? -1 : 0;
}
} // namespace bin
diff --git a/runtime/bin/filter.h b/runtime/bin/filter.h
index 16f1c6e..c104c88 100644
--- a/runtime/bin/filter.h
+++ b/runtime/bin/filter.h
@@ -21,14 +21,12 @@
virtual bool Init() = 0;
/**
- * On a succesfull call to Process, Process will take ownership of data. On
+ * On a successful call to Process, Process will take ownership of data. On
* successive calls to either Processed or ~Filter, data will be freed with
* a delete[] call.
*/
virtual bool Process(uint8_t* data, intptr_t length) = 0;
- virtual intptr_t Processed(uint8_t* buffer,
- intptr_t length,
- bool finish,
+ virtual intptr_t Processed(uint8_t* buffer, intptr_t length, bool finish,
bool end) = 0;
static Dart_Handle SetFilterPointerNativeField(Dart_Handle filter,
@@ -54,20 +52,29 @@
class ZLibDeflateFilter : public Filter {
public:
- ZLibDeflateFilter(bool gzip = false, int32_t level = 6)
- : gzip_(gzip), level_(level), current_buffer_(NULL) {}
+ ZLibDeflateFilter(bool gzip, int32_t level, int32_t window_bits,
+ int32_t mem_level, int32_t strategy,
+ uint8_t* dictionary, intptr_t dictionary_length, bool raw)
+ : gzip_(gzip), level_(level), window_bits_(window_bits),
+ mem_level_(mem_level), strategy_(strategy), dictionary_(dictionary),
+ dictionary_length_(dictionary_length), raw_(raw), current_buffer_(NULL)
+ {}
virtual ~ZLibDeflateFilter();
virtual bool Init();
virtual bool Process(uint8_t* data, intptr_t length);
- virtual intptr_t Processed(uint8_t* buffer,
- intptr_t length,
- bool finish,
+ virtual intptr_t Processed(uint8_t* buffer, intptr_t length, bool finish,
bool end);
private:
const bool gzip_;
const int32_t level_;
+ const int32_t window_bits_;
+ const int32_t mem_level_;
+ const int32_t strategy_;
+ uint8_t* dictionary_;
+ const intptr_t dictionary_length_;
+ const bool raw_;
uint8_t* current_buffer_;
z_stream stream_;
@@ -76,17 +83,23 @@
class ZLibInflateFilter : public Filter {
public:
- ZLibInflateFilter() : current_buffer_(NULL) {}
+ ZLibInflateFilter(int32_t window_bits, uint8_t* dictionary,
+ intptr_t dictionary_length, bool raw)
+ : window_bits_(window_bits), dictionary_(dictionary),
+ dictionary_length_(dictionary_length), raw_(raw), current_buffer_(NULL)
+ {}
virtual ~ZLibInflateFilter();
virtual bool Init();
virtual bool Process(uint8_t* data, intptr_t length);
- virtual intptr_t Processed(uint8_t* buffer,
- intptr_t length,
- bool finish,
+ virtual intptr_t Processed(uint8_t* buffer, intptr_t length, bool finish,
bool end);
private:
+ const int32_t window_bits_;
+ uint8_t* dictionary_;
+ const intptr_t dictionary_length_;
+ const bool raw_;
uint8_t* current_buffer_;
z_stream stream_;
diff --git a/runtime/bin/filter_patch.dart b/runtime/bin/filter_patch.dart
index 1dc727d..d8109fd 100644
--- a/runtime/bin/filter_patch.dart
+++ b/runtime/bin/filter_patch.dart
@@ -13,22 +13,33 @@
}
class _ZLibInflateFilter extends _FilterImpl {
- _ZLibInflateFilter() {
- _init();
+ _ZLibInflateFilter(int windowBits, List<int> dictionary, bool raw) {
+ _init(windowBits, dictionary, raw);
}
- void _init() native "Filter_CreateZLibInflate";
+ void _init(int windowBits, List<int> dictionary, bool raw)
+ native "Filter_CreateZLibInflate";
}
class _ZLibDeflateFilter extends _FilterImpl {
- _ZLibDeflateFilter(bool gzip, int level) {
- _init(gzip, level);
+ _ZLibDeflateFilter(bool gzip, int level, int windowBits, int memLevel,
+ int strategy, List<int> dictionary, bool raw) {
+ _init(gzip, level, windowBits, memLevel, strategy, dictionary, raw);
}
- void _init(bool gzip, int level) native "Filter_CreateZLibDeflate";
+ void _init(bool gzip, int level, int windowBits, int memLevel,
+ int strategy, List<int> dictionary, bool raw)
+ native "Filter_CreateZLibDeflate";
}
patch class _Filter {
- /* patch */ static _Filter newZLibDeflateFilter(bool gzip, int level)
- => new _ZLibDeflateFilter(gzip, level);
- /* patch */ static _Filter newZLibInflateFilter() => new _ZLibInflateFilter();
+ /* patch */ static _Filter newZLibDeflateFilter(bool gzip, int level,
+ int windowBits, int memLevel,
+ int strategy,
+ List<int> dictionary,
+ bool raw) =>
+ new _ZLibDeflateFilter(gzip, level, windowBits, memLevel, strategy,
+ dictionary, raw);
+ /* patch */ static _Filter newZLibInflateFilter(int windowBits,
+ List<int> dictionary,
+ bool raw) =>
+ new _ZLibInflateFilter(windowBits, dictionary, raw);
}
-
diff --git a/runtime/bin/io_buffer.h b/runtime/bin/io_buffer.h
index 1dfcc00..58c744e 100644
--- a/runtime/bin/io_buffer.h
+++ b/runtime/bin/io_buffer.h
@@ -29,10 +29,12 @@
}
// Function for finalizing external byte arrays used as IO buffers.
- static void Finalizer(Dart_WeakPersistentHandle handle, void* buffer) {
+ static void Finalizer(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* buffer) {
Free(buffer);
if (handle != NULL) {
- Dart_DeleteWeakPersistentHandle(handle);
+ Dart_DeleteWeakPersistentHandle(isolate, handle);
}
}
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index 69a8123..7fe5839 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -28,8 +28,8 @@
V(FileSystemWatcher_ReadEvents, 2) \
V(FileSystemWatcher_UnwatchPath, 2) \
V(FileSystemWatcher_WatchPath, 4) \
- V(Filter_CreateZLibDeflate, 3) \
- V(Filter_CreateZLibInflate, 1) \
+ V(Filter_CreateZLibDeflate, 8) \
+ V(Filter_CreateZLibInflate, 4) \
V(Filter_End, 1) \
V(Filter_Process, 4) \
V(Filter_Processed, 3) \
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index eda6e9b..18e4b59 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.cc
@@ -151,7 +151,7 @@
running_ = false;
// Fork to wake up waitpid.
- if (TEMP_FAILURE_RETRY(fork()) == 0) {
+ if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(fork()) == 0) {
exit(0);
}
@@ -350,7 +350,7 @@
program_environment[environment_length] = NULL;
}
- pid = TEMP_FAILURE_RETRY(fork());
+ pid = TEMP_FAILURE_RETRY_BLOCK_SIGNALS(fork());
if (pid < 0) {
SetChildOsErrorMessage(os_error_message);
delete[] program_arguments;
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index 037dd16..e2810fc 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -151,7 +151,7 @@
running_ = false;
// Fork to wake up waitpid.
- if (TEMP_FAILURE_RETRY(fork()) == 0) {
+ if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(fork()) == 0) {
exit(0);
}
@@ -349,7 +349,7 @@
program_environment[environment_length] = NULL;
}
- pid = TEMP_FAILURE_RETRY(fork());
+ pid = TEMP_FAILURE_RETRY_BLOCK_SIGNALS(fork());
if (pid < 0) {
SetChildOsErrorMessage(os_error_message);
delete[] program_arguments;
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index 185ca0b..5c85d9a 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -150,7 +150,7 @@
running_ = false;
// Fork to wake up waitpid.
- if (TEMP_FAILURE_RETRY(fork()) == 0) {
+ if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(fork()) == 0) {
exit(0);
}
@@ -349,7 +349,7 @@
program_environment[environment_length] = NULL;
}
- pid = TEMP_FAILURE_RETRY(fork());
+ pid = TEMP_FAILURE_RETRY_BLOCK_SIGNALS(fork());
if (pid < 0) {
SetChildOsErrorMessage(os_error_message);
delete[] program_arguments;
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 27329f1..c69ff18 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -84,6 +84,8 @@
String get host => _host != null ? _host : address;
+ List<int> get rawAddress => new Uint8List.fromList(_in_addr);
+
bool get isLoopback {
switch (type) {
case InternetAddressType.IP_V4:
@@ -1179,7 +1181,13 @@
assert(buffer == null);
buffer = data;
offset = 0;
- write();
+ try {
+ write();
+ } catch (e) {
+ stop();
+ socket._consumerDone();
+ done(e);
+ }
},
onError: (error, [stackTrace]) {
socket._consumerDone();
@@ -1199,28 +1207,22 @@
}
void write() {
- try {
- if (subscription == null) return;
- assert(buffer != null);
- // Write as much as possible.
- offset += socket._write(buffer, offset, buffer.length - offset);
- if (offset < buffer.length) {
- if (!paused) {
- paused = true;
- subscription.pause();
- }
- socket._enableWriteEvent();
- } else {
- buffer = null;
- if (paused) {
- paused = false;
- subscription.resume();
- }
+ if (subscription == null) return;
+ assert(buffer != null);
+ // Write as much as possible.
+ offset += socket._write(buffer, offset, buffer.length - offset);
+ if (offset < buffer.length) {
+ if (!paused) {
+ paused = true;
+ subscription.pause();
}
- } catch (e) {
- stop();
- socket._consumerDone();
- done(e);
+ socket._enableWriteEvent();
+ } else {
+ buffer = null;
+ if (paused) {
+ paused = false;
+ subscription.resume();
+ }
}
}
diff --git a/runtime/bin/stdio_android.cc b/runtime/bin/stdio_android.cc
index 12c87c9..25d16c3 100644
--- a/runtime/bin/stdio_android.cc
+++ b/runtime/bin/stdio_android.cc
@@ -67,12 +67,13 @@
bool Stdout::GetTerminalSize(int size[2]) {
struct winsize w;
if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(
- ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != 0)) {
- return false;
+ ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) == 0) &&
+ (w.ws_col != 0 || w.ws_row != 0)) {
+ size[0] = w.ws_col;
+ size[1] = w.ws_row;
+ return true;
}
- size[0] = w.ws_col;
- size[1] = w.ws_row;
- return true;
+ return false;
}
} // namespace bin
diff --git a/runtime/bin/stdio_linux.cc b/runtime/bin/stdio_linux.cc
index f61cc30..43ece52 100644
--- a/runtime/bin/stdio_linux.cc
+++ b/runtime/bin/stdio_linux.cc
@@ -67,12 +67,13 @@
bool Stdout::GetTerminalSize(int size[2]) {
struct winsize w;
if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(
- ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != 0)) {
- return false;
+ ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) == 0) &&
+ (w.ws_col != 0 || w.ws_row != 0)) {
+ size[0] = w.ws_col;
+ size[1] = w.ws_row;
+ return true;
}
- size[0] = w.ws_col;
- size[1] = w.ws_row;
- return true;
+ return false;
}
} // namespace bin
diff --git a/runtime/bin/stdio_macos.cc b/runtime/bin/stdio_macos.cc
index 4b27a1b..79e34f8 100644
--- a/runtime/bin/stdio_macos.cc
+++ b/runtime/bin/stdio_macos.cc
@@ -67,12 +67,13 @@
bool Stdout::GetTerminalSize(int size[2]) {
struct winsize w;
if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(
- ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != 0)) {
- return false;
+ ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) == 0) &&
+ (w.ws_col != 0 || w.ws_row != 0)) {
+ size[0] = w.ws_col;
+ size[1] = w.ws_row;
+ return true;
}
- size[0] = w.ws_col;
- size[1] = w.ws_row;
- return true;
+ return false;
}
} // namespace bin
diff --git a/runtime/bin/vmservice/client/deployed/web/index.html b/runtime/bin/vmservice/client/deployed/web/index.html
index f0f8325..1441387 100644
--- a/runtime/bin/vmservice/client/deployed/web/index.html
+++ b/runtime/bin/vmservice/client/deployed/web/index.html
@@ -13,8 +13,201 @@
</head>
<body><polymer-element name="observatory-element">
-</polymer-element><polymer-element name="breakpoint-list" extends="observatory-element">
+</polymer-element>
+<polymer-element name="nav-bar" extends="observatory-element">
<template>
+ <style>
+ nav ul {
+ display: inline-table;
+ position: relative;
+ list-style: none;
+ padding-left: 0;
+ margin-left: 0;
+ width: 100%;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background-color: #0489c3;
+ }
+ nav ul:after {
+ content: ""; clear: both; display: block;
+ }
+ </style>
+ <nav>
+ <ul>
+ <content></content>
+ </ul>
+ </nav>
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-menu" extends="observatory-element">
+ <template>
+ <style>
+ .menu, .spacer {
+ float: left;
+ }
+ .menu a, .spacer {
+ display: block;
+ padding: 12px 8px;
+ color: White;
+ text-decoration: none;
+ }
+ .menu:hover {
+ background: #455;
+ }
+ .menu ul {
+ display: none;
+ position: absolute;
+ top: 100%;
+ list-style: none;
+ padding: 0;
+ margin-left: 0;
+ width: auto;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background: #567;
+ }
+ .menu ul:after {
+ content: ""; clear: both; display: block;
+ }
+ .menu:hover > ul {
+ display: block;
+ }
+ </style>
+
+ <li class="menu"><a href="{{ link }}">{{ anchor }}</a>
+ <ul><content></content></ul>
+ </li>
+ <template if="{{ !last }}">
+ <li class="spacer">></li>
+ </template>
+
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-menu-item" extends="observatory-element">
+ <template>
+ <style>
+ li {
+ float: none;
+ border-top: 1px solid #677;
+ border-bottom: 1px solid #556; position: relative;
+ }
+ li:hover {
+ background: #455;
+ }
+ li ul {
+ display: none;
+ position: absolute;
+ top:0;
+ left: 100%;
+ list-style: none;
+ padding: 0;
+ margin-left: 0;
+ width: auto;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background: #567;
+ }
+ li ul:after {
+ content: ""; clear: both; display: block;
+ }
+ li:hover > ul {
+ display: block;
+ }
+ li a {
+ display: block;
+ padding: 12px 12px;
+ color: white;
+ text-decoration: none;
+ }
+ </style>
+ <li><a href="{{ link }}">{{ anchor }}</a>
+ <ul><content></content></ul>
+ </li>
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-refresh" extends="observatory-element">
+ <template>
+ <style>
+ .active {
+ color: #aaa;
+ cursor: wait;
+ }
+ .idle {
+ color: #000;
+ }
+ li {
+ float: right;
+ margin: 0;
+ }
+ li button {
+ margin: 3px;
+ padding: 8px;
+ }
+ </style>
+ <li>
+ <template if="{{ active }}">
+ <button class="active" on-click="{{ buttonClick }}">Refresh</button>
+ </template>
+ <template if="{{ !active }}">
+ <button class="idle" on-click="{{ buttonClick }}">Refresh</button>
+ </template>
+ </li>
+ </template>
+</polymer-element>
+
+<polymer-element name="top-nav-menu">
+ <template>
+ <nav-menu link="#" anchor="Observatory" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="isolate-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="#" anchor="{{ isolate.name }}" last="{{ last }}">
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('stacktrace') }}" anchor="stack trace"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('profile') }}" anchor="cpu profile"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('allocationprofile') }}" anchor="heap profile"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('debug/breakpoints') }}" anchor="breakpoints"></nav-menu-item>
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="library-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="{{ app.locationManager.currentIsolateRelativeLink(library['id']) }}" anchor="{{ library['name'] }}" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="class-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="{{ app.locationManager.currentIsolateRelativeLink(cls['id']) }}" anchor="{{ cls['user_name'] }}" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+
+<polymer-element name="breakpoint-list" extends="observatory-element">
+ <template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="breakpoints" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<template if="{{ msg['breakpoints'].isEmpty }}">
<div class="panel panel-warning">
<div class="panel-body">No breakpoints</div>
@@ -31,7 +224,8 @@
</template>
</template>
-</polymer-element><polymer-element name="service-ref" extends="observatory-element">
+</polymer-element>
+<polymer-element name="service-ref" extends="observatory-element">
</polymer-element><polymer-element name="class-ref" extends="service-ref">
<template>
@@ -71,17 +265,52 @@
<a title="{{ hoverText }}" href="{{ url }}">{{ name }}</a>
</template>
-</polymer-element><polymer-element name="instance-ref" extends="service-ref">
+</polymer-element><polymer-element name="curly-block">
<template>
<style>
- .memberList {
- margin-left: 3em;
- border-spacing: 0;
- border-collapse: collapse;
+ .idle {
+ display: inline-block;
+ color: #0489c3;
+ cursor: pointer;
}
+ .busy {
+ display: inline-block;
+ color: white;
+ cursor: wait;
+ }
+ </style>
+ <template if="{{ expanded }}">
+ <template if="{{ busy }}">
+ {<div class="busy"> ⊟ </div>
+ <br>
+ <content></content>
+ }
+ </template>
+ <template if="{{ !busy }}">
+ {<a on-click="{{ toggleExpand }}"><div class="idle"> ⊟ </div></a>
+ <br>
+ <content></content>
+ }
+ </template>
+ </template>
+
+ <template if="{{ !expanded }}">
+ <template if="{{ busy }}">
+ {<div class="busy"> ⊞ </div>}
+ </template>
+ <template if="{{ !busy }}">
+ {<a on-click="{{ toggleExpand }}"><div class="idle"> ⊞ </div></a>}
+ </template>
+ </template>
+ </template>
+
+</polymer-element>
+<polymer-element name="instance-ref" extends="service-ref">
+ <template>
+ <style>
.member {
- vertical-align: top;
- padding: 0 1em;
+ vertical-align: top;
+ padding: 0 0 0 1em;
}
</style>
<div>
@@ -106,27 +335,23 @@
</template>
<template if="{{ isInstanceRef(ref['type']) }}">
- <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> {
- <a on-click="{{ toggleExpand }}">...</a>
- <template if="{{ expanded }}">
- <table class="memberList">
+ <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a>
+ <curly-block callback="{{ expander() }}">
+ <table>
<tbody><tr template="" repeat="{{ field in ref['fields'] }}">
-
<td class="member">{{ field['decl']['user_name'] }}</td>
<td class="member">
<instance-ref app="{{ app }}" ref="{{ field['value'] }}"></instance-ref>
</td>
</tr>
</tbody></table>
- </template>
- }
+ </curly-block>
</template>
<template if="{{ isListRef(ref['type']) }}">
- <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['length']}})</a> {
- <a on-click="{{ toggleExpand }}">...</a>
- <template if="{{ expanded }}">
- <table class="memberList">
+ <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['length']}})</a>
+ <curly-block callback="{{ expander() }}">
+ <table>
<tbody><tr template="" repeat="{{ element in ref['elements'] }}">
<td class="member">[{{ element['index']}}]</td>
<td class="member">
@@ -134,8 +359,7 @@
</td>
</tr>
</tbody></table>
- </template>
- }
+ </curly-block>
</template>
</div>
@@ -149,6 +373,15 @@
</polymer-element><polymer-element name="class-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ cls['library'] }}"></library-nav-menu>
+ <class-nav-menu app="{{ app }}" cls="{{ cls }}" last="{{ true }}"></class-nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -237,6 +470,14 @@
</polymer-element><polymer-element name="code-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="{{ code.functionRef['user_name'] }}" last="{{ true }}"></nav-menu>
+ <!-- TODO(turnidge): Implement code refresh -->
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="{{ cssPanelClass }}">
@@ -259,7 +500,8 @@
</div>
</template>
-</polymer-element><polymer-element name="collapsible-content" extends="observatory-element">
+</polymer-element>
+<polymer-element name="collapsible-content" extends="observatory-element">
<template>
<div class="well row">
<a on-click="toggleDisplay" class="btn muted unselectable">
@@ -273,6 +515,21 @@
</polymer-element><polymer-element name="field-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <template if="{{ field['owner']['type'] == '@Class' }}">
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ field['owner'] }}"></class-nav-menu>
+ </template>
+ <template if="{{ field['owner']['type'] == '@Library' }}">
+ <library-nav-menu app="{{ app }}" library="{{ field['owner'] }}"></library-nav-menu>
+ </template>
+ <nav-menu link="." anchor="{{ field['user_name'] }}" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -309,8 +566,24 @@
</div>
</template>
-</polymer-element><polymer-element name="function-view" extends="observatory-element">
+</polymer-element>
+<polymer-element name="function-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <template if="{{ function['owner']['type'] == '@Class' }}">
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ function['owner'] }}"></class-nav-menu>
+ </template>
+ <template if="{{ function['owner']['type'] == '@Library' }}">
+ <library-nav-menu app="{{ app }}" library="{{ function['owner'] }}"></library-nav-menu>
+ </template>
+ <nav-menu link="." anchor="{{ function['user_name'] }}" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -357,7 +630,8 @@
</div>
</template>
-</polymer-element><polymer-element name="script-ref" extends="service-ref">
+</polymer-element>
+<polymer-element name="script-ref" extends="service-ref">
<template>
<a title="{{ hoverText }}" href="{{ url }}">{{ name }}</a>
</template>
@@ -370,7 +644,7 @@
<img src="img/isolate_icon.png" class="img-polaroid">
</div>
- <div class="col-md-1">{{ isolate.name }}</div>
+ <div class="col-md-1">{{ isolate.vmName }}</div>
<!-- TODO(turnidge): Use function-ref when it can take isolate param -->
<div class="col-md-4">
@@ -378,12 +652,11 @@
<div class="row">
<template if="{{ isolate.entry['id'] != null }}">
<a href="{{ app.locationManager.relativeLink(isolate.id, isolate.entry['id']) }}">
- {{ isolate.entry['name'] }}
+ {{ isolate.name }}
</a>
</template>
<template if="{{ isolate.entry['id'] == null }}">
- <!-- fred -->
- root isolate
+ {{ isolate.name }}
</template>
</div>
@@ -457,7 +730,11 @@
</polymer-element>
<polymer-element name="isolate-list" extends="observatory-element">
<template>
- <button type="button" on-click="{{refresh}}">Refresh</button>
+ <nav-bar>
+ <top-nav-menu last="{{ true }}"></top-nav-menu>
+ <!-- TODO(turnidge): Why doesn't "this.refresh" work? -->
+ <nav-refresh callback="{{ refresh } }}"></nav-refresh>
+ </nav-bar>
<ul class="list-group">
<template repeat="{{ isolate in app.isolateManager.isolates.values }}">
<li class="list-group-item">
@@ -471,6 +748,16 @@
</polymer-element>
<polymer-element name="instance-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ instance['class'] }}"></class-nav-menu>
+ <nav-menu link="." anchor="instance" last="{{ true }}"></nav-menu>
+ <!-- TODO(turnidge): Add nav refresh here. -->
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -539,7 +826,14 @@
</polymer-element>
<polymer-element name="library-view" extends="observatory-element">
<template>
- <div class="alert alert-success">Library {{ library['name'] }}</div>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ library }}" last="{{ true }}"></library-nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="alert alert-info">Scripts</div>
<table class="table table-hover">
<tbody>
@@ -607,9 +901,15 @@
</polymer-element>
<polymer-element name="heap-profile" extends="observatory-element">
<template>
- <div>
- <button type="button" on-click="{{refreshData}}">Refresh</button>
- </div>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="heap profile" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
+ <button type="button" on-click="{{resetAccumulator}}">Reset Accumulator</button>
<div class="row">
<div id="newPieChart" class="col-md-4" style="height: 400px">
</div>
@@ -638,21 +938,30 @@
<tbody>
<tr>
<td>Collections</td>
- <td>{{ formattedCollections(true) }}</td>
+ <td>{{ formattedCollections(false) }}</td>
</tr>
<tr>
<td>Average Collection Time</td>
- <td>{{ formattedAverage(true) }}</td>
+ <td>{{ formattedAverage(false) }}</td>
</tr>
<tr>
<td>Cumulative Collection Time</td>
- <td>{{ formattedTotalCollectionTime(true) }}</td>
+ <td>{{ formattedTotalCollectionTime(false) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
+ <p class="col-md-2">Aggregate heap table</p>
+ </div>
+ <div class="row">
+ <div id="simpleTable" class="col-md-12" style="height: 800px"></div>
+ </div>
+ <div class="row">
+ <p class="col-md-2">Individual heap table</p>
+ </div>
+ <div class="row">
<div id="table" class="col-md-12" style="height: 800px"></div>
</div>
</template>
@@ -660,6 +969,14 @@
</polymer-element>
<polymer-element name="script-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ script.libraryRef }}"></library-nav-menu>
+ <nav-menu link="." anchor="{{ script.shortName }}" last="{{ true }}"></nav-menu>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel-heading">
@@ -682,17 +999,13 @@
</div>
</template>
-</polymer-element><polymer-element name="stack-frame" extends="observatory-element">
+</polymer-element>
+<polymer-element name="stack-frame" extends="observatory-element">
<template>
<style>
- .memberList {
- margin-left: 3em;
- border-spacing: 0;
- border-collapse: collapse;
- }
.member {
- vertical-align: top;
- padding: 0 1em;
+ vertical-align: top;
+ padding: 0 0 0 1em;
}
</style>
<div class="row">
@@ -703,11 +1016,9 @@
<div class="col-md-9">
<function-ref app="{{ app }}" ref="{{ frame['function'] }}"></function-ref>
( <script-ref app="{{ app }}" ref="{{ frame['script'] }}" line="{{ frame['line'] }}">
- </script-ref> ) {
- <a on-click="{{ toggleExpand }}">...</a>
-
- <template if="{{ expanded }}">
- <table class="memberList">
+ </script-ref> )
+ <curly-block>
+ <table>
<tbody><tr template="" repeat="{{ v in frame['vars'] }}">
<td class="member">{{ v['name']}}</td>
<td class="member">
@@ -715,8 +1026,7 @@
</td>
</tr>
</tbody></table>
- </template>
- }
+ </curly-block>
</div>
<div class="col-md-1"></div>
@@ -728,7 +1038,14 @@
</polymer-element>
<polymer-element name="stack-trace" extends="observatory-element">
<template>
- <button type="button" on-click="{{refresh}}">Refresh</button>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="stack trace" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<template if="{{ trace['members'].isEmpty }}">
<div class="col-md-1"></div>
<div class="col-md-11">
@@ -816,34 +1133,17 @@
</template>
</polymer-element>
-<polymer-element name="navigation-bar-isolate" extends="observatory-element">
- <template>
- <ul class="nav navbar-nav">
- <li><a href="{{ currentIsolateLink('') }}"> {{currentIsolateName()}}</a></li>
- <template repeat="{{link in links}}">
- <li><a href="{{ currentIsolateLink(link) }}">{{ link }}</a></li>
- </template>
- </ul>
- </template>
-
-</polymer-element><polymer-element name="navigation-bar" extends="observatory-element">
+<polymer-element name="isolate-profile" extends="observatory-element">
<template>
- <nav class="navbar navbar-default" role="navigation">
- <div class="navbar-header">
- <a class="navbar-brand" href="#/isolates">Observatory</a>
- </div>
- <template if="{{ app.locationManager.hasCurrentIsolate }}">
- <div class="collapse navbar-collapse navbar-ex1-collapse">
- <navigation-bar-isolate app="{{ app }}"></navigation-bar-isolate>
- </div>
- </template>
- </nav>
- </template>
-
-</polymer-element><polymer-element name="isolate-profile" extends="observatory-element">
- <template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="cpu profile" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div>
- <button type="button" on-click="{{refreshData}}">Refresh profile data</button>
<span>Top</span>
<select selectedindex="{{methodCountSelected}}" value="{{methodCounts[methodCountSelected]}}">
<option template="" repeat="{{count in methodCounts}}">{{count}}</option>
@@ -882,7 +1182,6 @@
</polymer-element><polymer-element name="observatory-application" extends="observatory-element">
<template>
- <navigation-bar app="{{ app }}"></navigation-bar>
<template if="{{ app.locationManager.profile }}">
<isolate-profile app="{{ app }}"></isolate-profile>
</template>
@@ -892,6 +1191,8 @@
</template>
</polymer-element>
+
+
<observatory-application></observatory-application>
</body></html>
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js b/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js
index 37570e3..81b6ad1 100644
--- a/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js
+++ b/runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js
@@ -8597,7 +8597,7 @@
init()
$=I.p
var $$={}
-;init.mangledNames={gBA:"__$methodCountSelected",gBW:"__$msg",gCO:"_oldPieChart",gDF:"requestManager",gF0:"__$cls",gF8:"__$instruction",gGQ:"_newPieDataTable",gGj:"_message",gHX:"__$displayValue",gHm:"tree",gJ0:"_newPieChart",gKM:"$",gL4:"human",gLE:"timers",gMt:"__$expanded",gN7:"__$library",gOc:"_oldPieDataTable",gOl:"__$profile",gP:"value",gPe:"__$internal",gPw:"__$isolate",gPy:"__$error",gRd:"line",gSw:"lines",gUy:"_collapsed",gUz:"__$script",gV4:"__$trace",gVa:"__$frame",gWT:"rows",gX3:"_first",gXR:"scripts",gXh:"__$instance",gYu:"address",gZ0:"codes",gZ6:"locationManager",gZ8:"__$function",ga:"a",gan:"_tableChart",gb:"b",gc:"c",ge6:"_tableDataTable",geJ:"__$code",geb:"__$json",gfb:"methodCounts",ghm:"__$app",gi2:"isolates",gk5:"__$devtools",gkf:"_count",gm0:"__$isolate",gm7:"machine",gnI:"isolateManager",goH:"columns",gqO:"_id",gqX:"__$expanded",gqY:"__$topExclusiveCodes",grK:"__$links",gtT:"code",gtY:"__$ref",gvH:"index",gva:"instructions",gvt:"__$field",gwd:"children",gyt:"depth",gzh:"__$iconClass",gzw:"__$line"};init.mangledGlobalNames={BO:"ALLOCATED_BEFORE_GC",DI:"_closeIconClass",V1g:"LIVE_AFTER_GC_SIZE",Vl:"_openIconClass",Xa:"ALLOCATED_BEFORE_GC_SIZE",d6:"ALLOCATED_SINCE_GC_SIZE",r1K:"ALLOCATED_SINCE_GC",xK:"LIVE_AFTER_GC"};(function (reflectionData) {
+;init.mangledNames={gAp:"__$library",gAu:"__$cls",gBA:"__$methodCountSelected",gBW:"__$msg",gCO:"_oldPieChart",gDF:"requestManager",gF0:"__$cls",gF8:"__$instruction",gGQ:"_newPieDataTable",gGV:"__$expanded",gGj:"_message",gHX:"__$displayValue",gHm:"tree",gHu:"__$busy",gJ0:"_newPieChart",gJo:"__$last",gKM:"$",gKU:"__$link",gL4:"human",gLE:"timers",gLY:"_fullDataTable",gN7:"__$library",gOc:"_oldPieDataTable",gOl:"__$profile",gP:"value",gPe:"__$internal",gPw:"__$isolate",gPy:"__$error",gRd:"line",gSB:"__$active",gSw:"lines",gUy:"_collapsed",gUz:"__$script",gV4:"__$trace",gVa:"__$frame",gWT:"rows",gX3:"_first",gXR:"scripts",gXh:"__$instance",gYu:"address",gZ0:"codes",gZ6:"locationManager",gZ8:"__$function",gZC:"__$anchor",ga:"a",gb:"b",gbV:"_combinedDataTable",gc:"c",geJ:"__$code",geb:"__$json",gfb:"methodCounts",ghm:"__$app",gi2:"isolates",giy:"__$isolate",gk5:"__$devtools",gkf:"_count",gm0:"__$isolate",gm7:"machine",gnI:"isolateManager",gnx:"__$callback",goH:"columns",gq3:"_fullChart",gqO:"_id",gqY:"__$topExclusiveCodes",grU:"__$callback",gtT:"code",gtY:"__$ref",gvH:"index",gvR:"_combinedChart",gva:"instructions",gvt:"__$field",gwd:"children",gyt:"depth",gzh:"__$iconClass",gzw:"__$line"};init.mangledGlobalNames={BO:"ALLOCATED_BEFORE_GC",DI:"_closeIconClass",DY2:"ACCUMULATED_SIZE",V1g:"LIVE_AFTER_GC_SIZE",Vl:"_openIconClass",bQj:"ALLOCATED_BEFORE_GC_SIZE",d6:"ALLOCATED_SINCE_GC_SIZE",pC:"ACCUMULATED",r1K:"ALLOCATED_SINCE_GC",xK:"LIVE_AFTER_GC"};(function (reflectionData) {
"use strict";
function map(x){x={x:x};delete x.x;return x}
function processStatics(descriptor) {
@@ -8839,7 +8839,7 @@
n:[function(a,b){return a===b},"call$1","gUJ",2,0,null,104,[]],
giO:function(a){return H.eQ(a)},
bu:[function(a){return H.a5(a)},"call$0","gXo",0,0,null],
-T:[function(a,b){throw H.b(P.lr(a,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,326,[]],
+T:[function(a,b){throw H.b(P.lr(a,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,328,[]],
gbx:function(a){return new H.cu(H.dJ(a),null)},
$isGv:true,
"%":"DOMImplementation|SVGAnimatedEnumeration|SVGAnimatedNumberList|SVGAnimatedString"},
@@ -8849,7 +8849,7 @@
giO:function(a){return a?519018:218159},
gbx:function(a){return C.HL},
$isbool:true},
-ht:{
+Jh:{
"^":"Null/Gv;",
n:[function(a,b){return null==b},"call$1","gUJ",2,0,null,104,[]],
bu:[function(a){return"null"},"call$0","gXo",0,0,null],
@@ -8879,7 +8879,7 @@
return!0}return!1},"call$1","gRI",2,0,null,124,[]],
ev:[function(a,b){return H.VM(new H.U5(a,b),[null])},"call$1","gIR",2,0,null,110,[]],
FV:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(a,z.gl())},"call$1","gDY",2,0,null,327,[]],
+for(z=J.GP(b);z.G();)this.h(a,z.gl())},"call$1","gDY",2,0,null,329,[]],
V1:[function(a){this.sB(a,0)},"call$0","gyP",0,0,null],
aN:[function(a,b){return H.bQ(a,b)},"call$1","gjw",2,0,null,110,[]],
ez:[function(a,b){return H.VM(new H.A8(a,b),[null,null])},"call$1","gIr",2,0,null,110,[]],
@@ -8889,8 +8889,8 @@
y.fixed$length=init
for(x=0;x<a.length;++x){w=H.d(a[x])
if(x>=z)return H.e(y,x)
-y[x]=w}return y.join(b)},"call$1","gnr",0,2,null,328,329,[]],
-eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gZo",2,0,null,287,[]],
+y[x]=w}return y.join(b)},"call$1","gnr",0,2,null,330,331,[]],
+eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gZo",2,0,null,289,[]],
Zv:[function(a,b){if(b>>>0!==b||b>=a.length)return H.e(a,b)
return a[b]},"call$1","goY",2,0,null,47,[]],
D6:[function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(new P.AT(b))
@@ -8920,7 +8920,7 @@
Vr:[function(a,b){return H.Ck(a,b)},"call$1","gG2",2,0,null,110,[]],
GT:[function(a,b){if(!!a.immutable$list)H.vh(P.f("sort"))
H.ZE(a,0,a.length-1,b)},"call$1","gH7",0,2,null,77,128,[]],
-XU:[function(a,b,c){return H.TK(a,b,c,a.length)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,124,[],115,[]],
+XU:[function(a,b,c){return H.TK(a,b,c,a.length)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,124,[],115,[]],
Pk:[function(a,b,c){return H.eX(a,b,a.length-1)},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,124,[],115,[]],
tg:[function(a,b){var z
for(z=0;z<a.length;++z)if(J.de(a[z],b))return!0
@@ -8932,7 +8932,7 @@
if(b)return H.VM(a.slice(),[H.Kp(a,0)])
else{z=H.VM(a.slice(),[H.Kp(a,0)])
z.fixed$length=init
-return z}},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+return z}},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
gA:function(a){return H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)])},
giO:function(a){return H.eQ(a)},
gB:function(a){return a.length},
@@ -8961,7 +8961,7 @@
nM:{
"^":"Q;",
$isnM:true},
-ZC:{
+iY:{
"^":"nM;"},
Jt:{
"^":"nM;",
@@ -8976,11 +8976,11 @@
if(this.gzP(a)===z)return 0
if(this.gzP(a))return-1
return 1}return 0}else if(isNaN(a)){if(this.gG0(b))return 0
-return 1}else return-1},"call$1","gYc",2,0,null,180,[]],
+return 1}else return-1},"call$1","gYc",2,0,null,183,[]],
gzP:function(a){return a===0?1/a<0:a<0},
gG0:function(a){return isNaN(a)},
gx8:function(a){return isFinite(a)},
-JV:[function(a,b){return a%b},"call$1","gKG",2,0,null,180,[]],
+JV:[function(a,b){return a%b},"call$1","gKG",2,0,null,183,[]],
yu:[function(a){var z
if(a>=-2147483648&&a<=2147483647)return a|0
if(isFinite(a)){z=a<0?Math.ceil(a):Math.floor(a)
@@ -8992,7 +8992,7 @@
if(b>20)throw H.b(P.C3(b))
z=a.toFixed(b)
if(a===0&&this.gzP(a))return"-"+z
-return z},"call$1","gfE",2,0,null,333,[]],
+return z},"call$1","gfE",2,0,null,335,[]],
WZ:[function(a,b){if(b<2||b>36)throw H.b(P.C3(b))
return a.toString(b)},"call$1","gEI",2,0,null,28,[]],
bu:[function(a){if(a===0&&1/a<0)return"-0.0"
@@ -9028,7 +9028,7 @@
else{z=b>31?31:b
z=a>>z>>>0}return z},"call$1","gMe",2,0,null,104,[]],
i:[function(a,b){if(typeof b!=="number")throw H.b(new P.AT(b))
-return(a&b)>>>0},"call$1","gAp",2,0,null,104,[]],
+return(a&b)>>>0},"call$1","gAU",2,0,null,104,[]],
w:[function(a,b){if(typeof b!=="number")throw H.b(P.u(b))
return(a^b)>>>0},"call$1","gttE",2,0,null,104,[]],
C:[function(a,b){if(typeof b!=="number")throw H.b(P.u(b))
@@ -9064,7 +9064,7 @@
if(b<0)throw H.b(P.N(b))
if(b>=a.length)throw H.b(P.N(b))
return a.charCodeAt(b)},"call$1","gSu",2,0,null,47,[]],
-dd:[function(a,b){return H.ZT(a,b)},"call$1","gYv",2,0,null,334,[]],
+dd:[function(a,b){return H.ZT(a,b)},"call$1","gYv",2,0,null,336,[]],
wL:[function(a,b,c){var z,y,x,w
if(c<0||c>b.length)throw H.b(P.TE(c,0,b.length))
z=a.length
@@ -9075,7 +9075,7 @@
if(w>=y)H.vh(P.N(w))
w=b.charCodeAt(w)
if(x>=z)H.vh(P.N(x))
-if(w!==a.charCodeAt(x))return}return new H.tQ(c,b,a)},"call$2","grS",2,2,null,330,26,[],115,[]],
+if(w!==a.charCodeAt(x))return}return new H.tQ(c,b,a)},"call$2","grS",2,2,null,332,26,[],115,[]],
g:[function(a,b){if(typeof b!=="string")throw H.b(new P.AT(b))
return a+b},"call$1","gF1n",2,0,null,104,[]],
Tc:[function(a,b){var z,y
@@ -9089,7 +9089,7 @@
if(c>a.length)throw H.b(P.TE(c,0,a.length))
if(typeof b==="string"){z=c+b.length
if(z>a.length)return!1
-return b===a.substring(c,z)}return J.I8(b,a,c)!=null},function(a,b){return this.Qi(a,b,0)},"nC","call$2",null,"gcV",2,2,null,330,98,[],47,[]],
+return b===a.substring(c,z)}return J.I8(b,a,c)!=null},function(a,b){return this.Qi(a,b,0)},"nC","call$2",null,"gcV",2,2,null,332,98,[],47,[]],
Nj:[function(a,b,c){var z
if(typeof b!=="number"||Math.floor(b)!==b)H.vh(P.u(b))
if(c==null)c=a.length
@@ -9118,7 +9118,7 @@
z=J.rY(b)
if(typeof b==="object"&&b!==null&&!!z.$isVR){y=b.yk(a,c)
return y==null?-1:y.QK.index}for(x=a.length,w=c;w<=x;++w)if(z.wL(b,a,w)!=null)return w
-return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,98,[],115,[]],
+return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,98,[],115,[]],
Pk:[function(a,b,c){var z,y,x
c=a.length
if(typeof b==="string"){z=b.length
@@ -9132,7 +9132,7 @@
if(z.wL(b,a,x)!=null)return x;--x}return-1},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,98,[],115,[]],
Is:[function(a,b,c){if(b==null)H.vh(new P.AT(null))
if(c>a.length)throw H.b(P.TE(c,0,a.length))
-return H.m2(a,b,c)},function(a,b){return this.Is(a,b,0)},"tg","call$2",null,"gdj",2,2,null,330,104,[],80,[]],
+return H.m2(a,b,c)},function(a,b){return this.Is(a,b,0)},"tg","call$2",null,"gdj",2,2,null,332,104,[],80,[]],
gl0:function(a){return a.length===0},
gor:function(a){return a.length!==0},
iM:[function(a,b){var z
@@ -9297,7 +9297,7 @@
aX:{
"^":"a;jO>,Gx,fW,En<,EE<,Qy,RW<,C9<,lJ",
v8:[function(a,b){if(!this.Qy.n(0,a))return
-if(this.lJ.h(0,b)&&!this.RW)this.RW=!0},"call$2","gfU",4,0,null,335,[],336,[]],
+if(this.lJ.h(0,b)&&!this.RW)this.RW=!0},"call$2","gfU",4,0,null,337,[],338,[]],
NR:[function(a){var z,y,x,w,v,u
if(!this.RW)return
z=this.lJ
@@ -9313,7 +9313,7 @@
if(w<0||w>=u)return H.e(v,w)
v[w]=x
if(w===y.eZ)y.VW()
-y.qT=y.qT+1}this.RW=!1}},"call$1","gtS",2,0,null,336,[]],
+y.qT=y.qT+1}this.RW=!1}},"call$1","gtS",2,0,null,338,[]],
vV:[function(a){var z,y
z=init.globalState.N0
init.globalState.N0=this
@@ -9327,10 +9327,10 @@
case"resume":this.NR(z.t(a,1))
break
default:P.JS("UNKOWN MESSAGE: "+H.d(a))}},"call$1","gNo",2,0,null,20,[]],
-Zt:[function(a){return this.Gx.t(0,a)},"call$1","gQB",2,0,null,337,[]],
+Zt:[function(a){return this.Gx.t(0,a)},"call$1","gQB",2,0,null,339,[]],
aU:[function(a,b){var z=this.Gx
if(z.x4(a))throw H.b(P.FM("Registry: ports must be registered only once."))
-z.u(0,a,b)},"call$2","gPn",4,0,null,337,[],338,[]],
+z.u(0,a,b)},"call$2","gPn",4,0,null,339,[],340,[]],
PC:[function(){var z=this.jO
if(this.Gx.X5-this.fW.X5>0)init.globalState.i2.u(0,z,this)
else init.globalState.i2.Rz(0,z)},"call$0","gi8",0,0,null],
@@ -9465,7 +9465,7 @@
z.fW.Rz(0,y)
z.PC()},"call$0","gJK",0,0,null],
FL:[function(a,b){if(this.P0)return
-this.wy(b)},"call$1","gT5",2,0,null,339,[]],
+this.wy(b)},"call$1","gT5",2,0,null,341,[]],
$isyo:true,
static:{"^":"Vz"}},
NA:{
@@ -9483,7 +9483,7 @@
yf:[function(a){if(!!a.$isku)return new H.ku(a.ng)
throw H.b("Capability not serializable: "+H.d(a))},"call$1","gbM",2,0,null,21,[]]},
II:{
-"^":"iY;RZ",
+"^":"AP;RZ",
Vf:[function(a){var z,y,x,w,v,u
z=J.U6(a)
y=z.t(a,1)
@@ -9499,7 +9499,7 @@
"^":"a;MD",
t:[function(a,b){return b.__MessageTraverser__attached_info__},"call$1","gIA",2,0,null,6,[]],
u:[function(a,b,c){this.MD.push(b)
-b.__MessageTraverser__attached_info__=c},"call$2","gj3",4,0,null,6,[],340,[]],
+b.__MessageTraverser__attached_info__=c},"call$2","gj3",4,0,null,6,[],342,[]],
Hn:[function(a){this.MD=[]},"call$0","gb6",0,0,null],
Xq:[function(){var z,y,x
for(z=this.MD.length,y=0;y<z;++y){x=this.MD
@@ -9508,7 +9508,7 @@
X1:{
"^":"a;",
t:[function(a,b){return},"call$1","gIA",2,0,null,6,[]],
-u:[function(a,b,c){},"call$2","gj3",4,0,null,6,[],340,[]],
+u:[function(a,b,c){},"call$2","gj3",4,0,null,6,[],342,[]],
Hn:[function(a){},"call$0","gb6",0,0,null],
Xq:[function(){return},"call$0","gt6",0,0,null]},
HU:{
@@ -9555,9 +9555,9 @@
DE:[function(a){return H.vh(P.SY(null))},"call$1","goi",2,0,null,21,[]],
yf:[function(a){return H.vh(P.SY(null))},"call$1","gbM",2,0,null,21,[]]},
OW:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z=this.b
-J.kW(this.a.a,z.I8(a),z.I8(b))},"call$2",null,4,0,null,42,[],201,[],"call"],
+J.kW(this.a.a,z.I8(a),z.I8(b))},"call$2",null,4,0,null,42,[],204,[],"call"],
$isEH:true},
hz:{
"^":"HU;",
@@ -9588,7 +9588,7 @@
x[w]=v}return x},"call$1","gBv",2,0,null,68,[]],
DE:[function(a){return H.vh(P.SY(null))},"call$1","goi",2,0,null,21,[]],
yf:[function(a){return H.vh(P.SY(null))},"call$1","gbM",2,0,null,21,[]]},
-iY:{
+AP:{
"^":"a;",
QS:[function(a){if(H.ZR(a))return a
this.RZ=P.Py(null,null,null,null,null)
@@ -9851,7 +9851,7 @@
z.dartException=a
if("defineProperty" in Object){Object.defineProperty(z, "message", { get: H.Ju })
z.name=""}else z.toString=H.Ju
-throw z},"call$1","xE",2,0,null,48,[]],
+throw z},"call$1","wZ",2,0,null,48,[]],
Ru:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
z=new H.Am(a)
if(a==null)return
@@ -9989,7 +9989,7 @@
x="return function("+v+"){return this."+H.d(H.oN())+"."+z+"(this."+H.d(H.Wz())+","+v+");"
w=$.OK
$.OK=J.WB(w,1)
-return new Function(x+H.d(w)+"}")()}else return H.Z4(y,z,a)},"call$1","S4",2,0,null,15,[]],
+return new Function(x+H.d(w)+"}")()}else return H.Z4(y,z,a)},"call$1","n9",2,0,null,15,[]],
Kq:[function(a,b,c,d,e,f){b.fixed$length=init
c.fixed$length=init
return H.iA(a,b,c,!!d,e,f)},"call$6","lu",12,0,null,41,[],59,[],60,[],61,[],62,[],12,[]],
@@ -10033,7 +10033,7 @@
u=typeof u==="string"?u:H.d(u)
z.vM=z.vM+u}return w?"":"<"+H.d(z)+">"},"call$3$onTypeVariable","iM",4,3,null,77,79,[],80,[],78,[]],
dJ:[function(a){var z=typeof a==="object"&&a!==null&&a.constructor===Array?"List":J.x(a).constructor.builtin$cls
-return z+H.ia(a.$builtinTypeInfo,0,null)},"call$1","Yx",2,0,null,6,[]],
+return z+H.ia(a.$builtinTypeInfo,0,null)},"call$1","om",2,0,null,6,[]],
Y9:[function(a,b){if(typeof a==="object"&&a!==null&&a.constructor===Array)b=a
else if(typeof a=="function"){a=H.ml(a,null,b)
if(typeof a==="object"&&a!==null&&a.constructor===Array)b=a
@@ -10075,7 +10075,7 @@
if(!y&&t==null||!w)return!0
y=y?a.slice(1):null
w=w?b.slice(1):null
-return H.hv(H.Y9(t,y),w)},"call$2","jm",4,0,null,86,[],87,[]],
+return H.hv(H.Y9(t,y),w)},"call$2","Mb",4,0,null,86,[],87,[]],
Hc:[function(a,b,c){var z,y,x,w,v
if(b==null&&a==null)return!0
if(b==null)return c
@@ -10119,7 +10119,7 @@
if(!(H.t1(o,n)||H.t1(n,o)))return!1}for(m=0;m<q;++l,++m){o=v[l]
n=u[m]
if(!(H.t1(o,n)||H.t1(n,o)))return!1}}return H.Vt(a.named,b.named)},"call$2","Sj",4,0,null,86,[],87,[]],
-ml:[function(a,b,c){return a.apply(b,c)},"call$3","Ey",6,0,null,15,[],41,[],82,[]],
+ml:[function(a,b,c){return a.apply(b,c)},"call$3","lv",6,0,null,15,[],41,[],82,[]],
uc:[function(a){var z=$.NF
return"Instance of "+(z==null?"<Unknown>":z.call$1(a))},"call$1","zB",2,0,null,93,[]],
Su:[function(a){return H.eQ(a)},"call$1","cx",2,0,null,6,[]],
@@ -10234,7 +10234,7 @@
gor:function(a){return!J.de(this.gB(this),0)},
bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
Ix:[function(){throw H.b(P.f("Cannot modify unmodifiable Map"))},"call$0","gPb",0,0,null],
-u:[function(a,b,c){return this.Ix()},"call$2","gj3",4,0,null,42,[],201,[]],
+u:[function(a,b,c){return this.Ix()},"call$2","gj3",4,0,null,42,[],204,[]],
Rz:[function(a,b){return this.Ix()},"call$1","gRI",2,0,null,42,[]],
V1:[function(a){return this.Ix()},"call$0","gyP",0,0,null],
FV:[function(a,b){return this.Ix()},"call$1","gDY",2,0,null,104,[]],
@@ -10258,11 +10258,11 @@
$isEH:true,
$signature:function(){return H.IG(function(a,b){return{func:"JF",args:[b]}},this.a,"LPe")}},
WT:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){return this.b.call$2(a,this.a.t(0,a))},"call$1",null,2,0,null,42,[],"call"],
$isEH:true},
jJ:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,42,[],"call"],
$isEH:true},
XR:{
@@ -10356,18 +10356,18 @@
"^":"a;e0?",
gpf:function(){return!0},
Bj:[function(a,b){var z=this.e0
-return J.jf(z==null?a:z,b)},"call$2","gUT",4,0,null,140,[],326,[]]},
+return J.jf(z==null?a:z,b)},"call$2","gUT",4,0,null,140,[],328,[]]},
FD:{
"^":"a;mr,Rn>,XZ,Rv,hG,Mo,AM",
BX:[function(a,b){var z=this.Rv
if(b<z)return
-return this.Rn[3+b-z]},"call$1","gkv",2,0,null,342,[]],
+return this.Rn[3+b-z]},"call$1","gkv",2,0,null,344,[]],
hl:[function(a){var z,y
z=this.AM
if(typeof z=="number")return init.metadata[z]
else if(typeof z=="function"){y=new a()
H.VM(y,y["<>"])
-return z.apply({$receiver:y})}else throw H.b(H.Ef("Unexpected function type"))},"call$1","gIX",2,0,null,343,[]],
+return z.apply({$receiver:y})}else throw H.b(H.Ef("Unexpected function type"))},"call$1","gIX",2,0,null,345,[]],
gx5:function(){return this.mr.$reflectionName},
static:{"^":"t4,FV,C1,bt",zh:function(a){var z,y,x,w
z=a.$reflectionInfo
@@ -10379,7 +10379,7 @@
w=z[1]
return new H.FD(a,z,(y&1)===1,x,w>>1,(w&1)===1,z[2])}}},
Cj:{
-"^":"Tp:344;a,b,c",
+"^":"Tp:346;a,b,c",
call$2:[function(a,b){var z=this.a
z.b=z.b+"$"+H.d(a)
this.c.push(a)
@@ -10387,10 +10387,10 @@
z.a=z.a+1},"call$2",null,4,0,null,12,[],46,[],"call"],
$isEH:true},
u8:{
-"^":"Tp:344;a,b",
+"^":"Tp:346;a,b",
call$2:[function(a,b){var z=this.b
if(z.x4(a))z.u(0,a,b)
-else this.a.a=!0},"call$2",null,4,0,null,342,[],23,[],"call"],
+else this.a.a=!0},"call$2",null,4,0,null,344,[],23,[],"call"],
$isEH:true},
Zr:{
"^":"a;bT,rq,Xs,Fa,Ga,EP",
@@ -10425,7 +10425,7 @@
} catch (e) {
return e.message;
}
-}(a)},"call$1","XG",2,0,null,49,[]],Mj:[function(a){return function($expr$) {
+}(a)},"call$1","LS",2,0,null,49,[]],Mj:[function(a){return function($expr$) {
try {
$expr$.$method$;
} catch (e) {
@@ -10459,10 +10459,10 @@
bu:[function(a){var z=this.K9
return C.xB.gl0(z)?"Error":"Error: "+z},"call$0","gXo",0,0,null]},
Am:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isGe)if(a.$thrownJsError==null)a.$thrownJsError=this.a
-return a},"call$1",null,2,0,null,152,[],"call"],
+return a},"call$1",null,2,0,null,155,[],"call"],
$isEH:true},
XO:{
"^":"a;lA,ui",
@@ -10636,11 +10636,11 @@
Lm:{
"^":"a;XP<,oc>,kU>"},
dC:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return this.a(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
wN:{
-"^":"Tp:345;b",
+"^":"Tp:347;b",
call$2:[function(a,b){return this.b(a,b)},"call$2",null,4,0,null,91,[],94,[],"call"],
$isEH:true},
VX:{
@@ -10665,10 +10665,10 @@
if(typeof a!=="string")H.vh(new P.AT(a))
z=this.Ej.exec(a)
if(z==null)return
-return H.yx(this,z)},"call$1","gvz",2,0,null,334,[]],
+return H.yx(this,z)},"call$1","gvz",2,0,null,336,[]],
zD:[function(a){if(typeof a!=="string")H.vh(new P.AT(a))
-return this.Ej.test(a)},"call$1","guf",2,0,null,334,[]],
-dd:[function(a,b){return new H.KW(this,b)},"call$1","gYv",2,0,null,334,[]],
+return this.Ej.test(a)},"call$1","guf",2,0,null,336,[]],
+dd:[function(a,b){return new H.KW(this,b)},"call$1","gYv",2,0,null,336,[]],
yk:[function(a,b){var z,y
z=this.gF4()
z.lastIndex=b
@@ -10691,7 +10691,7 @@
if(typeof z!=="number")return H.s(z)
z=c>z}else z=!0
if(z)throw H.b(P.TE(c,0,J.q8(b)))
-return this.Bh(b,c)},function(a,b){return this.wL(a,b,0)},"R4","call$2",null,"grS",2,2,null,330,26,[],115,[]],
+return this.Bh(b,c)},function(a,b){return this.wL(a,b,0)},"R4","call$2",null,"grS",2,2,null,332,26,[],115,[]],
$isVR:true,
$iscT:true,
static:{v4:[function(a,b,c,d){var z,y,x,w,v
@@ -10737,18 +10737,20 @@
tQ:{
"^":"a;M,J9,zO",
t:[function(a,b){if(!J.de(b,0))H.vh(P.N(b))
-return this.zO},"call$1","gIA",2,0,null,346,[]],
+return this.zO},"call$1","gIA",2,0,null,348,[]],
$isOd:true}}],["app_bootstrap","index.html_bootstrap.dart",,E,{
"^":"",
-QL:[function(){$.x2=["package:observatory/src/observatory_elements/observatory_element.dart","package:observatory/src/observatory_elements/breakpoint_list.dart","package:observatory/src/observatory_elements/service_ref.dart","package:observatory/src/observatory_elements/class_ref.dart","package:observatory/src/observatory_elements/error_view.dart","package:observatory/src/observatory_elements/field_ref.dart","package:observatory/src/observatory_elements/function_ref.dart","package:observatory/src/observatory_elements/instance_ref.dart","package:observatory/src/observatory_elements/library_ref.dart","package:observatory/src/observatory_elements/class_view.dart","package:observatory/src/observatory_elements/code_ref.dart","package:observatory/src/observatory_elements/disassembly_entry.dart","package:observatory/src/observatory_elements/code_view.dart","package:observatory/src/observatory_elements/collapsible_content.dart","package:observatory/src/observatory_elements/field_view.dart","package:observatory/src/observatory_elements/function_view.dart","package:observatory/src/observatory_elements/script_ref.dart","package:observatory/src/observatory_elements/isolate_summary.dart","package:observatory/src/observatory_elements/isolate_list.dart","package:observatory/src/observatory_elements/instance_view.dart","package:observatory/src/observatory_elements/json_view.dart","package:observatory/src/observatory_elements/library_view.dart","package:observatory/src/observatory_elements/heap_profile.dart","package:observatory/src/observatory_elements/script_view.dart","package:observatory/src/observatory_elements/stack_frame.dart","package:observatory/src/observatory_elements/stack_trace.dart","package:observatory/src/observatory_elements/message_viewer.dart","package:observatory/src/observatory_elements/navigation_bar_isolate.dart","package:observatory/src/observatory_elements/navigation_bar.dart","package:observatory/src/observatory_elements/isolate_profile.dart","package:observatory/src/observatory_elements/response_viewer.dart","package:observatory/src/observatory_elements/observatory_application.dart","main.dart"]
+YF:[function(){$.x2=["package:observatory/src/observatory_elements/observatory_element.dart","package:observatory/src/observatory_elements/nav_bar.dart","package:observatory/src/observatory_elements/breakpoint_list.dart","package:observatory/src/observatory_elements/service_ref.dart","package:observatory/src/observatory_elements/class_ref.dart","package:observatory/src/observatory_elements/error_view.dart","package:observatory/src/observatory_elements/field_ref.dart","package:observatory/src/observatory_elements/function_ref.dart","package:observatory/src/observatory_elements/curly_block.dart","package:observatory/src/observatory_elements/instance_ref.dart","package:observatory/src/observatory_elements/library_ref.dart","package:observatory/src/observatory_elements/class_view.dart","package:observatory/src/observatory_elements/code_ref.dart","package:observatory/src/observatory_elements/disassembly_entry.dart","package:observatory/src/observatory_elements/code_view.dart","package:observatory/src/observatory_elements/collapsible_content.dart","package:observatory/src/observatory_elements/field_view.dart","package:observatory/src/observatory_elements/function_view.dart","package:observatory/src/observatory_elements/script_ref.dart","package:observatory/src/observatory_elements/isolate_summary.dart","package:observatory/src/observatory_elements/isolate_list.dart","package:observatory/src/observatory_elements/instance_view.dart","package:observatory/src/observatory_elements/json_view.dart","package:observatory/src/observatory_elements/library_view.dart","package:observatory/src/observatory_elements/heap_profile.dart","package:observatory/src/observatory_elements/script_view.dart","package:observatory/src/observatory_elements/stack_frame.dart","package:observatory/src/observatory_elements/stack_trace.dart","package:observatory/src/observatory_elements/message_viewer.dart","package:observatory/src/observatory_elements/isolate_profile.dart","package:observatory/src/observatory_elements/response_viewer.dart","package:observatory/src/observatory_elements/observatory_application.dart","main.dart"]
$.uP=!1
-F.E2()},"call$0","Pc",0,0,107]},1],["breakpoint_list_element","package:observatory/src/observatory_elements/breakpoint_list.dart",,B,{
+F.E2()},"call$0","nE",0,0,107]},1],["breakpoint_list_element","package:observatory/src/observatory_elements/breakpoint_list.dart",,B,{
"^":"",
G6:{
-"^":["Vf;BW%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-grs:[function(a){return a.BW},null,null,1,0,350,"msg",351,352],
-srs:[function(a,b){a.BW=this.ct(a,C.UX,a.BW,b)},null,null,3,0,353,23,[],"msg",351],
-"@":function(){return[C.lT]},
+"^":["Vf;BW%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+grs:[function(a){return a.BW},null,null,1,0,352,"msg",353,354],
+srs:[function(a,b){a.BW=this.ct(a,C.UX,a.BW,b)},null,null,3,0,355,23,[],"msg",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP("breakpoints")
+a.hm.gDF().fB(z).ml(new B.j3(a)).OA(new B.i0()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
+"@":function(){return[C.jy]},
static:{Dw:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
z=R.Jk(z)
@@ -10764,13 +10766,26 @@
C.J0.ZL(a)
C.J0.G6(a)
return a},null,null,0,0,108,"new BreakpointListElement$created"]}},
-"+BreakpointListElement":[354],
+"+BreakpointListElement":[357],
Vf:{
"^":"uL+Pi;",
-$isd3:true}}],["class_ref_element","package:observatory/src/observatory_elements/class_ref.dart",,Q,{
+$isd3:true},
+j3:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sBW(z,y.ct(z,C.UX,y.gBW(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+BreakpointListElement_refresh_closure":[358],
+i0:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing breakpoint-list: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+BreakpointListElement_refresh_closure":[358]}],["class_ref_element","package:observatory/src/observatory_elements/class_ref.dart",,Q,{
"^":"",
Tg:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.OS]},
static:{rt:[function(a){var z,y,x,w
z=$.Nd()
@@ -10786,13 +10801,15 @@
C.YZ.ZL(a)
C.YZ.G6(a)
return a},null,null,0,0,108,"new ClassRefElement$created"]}},
-"+ClassRefElement":[357]}],["class_view_element","package:observatory/src/observatory_elements/class_view.dart",,Z,{
+"+ClassRefElement":[362]}],["class_view_element","package:observatory/src/observatory_elements/class_view.dart",,Z,{
"^":"",
Ps:{
-"^":["pv;F0%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gRu:[function(a){return a.F0},null,null,1,0,350,"cls",351,352],
-sRu:[function(a,b){a.F0=this.ct(a,C.XA,a.F0,b)},null,null,3,0,353,23,[],"cls",351],
-"@":function(){return[C.aQ]},
+"^":["pv;F0%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gRu:[function(a){return a.F0},null,null,1,0,352,"cls",353,354],
+sRu:[function(a,b){a.F0=this.ct(a,C.XA,a.F0,b)},null,null,3,0,355,23,[],"cls",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.F0,"id"))
+a.hm.gDF().fB(z).ml(new Z.RI(a)).OA(new Z.Ye()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
+"@":function(){return[C.aQx]},
static:{zg:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
@@ -10805,13 +10822,26 @@
C.kk.ZL(a)
C.kk.G6(a)
return a},null,null,0,0,108,"new ClassViewElement$created"]}},
-"+ClassViewElement":[358],
+"+ClassViewElement":[363],
pv:{
"^":"uL+Pi;",
-$isd3:true}}],["code_ref_element","package:observatory/src/observatory_elements/code_ref.dart",,O,{
+$isd3:true},
+RI:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sF0(z,y.ct(z,C.XA,y.gF0(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+ClassViewElement_refresh_closure":[358],
+Ye:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing class-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+ClassViewElement_refresh_closure":[358]}],["code_ref_element","package:observatory/src/observatory_elements/code_ref.dart",,O,{
"^":"",
CN:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.U8]},
static:{On:[function(a){var z,y,x,w
z=$.Nd()
@@ -10827,13 +10857,13 @@
C.IK.ZL(a)
C.IK.G6(a)
return a},null,null,0,0,108,"new CodeRefElement$created"]}},
-"+CodeRefElement":[357]}],["code_view_element","package:observatory/src/observatory_elements/code_view.dart",,F,{
+"+CodeRefElement":[362]}],["code_view_element","package:observatory/src/observatory_elements/code_view.dart",,F,{
"^":"",
vc:{
-"^":["Vfx;eJ%-359,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gtT:[function(a){return a.eJ},null,null,1,0,360,"code",351,352],
-stT:[function(a,b){a.eJ=this.ct(a,C.b1,a.eJ,b)},null,null,3,0,361,23,[],"code",351],
-grj:[function(a){return"panel panel-success"},null,null,1,0,362,"cssPanelClass"],
+"^":["Vfx;eJ%-364,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtT:[function(a){return a.eJ},null,null,1,0,365,"code",353,354],
+stT:[function(a,b){a.eJ=this.ct(a,C.b1,a.eJ,b)},null,null,3,0,366,23,[],"code",353],
+grK:[function(a){return"panel panel-success"},null,null,1,0,367,"cssPanelClass"],
"@":function(){return[C.xW]},
static:{Fe:[function(a){var z,y,x,w
z=$.Nd()
@@ -10847,25 +10877,25 @@
C.YD.ZL(a)
C.YD.G6(a)
return a},null,null,0,0,108,"new CodeViewElement$created"]}},
-"+CodeViewElement":[363],
+"+CodeViewElement":[368],
Vfx:{
"^":"uL+Pi;",
$isd3:true}}],["collapsible_content_element","package:observatory/src/observatory_elements/collapsible_content.dart",,R,{
"^":"",
-i6:{
-"^":["Dsd;zh%-364,HX%-364,Uy%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gl7:[function(a){return a.zh},null,null,1,0,362,"iconClass",351,365],
-sl7:[function(a,b){a.zh=this.ct(a,C.Di,a.zh,b)},null,null,3,0,25,23,[],"iconClass",351],
-gai:[function(a){return a.HX},null,null,1,0,362,"displayValue",351,365],
-sai:[function(a,b){a.HX=this.ct(a,C.Jw,a.HX,b)},null,null,3,0,25,23,[],"displayValue",351],
-gxj:[function(a){return a.Uy},null,null,1,0,366,"collapsed"],
+E0:{
+"^":["Dsd;zh%-369,HX%-369,Uy%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gl7:[function(a){return a.zh},null,null,1,0,367,"iconClass",353,370],
+sl7:[function(a,b){a.zh=this.ct(a,C.Di,a.zh,b)},null,null,3,0,25,23,[],"iconClass",353],
+gai:[function(a){return a.HX},null,null,1,0,367,"displayValue",353,370],
+sai:[function(a,b){a.HX=this.ct(a,C.Jw,a.HX,b)},null,null,3,0,25,23,[],"displayValue",353],
+gxj:[function(a){return a.Uy},null,null,1,0,371,"collapsed"],
sxj:[function(a,b){a.Uy=b
-this.SS(a)},null,null,3,0,367,368,[],"collapsed"],
+this.SS(a)},null,null,3,0,372,373,[],"collapsed"],
i4:[function(a){Z.uL.prototype.i4.call(this,a)
this.SS(a)},"call$0","gQd",0,0,107,"enteredView"],
jp:[function(a,b,c,d){a.Uy=a.Uy!==!0
this.SS(a)
-this.SS(a)},"call$3","gl8",6,0,369,18,[],301,[],74,[],"toggleDisplay"],
+this.SS(a)},"call$3","gl8",6,0,374,18,[],303,[],74,[],"toggleDisplay"],
SS:[function(a){var z,y
z=a.Uy
y=a.zh
@@ -10873,7 +10903,7 @@
a.HX=this.ct(a,C.Jw,a.HX,"none")}else{a.zh=this.ct(a,C.Di,y,"glyphicon glyphicon-chevron-up")
a.HX=this.ct(a,C.Jw,a.HX,"block")}},"call$0","glg",0,0,107,"_refresh"],
"@":function(){return[C.Gu]},
-static:{"^":"Vl<-364,DI<-364",Hv:[function(a){var z,y,x,w
+static:{"^":"Vl<-369,DI<-369",Hv:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
x=J.O
@@ -10888,9 +10918,50 @@
C.j8.ZL(a)
C.j8.G6(a)
return a},null,null,0,0,108,"new CollapsibleContentElement$created"]}},
-"+CollapsibleContentElement":[370],
+"+CollapsibleContentElement":[375],
Dsd:{
"^":"uL+Pi;",
+$isd3:true}}],["curly_block_element","package:observatory/src/observatory_elements/curly_block.dart",,R,{
+"^":"",
+lw:{
+"^":["Nr;GV%-360,Hu%-360,nx%-77,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+goE:[function(a){return a.GV},null,null,1,0,371,"expanded",353,370],
+soE:[function(a,b){a.GV=this.ct(a,C.mr,a.GV,b)},null,null,3,0,372,23,[],"expanded",353],
+gO9:[function(a){return a.Hu},null,null,1,0,371,"busy",353,370],
+sO9:[function(a,b){a.Hu=this.ct(a,C.S4,a.Hu,b)},null,null,3,0,372,23,[],"busy",353],
+gFR:[function(a){return a.nx},null,null,1,0,108,"callback",353,354],
+Ki:function(a){return this.gFR(a).call$0()},
+AV:function(a,b,c){return this.gFR(a).call$2(b,c)},
+sFR:[function(a,b){a.nx=this.ct(a,C.AV,a.nx,b)},null,null,3,0,225,23,[],"callback",353],
+PA:[function(a){var z
+P.JS("done callback")
+z=a.GV
+a.GV=this.ct(a,C.mr,z,z!==!0)
+a.Hu=this.ct(a,C.S4,a.Hu,!1)},"call$0","goJ",0,0,107,"doneCallback"],
+AZ:[function(a,b,c,d){var z=a.Hu
+if(z===!0)return
+if(a.nx!=null){a.Hu=this.ct(a,C.S4,z,!0)
+this.AV(a,a.GV!==!0,this.goJ(a))}else{z=a.GV
+a.GV=this.ct(a,C.mr,z,z!==!0)}},"call$3","ghM",6,0,376,123,[],183,[],280,[],"toggleExpand"],
+"@":function(){return[C.DKS]},
+static:{fR:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.GV=!1
+a.Hu=!1
+a.nx=null
+a.SO=z
+a.B7=y
+a.X0=w
+C.O0.ZL(a)
+C.O0.G6(a)
+return a},null,null,0,0,108,"new CurlyBlockElement$created"]}},
+"+CurlyBlockElement":[377],
+Nr:{
+"^":"ir+Pi;",
$isd3:true}}],["custom_element.polyfill","package:custom_element/polyfill.dart",,B,{
"^":"",
G9:function(){var z,y
@@ -10901,9 +10972,8 @@
return J.de(J.UQ(y,"ready"),!0)},
wJ:{
"^":"Tp:108;",
-call$0:[function(){if(B.G9()){var z=H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[null])
-z.L7(null,null)
-return z}z=H.VM(new W.RO(document,"WebComponentsReady",!1),[null])
+call$0:[function(){if(B.G9())return P.Ab(null,null)
+var z=H.VM(new W.RO(document,"WebComponentsReady",!1),[null])
return z.gtH(z)},"call$0",null,0,0,null,"call"],
$isEH:true}}],["dart._internal","dart:_internal",,H,{
"^":"",
@@ -11084,7 +11154,7 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){b.call$1(this.Zv(0,y))
-if(z!==this.gB(this))throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.gB(this))throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,378,[]],
gl0:function(a){return J.de(this.gB(this),0)},
grZ:function(a){if(J.de(this.gB(this),0))throw H.b(new P.lj("No elements"))
return this.Zv(0,J.xH(this.gB(this),1))},
@@ -11099,7 +11169,7 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){if(b.call$1(this.Zv(0,y))===!0)return!0
-if(z!==this.gB(this))throw H.b(P.a4(this))}return!1},"call$1","gG2",2,0,null,372,[]],
+if(z!==this.gB(this))throw H.b(P.a4(this))}return!1},"call$1","gG2",2,0,null,379,[]],
zV:[function(a,b){var z,y,x,w,v,u
z=this.gB(this)
if(b.length!==0){y=J.x(z)
@@ -11119,8 +11189,8 @@
for(;v<z;++v){u=this.Zv(0,v)
u=typeof u==="string"?u:H.d(u)
w.vM=w.vM+u
-if(z!==this.gB(this))throw H.b(P.a4(this))}return w.vM}},"call$1","gnr",0,2,null,328,329,[]],
-ev:[function(a,b){return P.mW.prototype.ev.call(this,this,b)},"call$1","gIR",2,0,null,372,[]],
+if(z!==this.gB(this))throw H.b(P.a4(this))}return w.vM}},"call$1","gnr",0,2,null,330,331,[]],
+ev:[function(a,b){return P.mW.prototype.ev.call(this,this,b)},"call$1","gIR",2,0,null,379,[]],
ez:[function(a,b){return H.VM(new H.A8(this,b),[null,null])},"call$1","gIr",2,0,null,110,[]],
es:[function(a,b,c){var z,y,x
z=this.gB(this)
@@ -11142,7 +11212,7 @@
if(!(x<y))break
y=this.Zv(0,x)
if(x>=z.length)return H.e(z,x)
-z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
$isyN:true},
nH:{
"^":"aL;l6,SH,AN",
@@ -11267,7 +11337,7 @@
return!0},"call$0","gqy",0,0,null]},
H6:{
"^":"mW;l6,FT",
-eR:[function(a,b){return H.ke(this.l6,this.FT+b,H.Kp(this,0))},"call$1","gZo",2,0,null,287,[]],
+eR:[function(a,b){return H.ke(this.l6,this.FT+b,H.Kp(this,0))},"call$1","gZo",2,0,null,289,[]],
gA:function(a){var z=this.l6
z=new H.U1(z.gA(z),this.FT)
z.$builtinTypeInfo=this.$builtinTypeInfo
@@ -11318,7 +11388,7 @@
GT:[function(a,b){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$1","gH7",0,2,null,77,128,[]],
V1:[function(a){throw H.b(P.f("Cannot clear an unmodifiable list"))},"call$0","gyP",0,0,null],
KI:[function(a,b){throw H.b(P.f("Cannot remove from an unmodifiable list"))},"call$1","gNM",2,0,null,47,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isList:true,
$asWO:null,
$isyN:true,
@@ -11525,7 +11595,7 @@
"^":"a;",
bu:[function(a){return this.gOO()},"call$0","gXo",0,0,null],
IB:[function(a){throw H.b(P.SY(null))},"call$1","gft",2,0,null,41,[]],
-Hy:[function(a,b){throw H.b(P.SY(null))},"call$2","gdk",4,0,null,41,[],165,[]],
+Hy:[function(a,b){throw H.b(P.SY(null))},"call$2","gdk",4,0,null,41,[],168,[]],
$isej:true},
Lj:{
"^":"TY;MA",
@@ -11534,8 +11604,8 @@
return z.gUQ(z).XG(0,new H.mb())},
$isej:true},
mb:{
-"^":"Tp:374;",
-call$1:[function(a){return a.gGD()},"call$1",null,2,0,null,373,[],"call"],
+"^":"Tp:381;",
+call$1:[function(a){return a.gGD()},"call$1",null,2,0,null,380,[],"call"],
$isEH:true},
am:{
"^":"TY;If<",
@@ -11600,7 +11670,7 @@
if(w==null)w=this.gcc().nb.t(0,a)
if(w==null)throw H.b(P.lr(this,H.X7(a),[b],null,null))
w.Hy(this,b)
-return H.vn(b)},"call$2","gtd",4,0,null,65,[],165,[]],
+return H.vn(b)},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){var z=this.gQH().nb.t(0,a)
if(z==null)throw H.b(P.lr(this,a,[],null,null))
return H.vn(z.IB(this))},"call$1","gPo",2,0,null,65,[]],
@@ -11700,11 +11770,11 @@
"^":"am+M2;",
$isej:true},
IB:{
-"^":"Tp:375;a",
+"^":"Tp:382;a",
call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
oP:{
-"^":"Tp:375;a",
+"^":"Tp:382;a",
call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
YX:{
@@ -11726,7 +11796,7 @@
gYK:function(){return this.XW.gYK()},
F2:[function(a,b,c){throw H.b(P.lr(this,a,b,c,null))},function(a,b){return this.F2(a,b,null)},"CI","call$3",null,"gb2",4,2,null,77,24,[],43,[],44,[]],
rN:[function(a){throw H.b(P.lr(this,a,null,null,null))},"call$1","gPo",2,0,null,65,[]],
-PU:[function(a,b){throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],165,[]],
+PU:[function(a,b){throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],168,[]],
gkZ:function(){return[this.XW]},
gHA:function(){return!0},
gJi:function(){return this},
@@ -11764,10 +11834,10 @@
y=v.ZU(this.Ax)
z[c]=y}else v=null
if(y.gpf()){if(v==null)v=new H.LI(a,$.I6().t(0,c),b,d,[],null)
-return H.vn(y.Bj(this.Ax,v))}else return H.vn(y.Bj(this.Ax,d))},"call$4","gqi",8,0,null,12,[],11,[],376,[],82,[]],
+return H.vn(y.Bj(this.Ax,v))}else return H.vn(y.Bj(this.Ax,d))},"call$4","gqi",8,0,null,12,[],11,[],383,[],82,[]],
PU:[function(a,b){var z=H.d(a.gfN(a))+"="
this.tu(H.YC(z),2,z,[b])
-return H.vn(b)},"call$2","gtd",4,0,null,65,[],165,[]],
+return H.vn(b)},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){var z,y,x,w
$loop$0:{z=this.xq
if(typeof z=="number"||typeof a.$p=="undefined")break $loop$0
@@ -11797,12 +11867,12 @@
t.v=t.m=w
return y},"call$1","gFf",2,0,null,65,[]],
ds:[function(a,b){if(b)return(function(b){return eval(b)})("(function probe$"+H.d(a)+"(c){return c."+H.d(a)+"})")
-else return(function(n){return(function(c){return c[n]})})(a)},"call$2","gfu",4,0,null,236,[],377,[]],
+else return(function(n){return(function(c){return c[n]})})(a)},"call$2","gfu",4,0,null,238,[],384,[]],
x0:[function(a,b){if(!b)return(function(n){return(function(o){return o[n]()})})(a)
-return(function(b){return eval(b)})("(function "+this.Ax.constructor.name+"$"+H.d(a)+"(o){return o."+H.d(a)+"()})")},"call$2","gER",4,0,null,12,[],377,[]],
+return(function(b){return eval(b)})("(function "+this.Ax.constructor.name+"$"+H.d(a)+"(o){return o."+H.d(a)+"()})")},"call$2","gER",4,0,null,12,[],384,[]],
QN:[function(a,b){var z=J.x(this.Ax)
if(!b)return(function(n,i){return(function(o){return i[n](o)})})(a,z)
-return(function(b,i){return eval(b)})("(function "+z.constructor.name+"$"+H.d(a)+"(o){return i."+H.d(a)+"(o)})",z)},"call$2","gpa",4,0,null,12,[],377,[]],
+return(function(b,i){return eval(b)})("(function "+z.constructor.name+"$"+H.d(a)+"(o){return i."+H.d(a)+"(o)})",z)},"call$2","gpa",4,0,null,12,[],384,[]],
n:[function(a,b){var z,y
if(b==null)return!1
z=J.x(b)
@@ -11818,7 +11888,7 @@
$isvr:true,
$isej:true},
mg:{
-"^":"Tp:378;a",
+"^":"Tp:385;a",
call$2:[function(a,b){var z,y
z=a.gfN(a)
y=this.a
@@ -11878,7 +11948,7 @@
z=H.VM(new H.Oh(y),[P.wv,P.NL])
this.Db=z
return z},
-PU:[function(a,b){return this.NK.PU(a,b)},"call$2","gtd",4,0,null,65,[],165,[]],
+PU:[function(a,b){return this.NK.PU(a,b)},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){return this.NK.rN(a)},"call$1","gPo",2,0,null,65,[]],
gXP:function(){return this.NK.gXP()},
gc9:function(){return this.NK.gc9()},
@@ -11912,20 +11982,20 @@
y=this.a
if(J.de(z,-1))y.push(H.jO(J.rr(a)))
else{x=init.metadata[z]
-y.push(new H.cw(P.re(x.gXP()),x,z,null,H.YC(J.O6(x))))}},"call$1",null,2,0,null,379,[],"call"],
+y.push(new H.cw(P.re(x.gXP()),x,z,null,H.YC(J.O6(x))))}},"call$1",null,2,0,null,386,[],"call"],
$isEH:true},
Oo:{
-"^":"Tp:223;",
-call$1:[function(a){return-1},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return-1},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Tc:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){return this.b.call$1(a)},"call$1",null,2,0,null,87,[],"call"],
$isEH:true},
Ax:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.u(0,a.gIf(),a)
-return a},"call$1",null,2,0,null,380,[],"call"],
+return a},"call$1",null,2,0,null,387,[],"call"],
$isEH:true},
Wf:{
"^":"vk;Cr<,Tx<,H8,Ht,pz,le,qN,qu,zE,b0,FU,T1,fX,M2,uA,Db,xO,qm,UF,eL,RH,nz,If",
@@ -11963,7 +12033,7 @@
p=H.ys(n,"$",".")}}else continue
s=H.Sd(p,q,!o,o)
x.push(s)
-s.nz=a}return x},"call$1","gN4",2,0,null,381,[]],
+s.nz=a}return x},"call$1","gN4",2,0,null,388,[]],
gEO:function(){var z=this.qu
if(z!=null)return z
z=this.ly(this)
@@ -11979,7 +12049,7 @@
C.Nm.FV(x,y)}H.jw(a,x,!1,z)
w=init.statics[this.Cr]
if(w!=null)H.jw(a,w["^"],!0,z)
-return z},"call$1","gkW",2,0,null,382,[]],
+return z},"call$1","gkW",2,0,null,389,[]],
gTH:function(){var z=this.zE
if(z!=null)return z
z=this.ws(this)
@@ -12019,7 +12089,7 @@
if(z!=null&&z.gFo()&&!z.gV5()){y=z.gao()
if(!(y in $))throw H.b(H.Ef("Cannot find \""+y+"\" in current isolate."))
$[y]=b
-return H.vn(b)}throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],165,[]],
+return H.vn(b)}throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){var z,y
z=this.gcc().nb.t(0,a)
if(z!=null&&z.gFo()){y=z.gao()
@@ -12098,17 +12168,17 @@
"^":"EE+M2;",
$isej:true},
Ei:{
-"^":"Tp:375;a",
+"^":"Tp:382;a",
call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
U7:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){this.b.u(0,a.gIf(),a)
-return a},"call$1",null,2,0,null,380,[],"call"],
+return a},"call$1",null,2,0,null,387,[],"call"],
$isEH:true},
t0:{
-"^":"Tp:384;a",
-call$1:[function(a){return H.Jf(this.a,init.metadata[a])},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:391;a",
+call$1:[function(a){return H.Jf(this.a,init.metadata[a])},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
Ld:{
"^":"am;ao<,V5<,Fo<,n6,nz,Ay>,le,If",
@@ -12121,7 +12191,7 @@
this.le=z}return J.C0(z,H.Yf()).br(0)},
IB:[function(a){return $[this.ao]},"call$1","gft",2,0,null,41,[]],
Hy:[function(a,b){if(this.V5)throw H.b(P.lr(this,H.X7(this.If),[b],null,null))
-$[this.ao]=b},"call$2","gdk",4,0,null,41,[],165,[]],
+$[this.ao]=b},"call$2","gdk",4,0,null,41,[],168,[]],
$isRY:true,
$isNL:true,
$isej:true,
@@ -12226,7 +12296,7 @@
IB:[function(a){if(this.lT)return this.jd([],null)
else throw H.b(P.SY("getField on "+H.d(a)))},"call$1","gft",2,0,null,41,[]],
Hy:[function(a,b){if(this.hB)return this.jd([b],null)
-else throw H.b(P.lr(this,H.X7(this.If),[],null,null))},"call$2","gdk",4,0,null,41,[],165,[]],
+else throw H.b(P.lr(this,H.X7(this.If),[],null,null))},"call$2","gdk",4,0,null,41,[],168,[]],
guU:function(){return!this.lT&&!this.hB&&!this.xV},
$isZk:true,
$isRS:true,
@@ -12259,8 +12329,8 @@
$isNL:true,
$isej:true},
wt:{
-"^":"Tp:385;",
-call$1:[function(a){return H.vn(init.metadata[a])},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:392;",
+call$1:[function(a){return H.vn(init.metadata[a])},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
ng:{
"^":"am;Cr<,CM,If",
@@ -12340,7 +12410,7 @@
$isX9:true,
$isNL:true},
rh:{
-"^":"Tp:386;a",
+"^":"Tp:393;a",
call$1:[function(a){var z,y,x
z=init.metadata[a]
y=this.a
@@ -12348,7 +12418,7 @@
return J.UQ(y.a.gw8(),x)},"call$1",null,2,0,null,47,[],"call"],
$isEH:true},
jB:{
-"^":"Tp:387;b",
+"^":"Tp:394;b",
call$1:[function(a){var z,y
z=this.b.call$1(a)
y=J.x(z)
@@ -12359,12 +12429,12 @@
return z.gCr()},"call$1",null,2,0,null,47,[],"call"],
$isEH:true},
ye:{
-"^":"Tp:385;",
-call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:392;",
+call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
O1:{
-"^":"Tp:385;",
-call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:392;",
+call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
Oh:{
"^":"a;nb",
@@ -12408,16 +12478,36 @@
z.fixed$length=init
return z},"call$1","wp",2,0,null,140,[]],
Xh:{
-"^":"Tp:388;a",
-call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,132,[],376,[],"call"],
+"^":"Tp:395;a",
+call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,132,[],383,[],"call"],
$isEH:true}}],["dart.async","dart:async",,P,{
"^":"",
VH:[function(a,b){var z=H.N7()
z=H.KT(z,[z,z]).BD(a)
if(z)return b.O8(a)
else return b.cR(a)},"call$2","p3",4,0,null,145,[],146,[]],
+pH:[function(a,b){var z,y,x,w,v,u,t
+z={}
+z.a=null
+z.b=null
+z.c=0
+z.d=null
+z.e=null
+y=new P.j7(z,b)
+for(x=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]);x.G();){w=x.lo
+v=z.c
+z.c=v+1
+w.Rx(new P.ff(z,b,v),y)}y=z.c
+if(y===0)return P.Ab(C.xD,null)
+u=Array(y)
+u.fixed$length=init
+z.b=u
+y=J.Q
+t=H.VM(new P.Zf(P.Dt(y)),[y])
+z.a=t
+return t.MM},"call$2$eagerError","pk",2,3,null,147,148,[],149,[]],
Cx:[function(){var z=$.S6
-for(;z!=null;){z.Ki()
+for(;z!=null;){J.cG(z)
z=z.gaw()
$.S6=z}$.k8=null},"call$0","So",0,0,null],
BG:[function(){var z
@@ -12432,11 +12522,11 @@
$.S6=z
P.jL(C.ny,P.qZ())}else{y=new P.OM(a,null)
z.aw=y
-$.k8=y}},"call$1","xc",2,0,null,148,[]],
+$.k8=y}},"call$1","xc",2,0,null,151,[]],
rb:[function(a){var z
if(J.de($.X3,C.NU)){$.X3.wr(a)
return}z=$.X3
-z.wr(z.xi(a,!0))},"call$1","Rf",2,0,null,148,[]],
+z.wr(z.xi(a,!0))},"call$1","Rf",2,0,null,151,[]],
bK:function(a,b,c,d){var z
if(c){z=H.VM(new P.dz(b,a,0,null,null,null,null),[d])
z.SJ=z
@@ -12452,56 +12542,56 @@
return}catch(u){w=H.Ru(u)
y=w
x=new H.XO(u,null)
-$.X3.hk(y,x)}},"call$1","DC",2,0,null,149,[]],
-SN:[function(a){},"call$1","bV",2,0,150,23,[]],
-SZ:[function(a,b){$.X3.hk(a,b)},function(a){return P.SZ(a,null)},null,"call$2","call$1","AY",2,2,151,77,152,[],153,[]],
+$.X3.hk(y,x)}},"call$1","DC",2,0,null,152,[]],
+YE:[function(a){},"call$1","bZ",2,0,153,23,[]],
+SZ:[function(a,b){$.X3.hk(a,b)},function(a){return P.SZ(a,null)},null,"call$2","call$1","AY",2,2,154,77,155,[],156,[]],
dL:[function(){return},"call$0","v3",0,0,107],
FE:[function(a,b,c){var z,y,x,w
try{b.call$1(a.call$0())}catch(x){w=H.Ru(x)
z=w
y=new H.XO(x,null)
-c.call$2(z,y)}},"call$3","CV",6,0,null,154,[],155,[],156,[]],
+c.call$2(z,y)}},"call$3","CV",6,0,null,157,[],158,[],159,[]],
NX:[function(a,b,c,d){a.ed()
-b.K5(c,d)},"call$4","QD",8,0,null,157,[],158,[],152,[],153,[]],
-TB:[function(a,b){return new P.uR(a,b)},"call$2","cH",4,0,null,157,[],158,[]],
+b.K5(c,d)},"call$4","QD",8,0,null,160,[],161,[],155,[],156,[]],
+TB:[function(a,b){return new P.uR(a,b)},"call$2","cH",4,0,null,160,[],161,[]],
Bb:[function(a,b,c){a.ed()
-b.rX(c)},"call$3","iB",6,0,null,157,[],158,[],23,[]],
+b.rX(c)},"call$3","iB",6,0,null,160,[],161,[],23,[]],
rT:function(a,b){var z
if(J.de($.X3,C.NU))return $.X3.uN(a,b)
z=$.X3
return z.uN(a,z.xi(b,!0))},
jL:[function(a,b){var z=C.jn.cU(a.Fq,1000)
-return H.cy(z<0?0:z,b)},"call$2","et",4,0,null,159,[],148,[]],
+return H.cy(z<0?0:z,b)},"call$2","et",4,0,null,162,[],151,[]],
PJ:[function(a){var z=$.X3
$.X3=a
return z},"call$1","kb",2,0,null,146,[]],
-L2:[function(a,b,c,d,e){a.Gr(new P.pK(d,e))},"call$5","xP",10,0,160,161,[],162,[],146,[],152,[],153,[]],
+L2:[function(a,b,c,d,e){a.Gr(new P.pK(d,e))},"call$5","xP",10,0,163,164,[],165,[],146,[],155,[],156,[]],
T8:[function(a,b,c,d){var z,y
if(J.de($.X3,c))return d.call$0()
z=P.PJ(c)
try{y=d.call$0()
-return y}finally{$.X3=z}},"call$4","AI",8,0,163,161,[],162,[],146,[],110,[]],
+return y}finally{$.X3=z}},"call$4","AI",8,0,166,164,[],165,[],146,[],110,[]],
V7:[function(a,b,c,d,e){var z,y
if(J.de($.X3,c))return d.call$1(e)
z=P.PJ(c)
try{y=d.call$1(e)
-return y}finally{$.X3=z}},"call$5","MM",10,0,164,161,[],162,[],146,[],110,[],165,[]],
+return y}finally{$.X3=z}},"call$5","MM",10,0,167,164,[],165,[],146,[],110,[],168,[]],
Qx:[function(a,b,c,d,e,f){var z,y
if(J.de($.X3,c))return d.call$2(e,f)
z=P.PJ(c)
try{y=d.call$2(e,f)
-return y}finally{$.X3=z}},"call$6","l4",12,0,166,161,[],162,[],146,[],110,[],54,[],55,[]],
-Ee:[function(a,b,c,d){return d},"call$4","EU",8,0,167,161,[],162,[],146,[],110,[]],
-cQ:[function(a,b,c,d){return d},"call$4","zi",8,0,168,161,[],162,[],146,[],110,[]],
-VI:[function(a,b,c,d){return d},"call$4","uu",8,0,169,161,[],162,[],146,[],110,[]],
-Tk:[function(a,b,c,d){P.IA(C.NU!==c?c.ce(d):d)},"call$4","G2",8,0,170,161,[],162,[],146,[],110,[]],
-h8:[function(a,b,c,d,e){return P.jL(d,C.NU!==c?c.ce(e):e)},"call$5","KF",10,0,171,161,[],162,[],146,[],159,[],148,[]],
-XB:[function(a,b,c,d){H.qw(d)},"call$4","YM",8,0,172,161,[],162,[],146,[],173,[]],
-CI:[function(a){J.O2($.X3,a)},"call$1","Fl",2,0,174,173,[]],
+return y}finally{$.X3=z}},"call$6","l4",12,0,169,164,[],165,[],146,[],110,[],54,[],55,[]],
+Ee:[function(a,b,c,d){return d},"call$4","EU",8,0,170,164,[],165,[],146,[],110,[]],
+cQ:[function(a,b,c,d){return d},"call$4","zi",8,0,171,164,[],165,[],146,[],110,[]],
+VI:[function(a,b,c,d){return d},"call$4","uu",8,0,172,164,[],165,[],146,[],110,[]],
+Tk:[function(a,b,c,d){P.IA(C.NU!==c?c.ce(d):d)},"call$4","G2",8,0,173,164,[],165,[],146,[],110,[]],
+h8:[function(a,b,c,d,e){return P.jL(d,C.NU!==c?c.ce(e):e)},"call$5","KF",10,0,174,164,[],165,[],146,[],162,[],151,[]],
+XB:[function(a,b,c,d){H.qw(d)},"call$4","YM",8,0,175,164,[],165,[],146,[],176,[]],
+CI:[function(a){J.O2($.X3,a)},"call$1","Fl",2,0,177,176,[]],
UA:[function(a,b,c,d,e){var z
$.oK=P.Fl()
z=P.Py(null,null,null,null,null)
-return new P.uo(c,d,z)},"call$5","hn",10,0,175,161,[],162,[],146,[],176,[],177,[]],
+return new P.uo(c,d,z)},"call$5","hn",10,0,178,164,[],165,[],146,[],179,[],180,[]],
Ca:{
"^":"a;kc>,I4<",
$isGe:true},
@@ -12512,10 +12602,10 @@
gY8:function(){return this.Y8},
uR:[function(a){var z=this.Ae
if(typeof z!=="number")return z.i()
-return(z&1)===a},"call$1","gLM",2,0,null,389,[]],
+return(z&1)===a},"call$1","gLM",2,0,null,396,[]],
Ac:[function(){var z=this.Ae
if(typeof z!=="number")return z.w()
-this.Ae=z^1},"call$0","goX",0,0,null],
+this.Ae=z^1},"call$0","gUe",0,0,null],
gP4:function(){var z=this.Ae
if(typeof z!=="number")return z.i()
return(z&2)!==0},
@@ -12543,17 +12633,17 @@
z.siE(y)
y.sSJ(z)
a.sSJ(a)
-a.siE(a)},"call$1","gOo",2,0,null,157,[]],
+a.siE(a)},"call$1","gOo",2,0,null,160,[]],
j0:[function(a){if(a.giE()===a)return
if(a.gP4())a.dK()
else{this.p1(a)
-if((this.Gv&2)===0&&this.iE===this)this.Of()}},"call$1","gOr",2,0,null,157,[]],
+if((this.Gv&2)===0&&this.iE===this)this.Of()}},"call$1","gOr",2,0,null,160,[]],
q7:[function(){if((this.Gv&4)!==0)return new P.lj("Cannot add new events after calling close")
return new P.lj("Cannot add new events while doing an addStream")},"call$0","gVo",0,0,null],
h:[function(a,b){if(this.Gv>=4)throw H.b(this.q7())
-this.Iv(b)},"call$1","ght",2,0,function(){return H.IG(function(a){return{func:"lU",void:true,args:[a]}},this.$receiver,"Ks")},231,[]],
+this.Iv(b)},"call$1","ght",2,0,function(){return H.IG(function(a){return{func:"lU",void:true,args:[a]}},this.$receiver,"Ks")},233,[]],
fDe:[function(a,b){if(this.Gv>=4)throw H.b(this.q7())
-this.pb(a,b)},function(a){return this.fDe(a,null)},"JT","call$2","call$1","gXB",2,2,390,77,152,[],153,[]],
+this.pb(a,b)},function(a){return this.fDe(a,null)},"JT","call$2","call$1","gXB",2,2,397,77,155,[],156,[]],
cO:[function(a){var z,y
z=this.Gv
if((z&4)!==0)return this.Ip
@@ -12562,8 +12652,8 @@
y=this.SL()
this.SY()
return y},"call$0","gJK",0,0,null],
-Rg:[function(a,b){this.Iv(b)},"call$1","gHR",2,0,null,231,[]],
-V8:[function(a,b){this.pb(a,b)},"call$2","grd",4,0,null,152,[],153,[]],
+Rg:[function(a,b){this.Iv(b)},"call$1","gHR",2,0,null,233,[]],
+V8:[function(a,b){this.pb(a,b)},"call$2","grd",4,0,null,155,[],156,[]],
Qj:[function(){var z=this.WX
this.WX=null
this.Gv=this.Gv&4294967287
@@ -12587,7 +12677,7 @@
y.sAe(z&4294967293)
y=w}else y=y.giE()
this.Gv=this.Gv&4294967293
-if(this.iE===this)this.Of()},"call$1","gxd",2,0,null,371,[]],
+if(this.iE===this)this.Of()},"call$1","gxd",2,0,null,378,[]],
Of:[function(){if((this.Gv&4)!==0&&this.Ip.Gv===0)this.Ip.OH(null)
P.ot(this.QC)},"call$0","gVg",0,0,null]},
dz:{
@@ -12598,24 +12688,24 @@
this.iE.Rg(0,a)
this.Gv=this.Gv&4294967293
if(this.iE===this)this.Of()
-return}this.nE(new P.tK(this,a))},"call$1","gm9",2,0,null,231,[]],
+return}this.nE(new P.tK(this,a))},"call$1","gm9",2,0,null,233,[]],
pb:[function(a,b){if(this.iE===this)return
-this.nE(new P.OR(this,a,b))},"call$2","gTb",4,0,null,152,[],153,[]],
+this.nE(new P.OR(this,a,b))},"call$2","gTb",4,0,null,155,[],156,[]],
SY:[function(){if(this.iE!==this)this.nE(new P.Bg(this))
else this.Ip.OH(null)},"call$0","gXm",0,0,null]},
tK:{
"^":"Tp;a,b",
-call$1:[function(a){a.Rg(0,this.b)},"call$1",null,2,0,null,157,[],"call"],
+call$1:[function(a){a.Rg(0,this.b)},"call$1",null,2,0,null,160,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"DU",args:[[P.KA,a]]}},this.a,"dz")}},
OR:{
"^":"Tp;a,b,c",
-call$1:[function(a){a.V8(this.b,this.c)},"call$1",null,2,0,null,157,[],"call"],
+call$1:[function(a){a.V8(this.b,this.c)},"call$1",null,2,0,null,160,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"DU",args:[[P.KA,a]]}},this.a,"dz")}},
Bg:{
"^":"Tp;a",
-call$1:[function(a){a.Qj()},"call$1",null,2,0,null,157,[],"call"],
+call$1:[function(a){a.Qj()},"call$1",null,2,0,null,160,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"Zj",args:[[P.JI,a]]}},this.a,"dz")}},
DL:{
@@ -12623,27 +12713,53 @@
Iv:[function(a){var z,y
for(z=this.iE;z!==this;z=z.giE()){y=new P.LV(a,null)
y.$builtinTypeInfo=[null]
-z.w6(y)}},"call$1","gm9",2,0,null,231,[]],
+z.w6(y)}},"call$1","gm9",2,0,null,233,[]],
pb:[function(a,b){var z
-for(z=this.iE;z!==this;z=z.giE())z.w6(new P.DS(a,b,null))},"call$2","gTb",4,0,null,152,[],153,[]],
+for(z=this.iE;z!==this;z=z.giE())z.w6(new P.DS(a,b,null))},"call$2","gTb",4,0,null,155,[],156,[]],
SY:[function(){var z=this.iE
if(z!==this)for(;z!==this;z=z.giE())z.w6(C.Wj)
else this.Ip.OH(null)},"call$0","gXm",0,0,null]},
b8:{
"^":"a;",
$isb8:true},
+j7:{
+"^":"Tp:343;a,b",
+call$2:[function(a,b){var z,y,x
+z=this.a
+y=z.b
+z.b=null
+x=z.c-1
+z.c=x
+if(y!=null)if(x===0||this.b)z.a.w0(a,b)
+else{z.d=a
+z.e=b}else if(x===0&&!this.b)z.a.w0(z.d,z.e)},"call$2",null,4,0,null,398,[],399,[],"call"],
+$isEH:true},
+ff:{
+"^":"Tp:400;a,c,d",
+call$1:[function(a){var z,y,x,w
+z=this.a
+y=z.c-1
+z.c=y
+x=z.b
+if(x!=null){w=this.d
+if(w<0||w>=x.length)return H.e(x,w)
+x[w]=a
+if(y===0){z=z.a.MM
+if(z.Gv!==0)H.vh(new P.lj("Future already completed"))
+z.OH(x)}}else if(y===0&&!this.c)z.a.w0(z.d,z.e)},"call$1",null,2,0,null,23,[],"call"],
+$isEH:true},
Ia:{
"^":"a;"},
Zf:{
"^":"Ia;MM",
oo:[function(a,b){var z=this.MM
if(z.Gv!==0)throw H.b(P.w("Future already completed"))
-z.OH(b)},function(a){return this.oo(a,null)},"tZ","call$1","call$0","gv6",0,2,391,77,23,[]],
+z.OH(b)},function(a){return this.oo(a,null)},"tZ","call$1","call$0","gv6",0,2,401,77,23,[]],
w0:[function(a,b){var z
if(a==null)throw H.b(new P.AT("Error must not be null"))
z=this.MM
if(z.Gv!==0)throw H.b(new P.lj("Future already completed"))
-z.CG(a,b)},function(a){return this.w0(a,null)},"pm","call$2","call$1","gYJ",2,2,390,77,152,[],153,[]]},
+z.CG(a,b)},function(a){return this.w0(a,null)},"pm","call$2","call$1","gYJ",2,2,397,77,155,[],156,[]]},
vs:{
"^":"a;Gv,Lj<,jk,BQ@,OY,As,qV,o4",
gcg:function(){return this.Gv>=4},
@@ -12658,22 +12774,28 @@
z=$.X3
y=H.VM(new P.vs(0,z,null,null,z.cR(a),null,P.VH(b,$.X3),null),[null])
this.au(y)
-return y},function(a){return this.Rx(a,null)},"ml","call$2$onError",null,"grf",2,3,null,77,110,[],156,[]],
+return y},function(a){return this.Rx(a,null)},"ml","call$2$onError",null,"gxY",2,3,null,77,110,[],159,[]],
yd:[function(a,b){var z,y,x
z=$.X3
y=P.VH(a,z)
x=H.VM(new P.vs(0,z,null,null,null,$.X3.cR(b),y,null),[null])
this.au(x)
-return x},function(a){return this.yd(a,null)},"OA","call$2$test",null,"gue",2,3,null,77,156,[],372,[]],
+return x},function(a){return this.yd(a,null)},"OA","call$2$test",null,"gue",2,3,null,77,159,[],379,[]],
+YM:[function(a){var z,y
+z=$.X3
+y=new P.vs(0,z,null,null,null,null,null,z.Al(a))
+y.$builtinTypeInfo=this.$builtinTypeInfo
+this.au(y)
+return y},"call$1","gE1",2,0,null,378,[]],
gDL:function(){return this.jk},
gcG:function(){return this.jk},
Am:[function(a){this.Gv=4
-this.jk=a},"call$1","gAu",2,0,null,23,[]],
+this.jk=a},"call$1","goU",2,0,null,23,[]],
E6:[function(a,b){this.Gv=8
-this.jk=new P.Ca(a,b)},"call$2","gM6",4,0,null,152,[],153,[]],
+this.jk=new P.Ca(a,b)},"call$2","gM6",4,0,null,155,[],156,[]],
au:[function(a){if(this.Gv>=4)this.Lj.wr(new P.da(this,a))
else{a.sBQ(this.jk)
-this.jk=a}},"call$1","gXA",2,0,null,292,[]],
+this.jk=a}},"call$1","gXA",2,0,null,294,[]],
L3:[function(){var z,y,x
z=this.jk
this.jk=null
@@ -12687,7 +12809,7 @@
P.HZ(this,y)},"call$1","gJJ",2,0,null,23,[]],
K5:[function(a,b){var z=this.L3()
this.E6(a,b)
-P.HZ(this,z)},function(a){return this.K5(a,null)},"Lp","call$2","call$1","gbY",2,2,151,77,152,[],153,[]],
+P.HZ(this,z)},function(a){return this.K5(a,null)},"Lp","call$2","call$1","gbY",2,2,154,77,155,[],156,[]],
OH:[function(a){var z,y
z=J.x(a)
y=typeof a==="object"&&a!==null&&!!z.$isb8
@@ -12699,11 +12821,13 @@
this.Lj.wr(new P.rH(this,a))},"call$1","gZV",2,0,null,23,[]],
CG:[function(a,b){if(this.Gv!==0)H.vh(new P.lj("Future already completed"))
this.Gv=1
-this.Lj.wr(new P.ZL(this,a,b))},"call$2","glC",4,0,null,152,[],153,[]],
+this.Lj.wr(new P.ZL(this,a,b))},"call$2","glC",4,0,null,155,[],156,[]],
L7:function(a,b){this.OH(a)},
$isvs:true,
$isb8:true,
-static:{"^":"ewM,JE,C3n,oN1,NK",Dt:function(a){return H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[a])},GZ:[function(a,b){var z
+static:{"^":"ewM,JE,C3n,oN1,NK",Dt:function(a){return H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[a])},Ab:function(a,b){var z=H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[b])
+z.L7(a,b)
+return z},GZ:[function(a,b){var z
b.swG(!0)
z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isvs)if(a.Gv>=4)P.HZ(a,b)
@@ -12713,7 +12837,7 @@
b.sBQ(null)
P.HZ(a,b)
if(z!=null){b=z
-continue}else break}while(!0)},"call$2","cN",4,0,null,27,[],147,[]],HZ:[function(a,b){var z,y,x,w,v,u,t,s,r,q,p
+continue}else break}while(!0)},"call$2","cN",4,0,null,27,[],150,[]],HZ:[function(a,b){var z,y,x,w,v,u,t,s,r,q,p
z={}
z.e=a
for(y=a;!0;){x={}
@@ -12754,18 +12878,18 @@
v=x.c
b.E6(J.w8(v),v.gI4())}z.e=b
y=b
-b=p}},"call$2","WY",4,0,null,27,[],147,[]]}},
+b=p}},"call$2","WY",4,0,null,27,[],150,[]]}},
da:{
"^":"Tp:108;a,b",
call$0:[function(){P.HZ(this.a,this.b)},"call$0",null,0,0,null,"call"],
$isEH:true},
xw:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.rX(a)},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
dm:{
-"^":"Tp:392;b",
-call$2:[function(a,b){this.b.K5(a,b)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,152,[],153,[],"call"],
+"^":"Tp:402;b",
+call$2:[function(a,b){this.b.K5(a,b)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,155,[],156,[],"call"],
$isEH:true},
rH:{
"^":"Tp:108;a,b",
@@ -12776,7 +12900,7 @@
call$0:[function(){this.a.K5(this.b,this.c)},"call$0",null,0,0,null,"call"],
$isEH:true},
rq:{
-"^":"Tp:366;b,c,d,e",
+"^":"Tp:371;b,c,d,e",
call$0:[function(){var z,y,x,w
try{this.b.c=this.e.FI(this.d.gO1(),this.c.e.gDL())
return!0}catch(x){w=H.Ru(x)
@@ -12844,25 +12968,25 @@
z.a.Rx(new P.jZ(this.c,v),new P.FZ(z,v))}},"call$0",null,0,0,null,"call"],
$isEH:true},
jZ:{
-"^":"Tp:223;c,w3",
-call$1:[function(a){P.HZ(this.c.e,this.w3)},"call$1",null,2,0,null,393,[],"call"],
+"^":"Tp:225;c,w3",
+call$1:[function(a){P.HZ(this.c.e,this.w3)},"call$1",null,2,0,null,403,[],"call"],
$isEH:true},
FZ:{
-"^":"Tp:392;a,HZ",
+"^":"Tp:402;a,HZ",
call$2:[function(a,b){var z,y,x,w
z=this.a
y=z.a
x=J.x(y)
if(typeof y!=="object"||y===null||!x.$isvs){w=P.Dt(null)
z.a=w
-w.E6(a,b)}P.HZ(z.a,this.HZ)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,152,[],153,[],"call"],
+w.E6(a,b)}P.HZ(z.a,this.HZ)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,155,[],156,[],"call"],
$isEH:true},
OM:{
-"^":"a;FR,aw@",
-Ki:function(){return this.FR.call$0()}},
+"^":"a;FR>,aw@",
+Ki:function(a){return this.FR.call$0()}},
qh:{
"^":"a;",
-ez:[function(a,b){return H.VM(new P.t3(b,this),[H.ip(this,"qh",0),null])},"call$1","gIr",2,0,null,394,[]],
+ez:[function(a,b){return H.VM(new P.t3(b,this),[H.ip(this,"qh",0),null])},"call$1","gIr",2,0,null,404,[]],
tg:[function(a,b){var z,y
z={}
y=P.Dt(J.kn)
@@ -12874,13 +12998,13 @@
y=P.Dt(null)
z.a=null
z.a=this.KR(new P.lz(z,this,b,y),!0,new P.M4(y),y.gbY())
-return y},"call$1","gjw",2,0,null,371,[]],
+return y},"call$1","gjw",2,0,null,378,[]],
Vr:[function(a,b){var z,y
z={}
y=P.Dt(J.kn)
z.a=null
z.a=this.KR(new P.Jp(z,this,b,y),!0,new P.eN(y),y.gbY())
-return y},"call$1","gG2",2,0,null,372,[]],
+return y},"call$1","gG2",2,0,null,379,[]],
gB:function(a){var z,y
z={}
y=P.Dt(J.im)
@@ -12936,8 +13060,8 @@
call$0:[function(){return J.de(this.f,this.e)},"call$0",null,0,0,null,"call"],
$isEH:true},
LB:{
-"^":"Tp:367;a,UI",
-call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,395,[],"call"],
+"^":"Tp:372;a,UI",
+call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,405,[],"call"],
$isEH:true},
zn:{
"^":"Tp:108;bK",
@@ -12953,8 +13077,8 @@
call$0:[function(){return this.e.call$1(this.f)},"call$0",null,0,0,null,"call"],
$isEH:true},
Jb:{
-"^":"Tp:223;",
-call$1:[function(a){},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
M4:{
"^":"Tp:108;UI",
@@ -12973,25 +13097,25 @@
call$0:[function(){return this.e.call$1(this.f)},"call$0",null,0,0,null,"call"],
$isEH:true},
pr:{
-"^":"Tp:367;a,UI",
-call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,395,[],"call"],
+"^":"Tp:372;a,UI",
+call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,405,[],"call"],
$isEH:true},
eN:{
"^":"Tp:108;bK",
call$0:[function(){this.bK.rX(!1)},"call$0",null,0,0,null,"call"],
$isEH:true},
PI:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
-z.a=z.a+1},"call$1",null,2,0,null,235,[],"call"],
+z.a=z.a+1},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
uO:{
"^":"Tp:108;a,b",
call$0:[function(){this.b.rX(this.a.a)},"call$0",null,0,0,null,"call"],
$isEH:true},
j4:{
-"^":"Tp:223;a,b",
-call$1:[function(a){P.Bb(this.a.a,this.b,!1)},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){P.Bb(this.a.a,this.b,!1)},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
i9:{
"^":"Tp:108;c",
@@ -12999,7 +13123,7 @@
$isEH:true},
VV:{
"^":"Tp;a,b",
-call$1:[function(a){this.b.push(a)},"call$1",null,2,0,null,231,[],"call"],
+call$1:[function(a){this.b.push(a)},"call$1",null,2,0,null,233,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"Lf",args:[a]}},this.a,"qh")}},
Dy:{
@@ -13059,7 +13183,7 @@
z.SJ=w
w.Ae=z.Gv&1
if(z.iE===w)P.ot(z.nL)
-return w},"call$1","gvC",2,0,null,396,[]],
+return w},"call$1","gGE",2,0,null,406,[]],
giO:function(a){return(H.eQ(this.Y8)^892482866)>>>0},
n:[function(a,b){var z
if(b==null)return!1
@@ -13077,18 +13201,18 @@
"^":"a;"},
KA:{
"^":"a;dB,o7<,Bd,Lj<,Gv,lz,Ri",
-fe:[function(a){this.dB=this.Lj.cR(a)},"call$1","gqd",2,0,null,397,[]],
+fe:[function(a){this.dB=this.Lj.cR(a)},"call$1","gqd",2,0,null,407,[]],
fm:[function(a,b){if(b==null)b=P.AY()
this.o7=P.VH(b,this.Lj)},"call$1","geO",2,0,null,29,[]],
y5:[function(a){if(a==null)a=P.v3()
-this.Bd=this.Lj.Al(a)},"call$1","gNS",2,0,null,398,[]],
+this.Bd=this.Lj.Al(a)},"call$1","gNS",2,0,null,408,[]],
nB:[function(a,b){var z,y,x
z=this.Gv
if((z&8)!==0)return
y=(z+128|4)>>>0
this.Gv=y
if(z<128&&this.Ri!=null){x=this.Ri
-if(x.Gv===1)x.Gv=3}if((z&4)===0&&(y&32)===0)this.J7(this.gp4())},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,399,[]],
+if(x.Gv===1)x.Gv=3}if((z&4)===0&&(y&32)===0)this.J7(this.gp4())},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,409,[]],
QE:[function(){var z=this.Gv
if((z&8)!==0)return
if(z>=128){z-=128
@@ -13112,11 +13236,11 @@
Rg:[function(a,b){var z=this.Gv
if((z&8)!==0)return
if(z<32)this.Iv(b)
-else this.w6(H.VM(new P.LV(b,null),[null]))},"call$1","gHR",2,0,null,231,[]],
+else this.w6(H.VM(new P.LV(b,null),[null]))},"call$1","gHR",2,0,null,233,[]],
V8:[function(a,b){var z=this.Gv
if((z&8)!==0)return
if(z<32)this.pb(a,b)
-else this.w6(new P.DS(a,b,null))},"call$2","grd",4,0,null,152,[],153,[]],
+else this.w6(new P.DS(a,b,null))},"call$2","grd",4,0,null,155,[],156,[]],
Qj:[function(){var z=this.Gv
if((z&8)!==0)return
z=(z|2)>>>0
@@ -13133,19 +13257,19 @@
y=this.Gv
if((y&64)===0){y=(y|64)>>>0
this.Gv=y
-if(y<128)this.Ri.t2(this)}},"call$1","gnX",2,0,null,400,[]],
+if(y<128)this.Ri.t2(this)}},"call$1","gnX",2,0,null,410,[]],
Iv:[function(a){var z=this.Gv
this.Gv=(z|32)>>>0
this.Lj.m1(this.dB,a)
this.Gv=(this.Gv&4294967263)>>>0
-this.Kl((z&4)!==0)},"call$1","gm9",2,0,null,231,[]],
+this.Kl((z&4)!==0)},"call$1","gm9",2,0,null,233,[]],
pb:[function(a,b){var z,y
z=this.Gv
y=new P.Vo(this,a,b)
if((z&1)!==0){this.Gv=(z|16)>>>0
this.Ek()
y.call$0()}else{y.call$0()
-this.Kl((z&4)!==0)}},"call$2","gTb",4,0,null,152,[],153,[]],
+this.Kl((z&4)!==0)}},"call$2","gTb",4,0,null,155,[],156,[]],
SY:[function(){this.Ek()
this.Gv=(this.Gv|16)>>>0
new P.qB(this).call$0()},"call$0","gXm",0,0,null],
@@ -13153,7 +13277,7 @@
this.Gv=(z|32)>>>0
a.call$0()
this.Gv=(this.Gv&4294967263)>>>0
-this.Kl((z&4)!==0)},"call$1","gc2",2,0,null,148,[]],
+this.Kl((z&4)!==0)},"call$1","gc2",2,0,null,151,[]],
Kl:[function(a){var z,y,x
z=this.Gv
if((z&64)!==0&&this.Ri.N6==null){z=(z&4294967231)>>>0
@@ -13169,7 +13293,7 @@
if(x)this.uO()
else this.LP()
z=(this.Gv&4294967263)>>>0
-this.Gv=z}if((z&64)!==0&&z<128)this.Ri.t2(this)},"call$1","ghE",2,0,null,401,[]],
+this.Gv=z}if((z&64)!==0&&z<128)this.Ri.t2(this)},"call$1","ghE",2,0,null,411,[]],
$isMO:true,
static:{"^":"ry,bG,Q9,Ir,Il,X8,HX,GC,f9"}},
Vo:{
@@ -13204,34 +13328,34 @@
z.fe(a)
z.fm(0,d)
z.y5(c)
-return z},function(a){return this.KR(a,null,null,null)},"yI",function(a,b,c){return this.KR(a,null,b,c)},"zC","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]],
+return z},function(a){return this.KR(a,null,null,null)},"yI",function(a,b,c){return this.KR(a,null,b,c)},"zC","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]],
w4:[function(a){var z,y
z=$.X3
y=a?1:0
y=new P.KA(null,null,null,z,y,null,null)
y.$builtinTypeInfo=this.$builtinTypeInfo
-return y},"call$1","gvC",2,0,null,396,[]]},
-lx:{
+return y},"call$1","gGE",2,0,null,406,[]]},
+ti:{
"^":"a;aw@"},
LV:{
-"^":"lx;P>,aw",
+"^":"ti;P>,aw",
r6:function(a,b){return this.P.call$1(b)},
-dP:[function(a){a.Iv(this.P)},"call$1","gqp",2,0,null,404,[]]},
+dP:[function(a){a.Iv(this.P)},"call$1","gqp",2,0,null,414,[]]},
DS:{
-"^":"lx;kc>,I4<,aw",
-dP:[function(a){a.pb(this.kc,this.I4)},"call$1","gqp",2,0,null,404,[]]},
+"^":"ti;kc>,I4<,aw",
+dP:[function(a){a.pb(this.kc,this.I4)},"call$1","gqp",2,0,null,414,[]]},
JF:{
"^":"a;",
-dP:[function(a){a.SY()},"call$1","gqp",2,0,null,404,[]],
+dP:[function(a){a.SY()},"call$1","gqp",2,0,null,414,[]],
gaw:function(){return},
saw:function(a){throw H.b(new P.lj("No events after a done."))}},
-Je:{
+ht:{
"^":"a;",
t2:[function(a){var z=this.Gv
if(z===1)return
if(z>=1){this.Gv=1
return}P.rb(new P.CR(this,a))
-this.Gv=1},"call$1","gQu",2,0,null,404,[]]},
+this.Gv=1},"call$1","gQu",2,0,null,414,[]]},
CR:{
"^":"Tp:108;a,b",
call$0:[function(){var z,y
@@ -13242,18 +13366,18 @@
z.TO(this.b)},"call$0",null,0,0,null,"call"],
$isEH:true},
Qk:{
-"^":"Je;zR,N6,Gv",
+"^":"ht;zR,N6,Gv",
gl0:function(a){return this.N6==null},
h:[function(a,b){var z=this.N6
if(z==null){this.N6=b
this.zR=b}else{z.saw(b)
-this.N6=b}},"call$1","ght",2,0,null,400,[]],
+this.N6=b}},"call$1","ght",2,0,null,410,[]],
TO:[function(a){var z,y
z=this.zR
y=z.gaw()
this.zR=y
if(y==null)this.N6=null
-z.dP(a)},"call$1","gTn",2,0,null,404,[]],
+z.dP(a)},"call$1","gTn",2,0,null,414,[]],
V1:[function(a){if(this.Gv===1)this.Gv=3
this.N6=null
this.zR=null},"call$0","gyP",0,0,null]},
@@ -13262,8 +13386,8 @@
call$0:[function(){return this.a.K5(this.b,this.c)},"call$0",null,0,0,null,"call"],
$isEH:true},
uR:{
-"^":"Tp:405;a,b",
-call$2:[function(a,b){return P.NX(this.a,this.b,a,b)},"call$2",null,4,0,null,152,[],153,[],"call"],
+"^":"Tp:415;a,b",
+call$2:[function(a,b){return P.NX(this.a,this.b,a,b)},"call$2",null,4,0,null,155,[],156,[],"call"],
$isEH:true},
Q0:{
"^":"Tp:108;a,b",
@@ -13282,15 +13406,15 @@
v.fe(a)
v.fm(0,d)
v.y5(c)
-return v},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]],
-Ml:[function(a,b){b.Rg(0,a)},"call$2","gOa",4,0,null,231,[],406,[]],
+return v},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]],
+Ml:[function(a,b){b.Rg(0,a)},"call$2","gOa",4,0,null,233,[],416,[]],
$asqh:function(a,b){return[b]}},
fB:{
"^":"KA;UY,Ee,dB,o7,Bd,Lj,Gv,lz,Ri",
Rg:[function(a,b){if((this.Gv&2)!==0)return
-P.KA.prototype.Rg.call(this,this,b)},"call$1","gHR",2,0,null,231,[]],
+P.KA.prototype.Rg.call(this,this,b)},"call$1","gHR",2,0,null,233,[]],
V8:[function(a,b){if((this.Gv&2)!==0)return
-P.KA.prototype.V8.call(this,a,b)},"call$2","grd",4,0,null,152,[],153,[]],
+P.KA.prototype.V8.call(this,a,b)},"call$2","grd",4,0,null,155,[],156,[]],
uO:[function(){var z=this.Ee
if(z==null)return
z.yy(0)},"call$0","gp4",0,0,107],
@@ -13300,8 +13424,8 @@
tA:[function(){var z=this.Ee
if(z!=null){this.Ee=null
z.ed()}return},"call$0","gQC",0,0,null],
-vx:[function(a){this.UY.Ml(a,this)},"call$1","gOa",2,0,function(){return H.IG(function(a,b){return{func:"kA",void:true,args:[a]}},this.$receiver,"fB")},231,[]],
-xL:[function(a,b){this.V8(a,b)},"call$2","gRE",4,0,407,152,[],153,[]],
+vx:[function(a){this.UY.Ml(a,this)},"call$1","gOa",2,0,function(){return H.IG(function(a,b){return{func:"kA",void:true,args:[a]}},this.$receiver,"fB")},233,[]],
+xL:[function(a,b){this.V8(a,b)},"call$2","gRE",4,0,417,155,[],156,[]],
nn:[function(){this.Qj()},"call$0","gH1",0,0,107],
S8:function(a,b,c,d){var z,y
z=this.gOa()
@@ -13318,7 +13442,7 @@
y=v
x=new H.XO(w,null)
b.V8(y,x)
-return}if(z===!0)J.QM(b,a)},"call$2","gOa",4,0,null,408,[],406,[]],
+return}if(z===!0)J.QM(b,a)},"call$2","gOa",4,0,null,418,[],416,[]],
$asYR:function(a){return[a,a]},
$asqh:null},
t3:{
@@ -13330,12 +13454,12 @@
y=v
x=new H.XO(w,null)
b.V8(y,x)
-return}J.QM(b,z)},"call$2","gOa",4,0,null,408,[],406,[]]},
+return}J.QM(b,z)},"call$2","gOa",4,0,null,418,[],416,[]]},
dq:{
"^":"YR;Em,Sb",
Ml:[function(a,b){var z=this.Em
if(z>0){this.Em=z-1
-return}b.Rg(0,a)},"call$2","gOa",4,0,null,408,[],406,[]],
+return}b.Rg(0,a)},"call$2","gOa",4,0,null,418,[],416,[]],
U6:function(a,b,c){},
$asYR:function(a){return[a,a]},
$asqh:null},
@@ -13367,7 +13491,7 @@
c1:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gE2()==null;)z=z.geT(z)
-return y.gE2().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gE2",6,0,null,146,[],152,[],153,[]],
+return y.gE2().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gE2",6,0,null,146,[],155,[],156,[]],
Vn:[function(a,b){var z,y
z=this.oh
for(;y=z.gzU(),y.gcP()==null;)z=z.geT(z)
@@ -13375,7 +13499,7 @@
qG:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gJl()==null;)z=z.geT(z)
-return y.gJl().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gJl",6,0,null,146,[],110,[],165,[]],
+return y.gJl().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gJl",6,0,null,146,[],110,[],168,[]],
nA:[function(a,b,c,d){var z,y
z=this.oh
for(;y=z.gzU(),y.gpU()==null;)z=z.geT(z)
@@ -13400,19 +13524,19 @@
pX:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gZq()==null;)z=z.geT(z)
-return y.gZq().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gZq",6,0,null,146,[],159,[],110,[]],
+return y.gZq().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gZq",6,0,null,146,[],162,[],110,[]],
RB:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gJS(y)==null;)z=z.geT(z)
-y.gJS(y).call$4(z,new P.Id(z.geT(z)),b,c)},"call$2","gJS",4,0,null,146,[],173,[]],
+y.gJS(y).call$4(z,new P.Id(z.geT(z)),b,c)},"call$2","gJS",4,0,null,146,[],176,[]],
ld:[function(a,b,c){var z,y,x
z=this.oh
for(;y=z.gzU(),y.giq()==null;)z=z.geT(z)
x=z.geT(z)
-return y.giq().call$5(z,new P.Id(x),a,b,c)},"call$3","giq",6,0,null,146,[],176,[],177,[]]},
+return y.giq().call$5(z,new P.Id(x),a,b,c)},"call$3","giq",6,0,null,146,[],179,[],180,[]]},
WH:{
"^":"a;",
-fC:[function(a){return this.gC5()===a.gC5()},"call$1","gRX",2,0,null,409,[]],
+fC:[function(a){return this.gC5()===a.gC5()},"call$1","gRX",2,0,null,419,[]],
bH:[function(a){var z,y,x,w
try{x=this.Gr(a)
return x}catch(w){x=H.Ru(w)
@@ -13424,7 +13548,7 @@
return x}catch(w){x=H.Ru(w)
z=x
y=new H.XO(w,null)
-return this.hk(z,y)}},"call$2","gNY",4,0,null,110,[],165,[]],
+return this.hk(z,y)}},"call$2","gNY",4,0,null,110,[],168,[]],
z8:[function(a,b,c){var z,y,x,w
try{x=this.mg(a,b,c)
return x}catch(w){x=H.Ru(w)
@@ -13433,13 +13557,13 @@
return this.hk(z,y)}},"call$3","gLG",6,0,null,110,[],54,[],55,[]],
xi:[function(a,b){var z=this.Al(a)
if(b)return new P.TF(this,z)
-else return new P.K5(this,z)},function(a){return this.xi(a,!0)},"ce","call$2$runGuarded",null,"gAX",2,3,null,331,110,[],410,[]],
+else return new P.K5(this,z)},function(a){return this.xi(a,!0)},"ce","call$2$runGuarded",null,"gAX",2,3,null,333,110,[],420,[]],
oj:[function(a,b){var z=this.cR(a)
if(b)return new P.Cg(this,z)
-else return new P.Hs(this,z)},"call$2$runGuarded","gVF",2,3,null,331,110,[],410,[]],
+else return new P.Hs(this,z)},"call$2$runGuarded","gVF",2,3,null,333,110,[],420,[]],
PT:[function(a,b){var z=this.O8(a)
if(b)return new P.dv(this,z)
-else return new P.pV(this,z)},"call$2$runGuarded","gzg",2,3,null,331,110,[],410,[]]},
+else return new P.pV(this,z)},"call$2$runGuarded","gzg",2,3,null,333,110,[],420,[]]},
TF:{
"^":"Tp:108;a,b",
call$0:[function(){return this.a.bH(this.b)},"call$0",null,0,0,null,"call"],
@@ -13449,19 +13573,19 @@
call$0:[function(){return this.c.Gr(this.d)},"call$0",null,0,0,null,"call"],
$isEH:true},
Cg:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return this.a.m1(this.b,a)},"call$1",null,2,0,null,165,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return this.a.m1(this.b,a)},"call$1",null,2,0,null,168,[],"call"],
$isEH:true},
Hs:{
-"^":"Tp:223;c,d",
-call$1:[function(a){return this.c.FI(this.d,a)},"call$1",null,2,0,null,165,[],"call"],
+"^":"Tp:225;c,d",
+call$1:[function(a){return this.c.FI(this.d,a)},"call$1",null,2,0,null,168,[],"call"],
$isEH:true},
dv:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){return this.a.z8(this.b,a,b)},"call$2",null,4,0,null,54,[],55,[],"call"],
$isEH:true},
pV:{
-"^":"Tp:341;c,d",
+"^":"Tp:343;c,d",
call$2:[function(a,b){return this.c.mg(this.d,a,b)},"call$2",null,4,0,null,54,[],55,[],"call"],
$isEH:true},
uo:{
@@ -13472,17 +13596,17 @@
y=z.t(0,b)
if(y!=null||z.x4(b))return y
return this.eT.t(0,b)},"call$1","gIA",2,0,null,42,[]],
-hk:[function(a,b){return new P.Id(this).c1(this,a,b)},"call$2","gE2",4,0,null,152,[],153,[]],
-c6:[function(a,b){return new P.Id(this).ld(this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,[],177,[]],
+hk:[function(a,b){return new P.Id(this).c1(this,a,b)},"call$2","gE2",4,0,null,155,[],156,[]],
+c6:[function(a,b){return new P.Id(this).ld(this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,179,[],180,[]],
Gr:[function(a){return new P.Id(this).Vn(this,a)},"call$1","gcP",2,0,null,110,[]],
-FI:[function(a,b){return new P.Id(this).qG(this,a,b)},"call$2","gJl",4,0,null,110,[],165,[]],
+FI:[function(a,b){return new P.Id(this).qG(this,a,b)},"call$2","gJl",4,0,null,110,[],168,[]],
mg:[function(a,b,c){return new P.Id(this).nA(this,a,b,c)},"call$3","gpU",6,0,null,110,[],54,[],55,[]],
Al:[function(a){return new P.Id(this).TE(this,a)},"call$1","gFh",2,0,null,110,[]],
cR:[function(a){return new P.Id(this).V6(this,a)},"call$1","gXp",2,0,null,110,[]],
O8:[function(a){return new P.Id(this).mz(this,a)},"call$1","gaj",2,0,null,110,[]],
wr:[function(a){new P.Id(this).RK(this,a)},"call$1","grb",2,0,null,110,[]],
-uN:[function(a,b){return new P.Id(this).pX(this,a,b)},"call$2","gZq",4,0,null,159,[],110,[]],
-Ch:[function(a,b){new P.Id(this).RB(0,this,b)},"call$1","gJS",2,0,null,173,[]]},
+uN:[function(a,b){return new P.Id(this).pX(this,a,b)},"call$2","gZq",4,0,null,162,[],110,[]],
+Ch:[function(a,b){new P.Id(this).RB(0,this,b)},"call$1","gJS",2,0,null,176,[]]},
pK:{
"^":"Tp:108;a,b",
call$0:[function(){P.IA(new P.eM(this.a,this.b))},"call$0",null,0,0,null,"call"],
@@ -13499,8 +13623,8 @@
if(y!=null)P.JS("Stack Trace: \n"+H.d(y)+"\n")
throw H.b(z)},"call$0",null,0,0,null,"call"],
$isEH:true},
-Uez:{
-"^":"Tp:378;a",
+Ha:{
+"^":"Tp:385;a",
call$2:[function(a,b){if(a==null)throw H.b(new P.AT("ZoneValue key must not be null"))
this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
@@ -13534,23 +13658,23 @@
geT:function(a){return},
gzU:function(){return C.v8},
gC5:function(){return this},
-fC:[function(a){return a.gC5()===this},"call$1","gRX",2,0,null,409,[]],
+fC:[function(a){return a.gC5()===this},"call$1","gRX",2,0,null,419,[]],
t:[function(a,b){return},"call$1","gIA",2,0,null,42,[]],
-hk:[function(a,b){return P.L2(this,null,this,a,b)},"call$2","gE2",4,0,null,152,[],153,[]],
-c6:[function(a,b){return P.UA(this,null,this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,[],177,[]],
+hk:[function(a,b){return P.L2(this,null,this,a,b)},"call$2","gE2",4,0,null,155,[],156,[]],
+c6:[function(a,b){return P.UA(this,null,this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,179,[],180,[]],
Gr:[function(a){return P.T8(this,null,this,a)},"call$1","gcP",2,0,null,110,[]],
-FI:[function(a,b){return P.V7(this,null,this,a,b)},"call$2","gJl",4,0,null,110,[],165,[]],
+FI:[function(a,b){return P.V7(this,null,this,a,b)},"call$2","gJl",4,0,null,110,[],168,[]],
mg:[function(a,b,c){return P.Qx(this,null,this,a,b,c)},"call$3","gpU",6,0,null,110,[],54,[],55,[]],
Al:[function(a){return a},"call$1","gFh",2,0,null,110,[]],
cR:[function(a){return a},"call$1","gXp",2,0,null,110,[]],
O8:[function(a){return a},"call$1","gaj",2,0,null,110,[]],
wr:[function(a){P.Tk(this,null,this,a)},"call$1","grb",2,0,null,110,[]],
-uN:[function(a,b){return P.h8(this,null,this,a,b)},"call$2","gZq",4,0,null,159,[],110,[]],
+uN:[function(a,b){return P.h8(this,null,this,a,b)},"call$2","gZq",4,0,null,162,[],110,[]],
Ch:[function(a,b){H.qw(b)
-return},"call$1","gJS",2,0,null,173,[]]}}],["dart.collection","dart:collection",,P,{
+return},"call$1","gJS",2,0,null,176,[]]}}],["dart.collection","dart:collection",,P,{
"^":"",
-Ou:[function(a,b){return J.de(a,b)},"call$2","iv",4,0,179,123,[],180,[]],
-T9:[function(a){return J.v1(a)},"call$1","py",2,0,181,123,[]],
+Ou:[function(a,b){return J.de(a,b)},"call$2","iv",4,0,182,123,[],183,[]],
+T9:[function(a){return J.v1(a)},"call$1","py",2,0,184,123,[]],
Py:function(a,b,c,d,e){var z
if(a==null){z=new P.k6(0,null,null,null,null)
z.$builtinTypeInfo=[d,e]
@@ -13598,7 +13722,7 @@
if(q==null){y+=5
q="..."}}if(q!=null)b.push(q)
b.push(u)
-b.push(v)},"call$2","zE",4,0,null,109,[],182,[]],
+b.push(v)},"call$2","zE",4,0,null,109,[],185,[]],
L5:function(a,b,c,d,e){if(b==null){if(a==null)return H.VM(new P.YB(0,null,null,null,null,null,0),[d,e])
b=P.py()}else{if(P.J2()===b&&P.N3()===a)return H.VM(new P.ey(0,null,null,null,null,null,0),[d,e])
if(a==null)a=P.iv()}return P.Ex(a,b,c,d,e)},
@@ -13613,7 +13737,7 @@
J.kH(a,new P.ZQ(z,y))
y.KF("}")}finally{z=$.tw()
if(0>=z.length)return H.e(z,0)
-z.pop()}return y.gvM()},"call$1","DH",2,0,null,183,[]],
+z.pop()}return y.gvM()},"call$1","DH",2,0,null,186,[]],
k6:{
"^":"a;X5,vv,OX,OB,wV",
gB:function(a){return this.X5},
@@ -13679,7 +13803,7 @@
z=this.Ig()
for(y=z.length,x=0;x<y;++x){w=z[x]
b.call$2(w,this.t(0,w))
-if(z!==this.wV)throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.wV)throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,378,[]],
Ig:[function(){var z,y,x,w,v,u,t,s,r,q,p,o
z=this.wV
if(z!=null)return z
@@ -13700,33 +13824,33 @@
for(o=0;o<p;o+=2){y[u]=q[o];++u}}}this.wV=y
return y},"call$0","gtL",0,0,null],
dg:[function(a,b,c){if(a[b]==null){this.X5=this.X5+1
-this.wV=null}P.cW(a,b,c)},"call$3","gLa",6,0,null,178,[],42,[],23,[]],
+this.wV=null}P.cW(a,b,c)},"call$3","gLa",6,0,null,181,[],42,[],23,[]],
Nv:[function(a,b){var z
if(a!=null&&a[b]!=null){z=P.vL(a,b)
delete a[b]
this.X5=this.X5-1
this.wV=null
-return z}else return},"call$2","got",4,0,null,178,[],42,[]],
+return z}else return},"call$2","got",4,0,null,181,[],42,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,42,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;y+=2)if(J.de(a[y],b))return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
$isZ0:true,
static:{vL:[function(a,b){var z=a[b]
-return z===a?null:z},"call$2","ME",4,0,null,178,[],42,[]],cW:[function(a,b,c){if(c==null)a[b]=a
-else a[b]=c},"call$3","Nk",6,0,null,178,[],42,[],23,[]],a0:[function(){var z=Object.create(null)
+return z===a?null:z},"call$2","ME",4,0,null,181,[],42,[]],cW:[function(a,b,c){if(c==null)a[b]=a
+else a[b]=c},"call$3","Nk",6,0,null,181,[],42,[],23,[]],a0:[function(){var z=Object.create(null)
P.cW(z,"<non-identifier-key>",z)
delete z["<non-identifier-key>"]
return z},"call$0","Vd",0,0,null]}},
oi:{
-"^":"Tp:223;a",
-call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
ce:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
DJ:{
"^":"Tp;a",
@@ -13740,7 +13864,7 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;y+=2){x=a[y]
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,411,[],42,[]]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,421,[],42,[]]},
Fq:{
"^":"k6;m6,Q6,ac,X5,vv,OX,OB,wV",
C2:function(a,b){return this.m6.call$2(a,b)},
@@ -13757,14 +13881,14 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;y+=2)if(this.C2(a[y],b)===!0)return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
static:{MP:function(a,b,c,d,e){var z=new P.jG(d)
return H.VM(new P.Fq(a,b,z,0,null,null,null,null),[d,e])}}},
jG:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,272,[],"call"],
+return z},"call$1",null,2,0,null,274,[],"call"],
$isEH:true},
fG:{
"^":"mW;Fb",
@@ -13840,7 +13964,7 @@
if(this.x4(a))return this.t(0,a)
z=b.call$0()
this.u(0,a,z)
-return z},"call$2","gMs",4,0,null,42,[],413,[]],
+return z},"call$2","gMs",4,0,null,42,[],423,[]],
Rz:[function(a,b){var z,y,x,w
if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -13864,17 +13988,17 @@
y=this.zN
for(;z!=null;){b.call$2(z.gkh(),z.gS4())
if(y!==this.zN)throw H.b(P.a4(this))
-z=z.gDG()}},"call$1","gjw",2,0,null,371,[]],
+z=z.gDG()}},"call$1","gjw",2,0,null,378,[]],
dg:[function(a,b,c){var z=a[b]
if(z==null)a[b]=this.pE(b,c)
-else z.sS4(c)},"call$3","gLa",6,0,null,178,[],42,[],23,[]],
+else z.sS4(c)},"call$3","gLa",6,0,null,181,[],42,[],23,[]],
Nv:[function(a,b){var z
if(a==null)return
z=a[b]
if(z==null)return
this.Vb(z)
delete a[b]
-return z.gS4()},"call$2","got",4,0,null,178,[],42,[]],
+return z.gS4()},"call$2","got",4,0,null,181,[],42,[]],
pE:[function(a,b){var z,y
z=new P.db(a,b,null,null)
if(this.H9==null){this.lX=z
@@ -13892,13 +14016,13 @@
if(y==null)this.lX=z
else y.szQ(z)
this.X5=this.X5-1
-this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,414,[]],
+this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,424,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,42,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(J.de(a[y].gkh(),b))return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
$isFo:true,
$isZ0:true,
@@ -13907,12 +14031,12 @@
delete z["<non-identifier-key>"]
return z},"call$0","Bs",0,0,null]}},
a1:{
-"^":"Tp:223;a",
-call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
ou:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
S9:{
"^":"Tp;a",
@@ -13926,7 +14050,7 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;++y){x=a[y].gkh()
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,411,[],42,[]]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,421,[],42,[]]},
xd:{
"^":"YB;m6,Q6,ac,X5,vv,OX,OB,H9,lX,zN",
C2:function(a,b){return this.m6.call$2(a,b)},
@@ -13943,13 +14067,13 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(this.C2(a[y].gkh(),b)===!0)return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
static:{Ex:function(a,b,c,d,e){var z=new P.v6(d)
return H.VM(new P.xd(a,b,z,0,null,null,null,null,null,0),[d,e])}}},
v6:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,272,[],"call"],
+return z},"call$1",null,2,0,null,274,[],"call"],
$isEH:true},
db:{
"^":"a;kh<,S4@,DG@,zQ@"},
@@ -14030,7 +14154,7 @@
this.DM=null
return!0}},"call$1","ght",2,0,null,124,[]],
FV:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,415,[]],
+for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,425,[]],
Rz:[function(a,b){var z,y,x
if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -14071,17 +14195,17 @@
a[b]=0
this.X5=this.X5+1
this.DM=null
-return!0},"call$2","gLa",4,0,null,178,[],124,[]],
+return!0},"call$2","gLa",4,0,null,181,[],124,[]],
Nv:[function(a,b){if(a!=null&&a[b]!=null){delete a[b]
this.X5=this.X5-1
this.DM=null
-return!0}else return!1},"call$2","got",4,0,null,178,[],124,[]],
+return!0}else return!1},"call$2","got",4,0,null,181,[],124,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,124,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(J.de(a[y],b))return y
-return-1},"call$2","gSP",4,0,null,411,[],124,[]],
+return-1},"call$2","gSP",4,0,null,421,[],124,[]],
$isyN:true,
$iscX:true,
$ascX:null},
@@ -14092,7 +14216,7 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;++y){x=a[y]
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,411,[],124,[]]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,421,[],124,[]]},
oz:{
"^":"a;O2,DM,zi,fD",
gl:function(){return this.fD},
@@ -14136,7 +14260,7 @@
y=this.zN
for(;z!=null;){b.call$1(z.gGc())
if(y!==this.zN)throw H.b(P.a4(this))
-z=z.gDG()}},"call$1","gjw",2,0,null,371,[]],
+z=z.gDG()}},"call$1","gjw",2,0,null,378,[]],
grZ:function(a){var z=this.lX
if(z==null)throw H.b(new P.lj("No elements"))
return z.gGc()},
@@ -14162,7 +14286,7 @@
else{if(this.aH(u,b)>=0)return!1
u.push(this.xf(b))}return!0}},"call$1","ght",2,0,null,124,[]],
FV:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,415,[]],
+for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,425,[]],
Rz:[function(a,b){var z,y,x
if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -14182,14 +14306,14 @@
this.zN=this.zN+1&67108863}},"call$0","gyP",0,0,null],
cA:[function(a,b){if(a[b]!=null)return!1
a[b]=this.xf(b)
-return!0},"call$2","gLa",4,0,null,178,[],124,[]],
+return!0},"call$2","gLa",4,0,null,181,[],124,[]],
Nv:[function(a,b){var z
if(a==null)return!1
z=a[b]
if(z==null)return!1
this.Vb(z)
delete a[b]
-return!0},"call$2","got",4,0,null,178,[],124,[]],
+return!0},"call$2","got",4,0,null,181,[],124,[]],
xf:[function(a){var z,y
z=new P.ef(a,null,null)
if(this.H9==null){this.lX=z
@@ -14207,13 +14331,13 @@
if(y==null)this.lX=z
else y.szQ(z)
this.X5=this.X5-1
-this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,414,[]],
+this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,424,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,124,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(J.de(a[y].gGc(),b))return y
-return-1},"call$2","gSP",4,0,null,411,[],124,[]],
+return-1},"call$2","gSP",4,0,null,421,[],124,[]],
$isyN:true,
$iscX:true,
$ascX:null},
@@ -14242,7 +14366,7 @@
z=H.VM(y,[H.Kp(this,0)])}for(y=this.gA(this),x=0;y.G();x=v){w=y.gl()
v=x+1
if(x>=z.length)return H.e(z,x)
-z[x]=w}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+z[x]=w}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
bu:[function(a){return H.mx(this,"{","}")},"call$0","gXo",0,0,null],
$isyN:true,
$iscX:true,
@@ -14265,18 +14389,18 @@
else{y.KF(H.d(z.gl()))
for(;z.G();){y.vM=y.vM+b
x=H.d(z.gl())
-y.vM=y.vM+x}}return y.vM},"call$1","gnr",0,2,null,328,329,[]],
+y.vM=y.vM+x}}return y.vM},"call$1","gnr",0,2,null,330,331,[]],
Vr:[function(a,b){var z
for(z=this.gA(this);z.G();)if(b.call$1(z.gl())===!0)return!0
return!1},"call$1","gG2",2,0,null,110,[]],
-tt:[function(a,b){return P.F(this,b,H.ip(this,"mW",0))},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+tt:[function(a,b){return P.F(this,b,H.ip(this,"mW",0))},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
gB:function(a){var z,y
z=this.gA(this)
for(y=0;z.G();)++y
return y},
gl0:function(a){return!this.gA(this).G()},
gor:function(a){return this.gl0(this)!==!0},
-eR:[function(a,b){return H.ke(this,b,H.ip(this,"mW",0))},"call$1","gZo",2,0,null,287,[]],
+eR:[function(a,b){return H.ke(this,b,H.ip(this,"mW",0))},"call$1","gZo",2,0,null,289,[]],
grZ:function(a){var z,y
z=this.gA(this)
if(!z.G())throw H.b(new P.lj("No elements"))
@@ -14285,7 +14409,7 @@
return y},
qA:[function(a,b,c){var z,y
for(z=this.gA(this);z.G();){y=z.gl()
-if(b.call$1(y)===!0)return y}throw H.b(new P.lj("No matching element"))},function(a,b){return this.qA(a,b,null)},"XG","call$2$orElse",null,"gyo",2,3,null,77,372,[],416,[]],
+if(b.call$1(y)===!0)return y}throw H.b(new P.lj("No matching element"))},function(a,b){return this.qA(a,b,null)},"XG","call$2$orElse",null,"gyo",2,3,null,77,379,[],426,[]],
Zv:[function(a,b){var z,y,x,w
if(typeof b!=="number"||Math.floor(b)!==b||b<0)throw H.b(P.N(b))
for(z=this.gA(this),y=b;z.G();){x=z.gl()
@@ -14311,7 +14435,7 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){b.call$1(this.t(a,y))
-if(z!==this.gB(a))throw H.b(P.a4(a))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.gB(a))throw H.b(P.a4(a))}},"call$1","gjw",2,0,null,378,[]],
gl0:function(a){return J.de(this.gB(a),0)},
gor:function(a){return!this.gl0(a)},
grZ:function(a){if(J.de(this.gB(a),0))throw H.b(new P.lj("No elements"))
@@ -14330,13 +14454,13 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){if(b.call$1(this.t(a,y))===!0)return!0
-if(z!==this.gB(a))throw H.b(P.a4(a))}return!1},"call$1","gG2",2,0,null,372,[]],
+if(z!==this.gB(a))throw H.b(P.a4(a))}return!1},"call$1","gG2",2,0,null,379,[]],
zV:[function(a,b){var z
if(J.de(this.gB(a),0))return""
z=P.p9("")
z.We(a,b)
-return z.vM},"call$1","gnr",0,2,null,328,329,[]],
-ev:[function(a,b){return H.VM(new H.U5(a,b),[H.ip(a,"lD",0)])},"call$1","gIR",2,0,null,372,[]],
+return z.vM},"call$1","gnr",0,2,null,330,331,[]],
+ev:[function(a,b){return H.VM(new H.U5(a,b),[H.ip(a,"lD",0)])},"call$1","gIR",2,0,null,379,[]],
ez:[function(a,b){return H.VM(new H.A8(a,b),[null,null])},"call$1","gIr",2,0,null,110,[]],
eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gZo",2,0,null,122,[]],
tt:[function(a,b){var z,y,x
@@ -14351,7 +14475,7 @@
if(!(x<y))break
y=this.t(a,x)
if(x>=z.length)return H.e(z,x)
-z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
h:[function(a,b){var z=this.gB(a)
this.sB(a,J.WB(z,1))
this.u(a,z,b)},"call$1","ght",2,0,null,124,[]],
@@ -14403,7 +14527,7 @@
if(typeof x!=="number")return H.s(x)
if(e+y>x)throw H.b(new P.lj("Not enough elements"))
if(e<b)for(w=y-1;w>=0;--w)this.u(a,b+w,z.t(d,e+w))
-else for(w=0;w<y;++w)this.u(a,b+w,z.t(d,e+w))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+else for(w=0;w<y;++w)this.u(a,b+w,z.t(d,e+w))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
XU:[function(a,b,c){var z,y
z=this.gB(a)
if(typeof z!=="number")return H.s(z)
@@ -14412,7 +14536,7 @@
while(!0){z=this.gB(a)
if(typeof z!=="number")return H.s(z)
if(!(y<z))break
-if(J.de(this.t(a,y),b))return y;++y}return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,124,[],80,[]],
+if(J.de(this.t(a,y),b))return y;++y}return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,124,[],80,[]],
Pk:[function(a,b,c){var z,y
c=J.xH(this.gB(a),1)
for(z=c;y=J.Wx(z),y.F(z,0);z=y.W(z,1))if(J.de(this.t(a,z),b))return z
@@ -14443,14 +14567,14 @@
$iscX:true,
$ascX:null},
ZQ:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z=this.a
if(!z.a)this.b.KF(", ")
z.a=!1
z=this.b
z.KF(a)
z.KF(": ")
-z.KF(b)},"call$2",null,4,0,null,417,[],272,[],"call"],
+z.KF(b)},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true},
Sw:{
"^":"mW;v5,av,eZ,qT",
@@ -14462,7 +14586,7 @@
for(y=this.av;y!==this.eZ;y=(y+1&this.v5.length-1)>>>0){x=this.v5
if(y<0||y>=x.length)return H.e(x,y)
b.call$1(x[y])
-if(z!==this.qT)H.vh(P.a4(this))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.qT)H.vh(P.a4(this))}},"call$1","gjw",2,0,null,378,[]],
gl0:function(a){return this.av===this.eZ},
gB:function(a){return J.mQ(J.xH(this.eZ,this.av),this.v5.length-1)},
grZ:function(a){var z,y
@@ -14488,7 +14612,7 @@
C.Nm.sB(z,this.gB(this))}else{y=Array(this.gB(this))
y.fixed$length=init
z=H.VM(y,[H.Kp(this,0)])}this.e4(z)
-return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
h:[function(a,b){this.NZ(0,b)},"call$1","ght",2,0,null,124,[]],
FV:[function(a,b){var z,y,x,w,v,u,t,s,r
z=J.x(b)
@@ -14515,7 +14639,7 @@
H.Og(w,z,z+s,b,0)
z=this.v5
H.Og(z,0,r,b,s)
-this.eZ=r}}this.qT=this.qT+1}else for(z=z.gA(b);z.G();)this.NZ(0,z.gl())},"call$1","gDY",2,0,null,418,[]],
+this.eZ=r}}this.qT=this.qT+1}else for(z=z.gA(b);z.G();)this.NZ(0,z.gl())},"call$1","gDY",2,0,null,428,[]],
Rz:[function(a,b){var z,y
for(z=this.av;z!==this.eZ;z=(z+1&this.v5.length-1)>>>0){y=this.v5
if(z<0||z>=y.length)return H.e(y,z)
@@ -14556,7 +14680,7 @@
if(v<0||v>=w)return H.e(x,v)
x[v]=t}if(y>=w)return H.e(x,y)
x[y]=null
-return a}},"call$1","gzv",2,0,null,419,[]],
+return a}},"call$1","gzv",2,0,null,429,[]],
VW:[function(){var z,y,x,w
z=Array(this.v5.length*2)
z.fixed$length=init
@@ -14601,7 +14725,7 @@
if(typeof a!=="number")return a.O()
a=(a<<2>>>0)-1
for(;!0;a=z){z=(a&a-1)>>>0
-if(z===0)return a}},"call$1","W5",2,0,null,184,[]]}},
+if(z===0)return a}},"call$1","W5",2,0,null,187,[]]}},
o0:{
"^":"a;Lz,pP,qT,Dc,fD",
gl:function(){return this.fD},
@@ -14662,7 +14786,7 @@
return v},"call$1","gST",2,0,null,42,[]],
Xu:[function(a){var z,y
for(z=a;y=z.T8,y!=null;z=y){z.T8=y.Bb
-y.Bb=z}return z},"call$1","gOv",2,0,null,259,[]],
+y.Bb=z}return z},"call$1","gOv",2,0,null,261,[]],
bB:[function(a){var z,y,x
if(this.aY==null)return
if(!J.de(this.vh(a),0))return
@@ -14685,12 +14809,12 @@
a.T8=y.T8
y.T8=null}else{a.T8=y
a.Bb=y.Bb
-y.Bb=null}this.aY=a},"call$2","gSx",4,0,null,259,[],420,[]]},
+y.Bb=null}this.aY=a},"call$2","gSx",4,0,null,261,[],430,[]]},
Ba:{
"^":"vX;Cw,ac,aY,iW,P6,qT,bb",
wS:function(a,b){return this.Cw.call$2(a,b)},
Ef:function(a){return this.ac.call$1(a)},
-yV:[function(a,b){return this.wS(a,b)},"call$2","gNA",4,0,null,421,[],422,[]],
+yV:[function(a,b){return this.wS(a,b)},"call$2","gNA",4,0,null,431,[],432,[]],
t:[function(a,b){if(b==null)throw H.b(new P.AT(b))
if(this.Ef(b)!==!0)return
if(this.aY!=null)if(J.de(this.vh(b),0))return this.aY.P
@@ -14735,9 +14859,9 @@
y=new P.An(c)
return H.VM(new P.Ba(z,y,null,H.VM(new P.qv(null,null,null),[c]),0,0,0),[c,d])}}},
An:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,272,[],"call"],
+return z},"call$1",null,2,0,null,274,[],"call"],
$isEH:true},
bF:{
"^":"Tp;a",
@@ -14745,13 +14869,13 @@
$isEH:true,
$signature:function(){return H.IG(function(a,b){return{func:"ri",args:[a,b]}},this.a,"Ba")}},
LD:{
-"^":"Tp:423;a,b,c",
+"^":"Tp:433;a,b,c",
call$1:[function(a){var z,y,x,w
for(z=this.c,y=this.a,x=this.b;a!=null;){if(J.de(a.P,x))return!0
if(z!==y.bb)throw H.b(P.a4(y))
w=a.T8
if(w!=null&&this.call$1(w)===!0)return!0
-a=a.Bb}return!1},"call$1",null,2,0,null,259,[],"call"],
+a=a.Bb}return!1},"call$1",null,2,0,null,261,[],"call"],
$isEH:true},
S6B:{
"^":"a;",
@@ -14760,7 +14884,7 @@
return this.Wb(z)},
WV:[function(a){var z
for(z=this.Ln;a!=null;){z.push(a)
-a=a.Bb}},"call$1","gBl",2,0,null,259,[]],
+a=a.Bb}},"call$1","gBl",2,0,null,261,[]],
G:[function(){var z,y,x
z=this.Dn
if(this.qT!==z.qT)throw H.b(P.a4(z))
@@ -14802,32 +14926,32 @@
$isyN:true},
DN:{
"^":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a.G3},"call$1","gBL",2,0,null,259,[]]},
+Wb:[function(a){return a.G3},"call$1","gBL",2,0,null,261,[]]},
ZM:{
"^":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a.P},"call$1","gBL",2,0,null,259,[]],
+Wb:[function(a){return a.P},"call$1","gBL",2,0,null,261,[]],
$asS6B:function(a,b){return[b]}},
HW:{
"^":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a},"call$1","gBL",2,0,null,259,[]],
+Wb:[function(a){return a},"call$1","gBL",2,0,null,261,[]],
$asS6B:function(a){return[[P.qv,a]]}}}],["dart.convert","dart:convert",,P,{
"^":"",
VQ:[function(a,b){var z=new P.JC()
-return z.call$2(null,new P.f1(z).call$1(a))},"call$2","os",4,0,null,185,[],186,[]],
+return z.call$2(null,new P.f1(z).call$1(a))},"call$2","os",4,0,null,188,[],189,[]],
BS:[function(a,b){var z,y,x,w
x=a
if(typeof x!=="string")throw H.b(new P.AT(a))
z=null
try{z=JSON.parse(a)}catch(w){x=H.Ru(w)
y=x
-throw H.b(P.cD(String(y)))}return P.VQ(z,b)},"call$2","H44",4,0,null,27,[],186,[]],
-tp:[function(a){return a.Lt()},"call$1","BC",2,0,187,6,[]],
+throw H.b(P.cD(String(y)))}return P.VQ(z,b)},"call$2","H44",4,0,null,27,[],189,[]],
+tp:[function(a){return a.Lt()},"call$1","BC",2,0,190,6,[]],
JC:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){return b},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
f1:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y,x,w,v,u,t
if(a==null||typeof a!="object")return a
if(Object.getPrototypeOf(a)===Array.prototype){z=a
@@ -14857,12 +14981,12 @@
static:{TP:function(a){return new P.K8(a,null)}}},
by:{
"^":"Uk;N5,iY",
-pW:[function(a,b){return P.BS(a,this.gHe().N5)},function(a){return this.pW(a,null)},"kV","call$2$reviver",null,"gzL",2,3,null,77,27,[],186,[]],
-PN:[function(a,b){return P.Vg(a,this.gZE().Xi)},function(a){return this.PN(a,null)},"KP","call$2$toEncodable",null,"gV0",2,3,null,77,23,[],188,[]],
+pW:[function(a,b){return P.BS(a,this.gHe().N5)},function(a){return this.pW(a,null)},"kV","call$2$reviver",null,"gzL",2,3,null,77,27,[],189,[]],
+PN:[function(a,b){return P.Vg(a,this.gZE().Xi)},function(a){return this.PN(a,null)},"KP","call$2$toEncodable",null,"gV0",2,3,null,77,23,[],191,[]],
gZE:function(){return C.Ap},
gHe:function(){return C.A3},
$asUk:function(){return[P.a,J.O]}},
-dI:{
+pD:{
"^":"wI;Xi",
$aswI:function(){return[P.a,J.O]}},
Cf:{
@@ -14915,11 +15039,11 @@
w.KF("}")
this.JN.Rz(0,a)
return!0}else return!1}},"call$1","gjQ",2,0,null,6,[]],
-static:{"^":"P3,kD,IE,Yz,No,fg,SW,KQz,MU,ql,NXu,CE,QVv",Vg:[function(a,b){var z
+static:{"^":"P3,Ib,IE,Yz,No,fg,SW,KQz,MU,ql,NXu,CE,QVv",Vg:[function(a,b){var z
b=P.BC()
z=P.p9("")
new P.Sh(b,z,P.yv(null)).rl(a)
-return z.vM},"call$2","ab",4,0,null,6,[],188,[]],NY:[function(a,b){var z,y,x,w,v,u,t
+return z.vM},"call$2","ab",4,0,null,6,[],191,[]],NY:[function(a,b){var z,y,x,w,v,u,t
z=J.U6(b)
y=z.gB(b)
x=H.VM([],[J.im])
@@ -14949,9 +15073,9 @@
x.push(t<10?48+t:87+t)
break}w=!0}else if(u===34||u===92){x.push(92)
x.push(u)
-w=!0}else x.push(u)}a.KF(w?P.HM(x):b)},"call$2","qW",4,0,null,189,[],86,[]]}},
+w=!0}else x.push(u)}a.KF(w?P.HM(x):b)},"call$2","qW",4,0,null,192,[],86,[]]}},
tF:{
-"^":"Tp:424;a,b",
+"^":"Tp:434;a,b",
call$2:[function(a,b){var z,y,x
z=this.a
y=this.b
@@ -15011,7 +15135,7 @@
this.ZP=y+1
if(y>=v)return H.e(z,y)
z[y]=128|a&63
-return!1}},"call$2","gkL",4,0,null,425,[],426,[]],
+return!1}},"call$2","gkL",4,0,null,435,[],436,[]],
fJ:[function(a,b,c){var z,y,x,w,v,u,t,s
if(b!==c&&(J.lE(a,J.xH(c,1))&64512)===55296)c=J.xH(c,1)
if(typeof c!=="number")return H.s(c)
@@ -15044,11 +15168,11 @@
z[s]=128|v>>>6&63
this.ZP=u+1
if(u>=y)return H.e(z,u)
-z[u]=128|v&63}}return w},"call$3","gkH",6,0,null,334,[],115,[],116,[]],
-static:{"^":"n9"}}}],["dart.core","dart:core",,P,{
+z[u]=128|v&63}}return w},"call$3","gkH",6,0,null,336,[],115,[],116,[]],
+static:{"^":"Jf4"}}}],["dart.core","dart:core",,P,{
"^":"",
Te:[function(a){return},"call$1","PM",2,0,null,44,[]],
-Wc:[function(a,b){return J.oE(a,b)},"call$2","n4",4,0,190,123,[],180,[]],
+Wc:[function(a,b){return J.oE(a,b)},"call$2","n4",4,0,193,123,[],183,[]],
hl:[function(a){var z,y,x,w,v,u
if(typeof a==="number"||typeof a==="boolean"||null==a)return J.AG(a)
if(typeof a==="string"){z=new P.Rn("")
@@ -15074,9 +15198,9 @@
z.vM=y
return y}return"Instance of '"+H.lh(a)+"'"},"call$1","Zx",2,0,null,6,[]],
FM:function(a){return new P.HG(a)},
-ad:[function(a,b){return a==null?b==null:a===b},"call$2","N3",4,0,192,123,[],180,[]],
-xv:[function(a){return H.CU(a)},"call$1","J2",2,0,193,6,[]],
-QA:[function(a,b,c){return H.BU(a,c,b)},function(a){return P.QA(a,null,null)},null,function(a,b){return P.QA(a,b,null)},null,"call$3$onError$radix","call$1","call$2$onError","ya",2,5,194,77,77,27,[],156,[],28,[]],
+ad:[function(a,b){return a==null?b==null:a===b},"call$2","N3",4,0,195,123,[],183,[]],
+xv:[function(a){return H.CU(a)},"call$1","J2",2,0,196,6,[]],
+QA:[function(a,b,c){return H.BU(a,c,b)},function(a){return P.QA(a,null,null)},null,function(a,b){return P.QA(a,b,null)},null,"call$3$onError$radix","call$1","call$2$onError","ya",2,5,197,77,77,27,[],159,[],28,[]],
O8:function(a,b,c){var z,y,x
z=J.Qi(a,c)
if(a!==0&&b!=null)for(y=z.length,x=0;x<y;++x)z[x]=b
@@ -15101,11 +15225,11 @@
HM:function(a){return H.eT(a)},
fc:function(a){return P.HM(P.O8(1,a,J.im))},
HB:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){this.a.u(0,a.gfN(a),b)},"call$2",null,4,0,null,129,[],23,[],"call"],
$isEH:true},
CL:{
-"^":"Tp:378;a",
+"^":"Tp:385;a",
call$2:[function(a,b){var z=this.a
if(z.b>0)z.a.KF(", ")
z.a.KF(J.GL(a))
@@ -15120,7 +15244,7 @@
"^":"a;",
bu:[function(a){return this?"true":"false"},"call$0","gXo",0,0,null],
$isbool:true},
-fR:{
+Tx:{
"^":"a;"},
iP:{
"^":"a;y3<,aL",
@@ -15145,11 +15269,11 @@
q=new P.Zl().call$1(z)
if(y)return H.d(w)+"-"+H.d(v)+"-"+H.d(u)+" "+H.d(t)+":"+H.d(s)+":"+H.d(r)+"."+H.d(q)+"Z"
else return H.d(w)+"-"+H.d(v)+"-"+H.d(u)+" "+H.d(t)+":"+H.d(s)+":"+H.d(r)+"."+H.d(q)},"call$0","gXo",0,0,null],
-h:[function(a,b){return P.Wu(this.y3+b.gVs(),this.aL)},"call$1","ght",2,0,null,159,[]],
+h:[function(a,b){return P.Wu(this.y3+b.gVs(),this.aL)},"call$1","ght",2,0,null,162,[]],
EK:function(){H.o2(this)},
RM:function(a,b){if(Math.abs(a)>8640000000000000)throw H.b(new P.AT(a))},
$isiP:true,
-static:{"^":"aV,bI,Hq,Kw,h2,pa,EQe,NXt,tp1,Gi,k3,cR,E0,fH,Ne,Nr,bmS,FI,Kz,J7,dM,lme",Gl:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
+static:{"^":"aV,bI,Hq,Kw,h2,pa,EQe,NXt,tp1,Gi,k3,cR,E03,fH,Ne,r2,bmS,FI,Kz,EF,dM,lme",Gl:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
z=new H.VR(H.v4("^([+-]?\\d?\\d\\d\\d\\d)-?(\\d\\d)-?(\\d\\d)(?:[ T](\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(.\\d{1,6})?)?)?( ?[zZ]| ?\\+00(?::?00)?)?)?$",!1,!0,!1),null,null).ej(a)
if(z!=null){y=new P.MF()
x=z.QK
@@ -15172,48 +15296,48 @@
if(8>=x.length)return H.e(x,8)
o=x[8]!=null
n=H.zW(w,v,u,t,s,r,q,o)
-return P.Wu(p?n+1:n,o)}else throw H.b(P.cD(a))},"call$1","lel",2,0,null,191,[]],Wu:function(a,b){var z=new P.iP(a,b)
+return P.Wu(p?n+1:n,o)}else throw H.b(P.cD(a))},"call$1","lel",2,0,null,194,[]],Wu:function(a,b){var z=new P.iP(a,b)
z.RM(a,b)
return z}}},
MF:{
-"^":"Tp:428;",
+"^":"Tp:438;",
call$1:[function(a){if(a==null)return 0
-return H.BU(a,null,null)},"call$1",null,2,0,null,427,[],"call"],
+return H.BU(a,null,null)},"call$1",null,2,0,null,437,[],"call"],
$isEH:true},
Rq:{
-"^":"Tp:429;",
+"^":"Tp:439;",
call$1:[function(a){if(a==null)return 0
-return H.IH(a,null)},"call$1",null,2,0,null,427,[],"call"],
+return H.IH(a,null)},"call$1",null,2,0,null,437,[],"call"],
$isEH:true},
Hn:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){var z,y
z=Math.abs(a)
y=a<0?"-":""
if(z>=1000)return""+a
if(z>=100)return y+"0"+H.d(z)
if(z>=10)return y+"00"+H.d(z)
-return y+"000"+H.d(z)},"call$1",null,2,0,null,287,[],"call"],
+return y+"000"+H.d(z)},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
Zl:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=100)return""+a
if(a>=10)return"0"+a
-return"00"+a},"call$1",null,2,0,null,287,[],"call"],
+return"00"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
B5:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=10)return""+a
-return"0"+a},"call$1",null,2,0,null,287,[],"call"],
+return"0"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
a6:{
"^":"a;Fq<",
g:[function(a,b){return P.k5(0,0,this.Fq+b.gFq(),0,0,0)},"call$1","gF1n",2,0,null,104,[]],
W:[function(a,b){return P.k5(0,0,this.Fq-b.gFq(),0,0,0)},"call$1","gTG",2,0,null,104,[]],
U:[function(a,b){if(typeof b!=="number")return H.s(b)
-return P.k5(0,0,C.CD.yu(C.CD.UD(this.Fq*b)),0,0,0)},"call$1","gEH",2,0,null,430,[]],
+return P.k5(0,0,C.CD.yu(C.CD.UD(this.Fq*b)),0,0,0)},"call$1","gEH",2,0,null,440,[]],
Z:[function(a,b){if(b===0)throw H.b(P.zl())
-return P.k5(0,0,C.jn.Z(this.Fq,b),0,0,0)},"call$1","gdG",2,0,null,431,[]],
+return P.k5(0,0,C.jn.Z(this.Fq,b),0,0,0)},"call$1","gdG",2,0,null,441,[]],
C:[function(a,b){return this.Fq<b.gFq()},"call$1","gix",2,0,null,104,[]],
D:[function(a,b){return this.Fq>b.gFq()},"call$1","gh1",2,0,null,104,[]],
E:[function(a,b){return this.Fq<=b.gFq()},"call$1","gf5",2,0,null,104,[]],
@@ -15235,20 +15359,20 @@
v=new P.P7().call$1(C.jn.JV(y,1000000))
return""+C.jn.cU(y,3600000000)+":"+H.d(x)+":"+H.d(w)+"."+H.d(v)},"call$0","gXo",0,0,null],
$isa6:true,
-static:{"^":"Wt,S4d,dk,uU,RD,b2,q9,ll,Do,f4,kTB,IJZ,iI,Vk,Nw,yn",k5:function(a,b,c,d,e,f){return new P.a6(a*86400000000+b*3600000000+e*60000000+f*1000000+d*1000+c)}}},
+static:{"^":"Kl,S4d,dk,uU,RD,b2,q9,ll,Do,f4,kTB,IJZ,iI,Vk,Nw,yn",k5:function(a,b,c,d,e,f){return new P.a6(a*86400000000+b*3600000000+e*60000000+f*1000000+d*1000+c)}}},
P7:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=100000)return""+a
if(a>=10000)return"0"+a
if(a>=1000)return"00"+a
if(a>=100)return"000"+a
if(a>=10)return"0000"+a
-return"00000"+a},"call$1",null,2,0,null,287,[],"call"],
+return"00000"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
DW:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=10)return""+a
-return"0"+a},"call$1",null,2,0,null,287,[],"call"],
+return"0"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
Ge:{
"^":"a;",
@@ -15343,7 +15467,7 @@
$.Ss=y+1
z="expando$key$"+y
H.aw(this,"expando$key",z)}return z},"call$0","gwT",0,0,null],
-static:{"^":"bZ,rly,Ss"}},
+static:{"^":"Xa,rly,Ss"}},
EH:{
"^":"a;",
$isEH:true},
@@ -15364,7 +15488,7 @@
n:[function(a,b){return this===b},"call$1","gUJ",2,0,null,104,[]],
giO:function(a){return H.eQ(this)},
bu:[function(a){return H.a5(this)},"call$0","gXo",0,0,null],
-T:[function(a,b){throw H.b(P.lr(this,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,326,[]],
+T:[function(a,b){throw H.b(P.lr(this,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,328,[]],
gbx:function(a){return new H.cu(H.dJ(this),null)},
$isa:true},
Od:{
@@ -15409,7 +15533,7 @@
for(;z.G();){this.vM=this.vM+b
y=z.gl()
y=typeof y==="string"?y:H.d(y)
-this.vM=this.vM+y}}},"call$2","gS9",2,2,null,328,415,[],329,[]],
+this.vM=this.vM+y}}},"call$2","gS9",2,2,null,330,425,[],331,[]],
V1:[function(a){this.vM=""},"call$0","gyP",0,0,null],
bu:[function(a){return this.vM},"call$0","gXo",0,0,null],
PD:function(a){if(typeof a==="string")this.vM=a
@@ -15447,13 +15571,13 @@
if(!J.de(this.gJf(this),"")||J.de(this.Fi,"file")){z=J.U6(y)
z=z.gor(y)&&!z.nC(y,"/")}else z=!1
if(z)return"/"+H.d(y)
-return y},"call$2","gbQ",4,0,null,260,[],432,[]],
+return y},"call$2","gbQ",4,0,null,262,[],442,[]],
Ky:[function(a,b){var z=J.x(a)
if(z.n(a,""))return"/"+H.d(b)
-return z.Nj(a,0,J.WB(z.cn(a,"/"),1))+H.d(b)},"call$2","gAj",4,0,null,433,[],434,[]],
+return z.Nj(a,0,J.WB(z.cn(a,"/"),1))+H.d(b)},"call$2","gAj",4,0,null,443,[],444,[]],
uo:[function(a){var z=J.U6(a)
if(J.z8(z.gB(a),0)&&z.j(a,0)===58)return!0
-return z.u8(a,"/.")!==-1},"call$1","gaO",2,0,null,260,[]],
+return z.u8(a,"/.")!==-1},"call$1","gaO",2,0,null,262,[]],
SK:[function(a){var z,y,x,w,v
if(!this.uo(a))return a
z=[]
@@ -15466,13 +15590,13 @@
z.pop()}x=!0}else if("."===w)x=!0
else{z.push(w)
x=!1}}if(x)z.push("")
-return C.Nm.zV(z,"/")},"call$1","ghK",2,0,null,260,[]],
+return C.Nm.zV(z,"/")},"call$1","ghK",2,0,null,262,[]],
tb:[function(a){var z=this.ku
if(""!==z){a.KF(z)
a.KF("@")}z=this.NN
a.KF(z==null?"null":z)
if(!J.de(this.HC,0)){a.KF(":")
-a.KF(J.AG(this.HC))}},"call$1","gyL",2,0,null,435,[]],
+a.KF(J.AG(this.HC))}},"call$1","gyL",2,0,null,445,[]],
bu:[function(a){var z,y
z=P.p9("")
y=this.Fi
@@ -15497,7 +15621,7 @@
else this.HC=e
this.r0=this.x6(c,d)},
$isiD:true,
-static:{"^":"Um,KU,Bx,iR,ti,My,nR,jJY,d2,Qq,q7,ux,vI,SF,fd,IL,Q5,zk,om,fC,O5,eq,qf,ML,y3,Pk,R1,qs,lL,I9,t2,H5,wb,eK,ws,Sp,jH,Qd,Ai,ne",r6:function(a){var z,y,x,w,v,u,t,s
+static:{"^":"Um,B4,Bx,iR,OO,My,nR,jJY,d2,Qq,q7,ux,zk,SF,fd,IL,Q5,Pa,yt,fC,O5,eq,qf,ML,y3,Pk,R1,qs,lL,I9,t2,H5,wb,eK,ws,Sp,jH,Qd,Ai,ne",r6:function(a){var z,y,x,w,v,u,t,s
z=a.QK
if(1>=z.length)return H.e(z,1)
y=z[1]
@@ -15538,7 +15662,7 @@
if(typeof x!=="number")return H.s(x)
if(!(y<x))break
if(z.j(a,y)===58){P.eg(a)
-return"["+H.d(a)+"]"}++y}return a},"call$1","jC",2,0,null,195,[]],iy:[function(a){var z,y,x,w,v,u,t,s
+return"["+H.d(a)+"]"}++y}return a},"call$1","jC",2,0,null,198,[]],iy:[function(a){var z,y,x,w,v,u,t,s
z=new P.hb()
y=new P.XX()
if(a==null)return""
@@ -15553,7 +15677,7 @@
s=!s}else s=!1
if(s)throw H.b(new P.AT("Illegal scheme: "+H.d(a)))
if(z.call$1(t)!==!0){if(y.call$1(t)===!0);else throw H.b(new P.AT("Illegal scheme: "+H.d(a)))
-v=!1}}return v?a:x.hc(a)},"call$1","oL",2,0,null,196,[]],LE:[function(a,b){var z,y,x
+v=!1}}return v?a:x.hc(a)},"call$1","oL",2,0,null,199,[]],LE:[function(a,b){var z,y,x
z={}
y=a==null
if(y&&!0)return""
@@ -15562,8 +15686,8 @@
x=P.p9("")
z.a=!0
C.jN.aN(b,new P.yZ(z,x))
-return x.vM},"call$2","wF",4,0,null,197,[],198,[]],UJ:[function(a){if(a==null)return""
-return P.Xc(a)},"call$1","p7",2,0,null,199,[]],Xc:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l
+return x.vM},"call$2","wF",4,0,null,200,[],201,[]],UJ:[function(a){if(a==null)return""
+return P.Xc(a)},"call$1","p7",2,0,null,202,[]],Xc:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l
z={}
y=new P.Gs()
x=new P.Tw()
@@ -15610,14 +15734,14 @@
r=n}if(z.a!=null&&z.c!==r)s.call$0()
z=z.a
if(z==null)return a
-return J.AG(z)},"call$1","Sy",2,0,null,200,[]],n7:[function(a){if(a!=null&&!J.de(a,""))return H.BU(a,null,null)
-else return 0},"call$1","dl",2,0,null,201,[]],K6:[function(a,b){if(a!=null)return a
+return J.AG(z)},"call$1","Sy",2,0,null,203,[]],n7:[function(a){if(a!=null&&!J.de(a,""))return H.BU(a,null,null)
+else return 0},"call$1","dl",2,0,null,204,[]],K6:[function(a,b){if(a!=null)return a
if(b!=null)return b
-return""},"call$2","xX",4,0,null,202,[],203,[]],q5:[function(a){var z,y
+return""},"call$2","xX",4,0,null,205,[],206,[]],q5:[function(a){var z,y
z=new P.Mx()
y=a.split(".")
if(y.length!==4)z.call$1("IPv4 address should contain exactly 4 parts")
-return H.VM(new H.A8(y,new P.C9(z)),[null,null]).br(0)},"call$1","cf",2,0,null,195,[]],eg:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o
+return H.VM(new H.A8(y,new P.C9(z)),[null,null]).br(0)},"call$1","cf",2,0,null,198,[]],eg:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o
z=new P.kZ()
y=new P.JT(a,z)
if(J.u6(J.q8(a),2))z.call$1("address is too short")
@@ -15650,7 +15774,7 @@
z.call$1("invalid end of IPv6 address.")}}if(u){if(J.q8(x)>7)z.call$1("an address with a wildcard must have less than 7 parts")}else if(J.q8(x)!==8)z.call$1("an address without a wildcard must contain exactly 8 parts")
s=new H.kV(x,new P.d9(x))
s.$builtinTypeInfo=[null,null]
-return P.F(s,!0,H.ip(s,"mW",0))},"call$1","y9",2,0,null,195,[]],jW:[function(a,b,c,d){var z,y,x,w,v,u,t,s
+return P.F(s,!0,H.ip(s,"mW",0))},"call$1","y9",2,0,null,198,[]],jW:[function(a,b,c,d){var z,y,x,w,v,u,t,s
z=new P.rI()
y=P.p9("")
x=c.gZE().WJ(b)
@@ -15666,29 +15790,29 @@
y.vM=y.vM+u}else{s=P.O8(1,37,J.im)
u=H.eT(s)
y.vM=y.vM+u
-z.call$2(v,y)}}return y.vM},"call$4$encoding$spaceToPlus","jd",4,5,null,204,205,206,[],207,[],208,[],209,[]]}},
+z.call$2(v,y)}}return y.vM},"call$4$encoding$spaceToPlus","jd",4,5,null,207,147,208,[],209,[],210,[],211,[]]}},
hb:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(a<128){z=a>>>4
if(z>=8)return H.e(C.HE,z)
z=(C.HE[z]&C.jn.W4(1,a&15))!==0}else z=!1
-return z},"call$1",null,2,0,null,436,[],"call"],
+return z},"call$1",null,2,0,null,446,[],"call"],
$isEH:true},
XX:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(a<128){z=a>>>4
if(z>=8)return H.e(C.mK,z)
z=(C.mK[z]&C.jn.W4(1,a&15))!==0}else z=!1
-return z},"call$1",null,2,0,null,436,[],"call"],
+return z},"call$1",null,2,0,null,446,[],"call"],
$isEH:true},
Kd:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return P.jW(C.Wd,a,C.xM,!1)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
yZ:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z=this.a
if(!z.a)this.b.KF("&")
z.a=!1
@@ -15699,26 +15823,26 @@
z.KF(P.jW(C.kg,b,C.xM,!0))},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
Gs:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(!(48<=a&&a<=57))z=65<=a&&a<=70
else z=!0
-return z},"call$1",null,2,0,null,438,[],"call"],
+return z},"call$1",null,2,0,null,448,[],"call"],
$isEH:true},
pm:{
-"^":"Tp:437;",
-call$1:[function(a){return 97<=a&&a<=102},"call$1",null,2,0,null,438,[],"call"],
+"^":"Tp:447;",
+call$1:[function(a){return 97<=a&&a<=102},"call$1",null,2,0,null,448,[],"call"],
$isEH:true},
Tw:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(a<128){z=C.jn.GG(a,4)
if(z>=8)return H.e(C.kg,z)
z=(C.kg[z]&C.jn.W4(1,a&15))!==0}else z=!1
-return z},"call$1",null,2,0,null,436,[],"call"],
+return z},"call$1",null,2,0,null,446,[],"call"],
$isEH:true},
wm:{
-"^":"Tp:439;b,c,d",
+"^":"Tp:449;b,c,d",
call$1:[function(a){var z,y
z=this.b
y=J.lE(z,a)
@@ -15727,7 +15851,7 @@
else return y},"call$1",null,2,0,null,47,[],"call"],
$isEH:true},
FB:{
-"^":"Tp:439;e",
+"^":"Tp:449;e",
call$1:[function(a){var z,y,x,w,v
for(z=this.e,y=J.rY(z),x=0,w=0;w<2;++w){v=y.j(z,a+w)
if(48<=v&&v<=57)x=x*16+v-48
@@ -15747,29 +15871,29 @@
else y.KF(J.Nj(w,x,v))},"call$0",null,0,0,null,"call"],
$isEH:true},
XZ:{
-"^":"Tp:441;",
+"^":"Tp:451;",
call$2:[function(a,b){var z=J.v1(a)
if(typeof z!=="number")return H.s(z)
-return b*31+z&1073741823},"call$2",null,4,0,null,440,[],240,[],"call"],
+return b*31+z&1073741823},"call$2",null,4,0,null,450,[],242,[],"call"],
$isEH:true},
Mx:{
-"^":"Tp:174;",
+"^":"Tp:177;",
call$1:[function(a){throw H.b(P.cD("Illegal IPv4 address, "+a))},"call$1",null,2,0,null,19,[],"call"],
$isEH:true},
C9:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y
z=H.BU(a,null,null)
y=J.Wx(z)
if(y.C(z,0)||y.D(z,255))this.a.call$1("each part must be in the range of `0..255`")
-return z},"call$1",null,2,0,null,442,[],"call"],
+return z},"call$1",null,2,0,null,452,[],"call"],
$isEH:true},
kZ:{
-"^":"Tp:174;",
+"^":"Tp:177;",
call$1:[function(a){throw H.b(P.cD("Illegal IPv6 address, "+a))},"call$1",null,2,0,null,19,[],"call"],
$isEH:true},
JT:{
-"^":"Tp:443;a,b",
+"^":"Tp:453;a,b",
call$2:[function(a,b){var z,y
if(J.z8(J.xH(b,a),4))this.b.call$1("an IPv6 part can only contain a maximum of 4 hex digits")
z=H.BU(J.Nj(this.a,a,b),16,null)
@@ -15778,23 +15902,23 @@
return z},"call$2",null,4,0,null,115,[],116,[],"call"],
$isEH:true},
d9:{
-"^":"Tp:223;c",
+"^":"Tp:225;c",
call$1:[function(a){var z=J.x(a)
if(z.n(a,-1))return P.O8((9-this.c.length)*2,0,null)
else return[z.m(a,8)&255,z.i(a,255)]},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
rI:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){var z=J.Wx(a)
b.KF(P.fc(C.xB.j("0123456789ABCDEF",z.m(a,4))))
-b.KF(P.fc(C.xB.j("0123456789ABCDEF",z.i(a,15))))},"call$2",null,4,0,null,444,[],445,[],"call"],
+b.KF(P.fc(C.xB.j("0123456789ABCDEF",z.i(a,15))))},"call$2",null,4,0,null,454,[],455,[],"call"],
$isEH:true}}],["dart.dom.html","dart:html",,W,{
"^":"",
UE:[function(a){if(P.F7()===!0)return"webkitTransitionEnd"
else if(P.dg()===!0)return"oTransitionEnd"
-return"transitionend"},"call$1","pq",2,0,210,18,[]],
-r3:[function(a,b){return document.createElement(a)},"call$2","Oe",4,0,null,94,[],211,[]],
-It:[function(a,b,c){return W.lt(a,null,null,b,null,null,null,c).ml(new W.Kx())},"call$3$onProgress$withCredentials","xF",2,5,null,77,77,212,[],213,[],214,[]],
+return"transitionend"},"call$1","pq",2,0,212,18,[]],
+r3:[function(a,b){return document.createElement(a)},"call$2","Oe",4,0,null,94,[],213,[]],
+It:[function(a,b,c){return W.lt(a,null,null,b,null,null,null,c).ml(new W.Kx())},"call$3$onProgress$withCredentials","xF",2,5,null,77,77,214,[],215,[],216,[]],
lt:[function(a,b,c,d,e,f,g,h){var z,y,x
z=W.zU
y=H.VM(new P.Zf(P.Dt(z)),[z])
@@ -15805,7 +15929,7 @@
z=C.MD.aM(x)
H.VM(new W.Ov(0,z.uv,z.Ph,W.aF(y.gYJ()),z.Sg),[H.Kp(z,0)]).Zz()
x.send()
-return y.MM},"call$8$method$mimeType$onProgress$requestHeaders$responseType$sendData$withCredentials","Za",2,15,null,77,77,77,77,77,77,77,212,[],215,[],216,[],213,[],217,[],218,[],219,[],214,[]],
+return y.MM},"call$8$method$mimeType$onProgress$requestHeaders$responseType$sendData$withCredentials","Za",2,15,null,77,77,77,77,77,77,77,214,[],217,[],218,[],215,[],219,[],220,[],221,[],216,[]],
ED:function(a){var z,y
z=document.createElement("input",null)
if(a!=null)try{J.Lp(z,a)}catch(y){H.Ru(y)}return z},
@@ -15813,9 +15937,9 @@
try{z=a
y=J.x(z)
return typeof z==="object"&&z!==null&&!!y.$iscS}catch(x){H.Ru(x)
-return!1}},"call$1","iJ",2,0,null,220,[]],
+return!1}},"call$1","iJ",2,0,null,222,[]],
Pv:[function(a){if(a==null)return
-return W.P1(a)},"call$1","Ie",2,0,null,221,[]],
+return W.P1(a)},"call$1","Ie",2,0,null,223,[]],
qc:[function(a){var z,y
if(a==null)return
if("setInterval" in a){z=W.P1(a)
@@ -15823,10 +15947,10 @@
if(typeof z==="object"&&z!==null&&!!y.$isD0)return z
return}else return a},"call$1","Wq",2,0,null,18,[]],
qr:[function(a){return a},"call$1","Ku",2,0,null,18,[]],
-YT:[function(a,b){return new W.vZ(a,b)},"call$2","AD",4,0,null,222,[],7,[]],
-GO:[function(a){return J.TD(a)},"call$1","V5",2,0,223,41,[]],
-Yb:[function(a){return J.Vq(a)},"call$1","cn",2,0,223,41,[]],
-Qp:[function(a,b,c,d){return J.qd(a,b,c,d)},"call$4","A6",8,0,224,41,[],12,[],225,[],226,[]],
+YT:[function(a,b){return new W.vZ(a,b)},"call$2","AD",4,0,null,224,[],7,[]],
+GO:[function(a){return J.TD(a)},"call$1","V5",2,0,225,41,[]],
+Yb:[function(a){return J.Vq(a)},"call$1","cn",2,0,225,41,[]],
+Qp:[function(a,b,c,d){return J.qd(a,b,c,d)},"call$4","A6",8,0,226,41,[],12,[],227,[],228,[]],
wi:[function(a,b,c,d,e){var z,y,x,w,v,u,t,s,r,q
z=J.Xr(d)
if(z==null)throw H.b(new P.AT(d))
@@ -15865,16 +15989,16 @@
Object.defineProperty(s, init.dispatchPropertyName, {value: r, enumerable: false, writable: true, configurable: true})
q={prototype: s}
if(!v)q.extends=e
-b.registerElement(c,q)},"call$5","uz",10,0,null,89,[],227,[],94,[],11,[],228,[]],
+b.registerElement(c,q)},"call$5","uz",10,0,null,89,[],229,[],94,[],11,[],230,[]],
aF:[function(a){if(J.de($.X3,C.NU))return a
if(a==null)return
-return $.X3.oj(a,!0)},"call$1","Rj",2,0,null,148,[]],
+return $.X3.oj(a,!0)},"call$1","Rj",2,0,null,151,[]],
K2:[function(a){if(J.de($.X3,C.NU))return a
-return $.X3.PT(a,!0)},"call$1","dB",2,0,null,148,[]],
+return $.X3.PT(a,!0)},"call$1","ZJ",2,0,null,151,[]],
qE:{
"^":"cv;",
-"%":"HTMLAppletElement|HTMLBRElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLMarqueeElement|HTMLMenuElement|HTMLModElement|HTMLOptGroupElement|HTMLParagraphElement|HTMLPreElement|HTMLQuoteElement|HTMLShadowElement|HTMLSpanElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableHeaderCellElement|HTMLTitleElement|HTMLUListElement|HTMLUnknownElement;HTMLElement;jpR|GN|ir|LP|uL|Vf|G6|Ds|xI|Tg|pv|Ps|CN|Vfx|vc|Dsd|i6|tuj|Fv|Vct|E9|m8|D13|Gk|GG|WZq|yb|pva|NM|T5|pR|cda|hx|u7|waa|E7|V0|St|V4|vj|LU|V10|T2|PF|qT|V11|Xd|V12|F1|XP|JG|qe|knI|V13|fI|V14|nm|V15|Vu"},
-SV:{
+"%":"HTMLAppletElement|HTMLBRElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLMarqueeElement|HTMLMenuElement|HTMLModElement|HTMLOptGroupElement|HTMLParagraphElement|HTMLPreElement|HTMLQuoteElement|HTMLShadowElement|HTMLSpanElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableHeaderCellElement|HTMLTitleElement|HTMLUListElement|HTMLUnknownElement;HTMLElement;jpR|GN|ir|LP|uL|Vf|G6|Ds|xI|Tg|pv|Ps|CN|Vfx|vc|Dsd|E0|Nr|lw|tuj|Fv|Vct|E9|m8|D13|Gk|AX|WZq|yb|pva|NM|pR|cda|hx|u7|waa|E7|V0|St|V4|vj|LU|V10|T2|PF|F1|V11|aQ|V12|Qa|V13|vI|V14|tz|V15|fl|V16|Zt|V17|wM|V18|lI|XP|JG|T5|knI|V19|fI|V20|nm|V21|Vu"},
+ho:{
"^":"Gv;",
$isList:true,
$asWO:function(){return[W.M5]},
@@ -15911,11 +16035,11 @@
"^":"qE;MB:form=,oc:name%,t5:type%,P:value%",
r6:function(a,b){return a.value.call$1(b)},
"%":"HTMLButtonElement"},
-nx:{
+Zv:{
"^":"KV;Rn:data=,B:length=",
$isGv:true,
"%":"Comment;CharacterData"},
-QQ:{
+QQS:{
"^":"ea;tT:code=",
"%":"CloseEvent"},
di:{
@@ -15934,14 +16058,14 @@
QF:{
"^":"KV;",
JP:[function(a){return a.createDocumentFragment()},"call$0","gf8",0,0,null],
-Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,288,[]],
-ek:[function(a,b,c){return a.importNode(b,c)},"call$2","gPp",2,2,null,77,259,[],289,[]],
+Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,290,[]],
+ek:[function(a,b,c){return a.importNode(b,c)},"call$2","gPp",2,2,null,77,261,[],291,[]],
gi9:function(a){return C.mt.aM(a)},
gVl:function(a){return C.pi.aM(a)},
gLm:function(a){return C.i3.aM(a)},
-Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,290,[]],
-Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,291,[]],
-pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,291,[]],
+Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,292,[]],
+Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,293,[]],
+pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,293,[]],
$isQF:true,
"%":"Document|HTMLDocument|SVGDocument"},
Aj:{
@@ -15954,9 +16078,9 @@
x=J.w1(y)
x.V1(y)
x.FV(y,z)},
-Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,290,[]],
-Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,291,[]],
-pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,291,[]],
+Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,292,[]],
+Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,293,[]],
+pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,293,[]],
$isGv:true,
"%":";DocumentFragment"},
cm:{
@@ -15980,13 +16104,13 @@
y=this.gwd(a)
y.V1(0)
y.FV(0,z)},
-Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,290,[]],
-Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,291,[]],
-pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,291,[]],
+Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,292,[]],
+Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,293,[]],
+pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,293,[]],
gDD:function(a){return new W.I4(a)},
i4:[function(a){},"call$0","gQd",0,0,null],
xo:[function(a){},"call$0","gbt",0,0,null],
-aC:[function(a,b,c,d){},"call$3","gxR",6,0,null,12,[],225,[],226,[]],
+aC:[function(a,b,c,d){},"call$3","gxR",6,0,null,12,[],227,[],228,[]],
gqn:function(a){return a.localName},
bu:[function(a){return a.localName},"call$0","gXo",0,0,null],
WO:[function(a,b){if(!!a.matches)return a.matches(b)
@@ -15994,11 +16118,11 @@
else if(!!a.mozMatchesSelector)return a.mozMatchesSelector(b)
else if(!!a.msMatchesSelector)return a.msMatchesSelector(b)
else if(!!a.oMatchesSelector)return a.oMatchesSelector(b)
-else throw H.b(P.f("Not supported on this platform"))},"call$1","grM",2,0,null,290,[]],
+else throw H.b(P.f("Not supported on this platform"))},"call$1","grM",2,0,null,292,[]],
bA:[function(a,b){var z=a
do{if(J.RF(z,b))return!0
z=z.parentElement}while(z!=null)
-return!1},"call$1","gMn",2,0,null,290,[]],
+return!1},"call$1","gMn",2,0,null,292,[]],
er:[function(a){return(a.createShadowRoot||a.webkitCreateShadowRoot).call(a)},"call$0","gzd",0,0,null],
gKE:function(a){return a.shadowRoot||a.webkitShadowRoot},
gI:function(a){return new W.DM(a,a)},
@@ -16024,8 +16148,8 @@
D0:{
"^":"Gv;",
gI:function(a){return new W.Jn(a)},
-On:[function(a,b,c,d){return a.addEventListener(b,H.tR(c,1),d)},"call$3","gIV",4,2,null,77,11,[],292,[],293,[]],
-Y9:[function(a,b,c,d){return a.removeEventListener(b,H.tR(c,1),d)},"call$3","gcF",4,2,null,77,11,[],292,[],293,[]],
+On:[function(a,b,c,d){return a.addEventListener(b,H.tR(c,1),d)},"call$3","gIV",4,2,null,77,11,[],294,[],295,[]],
+Y9:[function(a,b,c,d){return a.removeEventListener(b,H.tR(c,1),d)},"call$3","gcF",4,2,null,77,11,[],294,[],295,[]],
$isD0:true,
"%":";EventTarget"},
as:{
@@ -16062,12 +16186,12 @@
$isXj:true,
"%":"HTMLCollection|HTMLFormControlsCollection|HTMLOptionsCollection"},
zU:{
-"^":"pk;iC:responseText=,ys:status=,po:statusText=",
-R3:[function(a,b,c,d,e,f){return a.open(b,c,d,f,e)},function(a,b,c,d){return a.open(b,c,d)},"eo","call$5$async$password$user",null,"gcY",4,7,null,77,77,77,215,[],212,[],294,[],295,[],296,[]],
-wR:[function(a,b){return a.send(b)},"call$1","gX8",0,2,null,77,231,[]],
+"^":"rk;iC:responseText=,ys:status=,po:statusText=",
+R3:[function(a,b,c,d,e,f){return a.open(b,c,d,f,e)},function(a,b,c,d){return a.open(b,c,d)},"eo","call$5$async$password$user",null,"gcY",4,7,null,77,77,77,217,[],214,[],296,[],297,[],298,[]],
+wR:[function(a,b){return a.send(b)},"call$1","gX8",0,2,null,77,233,[]],
$iszU:true,
"%":"XMLHttpRequest"},
-pk:{
+rk:{
"^":"D0;",
"%":";XMLHttpRequestEventTarget"},
tX:{
@@ -16151,7 +16275,7 @@
"%":"MIDIMessageEvent"},
bn:{
"^":"Imr;",
-LV:[function(a,b,c){return a.send(b,c)},function(a,b){return a.send(b)},"wR","call$2",null,"gX8",2,2,null,77,231,[],297,[]],
+LV:[function(a,b,c){return a.send(b,c)},function(a,b){return a.send(b)},"wR","call$2",null,"gX8",2,2,null,77,233,[],299,[]],
"%":"MIDIOutput"},
Imr:{
"^":"D0;jO:id=,oc:name=,t5:type=",
@@ -16159,7 +16283,7 @@
Oq:{
"^":"Mf;",
nH:[function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.initMouseEvent(b,c,d,e,f,g,h,i,j,k,l,m,n,o,W.qr(p))
-return},"call$15","gEx",30,0,null,11,[],298,[],299,[],300,[],301,[],302,[],303,[],304,[],305,[],306,[],307,[],308,[],309,[],310,[],311,[]],
+return},"call$15","gEx",30,0,null,11,[],300,[],301,[],302,[],303,[],304,[],305,[],306,[],307,[],308,[],309,[],310,[],311,[],312,[],313,[]],
$isOq:true,
"%":"DragEvent|MSPointerEvent|MouseEvent|MouseScrollEvent|MouseWheelEvent|PointerEvent|WheelEvent"},
H9:{
@@ -16173,7 +16297,7 @@
y.call$2("subtree",i)
y.call$2("attributeOldValue",d)
y.call$2("characterDataOldValue",g)
-a.observe(b,z)},function(a,b,c,d){return this.jh(a,b,null,null,null,null,null,c,d)},"yN","call$8$attributeFilter$attributeOldValue$attributes$characterData$characterDataOldValue$childList$subtree",null,"gTT",2,15,null,77,77,77,77,77,77,77,74,[],312,[],313,[],314,[],315,[],316,[],317,[],318,[]],
+a.observe(b,z)},function(a,b,c,d){return this.jh(a,b,null,null,null,null,null,c,d)},"yN","call$8$attributeFilter$attributeOldValue$attributes$characterData$characterDataOldValue$childList$subtree",null,"gTT",2,15,null,77,77,77,77,77,77,77,74,[],314,[],315,[],316,[],317,[],318,[],319,[],320,[]],
"%":"MutationObserver|WebKitMutationObserver"},
o4:{
"^":"Gv;jL:oldValue=,N:target=,t5:type=",
@@ -16192,13 +16316,13 @@
if(z!=null)z.removeChild(a)},"call$0","gRI",0,0,null],
Tk:[function(a,b){var z,y
try{z=a.parentNode
-J.ky(z,b,a)}catch(y){H.Ru(y)}return a},"call$1","gdA",2,0,null,319,[]],
+J.ky(z,b,a)}catch(y){H.Ru(y)}return a},"call$1","gdA",2,0,null,321,[]],
bu:[function(a){var z=a.nodeValue
return z==null?J.Gv.prototype.bu.call(this,a):z},"call$0","gXo",0,0,null],
-jx:[function(a,b){return a.appendChild(b)},"call$1","gp3",2,0,null,320,[]],
+jx:[function(a,b){return a.appendChild(b)},"call$1","gp3",2,0,null,322,[]],
tg:[function(a,b){return a.contains(b)},"call$1","gdj",2,0,null,104,[]],
-mK:[function(a,b,c){return a.insertBefore(b,c)},"call$2","gHc",4,0,null,320,[],321,[]],
-dR:[function(a,b,c){return a.replaceChild(b,c)},"call$2","ghn",4,0,null,320,[],322,[]],
+mK:[function(a,b,c){return a.insertBefore(b,c)},"call$2","gHc",4,0,null,322,[],323,[]],
+dR:[function(a,b,c){return a.replaceChild(b,c)},"call$2","ghn",4,0,null,322,[],324,[]],
$isKV:true,
"%":"Entity|Notation;Node"},
yk:{
@@ -16244,7 +16368,7 @@
"^":"Gv;tT:code=,G1:message=",
"%":"PositionError"},
nC:{
-"^":"nx;N:target=",
+"^":"Zv;N:target=",
"%":"ProcessingInstruction"},
KR:{
"^":"qE;P:value%",
@@ -16271,10 +16395,10 @@
"%":"HTMLSelectElement"},
I0:{
"^":"Aj;pQ:applyAuthorStyles=",
-Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,288,[]],
+Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,290,[]],
$isI0:true,
"%":"ShadowRoot"},
-QR:{
+CY:{
"^":"qE;LA:src=,t5:type%",
"%":"HTMLSourceElement"},
zD9:{
@@ -16286,7 +16410,7 @@
bk:{
"^":"ea;G3:key=,zZ:newValue=,jL:oldValue=,O3:url=",
"%":"StorageEvent"},
-fq:{
+Lx:{
"^":"qE;t5:type%",
"%":"HTMLStyleElement"},
Tb:{
@@ -16306,7 +16430,7 @@
$isyY:true,
"%":"HTMLTemplateElement"},
kJ:{
-"^":"nx;",
+"^":"Zv;",
$iskJ:true,
"%":"CDATASection|Text"},
AE:{
@@ -16333,7 +16457,7 @@
if(W.uC(z)===!0)return z
if(null==a._location_wrapper)a._location_wrapper=new W.Dk(z)
return a._location_wrapper},
-oB:[function(a,b){return a.requestAnimationFrame(H.tR(b,1))},"call$1","gfl",2,0,null,148,[]],
+oB:[function(a,b){return a.requestAnimationFrame(H.tR(b,1))},"call$1","gfl",2,0,null,151,[]],
hr:[function(a){if(!!(a.requestAnimationFrame&&a.cancelAnimationFrame))return
(function($this) {
var vendors = ['ms', 'moz', 'webkit', 'o'];
@@ -16354,7 +16478,7 @@
geT:function(a){return W.Pv(a.parent)},
cO:[function(a){return a.close()},"call$0","gJK",0,0,null],
xc:[function(a,b,c,d){a.postMessage(P.bL(b),c)
-return},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],323,[],324,[]],
+return},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],325,[],326,[]],
bu:[function(a){return a.toString()},"call$0","gXo",0,0,null],
gi9:function(a){return C.mt.aM(a)},
gVl:function(a){return C.pi.aM(a)},
@@ -16398,12 +16522,12 @@
"%":"MozNamedAttrMap|NamedNodeMap"},
QZ:{
"^":"a;",
-HH:[function(a){return typeof console!="undefined"?console.count(a):null},"call$1","gOu",2,0,446,165,[]],
-Wt:[function(a,b){return typeof console!="undefined"?console.error(b):null},"call$1","gkc",2,0,446,165,[]],
-To:[function(a){return typeof console!="undefined"?console.info(a):null},"call$1","gqa",2,0,null,165,[]],
-De:[function(a,b){return typeof console!="undefined"?console.profile(b):null},"call$1","gB1",2,0,174,447,[]],
-uj:[function(a){return typeof console!="undefined"?console.time(a):null},"call$1","gFl",2,0,174,447,[]],
-WL:[function(a,b){return typeof console!="undefined"?console.trace(b):null},"call$1","gtN",2,0,446,165,[]],
+HH:[function(a){return typeof console!="undefined"?console.count(a):null},"call$1","gOu",2,0,456,168,[]],
+Wt:[function(a,b){return typeof console!="undefined"?console.error(b):null},"call$1","gkc",2,0,456,168,[]],
+To:[function(a){return typeof console!="undefined"?console.info(a):null},"call$1","gqa",2,0,null,168,[]],
+De:[function(a,b){return typeof console!="undefined"?console.profile(b):null},"call$1","gB1",2,0,177,457,[]],
+uj:[function(a){return typeof console!="undefined"?console.time(a):null},"call$1","gFl",2,0,177,457,[]],
+WL:[function(a,b){return typeof console!="undefined"?console.trace(b):null},"call$1","gtN",2,0,456,168,[]],
static:{"^":"wk"}},
VG:{
"^":"ar;MW,vG",
@@ -16425,7 +16549,7 @@
z=J.x(b)
for(z=J.GP(typeof b==="object"&&b!==null&&!!z.$ise7?P.F(b,!0,null):b),y=this.MW;z.G();)y.appendChild(z.gl())},"call$1","gDY",2,0,null,109,[]],
GT:[function(a,b){throw H.b(P.f("Cannot sort element lists"))},"call$1","gH7",0,2,null,77,128,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.SY(null))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.SY(null))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
Rz:[function(a,b){var z=J.x(b)
if(typeof b==="object"&&b!==null&&!!z.$iscv){z=this.MW
if(b.parentNode===z){z.removeChild(b)
@@ -16476,7 +16600,7 @@
z.nJ(a,b)
return z}}},
B1:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
return typeof a==="object"&&a!==null&&!!z.$iscv},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
@@ -16508,15 +16632,15 @@
$iscX:true,
$ascX:function(){return[W.KV]}},
Kx:{
-"^":"Tp:223;",
-call$1:[function(a){return J.EC(a)},"call$1",null,2,0,null,448,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return J.EC(a)},"call$1",null,2,0,null,458,[],"call"],
$isEH:true},
iO:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.setRequestHeader(a,b)},"call$2",null,4,0,null,449,[],23,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.setRequestHeader(a,b)},"call$2",null,4,0,null,459,[],23,[],"call"],
$isEH:true},
bU:{
-"^":"Tp:223;b,c",
+"^":"Tp:225;b,c",
call$1:[function(a){var z,y,x
z=this.c
y=z.status
@@ -16528,7 +16652,7 @@
y.OH(z)}else x.pm(a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Yg:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){if(b!=null)this.a[a]=b},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
e7:{
@@ -16550,7 +16674,7 @@
x=y.length
if(b===x)z.appendChild(c)
else{if(b<0||b>=x)return H.e(y,b)
-z.insertBefore(c,y[b])}},"call$2","gQG",4,0,null,47,[],259,[]],
+z.insertBefore(c,y[b])}},"call$2","gQG",4,0,null,47,[],261,[]],
KI:[function(a,b){var z,y,x
z=this.NL
y=z.childNodes
@@ -16572,7 +16696,7 @@
z.replaceChild(c,y[b])},"call$2","gj3",4,0,null,47,[],23,[]],
gA:function(a){return C.t5.gA(this.NL.childNodes)},
GT:[function(a,b){throw H.b(P.f("Cannot sort Node list"))},"call$1","gH7",0,2,null,77,128,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on Node list"))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on Node list"))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
gB:function(a){return this.NL.childNodes.length},
sB:function(a,b){throw H.b(P.f("Cannot set length on immutable List."))},
t:[function(a,b){var z=this.NL.childNodes
@@ -16597,7 +16721,7 @@
$iscX:true,
$ascX:function(){return[W.KV]}},
kI:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
return typeof a==="object"&&a!==null&&!!z.$isQl},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
@@ -16642,8 +16766,8 @@
$isZ0:true,
$asZ0:function(){return[J.O,J.O]}},
Zc:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,417,[],272,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true},
i7:{
"^":"tJ;MW",
@@ -16656,7 +16780,7 @@
z.removeAttribute(b)
return y},"call$1","gRI",2,0,null,42,[]],
gB:function(a){return this.gvc(this).length},
-FJ:[function(a){return a.namespaceURI==null},"call$1","giG",2,0,null,259,[]]},
+FJ:[function(a){return a.namespaceURI==null},"call$1","giG",2,0,null,261,[]]},
nF:{
"^":"As;QX,Kd",
lF:[function(){var z=P.Ls(null,null,null,J.O)
@@ -16666,7 +16790,7 @@
z=C.Nm.zV(P.F(a,!0,null)," ")
for(y=this.QX,y=H.VM(new H.a7(y,y.length,0,null),[H.Kp(y,0)]);y.G();)J.Pw(y.lo,z)},"call$1","gVH",2,0,null,86,[]],
OS:[function(a){this.Kd.aN(0,new W.vf(a))},"call$1","gFd",2,0,null,110,[]],
-O4:[function(a,b){return this.xz(new W.Iw(a,b))},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],450,[]],
+O4:[function(a,b){return this.xz(new W.Iw(a,b))},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],460,[]],
Rz:[function(a,b){return this.xz(new W.Fc(b))},"call$1","gRI",2,0,null,23,[]],
xz:[function(a){return this.Kd.es(0,!1,new W.hD(a))},"call$1","gVz",2,0,null,110,[]],
yJ:function(a){this.Kd=H.VM(new H.A8(P.F(this.QX,!0,null),new W.FK()),[null,null])},
@@ -16674,28 +16798,28 @@
z.yJ(a)
return z}}},
FK:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new W.I4(a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Si:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return this.a.FV(0,a.lF())},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
vf:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return a.OS(this.a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Iw:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){return a.O4(this.a,this.b)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Fc:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return J.V1(a,this.a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
hD:{
-"^":"Tp:341;a",
-call$2:[function(a,b){return this.a.call$1(b)===!0||a===!0},"call$2",null,4,0,null,451,[],124,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){return this.a.call$1(b)===!0||a===!0},"call$2",null,4,0,null,461,[],124,[],"call"],
$isEH:true},
I4:{
"^":"As;MW",
@@ -16707,33 +16831,33 @@
J.Pw(this.MW,a.zV(0," "))},"call$1","gVH",2,0,null,86,[]]},
e0:{
"^":"a;Ph",
-zc:[function(a,b){return H.VM(new W.RO(a,this.Ph,b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,205,18,[],293,[]],
-Qm:[function(a,b){return H.VM(new W.eu(a,this.Ph,b),[null])},function(a){return this.Qm(a,!1)},"f0","call$2$useCapture",null,"gAW",2,3,null,205,18,[],293,[]],
-jl:[function(a,b){return H.VM(new W.pu(a,b,this.Ph),[null])},function(a){return this.jl(a,!1)},"vo","call$2$useCapture",null,"gcJ",2,3,null,205,18,[],293,[]]},
+zc:[function(a,b){return H.VM(new W.RO(a,this.Ph,b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,147,18,[],295,[]],
+Qm:[function(a,b){return H.VM(new W.eu(a,this.Ph,b),[null])},function(a){return this.Qm(a,!1)},"f0","call$2$useCapture",null,"gAW",2,3,null,147,18,[],295,[]],
+jl:[function(a,b){return H.VM(new W.pu(a,b,this.Ph),[null])},function(a){return this.jl(a,!1)},"vo","call$2$useCapture",null,"gcJ",2,3,null,147,18,[],295,[]]},
RO:{
"^":"qh;uv,Ph,Sg",
KR:[function(a,b,c,d){var z=new W.Ov(0,this.uv,this.Ph,W.aF(a),this.Sg)
z.$builtinTypeInfo=this.$builtinTypeInfo
z.Zz()
-return z},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]]},
+return z},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]]},
eu:{
"^":"RO;uv,Ph,Sg",
WO:[function(a,b){var z=H.VM(new P.nO(new W.ie(b),this),[H.ip(this,"qh",0)])
-return H.VM(new P.t3(new W.Ea(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,452,[]],
+return H.VM(new P.t3(new W.Ea(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,462,[]],
$isqh:true},
ie:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,400,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
Ea:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){J.og(a,this.b)
return a},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
pu:{
"^":"qh;DI,Sg,Ph",
WO:[function(a,b){var z=H.VM(new P.nO(new W.i2(b),this),[H.ip(this,"qh",0)])
-return H.VM(new P.t3(new W.b0(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,452,[]],
+return H.VM(new P.t3(new W.b0(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,462,[]],
KR:[function(a,b,c,d){var z,y,x,w,v
z=H.VM(new W.qO(null,P.L5(null,null,null,[P.qh,null],[P.MO,null])),[null])
z.KS(null)
@@ -16741,14 +16865,14 @@
v.$builtinTypeInfo=[null]
z.h(0,v)}y=z.aV
y.toString
-return H.VM(new P.Ik(y),[H.Kp(y,0)]).KR(a,b,c,d)},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]],
+return H.VM(new P.Ik(y),[H.Kp(y,0)]).KR(a,b,c,d)},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]],
$isqh:true},
i2:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,400,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
b0:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){J.og(a,this.b)
return a},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
@@ -16761,7 +16885,7 @@
return},"call$0","gZS",0,0,null],
nB:[function(a,b){if(this.uv==null)return
this.VP=this.VP+1
-this.Ns()},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,399,[]],
+this.Ns()},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,409,[]],
gRW:function(){return this.VP>0},
QE:[function(){if(this.uv==null||this.VP<=0)return
this.VP=this.VP-1
@@ -16776,9 +16900,9 @@
z=this.eM
if(z.x4(b))return
y=this.aV
-z.u(0,b,b.zC(y.ght(y),new W.RX(this,b),this.aV.gXB()))},"call$1","ght",2,0,null,453,[]],
+z.u(0,b,b.zC(y.ght(y),new W.RX(this,b),this.aV.gXB()))},"call$1","ght",2,0,null,463,[]],
Rz:[function(a,b){var z=this.eM.Rz(0,b)
-if(z!=null)z.ed()},"call$1","gRI",2,0,null,453,[]],
+if(z!=null)z.ed()},"call$1","gRI",2,0,null,463,[]],
cO:[function(a){var z,y
for(z=this.eM,y=z.gUQ(z),y=H.VM(new H.MH(null,J.GP(y.l6),y.T6),[H.Kp(y,0),H.Kp(y,1)]);y.G();)y.lo.ed()
z.V1(0)
@@ -16789,9 +16913,9 @@
call$0:[function(){return this.a.Rz(0,this.b)},"call$0",null,0,0,null,"call"],
$isEH:true},
bO:{
-"^":"a;xY",
-cN:function(a){return this.xY.call$1(a)},
-zc:[function(a,b){return H.VM(new W.RO(a,this.cN(a),b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,205,18,[],293,[]]},
+"^":"a;Vy",
+cN:function(a){return this.Vy.call$1(a)},
+zc:[function(a,b){return H.VM(new W.RO(a,this.cN(a),b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,147,18,[],295,[]]},
Gm:{
"^":"a;",
gA:function(a){return H.VM(new W.W9(a,this.gB(a),-1,null),[H.ip(a,"Gm",0)])},
@@ -16799,9 +16923,9 @@
FV:[function(a,b){throw H.b(P.f("Cannot add to immutable List."))},"call$1","gDY",2,0,null,109,[]],
GT:[function(a,b){throw H.b(P.f("Cannot sort immutable List."))},"call$1","gH7",0,2,null,77,128,[]],
xe:[function(a,b,c){throw H.b(P.f("Cannot add to immutable List."))},"call$2","gQG",4,0,null,47,[],124,[]],
-KI:[function(a,b){throw H.b(P.f("Cannot remove from immutable List."))},"call$1","gNM",2,0,null,454,[]],
+KI:[function(a,b){throw H.b(P.f("Cannot remove from immutable List."))},"call$1","gNM",2,0,null,464,[]],
Rz:[function(a,b){throw H.b(P.f("Cannot remove from immutable List."))},"call$1","gRI",2,0,null,6,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on immutable List."))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on immutable List."))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isList:true,
$asWO:null,
$isyN:true,
@@ -16822,11 +16946,11 @@
z[b]=c},"call$2","gj3",4,0,null,47,[],23,[]],
sB:function(a,b){J.wg(this.xa,b)},
GT:[function(a,b){J.LH(this.xa,b)},"call$1","gH7",0,2,null,77,128,[]],
-XU:[function(a,b,c){return J.hf(this.xa,b,c)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,124,[],115,[]],
-Pk:[function(a,b,c){return J.ff(this.xa,b,c)},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,124,[],115,[]],
+XU:[function(a,b,c){return J.hf(this.xa,b,c)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,124,[],115,[]],
+Pk:[function(a,b,c){return J.pB(this.xa,b,c)},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,124,[],115,[]],
xe:[function(a,b,c){return J.Nv(this.xa,b,c)},"call$2","gQG",4,0,null,47,[],124,[]],
KI:[function(a,b){return J.tH(this.xa,b)},"call$1","gNM",2,0,null,47,[]],
-YW:[function(a,b,c,d,e){J.VZ(this.xa,b,c,d,e)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]]},
+YW:[function(a,b,c,d,e){J.QQ(this.xa,b,c,d,e)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]]},
Qg:{
"^":"a;je",
G:[function(){return this.je.G()},"call$0","gqy",0,0,null],
@@ -16843,7 +16967,7 @@
return!1},"call$0","gqy",0,0,null],
gl:function(){return this.QZ}},
vZ:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){var z=H.Va(this.b)
Object.defineProperty(a, init.dispatchPropertyName, {value: z, enumerable: false, writable: true, configurable: true})
a.constructor=a.__proto__.constructor
@@ -16853,14 +16977,14 @@
"^":"a;Ui",
geT:function(a){return W.P1(this.Ui.parent)},
cO:[function(a){return this.Ui.close()},"call$0","gJK",0,0,null],
-xc:[function(a,b,c,d){this.Ui.postMessage(b,c)},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],323,[],324,[]],
+xc:[function(a,b,c,d){this.Ui.postMessage(b,c)},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],325,[],326,[]],
gI:function(a){return H.vh(P.SY(null))},
-On:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gIV",4,2,null,77,11,[],292,[],293,[]],
-Y9:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gcF",4,2,null,77,11,[],292,[],293,[]],
+On:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gIV",4,2,null,77,11,[],294,[],295,[]],
+Y9:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gcF",4,2,null,77,11,[],294,[],295,[]],
$isD0:true,
$isGv:true,
static:{P1:[function(a){if(a===window)return a
-else return new W.dW(a)},"call$1","lG",2,0,null,229,[]]}},
+else return new W.dW(a)},"call$1","lG",2,0,null,231,[]]}},
Dk:{
"^":"a;WK",
gcC:function(a){return this.WK.hash},
@@ -16879,7 +17003,7 @@
"^":"zp;N:target=,mH:href=",
$isGv:true,
"%":"SVGAElement"},
-ZJ:{
+Ue:{
"^":"Eo;mH:href=",
$isGv:true,
"%":"SVGAltGlyphElement"},
@@ -16907,7 +17031,7 @@
"^":"d5;",
$isGv:true,
"%":"SVGFEBlendElement"},
-lv:{
+bd:{
"^":"d5;t5:type=,UQ:values=",
$isGv:true,
"%":"SVGFEColorMatrixElement"},
@@ -16994,7 +17118,7 @@
"^":"d0;",
$isGv:true,
"%":"SVGLineElement"},
-Jq:{
+uzr:{
"^":"d5;",
$isGv:true,
"%":"SVGMarkerElement"},
@@ -17022,11 +17146,11 @@
"^":"d0;",
$isGv:true,
"%":"SVGRectElement"},
-Ue:{
+nd:{
"^":"d5;t5:type%,mH:href=",
$isGv:true,
"%":"SVGScriptElement"},
-Lx:{
+Lu:{
"^":"d5;t5:type%",
"%":"SVGStyleElement"},
d5:{
@@ -17045,7 +17169,7 @@
"%":"SVGAltGlyphDefElement|SVGAltGlyphItemElement|SVGComponentTransferFunctionElement|SVGDescElement|SVGFEDistantLightElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEMergeNodeElement|SVGFEPointLightElement|SVGFESpotLightElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGGlyphElement|SVGHKernElement|SVGMetadataElement|SVGMissingGlyphElement|SVGStopElement|SVGTitleElement|SVGVKernElement;SVGElement"},
hy:{
"^":"zp;",
-Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,288,[]],
+Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,290,[]],
$ishy:true,
$isGv:true,
"%":"SVGSVGElement"},
@@ -17115,11 +17239,11 @@
$isIU:true,
static:{Jz:function(){return new H.ku((Math.random()*0x100000000>>>0)+(Math.random()*0x100000000>>>0)*4294967296)}}}}],["dart.js","dart:js",,P,{
"^":"",
-xZ:[function(a,b){return function(_call, f, captureThis) {return function() {return _call(f, captureThis, this, Array.prototype.slice.apply(arguments));}}(P.R4, a, b)},"call$2$captureThis","Kc",2,3,null,205,110,[],230,[]],
+xZ:[function(a,b){return function(_call, f, captureThis) {return function() {return _call(f, captureThis, this, Array.prototype.slice.apply(arguments));}}(P.R4, a, b)},"call$2$captureThis","Kc",2,3,null,147,110,[],232,[]],
R4:[function(a,b,c,d){var z
if(b===!0){z=[c]
C.Nm.FV(z,d)
-d=z}return P.wY(H.Ek(a,P.F(J.C0(d,P.Xl()),!0,null),P.Te(null)))},"call$4","qH",8,0,null,148,[],230,[],161,[],82,[]],
+d=z}return P.wY(H.Ek(a,P.F(J.C0(d,P.Xl()),!0,null),P.Te(null)))},"call$4","qH",8,0,null,151,[],232,[],164,[],82,[]],
Dm:[function(a,b,c){var z
if(Object.isExtensible(a))try{Object.defineProperty(a, b, { value: c})
return!0}catch(z){H.Ru(z)}return!1},"call$3","bE",6,0,null,91,[],12,[],23,[]],
@@ -17136,10 +17260,10 @@
if(typeof a==="object"&&a!==null&&!!z.$isiP)return H.o2(a)
else if(typeof a==="object"&&a!==null&&!!z.$isE4)return a.eh
else if(typeof a==="object"&&a!==null&&!!z.$isEH)return P.hE(a,"$dart_jsFunction",new P.DV())
-else return P.hE(a,"_$dart_jsObject",new P.Hp())}}},"call$1","En",2,0,223,91,[]],
+else return P.hE(a,"_$dart_jsObject",new P.Hp())}}},"call$1","En",2,0,225,91,[]],
hE:[function(a,b,c){var z=P.Om(a,b)
if(z==null){z=c.call$1(a)
-P.Dm(a,b,z)}return z},"call$3","nB",6,0,null,91,[],63,[],232,[]],
+P.Dm(a,b,z)}return z},"call$3","nB",6,0,null,91,[],63,[],234,[]],
dU:[function(a){var z
if(a==null||typeof a=="string"||typeof a=="number"||typeof a=="boolean")return a
else{if(a instanceof Object){z=J.x(a)
@@ -17147,13 +17271,13 @@
if(z)return a
else if(a instanceof Date)return P.Wu(a.getMilliseconds(),!1)
else if(a.constructor===DartObject)return a.o
-else return P.ND(a)}},"call$1","Xl",2,0,187,91,[]],
+else return P.ND(a)}},"call$1","Xl",2,0,190,91,[]],
ND:[function(a){if(typeof a=="function")return P.iQ(a,$.Dp(),new P.Nz())
else if(a instanceof Array)return P.iQ(a,$.Iq(),new P.Jd())
else return P.iQ(a,$.Iq(),new P.QS())},"call$1","ln",2,0,null,91,[]],
iQ:[function(a,b,c){var z=P.Om(a,b)
if(z==null||!(a instanceof Object)){z=c.call$1(a)
-P.Dm(a,b,z)}return z},"call$3","yF",6,0,null,91,[],63,[],232,[]],
+P.Dm(a,b,z)}return z},"call$3","yF",6,0,null,91,[],63,[],234,[]],
E4:{
"^":"a;eh",
t:[function(a,b){if(typeof b!=="string"&&typeof b!=="number")throw H.b(new P.AT("property is not a String or num"))
@@ -17173,7 +17297,7 @@
V7:[function(a,b){var z,y
z=this.eh
y=b==null?null:P.F(J.C0(b,P.En()),!0,null)
-return P.dU(z[a].apply(z,y))},function(a){return this.V7(a,null)},"nQ","call$2",null,"gah",2,2,null,77,215,[],263,[]],
+return P.dU(z[a].apply(z,y))},function(a){return this.V7(a,null)},"nQ","call$2",null,"gah",2,2,null,77,217,[],265,[]],
$isE4:true,
static:{uw:function(a,b){var z,y,x
z=P.wY(a)
@@ -17183,9 +17307,9 @@
C.Nm.FV(y,H.VM(new H.A8(b,P.En()),[null,null]))
x=z.bind.apply(z,y)
String(x)
-return P.ND(new x())},jT:function(a){return P.ND(P.M0(a))},M0:[function(a){return new P.Gn(P.UD(null,null)).call$1(a)},"call$1","Ij",2,0,null,231,[]]}},
+return P.ND(new x())},jT:function(a){return P.ND(P.M0(a))},M0:[function(a){return new P.Gn(P.UD(null,null)).call$1(a)},"call$1","Ij",2,0,null,233,[]]}},
Gn:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y,x,w,v
z=this.a
if(z.x4(a))return z.t(0,a)
@@ -17247,7 +17371,7 @@
z.$builtinTypeInfo=[null]
if(e<0)H.vh(P.N(e))
C.Nm.FV(x,z.qZ(0,y))
-this.V7("splice",x)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+this.V7("splice",x)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
GT:[function(a,b){this.V7("sort",[b])},"call$1","gH7",0,2,null,77,128,[]]},
Wk:{
"^":"E4+lD;",
@@ -17257,25 +17381,25 @@
$iscX:true,
$ascX:null},
DV:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=P.xZ(a,!1)
P.Dm(z,$.Dp(),a)
return z},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
Hp:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new DartObject(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
Nz:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new P.r7(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
Jd:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return H.VM(new P.Tz(a),[null])},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
QS:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new P.E4(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true}}],["dart.math","dart:math",,P,{
"^":"",
@@ -17288,7 +17412,7 @@
if(a===0)z=b===0?1/b<0:b<0
else z=!1
if(z||isNaN(b))return b
-return a}return a},"call$2","yT",4,0,null,123,[],180,[]],
+return a}return a},"call$2","yT",4,0,null,123,[],183,[]],
y:[function(a,b){if(typeof a!=="number")throw H.b(new P.AT(a))
if(typeof b!=="number")throw H.b(new P.AT(b))
if(a>b)return a
@@ -17296,7 +17420,7 @@
if(typeof b==="number"){if(typeof a==="number")if(a===0)return a+b
if(C.ON.gG0(b))return b
return a}if(b===0&&C.CD.gzP(a))return b
-return a},"call$2","Yr",4,0,null,123,[],180,[]]}],["dart.mirrors","dart:mirrors",,P,{
+return a},"call$2","Yr",4,0,null,123,[],183,[]]}],["dart.mirrors","dart:mirrors",,P,{
"^":"",
re:[function(a){var z,y
z=J.x(a)
@@ -17403,15 +17527,15 @@
"^":"Gv;",
J2:[function(a,b,c){var z=J.Wx(b)
if(z.C(b,0)||z.F(b,c))throw H.b(P.TE(b,0,c))
-else throw H.b(new P.AT("Invalid list index "+H.d(b)))},"call$2","gYE",4,0,null,47,[],325,[]],
-XL:[function(a,b,c){if(b>>>0!=b||J.J5(b,c))this.J2(a,b,c)},"call$2","gDR",4,0,null,47,[],325,[]],
+else throw H.b(new P.AT("Invalid list index "+H.d(b)))},"call$2","gYE",4,0,null,47,[],327,[]],
+XL:[function(a,b,c){if(b>>>0!=b||J.J5(b,c))this.J2(a,b,c)},"call$2","gDR",4,0,null,47,[],327,[]],
PZ:[function(a,b,c,d){var z=d+1
this.XL(a,b,z)
if(c==null)return d
this.XL(a,c,z)
if(typeof c!=="number")return H.s(c)
if(b>c)throw H.b(P.TE(b,0,c))
-return c},"call$3","gyD",6,0,null,115,[],116,[],325,[]],
+return c},"call$3","gyD",6,0,null,115,[],116,[],327,[]],
$isrn:true,
$isHY:true,
"%":";ArrayBufferView;LZ|Ob|Ip|Dg|Nb|nA|Pg"},
@@ -17454,7 +17578,7 @@
$ascX:function(){return[J.GW]},
$isHY:true,
"%":"Float64Array"},
-xj:{
+zz:{
"^":"Pg;",
gbx:function(a){return C.jV},
t:[function(a,b){var z=a.length
@@ -17595,7 +17719,7 @@
"^":"Ip;",
YW:[function(a,b,c,d,e){var z=J.x(d)
if(!!z.$isDg){this.oZ(a,b,c,d,e)
-return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isDg:true,
$isList:true,
$asWO:function(){return[J.GW]},
@@ -17615,7 +17739,7 @@
"^":"nA;",
YW:[function(a,b,c,d,e){var z=J.x(d)
if(!!z.$isPg){this.oZ(a,b,c,d,e)
-return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isPg:true,
$isList:true,
$asWO:function(){return[J.im]},
@@ -17639,9 +17763,9 @@
return}throw "Unable to print message: " + String(a)},"call$1","XU",2,0,null,26,[]]}],["disassembly_entry_element","package:observatory/src/observatory_elements/disassembly_entry.dart",,E,{
"^":"",
Fv:{
-"^":["tuj;F8%-455,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gNI:[function(a){return a.F8},null,null,1,0,456,"instruction",351,352],
-sNI:[function(a,b){a.F8=this.ct(a,C.eJ,a.F8,b)},null,null,3,0,457,23,[],"instruction",351],
+"^":["tuj;F8%-465,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gNI:[function(a){return a.F8},null,null,1,0,466,"instruction",353,354],
+sNI:[function(a,b){a.F8=this.ct(a,C.i6,a.F8,b)},null,null,3,0,467,23,[],"instruction",353],
"@":function(){return[C.Vy]},
static:{AH:[function(a){var z,y,x,w
z=$.Nd()
@@ -17655,15 +17779,15 @@
C.er.ZL(a)
C.er.G6(a)
return a},null,null,0,0,108,"new DisassemblyEntryElement$created"]}},
-"+DisassemblyEntryElement":[458],
+"+DisassemblyEntryElement":[468],
tuj:{
"^":"uL+Pi;",
$isd3:true}}],["error_view_element","package:observatory/src/observatory_elements/error_view.dart",,F,{
"^":"",
E9:{
-"^":["Vct;Py%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gkc:[function(a){return a.Py},null,null,1,0,350,"error",351,352],
-skc:[function(a,b){a.Py=this.ct(a,C.YU,a.Py,b)},null,null,3,0,353,23,[],"error",351],
+"^":["Vct;Py%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gkc:[function(a){return a.Py},null,null,1,0,352,"error",353,354],
+skc:[function(a,b){a.Py=this.ct(a,C.YU,a.Py,b)},null,null,3,0,355,23,[],"error",353],
"@":function(){return[C.uW]},
static:{TW:[function(a){var z,y,x,w
z=$.Nd()
@@ -17677,13 +17801,13 @@
C.OD.ZL(a)
C.OD.G6(a)
return a},null,null,0,0,108,"new ErrorViewElement$created"]}},
-"+ErrorViewElement":[459],
+"+ErrorViewElement":[469],
Vct:{
"^":"uL+Pi;",
$isd3:true}}],["field_ref_element","package:observatory/src/observatory_elements/field_ref.dart",,D,{
"^":"",
m8:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.E6]},
static:{Tt:[function(a){var z,y,x,w
z=$.Nd()
@@ -17699,12 +17823,14 @@
C.MC.ZL(a)
C.MC.G6(a)
return a},null,null,0,0,108,"new FieldRefElement$created"]}},
-"+FieldRefElement":[357]}],["field_view_element","package:observatory/src/observatory_elements/field_view.dart",,A,{
+"+FieldRefElement":[362]}],["field_view_element","package:observatory/src/observatory_elements/field_view.dart",,A,{
"^":"",
Gk:{
-"^":["D13;vt%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gt0:[function(a){return a.vt},null,null,1,0,350,"field",351,352],
-st0:[function(a,b){a.vt=this.ct(a,C.WQ,a.vt,b)},null,null,3,0,353,23,[],"field",351],
+"^":["D13;vt%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gt0:[function(a){return a.vt},null,null,1,0,352,"field",353,354],
+st0:[function(a,b){a.vt=this.ct(a,C.WQ,a.vt,b)},null,null,3,0,355,23,[],"field",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.vt,"id"))
+a.hm.gDF().fB(z).ml(new A.e5(a)).OA(new A.Ni()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.Tq]},
static:{cY:[function(a){var z,y,x,w
z=$.Nd()
@@ -17718,13 +17844,26 @@
C.LT.ZL(a)
C.LT.G6(a)
return a},null,null,0,0,108,"new FieldViewElement$created"]}},
-"+FieldViewElement":[460],
+"+FieldViewElement":[470],
D13:{
"^":"uL+Pi;",
-$isd3:true}}],["function_ref_element","package:observatory/src/observatory_elements/function_ref.dart",,U,{
+$isd3:true},
+e5:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.svt(z,y.ct(z,C.WQ,y.gvt(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+FieldViewElement_refresh_closure":[358],
+Ni:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing field-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+FieldViewElement_refresh_closure":[358]}],["function_ref_element","package:observatory/src/observatory_elements/function_ref.dart",,U,{
"^":"",
-GG:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+AX:{
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.YQ]},
static:{v9:[function(a){var z,y,x,w
z=$.Nd()
@@ -17740,12 +17879,14 @@
C.Xo.ZL(a)
C.Xo.G6(a)
return a},null,null,0,0,108,"new FunctionRefElement$created"]}},
-"+FunctionRefElement":[357]}],["function_view_element","package:observatory/src/observatory_elements/function_view.dart",,N,{
+"+FunctionRefElement":[362]}],["function_view_element","package:observatory/src/observatory_elements/function_view.dart",,N,{
"^":"",
yb:{
-"^":["WZq;Z8%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gMj:[function(a){return a.Z8},null,null,1,0,350,"function",351,352],
-sMj:[function(a,b){a.Z8=this.ct(a,C.nf,a.Z8,b)},null,null,3,0,353,23,[],"function",351],
+"^":["WZq;Z8%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gMj:[function(a){return a.Z8},null,null,1,0,352,"function",353,354],
+sMj:[function(a,b){a.Z8=this.ct(a,C.nf,a.Z8,b)},null,null,3,0,355,23,[],"function",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.Z8,"id"))
+a.hm.gDF().fB(z).ml(new N.QR(a)).OA(new N.Yx()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.nu]},
static:{N0:[function(a){var z,y,x,w
z=$.Nd()
@@ -17759,24 +17900,37 @@
C.Yu.ZL(a)
C.Yu.G6(a)
return a},null,null,0,0,108,"new FunctionViewElement$created"]}},
-"+FunctionViewElement":[461],
+"+FunctionViewElement":[471],
WZq:{
"^":"uL+Pi;",
-$isd3:true}}],["heap_profile_element","package:observatory/src/observatory_elements/heap_profile.dart",,K,{
+$isd3:true},
+QR:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sZ8(z,y.ct(z,C.nf,y.gZ8(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+FunctionViewElement_refresh_closure":[358],
+Yx:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing field-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+FunctionViewElement_refresh_closure":[358]}],["heap_profile_element","package:observatory/src/observatory_elements/heap_profile.dart",,K,{
"^":"",
NM:{
-"^":["pva;GQ%-77,J0%-77,Oc%-77,CO%-77,e6%-77,an%-77,Ol%-347,X3%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gB1:[function(a){return a.Ol},null,null,1,0,350,"profile",351,352],
-sB1:[function(a,b){a.Ol=this.ct(a,C.vb,a.Ol,b)},null,null,3,0,353,23,[],"profile",351],
+"^":["pva;GQ%-77,J0%-77,Oc%-77,CO%-77,bV%-77,vR%-77,LY%-77,q3%-77,Ol%-349,X3%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gB1:[function(a){return a.Ol},null,null,1,0,352,"profile",353,354],
+sB1:[function(a,b){a.Ol=this.ct(a,C.vb,a.Ol,b)},null,null,3,0,355,23,[],"profile",353],
i4:[function(a){var z,y
Z.uL.prototype.i4.call(this,a)
z=(a.shadowRoot||a.webkitShadowRoot).querySelector("#table")
y=new L.qu(null,P.L5(null,null,null,null,null))
y.YZ=P.uw(J.UQ($.NR,"Table"),[z])
-a.an=y
+a.q3=y
y.bG.u(0,"allowHtml",!0)
-J.kW(J.wc(a.an),"sortColumn",1)
-J.kW(J.wc(a.an),"sortAscending",!1)
+J.kW(J.wc(a.q3),"sortColumn",1)
+J.kW(J.wc(a.q3),"sortAscending",!1)
y=(a.shadowRoot||a.webkitShadowRoot).querySelector("#newPieChart")
z=new L.qu(null,P.L5(null,null,null,null,null))
z.YZ=P.uw(J.UQ($.NR,"PieChart"),[y])
@@ -17787,33 +17941,54 @@
y.YZ=P.uw(J.UQ($.NR,"PieChart"),[z])
a.CO=y
y.bG.u(0,"title","Old Space")
+y=(a.shadowRoot||a.webkitShadowRoot).querySelector("#simpleTable")
+z=new L.qu(null,P.L5(null,null,null,null,null))
+z.YZ=P.uw(J.UQ($.NR,"Table"),[y])
+a.vR=z
+z.bG.u(0,"allowHtml",!0)
+J.kW(J.wc(a.vR),"sortColumn",1)
+J.kW(J.wc(a.vR),"sortAscending",!1)
this.uB(a)},"call$0","gQd",0,0,107,"enteredView"],
-hZ:[function(a){var z,y,x,w,v
+hZ:[function(a){var z,y,x,w,v,u
z=a.Ol
if(z!=null){z=J.UQ(z,"members")
y=J.x(z)
z=typeof z!=="object"||z===null||z.constructor!==Array&&!y.$isList||J.de(J.q8(J.UQ(a.Ol,"members")),0)}else z=!0
if(z)return
-a.e6.lb()
+a.LY.lb()
+a.bV.lb()
for(z=J.GP(J.UQ(a.Ol,"members"));z.G();){x=z.gl()
-w=a.hm.gZ6().kP(J.UQ(J.UQ(x,"class"),"id"))
-J.N5(a.e6,["<a href=\""+w+"\">"+H.d(this.cp(a,x,0))+"</a>",this.cp(a,x,1),this.cp(a,x,2),this.cp(a,x,3),this.cp(a,x,4),this.cp(a,x,5),this.cp(a,x,6),this.cp(a,x,7),this.cp(a,x,8)])}a.GQ.lb()
-v=J.UQ(J.UQ(a.Ol,"heaps"),"new")
-z=J.U6(v)
-J.N5(a.GQ,["Used",z.t(v,"used")])
-J.N5(a.GQ,["Free",J.xH(z.t(v,"capacity"),z.t(v,"used"))])
+if(this.K1(a,x))continue
+y=J.U6(x)
+w=J.UQ(y.t(x,"class"),"name")
+v=a.hm.gZ6().kP(J.UQ(y.t(x,"class"),"id"))
+J.N5(a.LY,["<a title=\""+H.d(w)+"\" href=\""+v+"\">"+H.d(this.iF(a,x,0))+"</a>",this.iF(a,x,1),this.iF(a,x,2),this.iF(a,x,3),this.iF(a,x,4),this.iF(a,x,5),this.iF(a,x,6),this.iF(a,x,7),this.iF(a,x,8)])
+J.N5(a.bV,["<a title=\""+H.d(w)+"\" href=\""+v+"\">"+H.d(this.VI(a,x,0))+"</a>",this.VI(a,x,1),this.VI(a,x,2),this.VI(a,x,3),this.VI(a,x,4),this.VI(a,x,5),this.VI(a,x,6)])}a.GQ.lb()
+u=J.UQ(J.UQ(a.Ol,"heaps"),"new")
+z=J.U6(u)
+J.N5(a.GQ,["Used",z.t(u,"used")])
+J.N5(a.GQ,["Free",J.xH(z.t(u,"capacity"),z.t(u,"used"))])
a.Oc.lb()
-v=J.UQ(J.UQ(a.Ol,"heaps"),"old")
-z=J.U6(v)
-J.N5(a.Oc,["Used",z.t(v,"used")])
-J.N5(a.Oc,["Free",J.xH(z.t(v,"capacity"),z.t(v,"used"))])
+u=J.UQ(J.UQ(a.Ol,"heaps"),"old")
+z=J.U6(u)
+J.N5(a.Oc,["Used",z.t(u,"used")])
+J.N5(a.Oc,["Free",J.xH(z.t(u,"capacity"),z.t(u,"used"))])
this.uB(a)},"call$0","gYs",0,0,107,"_updateChartData"],
-uB:[function(a){var z=a.an
-if(z==null)return
-z.W2(a.e6)
+uB:[function(a){if(a.q3==null||a.vR==null)return
+a.vR.u5()
+a.vR.W2(a.bV)
+a.q3.u5()
+a.q3.W2(a.LY)
a.J0.W2(a.GQ)
a.CO.W2(a.Oc)},"call$0","goI",0,0,107,"_draw"],
-cp:[function(a,b,c){var z
+K1:[function(a,b){var z,y,x
+z=J.U6(b)
+y=z.t(b,"new")
+x=z.t(b,"old")
+for(z=J.GP(y);z.G();)if(!J.de(z.gl(),0))return!1
+for(z=J.GP(x);z.G();)if(!J.de(z.gl(),0))return!1
+return!0},"call$1","gbU",2,0,472,274,[],"_classHasNoAllocations"],
+iF:[function(a,b,c){var z
switch(c){case 0:return J.UQ(J.UQ(b,"class"),"user_name")
case 1:z=J.U6(b)
return J.WB(J.UQ(z.t(b,"new"),3),J.UQ(z.t(b,"new"),5))
@@ -17825,44 +18000,64 @@
case 6:return J.UQ(J.UQ(b,"old"),5)
case 7:return J.UQ(J.UQ(b,"old"),1)
case 8:return J.UQ(J.UQ(b,"old"),3)
-default:}return},"call$2","gGm",4,0,462,272,[],47,[],"_columnValue"],
-Ub:[function(a,b,c,d){var z,y
+default:}throw H.b(P.hS())},"call$2","grz",4,0,473,274,[],47,[],"_fullTableColumnValue"],
+VI:[function(a,b,c){var z
+switch(c){case 0:return J.UQ(J.UQ(b,"class"),"user_name")
+case 1:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),7),J.UQ(z.t(b,"old"),7))
+case 2:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),6),J.UQ(z.t(b,"old"),6))
+case 3:z=J.U6(b)
+return J.WB(J.WB(J.WB(J.UQ(z.t(b,"new"),3),J.UQ(z.t(b,"new"),5)),J.UQ(z.t(b,"old"),3)),J.UQ(z.t(b,"old"),5))
+case 4:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),5),J.UQ(z.t(b,"old"),5))
+case 5:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),1),J.UQ(z.t(b,"old"),1))
+case 6:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),3),J.UQ(z.t(b,"old"),3))
+default:}throw H.b(P.hS())},"call$2","gaq",4,0,473,274,[],47,[],"_combinedTableColumnValue"],
+RF:[function(a,b){var z,y
z=a.hm.gZ6().R6()
if(a.hm.gnI().AQ(z)==null){N.Jx("").To("No isolate found.")
return}y="/"+z+"/allocationprofile"
-a.hm.gDF().fB(y).ml(new K.bd(a)).OA(new K.LS())},"call$3","gFz",6,0,369,18,[],301,[],74,[],"refreshData"],
+a.hm.gDF().fB(y).ml(new K.nx(a)).OA(new K.jm()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
+ii:[function(a,b,c,d){var z,y
+z=a.hm.gZ6().R6()
+if(a.hm.gnI().AQ(z)==null){N.Jx("").To("No isolate found.")
+return}y="/"+z+"/allocationprofile/reset"
+a.hm.gDF().fB(y).ml(new K.xj(a)).OA(new K.VB())},"call$3","gNb",6,0,374,18,[],303,[],74,[],"resetAccumulator"],
pM:[function(a,b){this.hZ(a)
this.ct(a,C.Aq,[],this.gOd(a))
this.ct(a,C.ST,[],this.goN(a))
-this.ct(a,C.WG,[],this.gBo(a))},"call$1","gaz",2,0,150,225,[],"profileChanged"],
+this.ct(a,C.WG,[],this.gBo(a))},"call$1","gaz",2,0,153,227,[],"profileChanged"],
ps:[function(a,b){var z,y,x
z=a.Ol
if(z==null)return""
y=b===!0?"new":"old"
x=J.UQ(J.UQ(z,"heaps"),y)
z=J.U6(x)
-return C.CD.yM(J.FW(J.p0(z.t(x,"time"),1000),z.t(x,"collections")),2)+" ms"},"call$1","gOd",2,0,463,464,[],"formattedAverage",365],
+return C.CD.yM(J.FW(J.p0(z.t(x,"time"),1000),z.t(x,"collections")),2)+" ms"},"call$1","gOd",2,0,474,475,[],"formattedAverage",370],
NC:[function(a,b){var z,y
z=a.Ol
if(z==null)return""
y=b===!0?"new":"old"
-return H.d(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"collections"))},"call$1","gBo",2,0,463,464,[],"formattedCollections",365],
+return H.d(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"collections"))},"call$1","gBo",2,0,474,475,[],"formattedCollections",370],
Q0:[function(a,b){var z,y
z=a.Ol
if(z==null)return""
y=b===!0?"new":"old"
-return J.Ez(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"time"),2)+" secs"},"call$1","goN",2,0,463,464,[],"formattedTotalCollectionTime",365],
+return J.Ez(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"time"),2)+" secs"},"call$1","goN",2,0,474,475,[],"formattedTotalCollectionTime",370],
Dd:[function(a){var z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
-a.e6=z
+a.LY=z
z.Gl("string","Class")
-a.e6.Gl("number","Current (new)")
-a.e6.Gl("number","Allocated Since GC (new)")
-a.e6.Gl("number","Total before GC (new)")
-a.e6.Gl("number","Survivors (new)")
-a.e6.Gl("number","Current (old)")
-a.e6.Gl("number","Allocated Since GC (old)")
-a.e6.Gl("number","Total before GC (old)")
-a.e6.Gl("number","Survivors (old)")
+a.LY.Gl("number","Current (new)")
+a.LY.Gl("number","Allocated Since GC (new)")
+a.LY.Gl("number","Total before GC (new)")
+a.LY.Gl("number","Survivors (new)")
+a.LY.Gl("number","Current (old)")
+a.LY.Gl("number","Allocated Since GC (old)")
+a.LY.Gl("number","Total before GC (old)")
+a.LY.Gl("number","Survivors (old)")
z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
a.GQ=z
z.Gl("string","Type")
@@ -17870,9 +18065,18 @@
z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
a.Oc=z
z.Gl("string","Type")
-a.Oc.Gl("number","Size")},null,null,0,0,108,"created"],
+a.Oc.Gl("number","Size")
+z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
+a.bV=z
+z.Gl("string","Class")
+a.bV.Gl("number","Accumulator")
+a.bV.Gl("number","Accumulator Instances")
+a.bV.Gl("number","Current")
+a.bV.Gl("number","Allocated Since GC")
+a.bV.Gl("number","Total before GC")
+a.bV.Gl("number","Survivors after GC")},null,null,0,0,108,"created"],
"@":function(){return[C.dA]},
-static:{"^":"BO<-77,Xa<-77,xK<-77,V1g<-77,r1K<-77,d6<-77",op:[function(a){var z,y,x,w
+static:{"^":"BO<-77,bQj<-77,xK<-77,V1g<-77,r1K<-77,d6<-77,pC<-77,DY2<-77",op:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
x=J.O
@@ -17886,23 +18090,36 @@
C.Vc.G6(a)
C.Vc.Dd(a)
return a},null,null,0,0,108,"new HeapProfileElement$created"]}},
-"+HeapProfileElement":[465],
+"+HeapProfileElement":[476],
pva:{
"^":"uL+Pi;",
$isd3:true},
-bd:{
-"^":"Tp:353;a-77",
+nx:{
+"^":"Tp:355;a-77",
call$1:[function(a){var z,y
z=this.a
y=J.RE(z)
-y.sOl(z,y.ct(z,C.vb,y.gOl(z),a))},"call$1",null,2,0,353,466,[],"call"],
+y.sOl(z,y.ct(z,C.vb,y.gOl(z),a))},"call$1",null,2,0,355,477,[],"call"],
$isEH:true},
-"+HeapProfileElement_refreshData_closure":[467],
-LS:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").To(H.d(a)+" "+H.d(b))},"call$2",null,4,0,341,18,[],468,[],"call"],
+"+HeapProfileElement_refresh_closure":[358],
+jm:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").To(H.d(a)+" "+H.d(b))},"call$2",null,4,0,343,18,[],478,[],"call"],
$isEH:true},
-"+HeapProfileElement_refreshData_closure":[467]}],["html_common","dart:html_common",,P,{
+"+HeapProfileElement_refresh_closure":[358],
+xj:{
+"^":"Tp:355;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sOl(z,y.ct(z,C.vb,y.gOl(z),a))},"call$1",null,2,0,355,477,[],"call"],
+$isEH:true},
+"+HeapProfileElement_resetAccumulator_closure":[358],
+VB:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").To(H.d(a)+" "+H.d(b))},"call$2",null,4,0,343,18,[],478,[],"call"],
+$isEH:true},
+"+HeapProfileElement_resetAccumulator_closure":[358]}],["html_common","dart:html_common",,P,{
"^":"",
bL:[function(a){var z,y
z=[]
@@ -17910,7 +18127,7 @@
new P.wO().call$0()
return y},"call$1","Lq",2,0,null,23,[]],
o7:[function(a,b){var z=[]
-return new P.xL(b,new P.CA([],z),new P.YL(z),new P.KC(z)).call$1(a)},"call$2$mustCopy","A1",2,3,null,205,6,[],233,[]],
+return new P.xL(b,new P.CA([],z),new P.YL(z),new P.KC(z)).call$1(a)},"call$2$mustCopy","A1",2,3,null,147,6,[],235,[]],
dg:function(){var z=$.L4
if(z==null){z=J.Vw(window.navigator.userAgent,"Opera",0)
$.L4=z}return z},
@@ -17918,7 +18135,7 @@
if(z==null){z=P.dg()!==!0&&J.Vw(window.navigator.userAgent,"WebKit",0)
$.PN=z}return z},
aI:{
-"^":"Tp:181;b,c",
+"^":"Tp:184;b,c",
call$1:[function(a){var z,y,x
z=this.b
y=z.length
@@ -17928,23 +18145,23 @@
return y},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
rG:{
-"^":"Tp:385;d",
+"^":"Tp:392;d",
call$1:[function(a){var z=this.d
if(a>=z.length)return H.e(z,a)
-return z[a]},"call$1",null,2,0,null,383,[],"call"],
+return z[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
yh:{
-"^":"Tp:469;e",
+"^":"Tp:479;e",
call$2:[function(a,b){var z=this.e
if(a>=z.length)return H.e(z,a)
-z[a]=b},"call$2",null,4,0,null,383,[],21,[],"call"],
+z[a]=b},"call$2",null,4,0,null,390,[],21,[],"call"],
$isEH:true},
wO:{
"^":"Tp:108;",
call$0:[function(){},"call$0",null,0,0,null,"call"],
$isEH:true},
Tm:{
-"^":"Tp:223;f,UI,bK",
+"^":"Tp:225;f,UI,bK",
call$1:[function(a){var z,y,x,w,v,u
z={}
if(a==null)return a
@@ -17980,11 +18197,11 @@
w[u]=z}return w}throw H.b(P.SY("structured clone of other type"))},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
q1:{
-"^":"Tp:341;a,Gq",
+"^":"Tp:343;a,Gq",
call$2:[function(a,b){this.a.a[a]=this.Gq.call$1(b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
CA:{
-"^":"Tp:181;a,b",
+"^":"Tp:184;a,b",
call$1:[function(a){var z,y,x,w
z=this.a
y=z.length
@@ -17994,19 +18211,19 @@
return y},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
YL:{
-"^":"Tp:385;c",
+"^":"Tp:392;c",
call$1:[function(a){var z=this.c
if(a>=z.length)return H.e(z,a)
-return z[a]},"call$1",null,2,0,null,383,[],"call"],
+return z[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
KC:{
-"^":"Tp:469;d",
+"^":"Tp:479;d",
call$2:[function(a,b){var z=this.d
if(a>=z.length)return H.e(z,a)
-z[a]=b},"call$2",null,4,0,null,383,[],21,[],"call"],
+z[a]=b},"call$2",null,4,0,null,390,[],21,[],"call"],
$isEH:true},
xL:{
-"^":"Tp:223;e,f,UI,bK",
+"^":"Tp:225;e,f,UI,bK",
call$1:[function(a){var z,y,x,w,v,u,t
if(a==null)return a
if(typeof a==="boolean")return a
@@ -18041,13 +18258,13 @@
if(!z.tg(0,a)===!0){z.h(0,a)
y=!0}else{z.Rz(0,a)
y=!1}this.p5(z)
-return y},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],450,[]],
+return y},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],460,[]],
gA:function(a){var z=this.lF()
z=H.VM(new P.zQ(z,z.zN,null,null),[null])
z.zq=z.O2.H9
return z},
aN:[function(a,b){this.lF().aN(0,b)},"call$1","gjw",2,0,null,110,[]],
-zV:[function(a,b){return this.lF().zV(0,b)},"call$1","gnr",0,2,null,328,329,[]],
+zV:[function(a,b){return this.lF().zV(0,b)},"call$1","gnr",0,2,null,330,331,[]],
ez:[function(a,b){var z=this.lF()
return H.K1(z,b,H.ip(z,"mW",0),null)},"call$1","gIr",2,0,null,110,[]],
ev:[function(a,b){var z=this.lF()
@@ -18069,9 +18286,9 @@
grZ:function(a){var z=this.lF().lX
if(z==null)H.vh(new P.lj("No elements"))
return z.gGc()},
-tt:[function(a,b){return this.lF().tt(0,b)},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+tt:[function(a,b){return this.lF().tt(0,b)},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
eR:[function(a,b){var z=this.lF()
-return H.ke(z,b,H.ip(z,"mW",0))},"call$1","gZo",2,0,null,287,[]],
+return H.ke(z,b,H.ip(z,"mW",0))},"call$1","gZo",2,0,null,289,[]],
Zv:[function(a,b){return this.lF().Zv(0,b)},"call$1","goY",2,0,null,47,[]],
V1:[function(a){this.OS(new P.uQ())},"call$0","gyP",0,0,null],
OS:[function(a){var z,y
@@ -18083,15 +18300,15 @@
$iscX:true,
$ascX:function(){return[J.O]}},
GE:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return a.h(0,this.a)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
rl:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return a.FV(0,this.a)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
uQ:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a.V1(0)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
D7:{
@@ -18115,7 +18332,7 @@
if(typeof b!=="object"||b===null||!z.$iscv)return!1
return b.parentNode===this.F1},"call$1","gdj",2,0,null,102,[]],
GT:[function(a,b){throw H.b(P.f("Cannot sort filtered list"))},"call$1","gH7",0,2,null,77,128,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on filtered list"))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on filtered list"))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
UZ:[function(a,b,c){H.bQ(C.Nm.D6(this.gzT(),b,c),new P.GS())},"call$2","gYH",4,0,null,115,[],116,[]],
V1:[function(a){this.h2.NL.textContent=""},"call$0","gyP",0,0,null],
xe:[function(a,b,c){this.h2.xe(0,b,c)},"call$2","gQG",4,0,null,47,[],23,[]],
@@ -18140,25 +18357,26 @@
gA:function(a){var z=this.gzT()
return H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)])}},
hT:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$iscv},"call$1",null,2,0,null,287,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$iscv},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
GS:{
-"^":"Tp:223;",
-call$1:[function(a){return J.QC(a)},"call$1",null,2,0,null,283,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return J.QC(a)},"call$1",null,2,0,null,285,[],"call"],
$isEH:true}}],["instance_ref_element","package:observatory/src/observatory_elements/instance_ref.dart",,B,{
"^":"",
pR:{
-"^":["T5;qX%-355,AP,fn,tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-goE:[function(a){return a.qX},null,null,1,0,366,"expanded",351,352],
-soE:[function(a,b){a.qX=this.ct(a,C.mr,a.qX,b)},null,null,3,0,367,23,[],"expanded",351],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
goc:[function(a){var z=a.tY
if(z==null)return Q.xI.prototype.goc.call(this,a)
-return J.UQ(z,"preview")},null,null,1,0,362,"name"],
-AZ:[function(a,b,c,d){if(a.qX===!0){J.kW(a.tY,"fields",null)
+return J.UQ(z,"preview")},null,null,1,0,367,"name"],
+Qx:[function(a){return this.gus(a)},"call$0","gyX",0,0,108,"expander"],
+SF:[function(a,b,c){P.JS("Calling expandEvent")
+if(b===!0)a.hm.gDF().fB(this.gO3(a)).ml(new B.Js(a)).OA(new B.fM()).YM(c)
+else{J.kW(a.tY,"fields",null)
J.kW(a.tY,"elements",null)
-a.qX=this.ct(a,C.mr,a.qX,!1)}else a.hm.gDF().fB(this.gO3(a)).ml(new B.YE(a)).OA(new B.we())},"call$3","ghM",6,0,470,123,[],180,[],278,[],"toggleExpand"],
+c.call$0()}},"call$2","gus",4,0,480,481,[],356,[],"expandEvent"],
"@":function(){return[C.VW]},
static:{b4:[function(a){var z,y,x,w
z=$.Nd()
@@ -18166,7 +18384,6 @@
x=J.O
w=W.cv
w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
-a.qX=!1
a.Pe=!1
a.m0=null
a.SO=z
@@ -18175,32 +18392,30 @@
C.cp.ZL(a)
C.cp.G6(a)
return a},null,null,0,0,108,"new InstanceRefElement$created"]}},
-"+InstanceRefElement":[471],
-T5:{
-"^":"xI+Pi;",
-$isd3:true},
-YE:{
-"^":"Tp:223;a-77",
+"+InstanceRefElement":[362],
+Js:{
+"^":"Tp:225;a-77",
call$1:[function(a){var z,y,x
+P.JS("Result is : "+H.d(a))
z=this.a
y=J.RE(z)
x=J.U6(a)
J.kW(y.gtY(z),"fields",x.t(a,"fields"))
J.kW(y.gtY(z),"elements",x.t(a,"elements"))
J.kW(y.gtY(z),"length",x.t(a,"length"))
-y.sqX(z,y.ct(z,C.mr,y.gqX(z),!0))},"call$1",null,2,0,223,144,[],"call"],
+P.JS("ref is "+H.d(y.gtY(z)))},"call$1",null,2,0,225,144,[],"call"],
$isEH:true},
-"+InstanceRefElement_toggleExpand_closure":[467],
-we:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").hh("Error while expanding instance-ref: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,341,18,[],472,[],"call"],
+"+InstanceRefElement_expandEvent_closure":[358],
+fM:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while expanding instance-ref: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
$isEH:true},
-"+InstanceRefElement_toggleExpand_closure":[467]}],["instance_view_element","package:observatory/src/observatory_elements/instance_view.dart",,Z,{
+"+InstanceRefElement_expandEvent_closure":[358]}],["instance_view_element","package:observatory/src/observatory_elements/instance_view.dart",,Z,{
"^":"",
hx:{
-"^":["cda;Xh%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gQr:[function(a){return a.Xh},null,null,1,0,350,"instance",351,352],
-sQr:[function(a,b){a.Xh=this.ct(a,C.fn,a.Xh,b)},null,null,3,0,353,23,[],"instance",351],
+"^":["cda;Xh%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gQr:[function(a){return a.Xh},null,null,1,0,352,"instance",353,354],
+sQr:[function(a,b){a.Xh=this.ct(a,C.fn,a.Xh,b)},null,null,3,0,355,23,[],"instance",353],
"@":function(){return[C.be]},
static:{HC:[function(a){var z,y,x,w
z=$.Nd()
@@ -18214,14 +18429,16 @@
C.yK.ZL(a)
C.yK.G6(a)
return a},null,null,0,0,108,"new InstanceViewElement$created"]}},
-"+InstanceViewElement":[473],
+"+InstanceViewElement":[482],
cda:{
"^":"uL+Pi;",
$isd3:true}}],["isolate_list_element","package:observatory/src/observatory_elements/isolate_list.dart",,L,{
"^":"",
u7:{
-"^":["uL;hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-Ak:[function(a,b,c,d){J.kH(a.hm.gnI().gi2(),new L.fW())},"call$3","gBq",6,0,369,18,[],301,[],74,[],"refresh"],
+"^":["uL;hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+RF:[function(a,b){var z=[]
+J.kH(a.hm.gnI().gi2(),new L.fW(z))
+P.pH(z,!1).ml(new L.Ey(b))},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.jFV]},
static:{Cu:[function(a){var z,y,x,w
z=$.Nd()
@@ -18235,15 +18452,20 @@
C.b9.ZL(a)
C.b9.G6(a)
return a},null,null,0,0,108,"new IsolateListElement$created"]}},
-"+IsolateListElement":[474],
+"+IsolateListElement":[483],
fW:{
-"^":"Tp:341;",
-call$2:[function(a,b){J.KM(b)},"call$2",null,4,0,341,236,[],14,[],"call"],
+"^":"Tp:343;a-77",
+call$2:[function(a,b){J.bi(this.a,J.KM(b))},"call$2",null,4,0,343,238,[],14,[],"call"],
$isEH:true},
-"+IsolateListElement_refresh_closure":[467]}],["isolate_profile_element","package:observatory/src/observatory_elements/isolate_profile.dart",,X,{
+"+IsolateListElement_refresh_closure":[358],
+Ey:{
+"^":"Tp:225;b-77",
+call$1:[function(a){return this.b.call$0()},"call$1",null,2,0,225,237,[],"call"],
+$isEH:true},
+"+IsolateListElement_refresh_closure":[358]}],["isolate_profile_element","package:observatory/src/observatory_elements/isolate_profile.dart",,X,{
"^":"",
qm:{
-"^":["Y2;Aq>,tT>-359,eT,yt-475,wd-476,oH-477,np,AP,fn",null,function(){return[C.mI]},null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null],
+"^":["Y2;Aq>,tT>-364,eT,yt-484,wd-485,oH-486,np,AP,fn",null,function(){return[C.mI]},null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null],
C4:[function(a){if(J.z8(J.q8(this.wd),0))return
H.bQ(this.tT.gVS(),new X.vO(this))},"call$0","gz7",0,0,null],
o8:[function(){return},"call$0","gDT",0,0,null],
@@ -18257,23 +18479,23 @@
if(c==null)v.h(z,"")
else{u=c.tT
v.h(z,X.eI(u.dJ(y),u.QQ()))}v.h(z,X.eI(y.gfF(),w.gB1(x).ghV()))},
-static:{eI:[function(a,b){return C.CD.yM(100*J.FW(a,b),2)+"%"},"call$2","rC",4,0,null,123,[],234,[]],Tl:function(a,b,c){var z,y
+static:{eI:[function(a,b){return C.CD.yM(100*J.FW(a,b),2)+"%"},"call$2","rC",4,0,null,123,[],236,[]],Tl:function(a,b,c){var z,y
z=H.VM([],[L.Y2])
y=c!=null?J.WB(c.yt,1):0
z=new X.qm(a,b,c,y,z,[],!1,null,null)
z.Af(a,b,c)
return z}}},
vO:{
-"^":"Tp:479;a",
+"^":"Tp:488;a",
call$1:[function(a){var z=this.a
-J.bi(z.wd,X.Tl(z.Aq,J.on(a),z))},"call$1",null,2,0,null,478,[],"call"],
+J.bi(z.wd,X.Tl(z.Aq,J.on(a),z))},"call$1",null,2,0,null,487,[],"call"],
$isEH:true},
E7:{
-"^":["waa;BA%-475,fb=-480,qY%-480,qO=-77,Hm%-481,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gXc:[function(a){return a.BA},null,null,1,0,482,"methodCountSelected",351,365],
-sXc:[function(a,b){a.BA=this.ct(a,C.fQ,a.BA,b)},null,null,3,0,385,23,[],"methodCountSelected",351],
-gHu:[function(a){return a.qY},null,null,1,0,483,"topExclusiveCodes",351,365],
-sHu:[function(a,b){a.qY=this.ct(a,C.jI,a.qY,b)},null,null,3,0,484,23,[],"topExclusiveCodes",351],
+"^":["waa;BA%-484,fb=-489,qY%-489,qO=-77,Hm%-490,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gXc:[function(a){return a.BA},null,null,1,0,491,"methodCountSelected",353,370],
+sXc:[function(a,b){a.BA=this.ct(a,C.fQ,a.BA,b)},null,null,3,0,392,23,[],"methodCountSelected",353],
+gDt:[function(a){return a.qY},null,null,1,0,492,"topExclusiveCodes",353,370],
+sDt:[function(a,b){a.qY=this.ct(a,C.jI,a.qY,b)},null,null,3,0,493,23,[],"topExclusiveCodes",353],
i4:[function(a){var z,y,x,w
z=a.hm.gZ6().R6()
y=a.hm.gnI().AQ(z)
@@ -18291,40 +18513,40 @@
y=a.hm.gnI().AQ(z)
if(y==null)return
this.oC(a,y)
-this.f9(a,y)},"call$1","ghj",2,0,223,225,[],"methodCountSelectedChanged"],
-Ub:[function(a,b,c,d){var z,y,x
+this.f9(a,y)},"call$1","ghj",2,0,225,227,[],"methodCountSelectedChanged"],
+RF:[function(a,b){var z,y,x
z=a.hm.gZ6().R6()
y=a.hm.gnI().AQ(z)
if(y==null){N.Jx("").To("No isolate found.")
return}x="/"+z+"/profile"
-a.hm.gDF().fB(x).ml(new X.RR(a,y)).OA(new X.EL(a))},"call$3","gFz",6,0,369,18,[],301,[],74,[],"refreshData"],
+a.hm.gDF().fB(x).ml(new X.SV(a,y)).OA(new X.vH(a)).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
IW:[function(a,b,c,d){J.CJ(b,L.hh(b,d))
this.oC(a,b)
-this.f9(a,b)},"call$3","gja",6,0,485,14,[],486,[],466,[],"_loadProfileData"],
+this.f9(a,b)},"call$3","gja",6,0,494,14,[],495,[],477,[],"_loadProfileData"],
yF:[function(a,b){this.oC(a,b)
-this.f9(a,b)},"call$1","gAL",2,0,487,14,[],"_refresh"],
+this.f9(a,b)},"call$1","gAL",2,0,496,14,[],"_refresh"],
f9:[function(a,b){var z,y
z=[]
for(y=J.GP(a.qY);y.G();)z.push(X.Tl(b,y.gl(),null))
a.Hm.rT(z)
-this.ct(a,C.ep,null,a.Hm)},"call$1","gCK",2,0,487,14,[],"_refreshTree"],
+this.ct(a,C.ep,null,a.Hm)},"call$1","gCK",2,0,496,14,[],"_refreshTree"],
oC:[function(a,b){var z,y
J.U2(a.qY)
if(b==null||J.Tv(b)==null)return
z=J.UQ(a.fb,a.BA)
y=J.Tv(b).T0(z)
-J.bj(a.qY,y)},"call$1","guE",2,0,487,14,[],"_refreshTopMethods"],
-ka:[function(a,b){return"padding-left: "+H.d(J.p0(b.gyt(),16))+"px;"},"call$1","gGX",2,0,488,489,[],"padding",365],
+J.bj(a.qY,y)},"call$1","guE",2,0,496,14,[],"_refreshTopMethods"],
+ka:[function(a,b){return"padding-left: "+H.d(J.p0(b.gyt(),16))+"px;"},"call$1","gGX",2,0,497,498,[],"padding",370],
LZ:[function(a,b){var z=J.bY(b.gyt(),5)
if(z>>>0!==z||z>=5)return H.e(C.PQ,z)
-return C.PQ[z]},"call$1","gth",2,0,488,489,[],"coloring",365],
+return C.PQ[z]},"call$1","gth",2,0,497,498,[],"coloring",370],
YF:[function(a,b,c,d){var z,y,x
z=J.u3(d)
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$istV){y=a.Hm
x=z.rowIndex
if(typeof x!=="number")return x.W()
-y.qU(x-1)}},"call$3","gpR",6,0,490,18,[],301,[],74,[],"toggleExpanded",365],
+y.qU(x-1)}},"call$3","gpR",6,0,499,18,[],303,[],74,[],"toggleExpanded",370],
"@":function(){return[C.jR]},
static:{jD:[function(a){var z,y,x,w,v
z=R.Jk([])
@@ -18343,12 +18565,12 @@
C.XH.ZL(a)
C.XH.G6(a)
return a},null,null,0,0,108,"new IsolateProfileElement$created"]}},
-"+IsolateProfileElement":[491],
+"+IsolateProfileElement":[500],
waa:{
"^":"uL+Pi;",
$isd3:true},
-RR:{
-"^":"Tp:353;a-77,b-77",
+SV:{
+"^":"Tp:355;a-77,b-77",
call$1:[function(a){var z,y,x,w
z=J.UQ(a,"samples")
N.Jx("").To("Profile contains "+H.d(z)+" samples.")
@@ -18357,19 +18579,19 @@
J.CJ(x,L.hh(x,a))
w=J.RE(y)
w.oC(y,x)
-w.f9(y,x)},"call$1",null,2,0,353,492,[],"call"],
+w.f9(y,x)},"call$1",null,2,0,355,501,[],"call"],
$isEH:true},
-"+IsolateProfileElement_refreshData_closure":[467],
-EL:{
-"^":"Tp:223;c-77",
-call$1:[function(a){},"call$1",null,2,0,223,18,[],"call"],
+"+IsolateProfileElement_refresh_closure":[358],
+vH:{
+"^":"Tp:225;c-77",
+call$1:[function(a){},"call$1",null,2,0,225,18,[],"call"],
$isEH:true},
-"+IsolateProfileElement_refreshData_closure":[467]}],["isolate_summary_element","package:observatory/src/observatory_elements/isolate_summary.dart",,D,{
+"+IsolateProfileElement_refresh_closure":[358]}],["isolate_summary_element","package:observatory/src/observatory_elements/isolate_summary.dart",,D,{
"^":"",
St:{
-"^":["V0;Pw%-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gAq:[function(a){return a.Pw},null,null,1,0,493,"isolate",351,352],
-sAq:[function(a,b){a.Pw=this.ct(a,C.Z8,a.Pw,b)},null,null,3,0,494,23,[],"isolate",351],
+"^":["V0;Pw%-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gAq:[function(a){return a.Pw},null,null,1,0,502,"isolate",353,354],
+sAq:[function(a,b){a.Pw=this.ct(a,C.Z8,a.Pw,b)},null,null,3,0,503,23,[],"isolate",353],
"@":function(){return[C.aM]},
static:{JR:[function(a){var z,y,x,w
z=$.Nd()
@@ -18383,38 +18605,38 @@
C.Qt.ZL(a)
C.Qt.G6(a)
return a},null,null,0,0,108,"new IsolateSummaryElement$created"]}},
-"+IsolateSummaryElement":[495],
+"+IsolateSummaryElement":[504],
V0:{
"^":"uL+Pi;",
$isd3:true}}],["json_view_element","package:observatory/src/observatory_elements/json_view.dart",,Z,{
"^":"",
vj:{
-"^":["V4;eb%-77,kf%-77,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gvL:[function(a){return a.eb},null,null,1,0,108,"json",351,352],
-svL:[function(a,b){a.eb=this.ct(a,C.Gd,a.eb,b)},null,null,3,0,223,23,[],"json",351],
+"^":["V4;eb%-77,kf%-77,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gvL:[function(a){return a.eb},null,null,1,0,108,"json",353,354],
+svL:[function(a,b){a.eb=this.ct(a,C.Gd,a.eb,b)},null,null,3,0,225,23,[],"json",353],
i4:[function(a){Z.uL.prototype.i4.call(this,a)
a.kf=0},"call$0","gQd",0,0,107,"enteredView"],
-yC:[function(a,b){this.ct(a,C.eR,"a","b")},"call$1","gHl",2,0,150,225,[],"jsonChanged"],
-gW0:[function(a){return J.AG(a.eb)},null,null,1,0,362,"primitiveString"],
+yC:[function(a,b){this.ct(a,C.eR,"a","b")},"call$1","gHl",2,0,153,227,[],"jsonChanged"],
+gW0:[function(a){return J.AG(a.eb)},null,null,1,0,367,"primitiveString"],
gmm:[function(a){var z,y
z=a.eb
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isZ0)return"Map"
else if(typeof z==="object"&&z!==null&&(z.constructor===Array||!!y.$isList))return"List"
-return"Primitive"},null,null,1,0,362,"valueType"],
+return"Primitive"},null,null,1,0,367,"valueType"],
gkG:[function(a){var z=a.kf
a.kf=J.WB(z,1)
-return z},null,null,1,0,482,"counter"],
+return z},null,null,1,0,491,"counter"],
gaK:[function(a){var z,y
z=a.eb
y=J.x(z)
if(typeof z==="object"&&z!==null&&(z.constructor===Array||!!y.$isList))return z
-return[]},null,null,1,0,483,"list"],
+return[]},null,null,1,0,492,"list"],
gvc:[function(a){var z,y
z=a.eb
y=J.RE(z)
if(typeof z==="object"&&z!==null&&!!y.$isZ0)return J.qA(y.gvc(z))
-return[]},null,null,1,0,483,"keys"],
+return[]},null,null,1,0,492,"keys"],
r6:[function(a,b){return J.UQ(a.eb,b)},"call$1","gP",2,0,25,42,[],"value"],
"@":function(){return[C.KH]},
static:{mA:[function(a){var z,y,x,w
@@ -18431,13 +18653,13 @@
C.GB.ZL(a)
C.GB.G6(a)
return a},null,null,0,0,108,"new JsonViewElement$created"]}},
-"+JsonViewElement":[496],
+"+JsonViewElement":[505],
V4:{
"^":"uL+Pi;",
$isd3:true}}],["library_ref_element","package:observatory/src/observatory_elements/library_ref.dart",,R,{
"^":"",
LU:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.QU]},
static:{rA:[function(a){var z,y,x,w
z=$.Nd()
@@ -18453,12 +18675,14 @@
C.Z3.ZL(a)
C.Z3.G6(a)
return a},null,null,0,0,108,"new LibraryRefElement$created"]}},
-"+LibraryRefElement":[357]}],["library_view_element","package:observatory/src/observatory_elements/library_view.dart",,M,{
+"+LibraryRefElement":[362]}],["library_view_element","package:observatory/src/observatory_elements/library_view.dart",,M,{
"^":"",
T2:{
-"^":["V10;N7%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gtD:[function(a){return a.N7},null,null,1,0,350,"library",351,352],
-stD:[function(a,b){a.N7=this.ct(a,C.EV,a.N7,b)},null,null,3,0,353,23,[],"library",351],
+"^":["V10;N7%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtD:[function(a){return a.N7},null,null,1,0,352,"library",353,354],
+stD:[function(a,b){a.N7=this.ct(a,C.EV,a.N7,b)},null,null,3,0,355,23,[],"library",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.N7,"id"))
+a.hm.gDF().fB(z).ml(new M.Jq(a)).OA(new M.RJ()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.Gg]},
static:{SP:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
@@ -18475,10 +18699,23 @@
C.MG.ZL(a)
C.MG.G6(a)
return a},null,null,0,0,108,"new LibraryViewElement$created"]}},
-"+LibraryViewElement":[497],
+"+LibraryViewElement":[506],
V10:{
"^":"uL+Pi;",
-$isd3:true}}],["logging","package:logging/logging.dart",,N,{
+$isd3:true},
+Jq:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sN7(z,y.ct(z,C.EV,y.gN7(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+LibraryViewElement_refresh_closure":[358],
+RJ:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing library-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+LibraryViewElement_refresh_closure":[358]}],["logging","package:logging/logging.dart",,N,{
"^":"",
TJ:{
"^":"a;oc>,eT>,n2,Cj>,wd>,Gs",
@@ -18505,19 +18742,19 @@
w=new N.HV(a,b,z,y,x,c,d)
if($.RL)for(v=this;v!=null;){z=J.RE(v)
z.od(v,w)
-v=z.geT(v)}else J.EY(N.Jx(""),w)}},"call$4","gA9",4,4,null,77,77,498,[],20,[],152,[],153,[]],
-X2:[function(a,b,c){return this.Y6(C.Ab,a,b,c)},function(a){return this.X2(a,null,null)},"x9","call$3",null,"git",2,4,null,77,77,20,[],152,[],153,[]],
-yl:[function(a,b,c){return this.Y6(C.R5,a,b,c)},function(a){return this.yl(a,null,null)},"J4","call$3",null,"gjW",2,4,null,77,77,20,[],152,[],153,[]],
-ZG:[function(a,b,c){return this.Y6(C.IF,a,b,c)},function(a){return this.ZG(a,null,null)},"To","call$3",null,"gqa",2,4,null,77,77,20,[],152,[],153,[]],
-xH:[function(a,b,c){return this.Y6(C.UP,a,b,c)},function(a){return this.xH(a,null,null)},"j2","call$3",null,"goa",2,4,null,77,77,20,[],152,[],153,[]],
-WB:[function(a,b,c){return this.Y6(C.cV,a,b,c)},function(a){return this.WB(a,null,null)},"hh","call$3",null,"gxx",2,4,null,77,77,20,[],152,[],153,[]],
+v=z.geT(v)}else J.EY(N.Jx(""),w)}},"call$4","gA9",4,4,null,77,77,507,[],20,[],155,[],156,[]],
+X2:[function(a,b,c){return this.Y6(C.VZ,a,b,c)},function(a){return this.X2(a,null,null)},"x9","call$3",null,"git",2,4,null,77,77,20,[],155,[],156,[]],
+yl:[function(a,b,c){return this.Y6(C.R5,a,b,c)},function(a){return this.yl(a,null,null)},"J4","call$3",null,"gjW",2,4,null,77,77,20,[],155,[],156,[]],
+ZG:[function(a,b,c){return this.Y6(C.IF,a,b,c)},function(a){return this.ZG(a,null,null)},"To","call$3",null,"gqa",2,4,null,77,77,20,[],155,[],156,[]],
+xH:[function(a,b,c){return this.Y6(C.UP,a,b,c)},function(a){return this.xH(a,null,null)},"j2","call$3",null,"goa",2,4,null,77,77,20,[],155,[],156,[]],
+WB:[function(a,b,c){return this.Y6(C.cV,a,b,c)},function(a){return this.WB(a,null,null)},"hh","call$3",null,"gxx",2,4,null,77,77,20,[],155,[],156,[]],
IE:[function(){if($.RL||this.eT==null){var z=this.Gs
if(z==null){z=P.bK(null,null,!0,N.HV)
this.Gs=z}z.toString
return H.VM(new P.Ik(z),[H.Kp(z,0)])}else return N.Jx("").IE()},"call$0","gnc",0,0,null],
od:[function(a,b){var z=this.Gs
if(z!=null){if(z.Gv>=4)H.vh(z.q7())
-z.Iv(b)}},"call$1","gHh",2,0,null,22,[]],
+z.Iv(b)}},"call$1","gBq",2,0,null,22,[]],
QL:function(a,b,c){var z=this.eT
if(z!=null)J.Tr(z).u(0,this.oc,this)},
$isTJ:true,
@@ -18575,28 +18812,28 @@
J.UQ($.cM(),"google").V7("load",["visualization","1",P.jT(H.B7(["packages",["corechart","table"],"callback",new P.r7(P.xZ(z.gv6(z),!0))],P.L5(null,null,null,null,null)))])
z.MM.ml(L.vN()).ml(new F.Lb())},"call$0","qg",0,0,null],
em:{
-"^":"Tp:500;",
-call$1:[function(a){P.JS(a.gOR().oc+": "+H.d(a.gFl())+": "+H.d(J.yj(a)))},"call$1",null,2,0,null,499,[],"call"],
+"^":"Tp:509;",
+call$1:[function(a){P.JS(a.gOR().oc+": "+H.d(a.gFl())+": "+H.d(J.yj(a)))},"call$1",null,2,0,null,508,[],"call"],
$isEH:true},
Lb:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){N.Jx("").To("Initializing Polymer")
-A.Ok()},"call$1",null,2,0,null,235,[],"call"],
+A.Ok()},"call$1",null,2,0,null,237,[],"call"],
$isEH:true}}],["message_viewer_element","package:observatory/src/observatory_elements/message_viewer.dart",,L,{
"^":"",
PF:{
-"^":["uL;Gj%-347,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gG1:[function(a){return a.Gj},null,null,1,0,350,"message",352],
+"^":["uL;Gj%-349,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gG1:[function(a){return a.Gj},null,null,1,0,352,"message",354],
sG1:[function(a,b){a.Gj=b
this.ct(a,C.US,"",this.gQW(a))
this.ct(a,C.zu,[],this.glc(a))
-N.Jx("").To("Viewing message of type '"+H.d(J.UQ(a.Gj,"type"))+"'")},null,null,3,0,353,183,[],"message",352],
+N.Jx("").To("Viewing message of type '"+H.d(J.UQ(a.Gj,"type"))+"'")},null,null,3,0,355,186,[],"message",354],
gQW:[function(a){var z=a.Gj
if(z==null||J.UQ(z,"type")==null)return"Error"
-return J.UQ(a.Gj,"type")},null,null,1,0,362,"messageType"],
+return J.UQ(a.Gj,"type")},null,null,1,0,367,"messageType"],
glc:[function(a){var z=a.Gj
if(z==null||J.UQ(z,"members")==null)return[]
-return J.UQ(a.Gj,"members")},null,null,1,0,501,"members"],
+return J.UQ(a.Gj,"members")},null,null,1,0,510,"members"],
"@":function(){return[C.rc]},
static:{A5:[function(a){var z,y,x,w
z=$.Nd()
@@ -18610,24 +18847,24 @@
C.Wp.ZL(a)
C.Wp.G6(a)
return a},null,null,0,0,108,"new MessageViewerElement$created"]}},
-"+MessageViewerElement":[474]}],["metadata","../../../../../../../../../dart/dart-sdk/lib/html/html_common/metadata.dart",,B,{
+"+MessageViewerElement":[483]}],["metadata","../../../../../../../../../dart/dart-sdk/lib/html/html_common/metadata.dart",,B,{
"^":"",
-fA:{
+T4:{
"^":"a;T9,Jt",
-static:{"^":"n4I,en,pjg,PZ,xa"}},
-tz:{
+static:{"^":"Xd,en,pjg,PZ,xa"}},
+Qz:{
"^":"a;"},
jA:{
"^":"a;oc>"},
PO:{
"^":"a;"},
c5:{
-"^":"a;"}}],["navigation_bar_element","package:observatory/src/observatory_elements/navigation_bar.dart",,Q,{
+"^":"a;"}}],["nav_bar_element","package:observatory/src/observatory_elements/nav_bar.dart",,A,{
"^":"",
-qT:{
-"^":["uL;hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-"@":function(){return[C.KG]},
-static:{BW:[function(a){var z,y,x,w
+F1:{
+"^":["uL;hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"@":function(){return[C.nW]},
+static:{z5:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
x=J.O
@@ -18636,54 +18873,194 @@
a.SO=z
a.B7=y
a.X0=w
-C.Xg.ZL(a)
-C.Xg.G6(a)
-return a},null,null,0,0,108,"new NavigationBarElement$created"]}},
-"+NavigationBarElement":[474]}],["navigation_bar_isolate_element","package:observatory/src/observatory_elements/navigation_bar_isolate.dart",,F,{
-"^":"",
-Xd:{
-"^":["V11;rK%-477,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gNa:[function(a){return a.rK},null,null,1,0,502,"links",351,365],
-sNa:[function(a,b){a.rK=this.ct(a,C.AX,a.rK,b)},null,null,3,0,503,23,[],"links",351],
-Pz:[function(a,b){Z.uL.prototype.Pz.call(this,a,b)
-this.ct(a,C.T7,"",this.gMm(a))},"call$1","gpx",2,0,150,225,[],"appChanged"],
-Zc:[function(a){var z,y
-z=a.hm
-if(z==null)return""
-y=z.gZ6().Pr()
-if(y==null)return""
-return J.O6(y)},"call$0","gMm",0,0,362,"currentIsolateName"],
-Ta:[function(a,b){var z=a.hm
-if(z==null)return""
-switch(b){case"Stacktrace":return z.gZ6().kP("stacktrace")
-case"Library":return z.gZ6().kP("library")
-case"CPU Profile":return z.gZ6().kP("profile")
-default:return z.gZ6().kP("")}},"call$1","gcD",2,0,504,505,[],"currentIsolateLink"],
-"@":function(){return[C.AR]},
-static:{L1:[function(a){var z,y,x,w,v
-z=R.Jk(["Stacktrace","Library","CPU Profile"])
-y=$.Nd()
-x=P.Py(null,null,null,J.O,W.I0)
-w=J.O
-v=W.cv
-v=H.VM(new V.qC(P.Py(null,null,null,w,v),null,null),[w,v])
-a.rK=z
-a.SO=y
-a.B7=x
-a.X0=v
-C.Vn.ZL(a)
-C.Vn.G6(a)
-return a},null,null,0,0,108,"new NavigationBarIsolateElement$created"]}},
-"+NavigationBarIsolateElement":[506],
+C.kD.ZL(a)
+C.kD.G6(a)
+return a},null,null,0,0,108,"new NavBarElement$created"]}},
+"+NavBarElement":[483],
+aQ:{
+"^":["V11;KU%-369,ZC%-369,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gPj:[function(a){return a.KU},null,null,1,0,367,"link",353,354],
+sPj:[function(a,b){a.KU=this.ct(a,C.dB,a.KU,b)},null,null,3,0,25,23,[],"link",353],
+gdU:[function(a){return a.ZC},null,null,1,0,367,"anchor",353,354],
+sdU:[function(a,b){a.ZC=this.ct(a,C.Es,a.ZC,b)},null,null,3,0,25,23,[],"anchor",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.pc]},
+static:{AJ:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.KU="#"
+a.ZC="---"
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.SU.ZL(a)
+C.SU.G6(a)
+return a},null,null,0,0,108,"new NavMenuElement$created"]}},
+"+NavMenuElement":[511],
V11:{
"^":"uL+Pi;",
+$isd3:true},
+Qa:{
+"^":["V12;KU%-369,ZC%-369,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gPj:[function(a){return a.KU},null,null,1,0,367,"link",353,354],
+sPj:[function(a,b){a.KU=this.ct(a,C.dB,a.KU,b)},null,null,3,0,25,23,[],"link",353],
+gdU:[function(a){return a.ZC},null,null,1,0,367,"anchor",353,354],
+sdU:[function(a,b){a.ZC=this.ct(a,C.Es,a.ZC,b)},null,null,3,0,25,23,[],"anchor",353],
+"@":function(){return[C.qT]},
+static:{EL:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.KU="#"
+a.ZC="---"
+a.SO=z
+a.B7=y
+a.X0=w
+C.nn.ZL(a)
+C.nn.G6(a)
+return a},null,null,0,0,108,"new NavMenuItemElement$created"]}},
+"+NavMenuItemElement":[512],
+V12:{
+"^":"uL+Pi;",
+$isd3:true},
+vI:{
+"^":["V13;rU%-77,SB%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gFR:[function(a){return a.rU},null,null,1,0,108,"callback",353,354],
+Ki:function(a){return this.gFR(a).call$0()},
+VN:function(a,b){return this.gFR(a).call$1(b)},
+sFR:[function(a,b){a.rU=this.ct(a,C.AV,a.rU,b)},null,null,3,0,225,23,[],"callback",353],
+gxw:[function(a){return a.SB},null,null,1,0,371,"active",353,354],
+sxw:[function(a,b){a.SB=this.ct(a,C.aP,a.SB,b)},null,null,3,0,372,23,[],"active",353],
+Ty:[function(a,b,c,d){var z=a.SB
+if(z===!0)return
+a.SB=this.ct(a,C.aP,z,!0)
+if(a.rU!=null)this.VN(a,this.gCB(a))},"call$3","gzY",6,0,374,18,[],303,[],74,[],"buttonClick"],
+wY:[function(a){a.SB=this.ct(a,C.aP,a.SB,!1)},"call$0","gCB",0,0,107,"refreshDone"],
+"@":function(){return[C.XG]},
+static:{ZC:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.SB=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.J7.ZL(a)
+C.J7.G6(a)
+return a},null,null,0,0,108,"new NavRefreshElement$created"]}},
+"+NavRefreshElement":[513],
+V13:{
+"^":"uL+Pi;",
+$isd3:true},
+tz:{
+"^":["V14;Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.NT]},
+static:{J8:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.lx.ZL(a)
+C.lx.G6(a)
+return a},null,null,0,0,108,"new TopNavMenuElement$created"]}},
+"+TopNavMenuElement":[514],
+V14:{
+"^":"uL+Pi;",
+$isd3:true},
+fl:{
+"^":["V15;iy%-361,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gAq:[function(a){return a.iy},null,null,1,0,502,"isolate",353,354],
+sAq:[function(a,b){a.iy=this.ct(a,C.Z8,a.iy,b)},null,null,3,0,503,23,[],"isolate",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.zaS]},
+static:{Yt:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.RR.ZL(a)
+C.RR.G6(a)
+return a},null,null,0,0,108,"new IsolateNavMenuElement$created"]}},
+"+IsolateNavMenuElement":[515],
+V15:{
+"^":"uL+Pi;",
+$isd3:true},
+Zt:{
+"^":["V16;Ap%-349,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtD:[function(a){return a.Ap},null,null,1,0,352,"library",353,354],
+stD:[function(a,b){a.Ap=this.ct(a,C.EV,a.Ap,b)},null,null,3,0,355,23,[],"library",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.KI]},
+static:{IV:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.S3.ZL(a)
+C.S3.G6(a)
+return a},null,null,0,0,108,"new LibraryNavMenuElement$created"]}},
+"+LibraryNavMenuElement":[516],
+V16:{
+"^":"uL+Pi;",
+$isd3:true},
+wM:{
+"^":["V17;Au%-349,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gRu:[function(a){return a.Au},null,null,1,0,352,"cls",353,354],
+sRu:[function(a,b){a.Au=this.ct(a,C.XA,a.Au,b)},null,null,3,0,355,23,[],"cls",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.t9]},
+static:{lT:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.xE.ZL(a)
+C.xE.G6(a)
+return a},null,null,0,0,108,"new ClassNavMenuElement$created"]}},
+"+ClassNavMenuElement":[517],
+V17:{
+"^":"uL+Pi;",
$isd3:true}}],["observatory","package:observatory/observatory.dart",,L,{
"^":"",
m7:[function(a){var z
N.Jx("").To("Google Charts API loaded")
z=J.UQ(J.UQ($.cM(),"google"),"visualization")
$.NR=z
-return z},"call$1","vN",2,0,223,235,[]],
+return z},"call$1","vN",2,0,225,237,[]],
CX:[function(a){var z,y,x,w,v,u
z=$.mE().R4(0,a)
if(z==null)return 0
@@ -18696,7 +19073,7 @@
if(typeof w!=="number")return H.s(w)
y=H.BU(C.xB.yn(x,v+w),16,null)
return y}catch(u){H.Ru(u)
-return 0}},"call$1","Cz",2,0,null,212,[]],
+return 0}},"call$1","Cz",2,0,null,214,[]],
r5:[function(a){var z,y,x,w,v
z=$.kj().R4(0,a)
if(z==null)return
@@ -18707,10 +19084,10 @@
if(0>=y.length)return H.e(y,0)
y=J.q8(y[0])
if(typeof y!=="number")return H.s(y)
-return C.xB.Nj(x,w,v+y)},"call$1","cK",2,0,null,212,[]],
+return C.xB.Nj(x,w,v+y)},"call$1","cK",2,0,null,214,[]],
Lw:[function(a){var z=L.r5(a)
if(z==null)return
-return J.ZZ(z,1)},"call$1","J4",2,0,null,212,[]],
+return J.ZZ(z,1)},"call$1","J4",2,0,null,214,[]],
CB:[function(a){var z,y,x,w
z=$.XJ().R4(0,a)
if(z==null)return
@@ -18720,9 +19097,9 @@
if(0>=y.length)return H.e(y,0)
y=J.q8(y[0])
if(typeof y!=="number")return H.s(y)
-return C.xB.yn(x,w+y)},"call$1","jU",2,0,null,212,[]],
+return C.xB.yn(x,w+y)},"call$1","jU",2,0,null,214,[]],
mL:{
-"^":["Pi;Z6<-507,DF<-508,nI<-509,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null],
+"^":["Pi;Z6<-518,DF<-519,nI<-520,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null],
pO:[function(){var z,y,x
z=this.Z6
z.sXT(this)
@@ -18733,7 +19110,7 @@
$.tE=this
y.se0(x.gPI())
z.kI()},"call$0","gGo",0,0,null],
-AQ:[function(a){return J.UQ(this.nI.gi2(),a)},"call$1","grE",2,0,null,236,[]],
+AQ:[function(a){return J.UQ(this.nI.gi2(),a)},"call$1","grE",2,0,null,238,[]],
US:function(){this.pO()},
hq:function(){this.pO()},
static:{"^":"li,pQ"}},
@@ -18741,49 +19118,61 @@
"^":"a;oV<",
goH:function(){return this.oV.nQ("getNumberOfColumns")},
gWT:function(a){return this.oV.nQ("getNumberOfRows")},
-Gl:[function(a,b){this.oV.V7("addColumn",[a,b])},"call$2","gGU",4,0,null,11,[],510,[]],
+Gl:[function(a,b){this.oV.V7("addColumn",[a,b])},"call$2","gGU",4,0,null,11,[],521,[]],
lb:[function(){var z=this.oV
z.V7("removeRows",[0,z.nQ("getNumberOfRows")])},"call$0","gGL",0,0,null],
RP:[function(a,b){var z=[]
C.Nm.FV(z,H.VM(new H.A8(b,P.En()),[null,null]))
-this.oV.V7("addRow",[H.VM(new P.Tz(z),[null])])},"call$1","gJW",2,0,null,489,[]]},
+this.oV.V7("addRow",[H.VM(new P.Tz(z),[null])])},"call$1","gJW",2,0,null,498,[]]},
qu:{
"^":"a;YZ,bG>",
+u5:[function(){var z,y,x
+z=this.YZ.nQ("getSortInfo")
+if(z!=null&&!J.de(J.UQ(z,"column"),-1)){y=this.bG
+x=J.U6(z)
+y.u(0,"sortColumn",x.t(z,"column"))
+y.u(0,"sortAscending",x.t(z,"ascending"))}},"call$0","gIK",0,0,null],
W2:[function(a){var z=P.jT(this.bG)
-this.YZ.V7("draw",[a.goV(),z])},"call$1","gW8",2,0,null,178,[]]},
+this.YZ.V7("draw",[a.goV(),z])},"call$1","gW8",2,0,null,181,[]]},
bv:{
-"^":["Pi;WP,XR<-511,Z0<-512,md,mY,F3,rU,LE<-513,iP,mU,mM,Td,AP,fn",null,function(){return[C.mI]},function(){return[C.mI]},null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
-gB1:[function(a){return this.WP},null,null,1,0,514,"profile",351,365],
-sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,515,23,[],"profile",351],
-gjO:[function(a){return this.md},null,null,1,0,362,"id",351,365],
-sjO:[function(a,b){this.md=F.Wi(this,C.EN,this.md,b)},null,null,3,0,25,23,[],"id",351],
-goc:[function(a){return this.mY},null,null,1,0,362,"name",351,365],
-soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",351],
-gw2:[function(){return this.F3},null,null,1,0,350,"entry",351,365],
-sw2:[function(a){this.F3=F.Wi(this,C.tP,this.F3,a)},null,null,3,0,353,23,[],"entry",351],
-gVc:[function(){return this.rU},null,null,1,0,362,"rootLib",351,365],
-sVc:[function(a){this.rU=F.Wi(this,C.iF,this.rU,a)},null,null,3,0,25,23,[],"rootLib",351],
-gCi:[function(){return this.iP},null,null,1,0,482,"newHeapUsed",351,365],
-sCi:[function(a){this.iP=F.Wi(this,C.IO,this.iP,a)},null,null,3,0,385,23,[],"newHeapUsed",351],
-guq:[function(){return this.mU},null,null,1,0,482,"oldHeapUsed",351,365],
-suq:[function(a){this.mU=F.Wi(this,C.ap,this.mU,a)},null,null,3,0,385,23,[],"oldHeapUsed",351],
-gKu:[function(){return this.mM},null,null,1,0,350,"topFrame",351,365],
-sKu:[function(a){this.mM=F.Wi(this,C.ch,this.mM,a)},null,null,3,0,353,23,[],"topFrame",351],
-gNh:[function(a){return this.Td},null,null,1,0,362,"fileAndLine",351,365],
+"^":["Pi;WP,XR<-522,Z0<-523,md,mY,e8,F3,Gg,LE<-524,iP,mU,mM,Td,AP,fn",null,function(){return[C.mI]},function(){return[C.mI]},null,null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
+gB1:[function(a){return this.WP},null,null,1,0,525,"profile",353,370],
+sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,526,23,[],"profile",353],
+gjO:[function(a){return this.md},null,null,1,0,367,"id",353,370],
+sjO:[function(a,b){this.md=F.Wi(this,C.EN,this.md,b)},null,null,3,0,25,23,[],"id",353],
+goc:[function(a){return this.mY},null,null,1,0,367,"name",353,370],
+soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",353],
+gzz:[function(){return this.e8},null,null,1,0,367,"vmName",353,370],
+szz:[function(a){this.e8=F.Wi(this,C.KS,this.e8,a)},null,null,3,0,25,23,[],"vmName",353],
+gw2:[function(){return this.F3},null,null,1,0,352,"entry",353,370],
+sw2:[function(a){this.F3=F.Wi(this,C.tP,this.F3,a)},null,null,3,0,355,23,[],"entry",353],
+gVc:[function(){return this.Gg},null,null,1,0,367,"rootLib",353,370],
+sVc:[function(a){this.Gg=F.Wi(this,C.iF,this.Gg,a)},null,null,3,0,25,23,[],"rootLib",353],
+gCi:[function(){return this.iP},null,null,1,0,491,"newHeapUsed",353,370],
+sCi:[function(a){this.iP=F.Wi(this,C.IO,this.iP,a)},null,null,3,0,392,23,[],"newHeapUsed",353],
+guq:[function(){return this.mU},null,null,1,0,491,"oldHeapUsed",353,370],
+suq:[function(a){this.mU=F.Wi(this,C.ap,this.mU,a)},null,null,3,0,392,23,[],"oldHeapUsed",353],
+gKu:[function(){return this.mM},null,null,1,0,352,"topFrame",353,370],
+sKu:[function(a){this.mM=F.Wi(this,C.ch,this.mM,a)},null,null,3,0,355,23,[],"topFrame",353],
+gNh:[function(a){return this.Td},null,null,1,0,367,"fileAndLine",353,370],
bj:function(a,b){return this.gNh(this).call$1(b)},
-sNh:[function(a,b){this.Td=F.Wi(this,C.SK,this.Td,b)},null,null,3,0,25,23,[],"fileAndLine",351],
+sNh:[function(a,b){this.Td=F.Wi(this,C.SK,this.Td,b)},null,null,3,0,25,23,[],"fileAndLine",353],
zr:[function(a){var z="/"+H.d(this.md)+"/"
-$.tE.DF.fB(z).ml(new L.eS(this)).OA(new L.IQ())},"call$0","gBq",0,0,null],
+return $.tE.DF.fB(z).ml(new L.eS(this)).OA(new L.IQ())},"call$0","gvC",0,0,null],
eC:[function(a){var z,y,x,w
z=J.U6(a)
if(!J.de(z.t(a,"type"),"Isolate")){N.Jx("").hh("Unexpected message type in Isolate.update: "+H.d(z.t(a,"type")))
-return}if(z.t(a,"name")==null||z.t(a,"rootLib")==null||z.t(a,"timers")==null||z.t(a,"heap")==null){N.Jx("").hh("Malformed 'Isolate' response: "+H.d(a))
-return}y=z.t(a,"name")
-this.mY=F.Wi(this,C.YS,this.mY,y)
-y=J.UQ(z.t(a,"rootLib"),"id")
-this.rU=F.Wi(this,C.iF,this.rU,y)
+return}if(z.t(a,"rootLib")==null||z.t(a,"timers")==null||z.t(a,"heap")==null){N.Jx("").hh("Malformed 'Isolate' response: "+H.d(a))
+return}y=J.UQ(z.t(a,"rootLib"),"id")
+this.Gg=F.Wi(this,C.iF,this.Gg,y)
+y=z.t(a,"name")
+this.e8=F.Wi(this,C.KS,this.e8,y)
if(z.t(a,"entry")!=null){y=z.t(a,"entry")
-this.F3=F.Wi(this,C.tP,this.F3,y)}if(z.t(a,"topFrame")!=null){y=z.t(a,"topFrame")
+y=F.Wi(this,C.tP,this.F3,y)
+this.F3=y
+y=J.UQ(y,"name")
+this.mY=F.Wi(this,C.YS,this.mY,y)}else this.mY=F.Wi(this,C.YS,this.mY,"root isolate")
+if(z.t(a,"topFrame")!=null){y=z.t(a,"topFrame")
this.mM=F.Wi(this,C.ch,this.mM,y)}x=H.B7([],P.L5(null,null,null,null,null))
J.kH(z.t(a,"timers"),new L.TI(x))
y=this.LE
@@ -18805,7 +19194,7 @@
while(!0){w=y.gB(z)
if(typeof w!=="number")return H.s(w)
if(!(x<w))break
-if(J.kE(y.t(z,x),a)===!0)return y.t(z,x);++x}return},"call$1","gSB",2,0,null,516,[]],
+if(J.kE(y.t(z,x),a)===!0)return y.t(z,x);++x}return},"call$1","gt7",2,0,null,527,[]],
R7:[function(){var z,y,x,w
N.Jx("").To("Reset all code ticks.")
z=this.Z0
@@ -18821,24 +19210,24 @@
u=J.UQ(v.t(w,"script"),"id")
t=x.t(y,u)
if(t==null){t=L.Ak(v.t(w,"script"))
-x.u(y,u,t)}t.o6(v.t(w,"hits"))}},"call$1","gHY",2,0,null,517,[]],
+x.u(y,u,t)}t.o6(v.t(w,"hits"))}},"call$1","gHY",2,0,null,528,[]],
$isbv:true,
static:{"^":"tE?"}},
eS:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.eC(a)},"call$1",null,2,0,null,144,[],"call"],
$isEH:true},
IQ:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").hh("Error while updating isolate summary: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,null,18,[],472,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while updating isolate summary: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,null,18,[],359,[],"call"],
$isEH:true},
TI:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.U6(a)
-this.a.u(0,z.t(a,"name"),z.t(a,"time"))},"call$1",null,2,0,null,518,[],"call"],
+this.a.u(0,z.t(a,"name"),z.t(a,"time"))},"call$1",null,2,0,null,529,[],"call"],
$isEH:true},
yU:{
-"^":["Pi;XT?,i2<-519,AP,fn",null,function(){return[C.mI]},null,null],
+"^":["Pi;XT?,i2<-530,AP,fn",null,function(){return[C.mI]},null,null],
Ql:[function(){J.kH(this.XT.DF.gjR(),new L.dY(this))},"call$0","gPI",0,0,107],
AQ:[function(a){var z,y,x,w,v,u
z=this.i2
@@ -18849,33 +19238,33 @@
v=H.VM([],[L.kx])
u=P.L5(null,null,null,J.O,J.GW)
u=R.Jk(u)
-x=new L.bv(null,w,v,a,"",null,null,u,0,0,null,null,null,null)
-y.u(z,a,x)
-return x}return x},"call$1","grE",2,0,null,236,[]],
+x=new L.bv(null,w,v,a,"isolate",null,null,null,u,0,0,null,null,null,null)
+y.u(z,a,x)}if(x.gzz()==null)J.KM(x)
+return x},"call$1","grE",2,0,null,238,[]],
N8:[function(a){var z=[]
J.kH(this.i2,new L.vY(a,z))
H.bQ(z,new L.zZ(this))
-J.kH(a,new L.dS(this))},"call$1","gajF",2,0,null,237,[]],
-static:{AC:[function(a,b){return J.pb(b,new L.Ub(a))},"call$2","mc",4,0,null,236,[],237,[]]}},
+J.kH(a,new L.dS(this))},"call$1","gajF",2,0,null,239,[]],
+static:{AC:[function(a,b){return J.pb(b,new L.Ub(a))},"call$2","mc",4,0,null,238,[],239,[]]}},
Ub:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.de(J.UQ(a,"id"),this.a)},"call$1",null,2,0,null,520,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.de(J.UQ(a,"id"),this.a)},"call$1",null,2,0,null,531,[],"call"],
$isEH:true},
dY:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.U6(a)
-if(J.de(z.t(a,"type"),"IsolateList"))this.a.N8(z.t(a,"members"))},"call$1",null,2,0,null,466,[],"call"],
+if(J.de(z.t(a,"type"),"IsolateList"))this.a.N8(z.t(a,"members"))},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
vY:{
-"^":"Tp:341;a,b",
-call$2:[function(a,b){if(L.AC(a,this.a)!==!0)this.b.push(a)},"call$2",null,4,0,null,417,[],272,[],"call"],
+"^":"Tp:343;a,b",
+call$2:[function(a,b){if(L.AC(a,this.a)!==!0)this.b.push(a)},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true},
zZ:{
-"^":"Tp:223;c",
-call$1:[function(a){J.V1(this.c.i2,a)},"call$1",null,2,0,null,236,[],"call"],
+"^":"Tp:225;c",
+call$1:[function(a){J.V1(this.c.i2,a)},"call$1",null,2,0,null,238,[],"call"],
$isEH:true},
dS:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z,y,x,w,v,u,t,s
z=J.U6(a)
y=z.t(a,"id")
@@ -18887,17 +19276,17 @@
t=H.VM([],[L.kx])
s=P.L5(null,null,null,J.O,J.GW)
s=R.Jk(s)
-v=new L.bv(null,u,t,z.t(a,"id"),z.t(a,"name"),null,null,s,0,0,null,null,null,null)
+v=new L.bv(null,u,t,z.t(a,"id"),z.t(a,"name"),null,null,null,s,0,0,null,null,null,null)
w.u(x,y,v)}J.KM(v)},"call$1",null,2,0,null,144,[],"call"],
$isEH:true},
dZ:{
"^":"Pi;XT?,WP,kg,UL,AP,fn",
-gB1:[function(a){return this.WP},null,null,1,0,366,"profile",351,365],
-sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,367,23,[],"profile",351],
-gb8:[function(){return this.kg},null,null,1,0,362,"currentHash",351,365],
-sb8:[function(a){this.kg=F.Wi(this,C.h1,this.kg,a)},null,null,3,0,25,23,[],"currentHash",351],
-gXX:[function(){return this.UL},null,null,1,0,521,"currentHashUri",351,365],
-sXX:[function(a){this.UL=F.Wi(this,C.tv,this.UL,a)},null,null,3,0,522,23,[],"currentHashUri",351],
+gB1:[function(a){return this.WP},null,null,1,0,371,"profile",353,370],
+sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,372,23,[],"profile",353],
+gb8:[function(){return this.kg},null,null,1,0,367,"currentHash",353,370],
+sb8:[function(a){this.kg=F.Wi(this,C.h1,this.kg,a)},null,null,3,0,25,23,[],"currentHash",353],
+gXX:[function(){return this.UL},null,null,1,0,532,"currentHashUri",353,370],
+sXX:[function(a){this.UL=F.Wi(this,C.tv,this.UL,a)},null,null,3,0,533,23,[],"currentHashUri",353],
kI:[function(){var z=C.PP.aM(window)
H.VM(new W.Ov(0,z.uv,z.Ph,W.aF(new L.Qe(this)),z.Sg),[H.Kp(z,0)]).Zz()
if(!this.S7())this.df()},"call$0","gMz",0,0,null],
@@ -18912,13 +19301,13 @@
y=J.q8(y[0])
if(typeof y!=="number")return H.s(y)
return C.xB.Nj(x,w,v+y)},"call$0","gzJ",0,0,null],
-gwB:[function(){return this.vI()!=null},null,null,1,0,366,"hasCurrentIsolate",365],
+gwB:[function(){return this.vI()!=null},null,null,1,0,371,"hasCurrentIsolate",370],
R6:[function(){var z=this.vI()
if(z==null)return""
return J.ZZ(z,2)},"call$0","gKo",0,0,null],
Pr:[function(){var z=this.R6()
if(z==="")return
-return this.XT.nI.AQ(z)},"call$0","gjf",0,0,null],
+return this.XT.nI.AQ(z)},"call$0","gjf",0,0,502,"currentIsolate",370],
S7:[function(){var z=J.Co(C.ol.gmW(window))
z=F.Wi(this,C.h1,this.kg,z)
this.kg=z
@@ -18939,28 +19328,28 @@
else{this.XT.DF.ox(y)
this.WP=F.Wi(this,C.vb,this.WP,!1)}},"call$0","glq",0,0,null],
kP:[function(a){var z=this.R6()
-return"#/"+z+"/"+H.d(a)},"call$1","gVM",2,0,504,274,[],"currentIsolateRelativeLink",365],
-XY:[function(a){return this.kP("scripts/"+P.jW(C.yD,a,C.xM,!1))},"call$1","gOs",2,0,504,523,[],"currentIsolateScriptLink",365],
-r4:[function(a,b,c){return"#/"+H.d(b)+"/"+H.d(c)},"call$2","gLc",4,0,524,525,[],274,[],"relativeLink",365],
-da:[function(a){return"#/"+H.d(a)},"call$1","geP",2,0,504,274,[],"absoluteLink",365],
-static:{"^":"x4,YF,qY,HT"}},
+return"#/"+z+"/"+H.d(a)},"call$1","gVM",2,0,534,276,[],"currentIsolateRelativeLink",370],
+XY:[function(a){return this.kP("scripts/"+P.jW(C.yD,a,C.xM,!1))},"call$1","gOs",2,0,534,535,[],"currentIsolateScriptLink",370],
+r4:[function(a,b,c){return"#/"+H.d(b)+"/"+H.d(c)},"call$2","gLc",4,0,536,537,[],276,[],"relativeLink",370],
+da:[function(a){return"#/"+H.d(a)},"call$1","geP",2,0,534,276,[],"absoluteLink",370],
+static:{"^":"x4,K3D,qY,HT"}},
Qe:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
if(z.S7())return
F.Wi(z,C.D2,z.vI()==null,z.vI()!=null)
-z.df()},"call$1",null,2,0,null,400,[],"call"],
+z.df()},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
DP:{
-"^":["Pi;Yu<-475,m7<-364,L4<-364,Fv,ZZ,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null,null],
-ga0:[function(){return this.Fv},null,null,1,0,482,"ticks",351,365],
-sa0:[function(a){this.Fv=F.Wi(this,C.p1,this.Fv,a)},null,null,3,0,385,23,[],"ticks",351],
-gGK:[function(){return this.ZZ},null,null,1,0,526,"percent",351,365],
-sGK:[function(a){this.ZZ=F.Wi(this,C.tI,this.ZZ,a)},null,null,3,0,527,23,[],"percent",351],
+"^":["Pi;Yu<-484,m7<-369,L4<-369,Fv,ZZ,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null,null],
+ga0:[function(){return this.Fv},null,null,1,0,491,"ticks",353,370],
+sa0:[function(a){this.Fv=F.Wi(this,C.p1,this.Fv,a)},null,null,3,0,392,23,[],"ticks",353],
+gGK:[function(){return this.ZZ},null,null,1,0,538,"percent",353,370],
+sGK:[function(a){this.ZZ=F.Wi(this,C.tI,this.ZZ,a)},null,null,3,0,539,23,[],"percent",353],
oS:[function(){var z=this.ZZ
if(z==null||J.Hb(z,0))return""
-return J.Ez(this.ZZ,2)+"% ("+H.d(this.Fv)+")"},"call$0","gu3",0,0,362,"formattedTicks",365],
-xt:[function(){return"0x"+J.u1(this.Yu,16)},"call$0","gZd",0,0,362,"formattedAddress",365]},
+return J.Ez(this.ZZ,2)+"% ("+H.d(this.Fv)+")"},"call$0","gu3",0,0,367,"formattedTicks",370],
+xt:[function(){return"0x"+J.u1(this.Yu,16)},"call$0","gZd",0,0,367,"formattedAddress",370]},
WAE:{
"^":"a;eg",
bu:[function(a){return"CodeKind."+this.eg},"call$0","gXo",0,0,null],
@@ -18968,21 +19357,21 @@
if(z.n(a,"Native"))return C.nj
else if(z.n(a,"Dart"))return C.l8
else if(z.n(a,"Collected"))return C.WA
-throw H.b(P.hS())},"call$1","Tx",2,0,null,86,[]]}},
+throw H.b(P.hS())},"call$1","J6",2,0,null,86,[]]}},
N8:{
"^":"a;Yu<,z4,Iw"},
Vi:{
"^":"a;tT>,Ou<"},
kx:{
-"^":["Pi;fY>,vg,Mb,a0<,VS<,hw,fF<,Du<,va<-528,Qo,uP,mY,B0,AP,fn",null,null,null,null,null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
-gkx:[function(){return this.Qo},null,null,1,0,350,"functionRef",351,365],
-skx:[function(a){this.Qo=F.Wi(this,C.yg,this.Qo,a)},null,null,3,0,353,23,[],"functionRef",351],
-gZN:[function(){return this.uP},null,null,1,0,350,"codeRef",351,365],
-sZN:[function(a){this.uP=F.Wi(this,C.EX,this.uP,a)},null,null,3,0,353,23,[],"codeRef",351],
-goc:[function(a){return this.mY},null,null,1,0,362,"name",351,365],
-soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",351],
-giK:[function(){return this.B0},null,null,1,0,362,"userName",351,365],
-siK:[function(a){this.B0=F.Wi(this,C.ct,this.B0,a)},null,null,3,0,25,23,[],"userName",351],
+"^":["Pi;fY>,vg,Mb,a0<,VS<,hw,fF<,Du<,va<-540,Qo,uP,mY,B0,AP,fn",null,null,null,null,null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
+gkx:[function(){return this.Qo},null,null,1,0,352,"functionRef",353,370],
+skx:[function(a){this.Qo=F.Wi(this,C.yg,this.Qo,a)},null,null,3,0,355,23,[],"functionRef",353],
+gZN:[function(){return this.uP},null,null,1,0,352,"codeRef",353,370],
+sZN:[function(a){this.uP=F.Wi(this,C.EX,this.uP,a)},null,null,3,0,355,23,[],"codeRef",353],
+goc:[function(a){return this.mY},null,null,1,0,367,"name",353,370],
+soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",353],
+giK:[function(){return this.B0},null,null,1,0,367,"userName",353,370],
+siK:[function(a){this.B0=F.Wi(this,C.ct,this.B0,a)},null,null,3,0,25,23,[],"userName",353],
Ne:[function(a,b){var z,y,x,w,v,u,t
z=J.U6(b)
this.fF=H.BU(z.t(b,"inclusive_ticks"),null,null)
@@ -19003,14 +19392,14 @@
fs:[function(a){var z,y,x
for(z=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]),y=0;z.G();){x=z.lo.gOu()
if(typeof x!=="number")return H.s(x)
-y+=x}return y},"call$1","gJ6",2,0,null,529,[]],
+y+=x}return y},"call$1","gJ6",2,0,null,541,[]],
U8:[function(a,b){var z,y
for(z=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]);z.G();){y=z.lo
-if(J.de(J.on(y),b))return y.gOu()}return 0},"call$2","gGp",4,0,null,529,[],136,[]],
+if(J.de(J.on(y),b))return y.gOu()}return 0},"call$2","gPz",4,0,null,541,[],136,[]],
hI:[function(a,b){var z=J.U6(a)
-this.GV(this.VS,z.t(a,"callers"),b)
-this.GV(this.hw,z.t(a,"callees"),b)},"call$2","gL0",4,0,null,136,[],530,[]],
-GV:[function(a,b,c){var z,y,x,w,v
+this.OV(this.VS,z.t(a,"callers"),b)
+this.OV(this.hw,z.t(a,"callees"),b)},"call$2","gL0",4,0,null,136,[],542,[]],
+OV:[function(a,b,c){var z,y,x,w,v
C.Nm.sB(a,0)
z=J.U6(b)
y=0
@@ -19021,7 +19410,7 @@
v=H.BU(z.t(b,y+1),null,null)
if(w>>>0!==w||w>=c.length)return H.e(c,w)
a.push(new L.Vi(c[w],v))
-y+=2}H.ZE(a,0,a.length-1,new L.fx())},"call$3","gI1",6,0,null,529,[],231,[],530,[]],
+y+=2}H.ZE(a,0,a.length-1,new L.fx())},"call$3","gI1",6,0,null,541,[],233,[],542,[]],
FB:[function(){this.fF=0
this.Du=0
C.Nm.sB(this.a0,0)
@@ -19036,16 +19425,15 @@
if(typeof v!=="number")return H.s(v)
if(!(w<v))break
c$0:{if(J.de(x.t(a,w),""))break c$0
-y.h(z,new L.DP(H.BU(x.t(a,w),null,null),x.t(a,w+1),x.t(a,w+2),0,null,null,null))}w+=3}},"call$1","gwj",2,0,null,531,[]],
+y.h(z,new L.DP(H.BU(x.t(a,w),null,null),x.t(a,w+1),x.t(a,w+2),0,null,null,null))}w+=3}},"call$1","gwj",2,0,null,543,[]],
tg:[function(a,b){var z=J.Wx(b)
-return z.F(b,this.vg)&&z.C(b,this.Mb)},"call$1","gdj",2,0,null,516,[]],
+return z.F(b,this.vg)&&z.C(b,this.Mb)},"call$1","gdj",2,0,null,527,[]],
NV:function(a){var z,y
z=J.U6(a)
y=z.t(a,"function")
y=R.Jk(y)
this.Qo=F.Wi(this,C.yg,this.Qo,y)
-y=H.B7(["type","@Code","id",z.t(a,"id"),"name",z.t(a,"name"),"user_name",z.t(a,"user_name")],P.L5(null,null,null,null,null))
-y=R.Jk(y)
+y=R.Jk(a)
this.uP=F.Wi(this,C.EX,this.uP,y)
y=z.t(a,"name")
this.mY=F.Wi(this,C.YS,this.mY,y)
@@ -19054,54 +19442,37 @@
if(z.t(a,"disassembly")!=null)this.fo(z.t(a,"disassembly"))},
$iskx:true},
fx:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.xH(b.gOu(),a.gOu())},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.xH(b.gOu(),a.gOu())},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
CM:{
"^":"a;Aq>,jV,hV<",
-vD:[function(a){var z=J.U6(a)
-if(L.CQ(z.t(a,"kind"))===C.l8&&z.t(a,"code")!=null)return H.BU(J.UQ(z.t(a,"code"),"start"),16,null)
-return H.BU(z.t(a,"start"),16,null)},"call$1","gRU",2,0,null,136,[]],
-U5:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
+U5:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o
z=J.U6(a)
if(!J.de(z.t(a,"type"),"ProfileCode"))return
y=this.Aq
-x=y.hv(this.vD(a))
+x=y.hv(H.BU(J.UQ(z.t(a,"code"),"start"),16,null))
if(x==null){w=L.CQ(z.t(a,"kind"))
-if(w===C.l8){x=z.t(a,"code")
-if(x!=null){v=J.U6(x)
-u=H.BU(v.t(x,"start"),16,null)
-t=H.BU(v.t(x,"end"),16,null)
-s=v.t(x,"name")
-r=v.t(x,"user_name")
-q=H.B7(["type","@Code","id",v.t(x,"id"),"name",s,"user_name",r],P.L5(null,null,null,null,null))
-p=R.Jk(q)
-v=v.t(x,"function")
-o=R.Jk(v)}else{u=null
-t=null
-s=null
-r=null
-p=null
-o=null}}else{u=null
-t=null
-s=null
-r=null
-p=null
-o=null}if(u==null){u=H.BU(z.t(a,"start"),16,null)
-t=H.BU(z.t(a,"end"),16,null)
-s=z.t(a,"name")
-r=s}v=R.Jk([])
-q=H.B7([],P.L5(null,null,null,null,null))
-q=R.Jk(q)
-n=H.B7([],P.L5(null,null,null,null,null))
-n=R.Jk(n)
-x=new L.kx(w,u,t,[],[],[],0,0,v,q,n,s,null,null,null)
-x.uP=F.Wi(x,C.EX,n,p)
-x.Qo=F.Wi(x,C.yg,x.Qo,o)
+v=z.t(a,"code")
+z=J.U6(v)
+u=H.BU(z.t(v,"start"),16,null)
+t=H.BU(z.t(v,"end"),16,null)
+s=z.t(v,"name")
+r=z.t(v,"user_name")
+q=R.Jk([])
+p=H.B7([],P.L5(null,null,null,null,null))
+p=R.Jk(p)
+o=H.B7([],P.L5(null,null,null,null,null))
+o=R.Jk(o)
+x=new L.kx(w,u,t,[],[],[],0,0,q,p,o,s,null,null,null)
+x.uP=F.Wi(x,C.EX,o,v)
+o=z.t(v,"function")
+q=R.Jk(o)
+x.Qo=F.Wi(x,C.yg,x.Qo,q)
x.B0=F.Wi(x,C.ct,x.B0,r)
-if(z.t(a,"disassembly")!=null)x.fo(z.t(a,"disassembly"))
-J.bi(y.gZ0(),x)}J.eh(x,a)
-this.jV.push(x)},"call$1","gu5",2,0,null,532,[]],
+if(z.t(v,"disassembly")!=null){x.fo(z.t(v,"disassembly"))
+z.u(v,"disassembly",null)}J.bi(y.gZ0(),x)}J.eh(x,a)
+this.jV.push(x)},"call$1","gXx",2,0,null,544,[]],
T0:[function(a){var z,y
z=this.Aq.gZ0()
y=J.w1(z)
@@ -19128,7 +19499,7 @@
z.uH(a,b)
return z}}},
xn:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y,x,w
try{this.a.U5(a)}catch(x){w=H.Ru(x)
z=w
@@ -19136,28 +19507,30 @@
N.Jx("").xH("Error processing code object. "+H.d(z)+" "+H.d(y),z,y)}},"call$1",null,2,0,null,136,[],"call"],
$isEH:true},
vu:{
-"^":"Tp:533;",
-call$2:[function(a,b){return J.xH(b.gDu(),a.gDu())},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:545;",
+call$2:[function(a,b){return J.xH(b.gDu(),a.gDu())},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
c2:{
-"^":["Pi;Rd>-475,eB,P2,AP,fn",function(){return[C.mI]},null,null,null,null],
-gu9:[function(){return this.eB},null,null,1,0,482,"hits",351,365],
-su9:[function(a){this.eB=F.Wi(this,C.K7,this.eB,a)},null,null,3,0,385,23,[],"hits",351],
-ga4:[function(a){return this.P2},null,null,1,0,362,"text",351,365],
-sa4:[function(a,b){this.P2=F.Wi(this,C.MB,this.P2,b)},null,null,3,0,25,23,[],"text",351],
+"^":["Pi;Rd>-484,eB,P2,AP,fn",function(){return[C.mI]},null,null,null,null],
+gu9:[function(){return this.eB},null,null,1,0,491,"hits",353,370],
+su9:[function(a){this.eB=F.Wi(this,C.K7,this.eB,a)},null,null,3,0,392,23,[],"hits",353],
+ga4:[function(a){return this.P2},null,null,1,0,367,"text",353,370],
+sa4:[function(a,b){this.P2=F.Wi(this,C.MB,this.P2,b)},null,null,3,0,25,23,[],"text",353],
goG:function(){return J.J5(this.eB,0)},
gVt:function(){return J.z8(this.eB,0)},
$isc2:true},
rj:{
-"^":["Pi;W6,xN,Hz,Sw<-534,UK,AP,fn",null,null,null,function(){return[C.mI]},null,null,null],
-gfY:[function(a){return this.W6},null,null,1,0,362,"kind",351,365],
-sfY:[function(a,b){this.W6=F.Wi(this,C.fy,this.W6,b)},null,null,3,0,25,23,[],"kind",351],
-gKC:[function(){return this.xN},null,null,1,0,350,"scriptRef",351,365],
-sKC:[function(a){this.xN=F.Wi(this,C.Be,this.xN,a)},null,null,3,0,353,23,[],"scriptRef",351],
-gBi:[function(){return this.Hz},null,null,1,0,350,"libraryRef",351,365],
-sBi:[function(a){this.Hz=F.Wi(this,C.cg,this.Hz,a)},null,null,3,0,353,23,[],"libraryRef",351],
+"^":["Pi;W6,xN,ei,Hz,Sw<-546,UK,AP,fn",null,null,null,null,function(){return[C.mI]},null,null,null],
+gfY:[function(a){return this.W6},null,null,1,0,367,"kind",353,370],
+sfY:[function(a,b){this.W6=F.Wi(this,C.fy,this.W6,b)},null,null,3,0,25,23,[],"kind",353],
+gKC:[function(){return this.xN},null,null,1,0,352,"scriptRef",353,370],
+sKC:[function(a){this.xN=F.Wi(this,C.Be,this.xN,a)},null,null,3,0,355,23,[],"scriptRef",353],
+gQT:[function(){return this.ei},null,null,1,0,367,"shortName",353,354],
+sQT:[function(a){this.ei=F.Wi(this,C.Kt,this.ei,a)},null,null,3,0,25,23,[],"shortName",353],
+gBi:[function(){return this.Hz},null,null,1,0,352,"libraryRef",353,370],
+sBi:[function(a){this.Hz=F.Wi(this,C.cg,this.Hz,a)},null,null,3,0,355,23,[],"libraryRef",353],
giI:function(){return this.UK},
-gX4:[function(){return J.Pr(this.Sw,1)},null,null,1,0,535,"linesForDisplay",365],
+gHh:[function(){return J.Pr(this.Sw,1)},null,null,1,0,547,"linesForDisplay",370],
Av:[function(a){var z,y,x,w
z=this.Sw
y=J.U6(z)
@@ -19165,7 +19538,7 @@
if(x.F(a,y.gB(z)))y.sB(z,x.g(a,1))
w=y.t(z,a)
if(w==null){w=new L.c2(a,-1,"",null,null)
-y.u(z,a,w)}return w},"call$1","gKN",2,0,null,536,[]],
+y.u(z,a,w)}return w},"call$1","gKN",2,0,null,548,[]],
lu:[function(a){var z,y,x,w
if(a==null)return
N.Jx("").To("Loading source for "+H.d(J.UQ(this.xN,"name")))
@@ -19182,19 +19555,21 @@
if(typeof x!=="number")return H.s(x)
if(!(y<x))break
this.Av(z.t(a,y)).su9(z.t(a,y+1))
-y+=2}F.Wi(this,C.C2,"","("+C.CD.yM(this.Nk(),1)+"% covered)")},"call$1","gpc",2,0,null,537,[]],
+y+=2}F.Wi(this,C.C2,"","("+C.CD.yM(this.Nk(),1)+"% covered)")},"call$1","gpc",2,0,null,549,[]],
Nk:[function(){var z,y,x,w
for(z=J.GP(this.Sw),y=0,x=0;z.G();){w=z.gl()
if(w==null)continue
if(!w.goG())continue;++x
if(!w.gVt())continue;++y}if(x===0)return 0
-return y/x*100},"call$0","gCx",0,0,526,"coveredPercentage",365],
-nZ:[function(){return"("+C.CD.yM(this.Nk(),1)+"% covered)"},"call$0","gic",0,0,362,"coveredPercentageFormatted",365],
+return y/x*100},"call$0","gCx",0,0,538,"coveredPercentage",370],
+nZ:[function(){return"("+C.CD.yM(this.Nk(),1)+"% covered)"},"call$0","gic",0,0,367,"coveredPercentageFormatted",370],
Ea:function(a){var z,y
z=J.U6(a)
y=H.B7(["id",z.t(a,"id"),"name",z.t(a,"name"),"user_name",z.t(a,"user_name")],P.L5(null,null,null,null,null))
y=R.Jk(y)
this.xN=F.Wi(this,C.Be,this.xN,y)
+y=J.ZZ(z.t(a,"name"),J.WB(J.eJ(z.t(a,"name"),"/"),1))
+this.ei=F.Wi(this,C.Kt,this.ei,y)
y=z.t(a,"library")
y=R.Jk(y)
this.Hz=F.Wi(this,C.cg,this.Hz,y)
@@ -19209,31 +19584,31 @@
y=R.Jk(y)
x=H.VM([],[L.c2])
x=R.Jk(x)
-x=new L.rj(null,z,y,x,!0,null,null)
+x=new L.rj(null,z,null,y,x,!0,null,null)
x.Ea(a)
return x}}},
Nu:{
"^":"Pi;XT?,e0?",
pG:function(){return this.e0.call$0()},
-geG:[function(){return this.SI},null,null,1,0,362,"prefix",351,365],
-seG:[function(a){this.SI=F.Wi(this,C.qb3,this.SI,a)},null,null,3,0,25,23,[],"prefix",351],
-gjR:[function(){return this.Tj},null,null,1,0,501,"responses",351,365],
-sjR:[function(a){this.Tj=F.Wi(this,C.wH,this.Tj,a)},null,null,3,0,538,23,[],"responses",351],
+geG:[function(){return this.SI},null,null,1,0,367,"prefix",353,370],
+seG:[function(a){this.SI=F.Wi(this,C.qb3,this.SI,a)},null,null,3,0,25,23,[],"prefix",353],
+gjR:[function(){return this.Tj},null,null,1,0,510,"responses",353,370],
+sjR:[function(a){this.Tj=F.Wi(this,C.wH,this.Tj,a)},null,null,3,0,550,23,[],"responses",353],
FH:[function(a){var z,y,x,w,v
z=null
try{z=C.xr.kV(a)}catch(w){v=H.Ru(w)
y=v
x=new H.XO(w,null)
-this.AI(H.d(y)+" "+H.d(x))}return z},"call$1","gkJ",2,0,null,466,[]],
+this.AI(H.d(y)+" "+H.d(x))}return z},"call$1","gkJ",2,0,null,477,[]],
f3:[function(a){var z,y
z=this.FH(a)
if(z==null)return
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isZ0)this.dq([z])
-else this.dq(z)},"call$1","gt7",2,0,null,539,[]],
+else this.dq(z)},"call$1","gI5",2,0,null,551,[]],
dq:[function(a){var z=R.Jk(a)
this.Tj=F.Wi(this,C.wH,this.Tj,z)
-if(this.e0!=null)this.pG()},"call$1","gvw",2,0,null,368,[]],
+if(this.e0!=null)this.pG()},"call$1","gvw",2,0,null,373,[]],
AI:[function(a){this.dq([H.B7(["type","Error","errorType","ResponseError","text",a],P.L5(null,null,null,null,null))])
N.Jx("").hh(a)},"call$1","gug",2,0,null,20,[]],
Uu:[function(a){var z,y,x,w,v
@@ -19247,7 +19622,7 @@
return}v=y.hv(x)
if(v!=null){N.Jx("").To("Found code with 0x"+w.WZ(x,16)+" in isolate.")
this.dq([H.B7(["type","Code","code",v],P.L5(null,null,null,null,null))])
-return}this.ym(0,a).ml(new L.Q4(this,y,x)).OA(this.gSC())},"call$1","gVB",2,0,null,540,[]],
+return}this.ym(0,a).ml(new L.Q4(this,y,x)).OA(this.gSC())},"call$1","gVB",2,0,null,552,[]],
GY:[function(a){var z,y,x,w,v
z=L.Lw(a)
if(z==null){this.AI(z+" is not an isolate id.")
@@ -19260,22 +19635,22 @@
if(v&&!w.giI()){N.Jx("").To("Found script "+H.d(J.UQ(w.gKC(),"name"))+" in isolate")
this.dq([H.B7(["type","Script","script",w],P.L5(null,null,null,null,null))])
return}if(v){this.fB(a).ml(new L.aJ(this,w))
-return}this.fB(a).ml(new L.u4(this,y,x))},"call$1","gPc",2,0,null,540,[]],
+return}this.fB(a).ml(new L.u4(this,y,x))},"call$1","gPc",2,0,null,552,[]],
xl:[function(a,b){var z,y,x
z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isew){z=W.qc(a.target)
y=J.RE(z)
x=H.d(y.gys(z))+" "+y.gpo(z)
if(y.gys(z)===0)x="No service found. Did you run with --enable-vm-service ?"
-this.dq([H.B7(["type","Error","errorType","RequestError","text",x],P.L5(null,null,null,null,null))])}else this.AI(H.d(a)+" "+H.d(b))},"call$2","gSC",4,0,541,18,[],468,[]],
+this.dq([H.B7(["type","Error","errorType","RequestError","text",x],P.L5(null,null,null,null,null))])}else this.AI(H.d(a)+" "+H.d(b))},"call$2","gSC",4,0,553,18,[],478,[]],
ox:[function(a){var z=$.mE().Ej
if(z.test(a)){this.Uu(a)
return}z=$.Ww().Ej
if(z.test(a)){this.GY(a)
-return}this.ym(0,a).ml(new L.pF(this)).OA(this.gSC())},"call$1","gRD",2,0,null,540,[]],
-fB:[function(a){return this.ym(0,C.xB.nC(a,"#")?C.xB.yn(a,1):a).ml(new L.Q2())},"call$1","gHi",2,0,null,540,[]]},
+return}this.ym(0,a).ml(new L.pF(this)).OA(this.gSC())},"call$1","gRD",2,0,null,552,[]],
+fB:[function(a){return this.ym(0,C.xB.nC(a,"#")?C.xB.yn(a,1):a).ml(new L.Q2())},"call$1","gHi",2,0,null,552,[]]},
Q4:{
-"^":"Tp:223;a,b,c",
+"^":"Tp:225;a,b,c",
call$1:[function(a){var z,y,x,w,v,u,t
z=this.a
y=z.FH(a)
@@ -19290,36 +19665,37 @@
t.NV(y)
N.Jx("").To("Added code with 0x"+J.u1(this.c,16)+" to isolate.")
J.bi(this.b.gZ0(),t)
-z.dq([H.B7(["type","Code","code",t],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,539,[],"call"],
+z.dq([H.B7(["type","Code","code",t],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,551,[],"call"],
$isEH:true},
aJ:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){var z=this.b
z.lu(J.UQ(a,"source"))
N.Jx("").To("Grabbed script "+H.d(J.UQ(z.gKC(),"name"))+" source.")
-this.a.dq([H.B7(["type","Script","script",z],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,466,[],"call"],
+this.a.dq([H.B7(["type","Script","script",z],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
u4:{
-"^":"Tp:223;c,d,e",
+"^":"Tp:225;c,d,e",
call$1:[function(a){var z=L.Ak(a)
N.Jx("").To("Added script "+H.d(J.UQ(z.xN,"name"))+" to isolate.")
this.c.dq([H.B7(["type","Script","script",z],P.L5(null,null,null,null,null))])
-J.kW(this.d.gXR(),this.e,z)},"call$1",null,2,0,null,466,[],"call"],
+J.kW(this.d.gXR(),this.e,z)},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
pF:{
-"^":"Tp:223;a",
-call$1:[function(a){this.a.f3(a)},"call$1",null,2,0,null,539,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){this.a.f3(a)},"call$1",null,2,0,null,551,[],"call"],
$isEH:true},
Q2:{
-"^":"Tp:223;",
-call$1:[function(a){var z,y
+"^":"Tp:225;",
+call$1:[function(a){var z,y,x
try{z=C.xr.kV(a)
-return z}catch(y){H.Ru(y)}return},"call$1",null,2,0,null,466,[],"call"],
+y=R.Jk(z)
+return y}catch(x){H.Ru(x)}return},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
r1:{
"^":"Nu;XT,e0,SI,Tj,AP,fn",
ym:[function(a,b){N.Jx("").To("Requesting "+b)
-return W.It(J.WB(this.SI,b),null,null)},"call$1","gkq",2,0,null,540,[]]},
+return W.It(J.WB(this.SI,b),null,null)},"call$1","gkq",2,0,null,552,[]]},
Rb:{
"^":"Nu;eA,Wj,XT,e0,SI,Tj,AP,fn",
AJ:[function(a){var z,y,x,w,v
@@ -19332,7 +19708,7 @@
v=z.t(0,y)
if(v!=null){z.Rz(0,y)
P.JS("Completing "+H.d(y))
-J.Xf(v,w)}else P.JS("Could not find completer for "+H.d(y))},"call$1","gpJ",2,0,150,19,[]],
+J.Xf(v,w)}else P.JS("Could not find completer for "+H.d(y))},"call$1","gpJ",2,0,153,19,[]],
ym:[function(a,b){var z,y,x
z=""+this.Wj
y=H.B7([],P.L5(null,null,null,null,null))
@@ -19343,9 +19719,9 @@
x=H.VM(new P.Zf(P.Dt(null)),[null])
this.eA.u(0,z,x)
J.Ih(W.Pv(window.parent),C.xr.KP(y),"*")
-return x.MM},"call$1","gkq",2,0,null,540,[]]},
+return x.MM},"call$1","gkq",2,0,null,552,[]]},
Y2:{
-"^":["Pi;eT>,yt<-475,wd>-476,oH<-477",null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]}],
+"^":["Pi;eT>,yt<-484,wd>-485,oH<-486",null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]}],
goE:function(a){return this.np},
soE:function(a,b){var z=this.np
this.np=b
@@ -19355,21 +19731,15 @@
return this.np},"call$0","gMk",0,0,null],
$isY2:true},
XN:{
-"^":["Pi;JL,WT>-476,AP,fn",null,function(){return[C.mI]},null,null],
+"^":["Pi;JL,WT>-485,AP,fn",null,function(){return[C.mI]},null,null],
rT:[function(a){var z,y
z=this.WT
y=J.w1(z)
y.V1(z)
-y.FV(z,a)},"call$1","gE3",2,0,null,542,[]],
-qU:[function(a){var z,y,x
-P.JS(a)
-z=this.WT
-y=J.U6(z)
-P.JS(y.gB(z))
-x=y.t(z,a)
-if(x.r8())this.ad(x)
-else this.cB(x)
-P.JS("e")},"call$1","gMk",2,0,null,543,[]],
+y.FV(z,a)},"call$1","gE3",2,0,null,554,[]],
+qU:[function(a){var z=J.UQ(this.WT,a)
+if(z.r8())this.ad(z)
+else this.cB(z)},"call$1","gMk",2,0,null,555,[]],
ad:[function(a){var z,y,x,w,v,u,t
z=this.WT
y=J.U6(z)
@@ -19382,7 +19752,7 @@
u=x+v+1
t=J.UQ(w.gwd(a),v)
if(u===-1)y.h(z,t)
-else y.xe(z,u,t);++v}},"call$1","ghF",2,0,null,489,[]],
+else y.xe(z,u,t);++v}},"call$1","ghF",2,0,null,498,[]],
cB:[function(a){var z,y,x,w,v
z=J.RE(a)
y=J.q8(z.gwd(a))
@@ -19393,12 +19763,12 @@
z.soE(a,!1)
z=this.WT
w=J.U6(z)
-for(v=w.u8(z,a)+1,x=0;x<y;++x)w.KI(z,v)},"call$1","gjc",2,0,null,489,[]]}}],["observatory_application_element","package:observatory/src/observatory_elements/observatory_application.dart",,V,{
+for(v=w.u8(z,a)+1,x=0;x<y;++x)w.KI(z,v)},"call$1","gjc",2,0,null,498,[]]}}],["observatory_application_element","package:observatory/src/observatory_elements/observatory_application.dart",,V,{
"^":"",
-F1:{
-"^":["V12;k5%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gzj:[function(a){return a.k5},null,null,1,0,366,"devtools",351,352],
-szj:[function(a,b){a.k5=this.ct(a,C.Na,a.k5,b)},null,null,3,0,367,23,[],"devtools",351],
+lI:{
+"^":["V18;k5%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gzj:[function(a){return a.k5},null,null,1,0,371,"devtools",353,354],
+szj:[function(a,b){a.k5=this.ct(a,C.Na,a.k5,b)},null,null,3,0,372,23,[],"devtools",353],
ZB:[function(a){var z,y
if(a.k5===!0){z=P.L5(null,null,null,null,null)
y=R.Jk([])
@@ -19430,20 +19800,20 @@
C.k0.G6(a)
C.k0.ZB(a)
return a},null,null,0,0,108,"new ObservatoryApplicationElement$created"]}},
-"+ObservatoryApplicationElement":[544],
-V12:{
+"+ObservatoryApplicationElement":[556],
+V18:{
"^":"uL+Pi;",
$isd3:true}}],["observatory_element","package:observatory/src/observatory_elements/observatory_element.dart",,Z,{
"^":"",
uL:{
-"^":["LP;hm%-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["LP;hm%-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
i4:[function(a){A.zs.prototype.i4.call(this,a)},"call$0","gQd",0,0,107,"enteredView"],
xo:[function(a){A.zs.prototype.xo.call(this,a)},"call$0","gbt",0,0,107,"leftView"],
-aC:[function(a,b,c,d){A.zs.prototype.aC.call(this,a,b,c,d)},"call$3","gxR",6,0,545,12,[],225,[],226,[],"attributeChanged"],
-guw:[function(a){return a.hm},null,null,1,0,546,"app",351,352],
-suw:[function(a,b){a.hm=this.ct(a,C.wh,a.hm,b)},null,null,3,0,547,23,[],"app",351],
-Pz:[function(a,b){},"call$1","gpx",2,0,150,225,[],"appChanged"],
-gpQ:[function(a){return!0},null,null,1,0,366,"applyAuthorStyles"],
+aC:[function(a,b,c,d){A.zs.prototype.aC.call(this,a,b,c,d)},"call$3","gxR",6,0,557,12,[],227,[],228,[],"attributeChanged"],
+guw:[function(a){return a.hm},null,null,1,0,558,"app",353,354],
+suw:[function(a,b){a.hm=this.ct(a,C.wh,a.hm,b)},null,null,3,0,559,23,[],"app",353],
+Dy:[function(a,b){},"call$1","gpx",2,0,153,227,[],"appChanged"],
+gpQ:[function(a){return!0},null,null,1,0,371,"applyAuthorStyles"],
Om:[function(a,b){var z,y,x,w
if(b==null)return"-"
z=J.LL(J.p0(b,1000))
@@ -19453,28 +19823,28 @@
z=C.jn.Y(z,60000)
w=C.jn.cU(z,1000)
z=C.jn.Y(z,1000)
-return Z.Ce(y,2)+":"+Z.Ce(x,2)+":"+Z.Ce(w,2)+"."+Z.Ce(z,3)},"call$1","gSs",2,0,548,549,[],"formatTime"],
+return Z.Ce(y,2)+":"+Z.Ce(x,2)+":"+Z.Ce(w,2)+"."+Z.Ce(z,3)},"call$1","gSs",2,0,560,561,[],"formatTime"],
Ze:[function(a,b){var z=J.Wx(b)
if(z.C(b,1024))return H.d(b)+"B"
else if(z.C(b,1048576))return""+C.CD.yu(C.CD.UD(z.V(b,1024)))+"KB"
else if(z.C(b,1073741824))return""+C.CD.yu(C.CD.UD(z.V(b,1048576)))+"MB"
else if(z.C(b,1099511627776))return""+C.CD.yu(C.CD.UD(z.V(b,1073741824)))+"GB"
-else return""+C.CD.yu(C.CD.UD(z.V(b,1099511627776)))+"TB"},"call$1","gbJ",2,0,387,550,[],"formatSize"],
+else return""+C.CD.yu(C.CD.UD(z.V(b,1099511627776)))+"TB"},"call$1","gbJ",2,0,394,562,[],"formatSize"],
bj:[function(a,b){var z,y,x
z=J.U6(b)
y=J.UQ(z.t(b,"script"),"user_name")
x=J.U6(y)
-return x.yn(y,J.WB(x.cn(y,"/"),1))+":"+H.d(z.t(b,"line"))},"call$1","gNh",2,0,551,552,[],"fileAndLine"],
-nt:[function(a,b){return J.de(b,"@Null")},"call$1","gYx",2,0,553,11,[],"isNullRef"],
+return x.yn(y,J.WB(x.cn(y,"/"),1))+":"+H.d(z.t(b,"line"))},"call$1","gNh",2,0,563,564,[],"fileAndLine"],
+nt:[function(a,b){return J.de(b,"@Null")},"call$1","gYx",2,0,565,11,[],"isNullRef"],
Qq:[function(a,b){var z=J.x(b)
-return z.n(b,"@Smi")||z.n(b,"@Mint")||z.n(b,"@Bigint")},"call$1","gBI",2,0,553,11,[],"isIntRef"],
-TJ:[function(a,b){return J.de(b,"@Bool")},"call$1","gUA",2,0,553,11,[],"isBoolRef"],
-qH:[function(a,b){return J.de(b,"@String")},"call$1","gwm",2,0,553,11,[],"isStringRef"],
-JG:[function(a,b){return J.de(b,"@Instance")},"call$1","gUq",2,0,553,11,[],"isInstanceRef"],
-CL:[function(a,b){return J.de(b,"@Closure")},"call$1","gj7",2,0,553,11,[],"isClosureRef"],
+return z.n(b,"@Smi")||z.n(b,"@Mint")||z.n(b,"@Bigint")},"call$1","gBI",2,0,565,11,[],"isIntRef"],
+TJ:[function(a,b){return J.de(b,"@Bool")},"call$1","gX4",2,0,565,11,[],"isBoolRef"],
+qH:[function(a,b){return J.de(b,"@String")},"call$1","gwm",2,0,565,11,[],"isStringRef"],
+JG:[function(a,b){return J.de(b,"@Instance")},"call$1","gUq",2,0,565,11,[],"isInstanceRef"],
+CL:[function(a,b){return J.de(b,"@Closure")},"call$1","gj7",2,0,565,11,[],"isClosureRef"],
Bk:[function(a,b){var z=J.x(b)
-return z.n(b,"@GrowableObjectArray")||z.n(b,"@Array")},"call$1","gmv",2,0,553,11,[],"isListRef"],
-VR:[function(a,b){return!C.Nm.tg(["@Null","@Smi","@Mint","@Biginit","@Bool","@String","@Closure","@Instance","@GrowableObjectArray","@Array"],b)},"call$1","gua",2,0,553,11,[],"isUnexpectedRef"],
+return z.n(b,"@GrowableObjectArray")||z.n(b,"@Array")},"call$1","gmv",2,0,565,11,[],"isListRef"],
+VR:[function(a,b){return!C.Nm.tg(["@Null","@Smi","@Mint","@Biginit","@Bool","@String","@Closure","@Instance","@GrowableObjectArray","@Array"],b)},"call$1","gua",2,0,565,11,[],"isUnexpectedRef"],
"@":function(){return[C.Br]},
static:{Hx:[function(a){var z,y,x,w
z=$.Nd()
@@ -19491,8 +19861,8 @@
for(z=J.Wx(a),y="";x=J.Wx(b),x.D(b,1);){w=x.W(b,1)
if(typeof w!=="number")H.vh(new P.AT(w))
if(z.C(a,Math.pow(10,w)))y+="0"
-b=x.W(b,1)}return y+H.d(a)},"call$2","Rz",4,0,238,23,[],239,[],"_zeroPad"]}},
-"+ObservatoryElement":[554],
+b=x.W(b,1)}return y+H.d(a)},"call$2","Rz",4,0,240,23,[],241,[],"_zeroPad"]}},
+"+ObservatoryElement":[566],
LP:{
"^":"ir+Pi;",
$isd3:true}}],["observe.src.change_notifier","package:observe/src/change_notifier.dart",,O,{
@@ -19515,13 +19885,13 @@
if(x&&z!=null){x=H.VM(new P.Yp(z),[T.z2])
if(y.Gv>=4)H.vh(y.q7())
y.Iv(x)
-return!0}return!1},"call$0","gDx",0,0,366],
+return!0}return!1},"call$0","gDx",0,0,371],
gUV:function(a){var z,y
z=a.AP
if(z!=null){y=z.iE
z=y==null?z!=null:y!==z}else z=!1
return z},
-ct:[function(a,b,c,d){return F.Wi(a,b,c,d)},"call$3","gAn",6,0,null,252,[],225,[],226,[]],
+ct:[function(a,b,c,d){return F.Wi(a,b,c,d)},"call$3","gAn",6,0,null,254,[],227,[],228,[]],
nq:[function(a,b){var z,y
z=a.AP
if(z!=null){y=z.iE
@@ -19543,7 +19913,7 @@
"^":"Pi;b9,kK,Sv,rk,YX,B6,AP,fn",
kb:function(a){return this.rk.call$1(a)},
gB:function(a){return this.b9.length},
-gP:[function(a){return this.Sv},null,null,1,0,108,"value",351],
+gP:[function(a){return this.Sv},null,null,1,0,108,"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
wE:[function(a){var z,y,x,w,v
if(this.YX)return
@@ -19557,7 +19927,7 @@
x.push(w)}this.Ow()},"call$0","gM",0,0,null],
TF:[function(a){if(this.B6)return
this.B6=!0
-P.rb(this.gMc())},"call$1","geu",2,0,150,235,[]],
+P.rb(this.gMc())},"call$1","geu",2,0,153,237,[]],
Ow:[function(){var z,y
this.B6=!1
z=this.b9
@@ -19576,7 +19946,7 @@
ni:[function(a){return this.cO(0)},"call$0","gl1",0,0,108],
$isJ3:true},
E5:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return J.Vm(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true}}],["observe.src.dirty_check","package:observe/src/dirty_check.dart",,O,{
"^":"",
@@ -19608,11 +19978,11 @@
z=new O.o5(z)
return new P.zG(null,null,null,null,new O.zI(z),new O.id(z),null,null,null,null,null,null)},"call$0","Zq",0,0,null],
o5:{
-"^":"Tp:555;a",
+"^":"Tp:567;a",
call$2:[function(a,b){var z=this.a
if(z.a)return
z.a=!0
-a.RK(b,new O.b5(z))},"call$2",null,4,0,null,162,[],146,[],"call"],
+a.RK(b,new O.b5(z))},"call$2",null,4,0,null,165,[],146,[],"call"],
$isEH:true},
b5:{
"^":"Tp:108;a",
@@ -19620,9 +19990,9 @@
O.Y3()},"call$0",null,0,0,null,"call"],
$isEH:true},
zI:{
-"^":"Tp:163;b",
+"^":"Tp:166;b",
call$4:[function(a,b,c,d){if(d==null)return d
-return new O.Zb(this.b,b,c,d)},"call$4",null,8,0,null,161,[],162,[],146,[],110,[],"call"],
+return new O.Zb(this.b,b,c,d)},"call$4",null,8,0,null,164,[],165,[],146,[],110,[],"call"],
$isEH:true},
Zb:{
"^":"Tp:108;c,d,e,f",
@@ -19630,12 +20000,12 @@
return this.f.call$0()},"call$0",null,0,0,null,"call"],
$isEH:true},
id:{
-"^":"Tp:556;UI",
+"^":"Tp:568;UI",
call$4:[function(a,b,c,d){if(d==null)return d
-return new O.iV(this.UI,b,c,d)},"call$4",null,8,0,null,161,[],162,[],146,[],110,[],"call"],
+return new O.iV(this.UI,b,c,d)},"call$4",null,8,0,null,164,[],165,[],146,[],110,[],"call"],
$isEH:true},
iV:{
-"^":"Tp:223;bK,Gq,Rm,w3",
+"^":"Tp:225;bK,Gq,Rm,w3",
call$1:[function(a){this.bK.call$2(this.Gq,this.Rm)
return this.w3.call$1(a)},"call$1",null,2,0,null,21,[],"call"],
$isEH:true}}],["observe.src.list_diff","package:observe/src/list_diff.dart",,G,{
@@ -19675,7 +20045,7 @@
if(typeof n!=="number")return n.g()
n=P.J(o+1,n+1)
if(t>=l)return H.e(m,t)
-m[t]=n}}return x},"call$6","cL",12,0,null,240,[],241,[],242,[],243,[],244,[],245,[]],
+m[t]=n}}return x},"call$6","cL",12,0,null,242,[],243,[],244,[],245,[],246,[],247,[]],
Mw:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
z=a.length
y=z-1
@@ -19710,10 +20080,10 @@
v=p
y=w}else{u.push(2)
v=o
-x=s}}}return H.VM(new H.iK(u),[null]).br(0)},"call$1","fZ",2,0,null,246,[]],
+x=s}}}return H.VM(new H.iK(u),[null]).br(0)},"call$1","fZ",2,0,null,248,[]],
rB:[function(a,b,c){var z,y,x
for(z=J.U6(a),y=J.U6(b),x=0;x<c;++x)if(!J.de(z.t(a,x),y.t(b,x)))return x
-return c},"call$3","UF",6,0,null,247,[],248,[],249,[]],
+return c},"call$3","UF",6,0,null,249,[],250,[],251,[]],
xU:[function(a,b,c){var z,y,x,w,v,u
z=J.U6(a)
y=z.gB(a)
@@ -19724,7 +20094,7 @@
u=z.t(a,y)
w=J.xH(w,1)
u=J.de(u,x.t(b,w))}else u=!1
-if(!u)break;++v}return v},"call$3","M9",6,0,null,247,[],248,[],249,[]],
+if(!u)break;++v}return v},"call$3","M9",6,0,null,249,[],250,[],251,[]],
jj:[function(a,b,c,d,e,f){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
z=J.Wx(c)
y=J.Wx(f)
@@ -19774,7 +20144,7 @@
s=new G.DA(a,y,t,n,0)}J.bi(s.Il,z.t(d,o));++o
break
default:}if(s!=null)p.push(s)
-return p},"call$6","Lr",12,0,null,240,[],241,[],242,[],243,[],244,[],245,[]],
+return p},"call$6","Lr",12,0,null,242,[],243,[],244,[],245,[],246,[],247,[]],
m1:[function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
z=b.gWA()
y=J.zj(b)
@@ -19813,11 +20183,11 @@
q.jr=J.WB(q.jr,m)
if(typeof m!=="number")return H.s(m)
s+=m
-t=!0}else t=!1}if(!t)a.push(u)},"call$2","c7",4,0,null,250,[],22,[]],
+t=!0}else t=!1}if(!t)a.push(u)},"call$2","c7",4,0,null,252,[],22,[]],
xl:[function(a,b){var z,y
z=H.VM([],[G.DA])
for(y=H.VM(new H.a7(b,b.length,0,null),[H.Kp(b,0)]);y.G();)G.m1(z,y.lo)
-return z},"call$2","bN",4,0,null,68,[],251,[]],
+return z},"call$2","bN",4,0,null,68,[],253,[]],
u2:[function(a,b){var z,y,x,w,v,u
if(b.length===1)return b
z=[]
@@ -19827,7 +20197,7 @@
if(u>>>0!==u||u>=x.length)return H.e(x,u)
if(!J.de(v,x[u]))z.push(w)
continue}v=J.RE(w)
-C.Nm.FV(z,G.jj(a,v.gvH(w),J.WB(v.gvH(w),w.gNg()),w.gIl(),0,J.q8(w.gRt().G4)))}return z},"call$2","SI",4,0,null,68,[],251,[]],
+C.Nm.FV(z,G.jj(a,v.gvH(w),J.WB(v.gvH(w),w.gNg()),w.gIl(),0,J.q8(w.gRt().G4)))}return z},"call$2","SI",4,0,null,68,[],253,[]],
DA:{
"^":"a;WA<,ok,Il<,jr,dM",
gvH:function(a){return this.jr},
@@ -19850,19 +20220,19 @@
z.$builtinTypeInfo=[null]
return new G.DA(a,z,d,b,c)}}}}],["observe.src.metadata","package:observe/src/metadata.dart",,K,{
"^":"",
-nd:{
+ndx:{
"^":"a;"},
vly:{
"^":"a;"}}],["observe.src.observable","package:observe/src/observable.dart",,F,{
"^":"",
Wi:[function(a,b,c,d){var z=J.RE(a)
if(z.gUV(a)&&!J.de(c,d))z.nq(a,H.VM(new T.qI(a,b,c,d),[null]))
-return d},"call$4","Ha",8,0,null,93,[],252,[],225,[],226,[]],
+return d},"call$4","T7",8,0,null,93,[],254,[],227,[],228,[]],
d3:{
"^":"a;",
$isd3:true},
lS:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z,y,x,w,v
z=this.b
y=z.wv.rN(a).gAx()
@@ -19872,14 +20242,14 @@
x.a=v
x=v}else x=w
x.push(H.VM(new T.qI(z,a,b,y),[null]))
-z.V2.u(0,a,y)}},"call$2",null,4,0,null,12,[],225,[],"call"],
+z.V2.u(0,a,y)}},"call$2",null,4,0,null,12,[],227,[],"call"],
$isEH:true}}],["observe.src.observable_box","package:observe/src/observable_box.dart",,A,{
"^":"",
xh:{
"^":"Pi;L1,AP,fn",
-gP:[function(a){return this.L1},null,null,1,0,function(){return H.IG(function(a){return{func:"Oy",ret:a}},this.$receiver,"xh")},"value",351],
+gP:[function(a){return this.L1},null,null,1,0,function(){return H.IG(function(a){return{func:"Oy",ret:a}},this.$receiver,"xh")},"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
-sP:[function(a,b){this.L1=F.Wi(this,C.ls,this.L1,b)},null,null,3,0,function(){return H.IG(function(a){return{func:"lU6",void:true,args:[a]}},this.$receiver,"xh")},226,[],"value",351],
+sP:[function(a,b){this.L1=F.Wi(this,C.ls,this.L1,b)},null,null,3,0,function(){return H.IG(function(a){return{func:"lU6",void:true,args:[a]}},this.$receiver,"xh")},228,[],"value",353],
bu:[function(a){return"#<"+H.d(new H.cu(H.dJ(this),null))+" value: "+H.d(this.L1)+">"},"call$0","gXo",0,0,null]}}],["observe.src.observable_list","package:observe/src/observable_list.dart",,Q,{
"^":"",
wn:{
@@ -19888,7 +20258,7 @@
if(z==null){z=P.bK(new Q.Bj(this),null,!0,null)
this.xg=z}z.toString
return H.VM(new P.Ik(z),[H.Kp(z,0)])},
-gB:[function(a){return this.h3.length},null,null,1,0,482,"length",351],
+gB:[function(a){return this.h3.length},null,null,1,0,491,"length",353],
sB:[function(a,b){var z,y,x,w,v,u
z=this.h3
y=z.length
@@ -19916,10 +20286,10 @@
u=[]
w=new P.Yp(u)
w.$builtinTypeInfo=[null]
-this.iH(new G.DA(this,w,u,y,x))}C.Nm.sB(z,b)},null,null,3,0,385,23,[],"length",351],
+this.iH(new G.DA(this,w,u,y,x))}C.Nm.sB(z,b)},null,null,3,0,392,23,[],"length",353],
t:[function(a,b){var z=this.h3
if(b>>>0!==b||b>=z.length)return H.e(z,b)
-return z[b]},"call$1","gIA",2,0,function(){return H.IG(function(a){return{func:"Zg",ret:a,args:[J.im]}},this.$receiver,"wn")},47,[],"[]",351],
+return z[b]},"call$1","gIA",2,0,function(){return H.IG(function(a){return{func:"Zg",ret:a,args:[J.im]}},this.$receiver,"wn")},47,[],"[]",353],
u:[function(a,b,c){var z,y,x,w
z=this.h3
if(b>>>0!==b||b>=z.length)return H.e(z,b)
@@ -19931,9 +20301,9 @@
w=new P.Yp(x)
w.$builtinTypeInfo=[null]
this.iH(new G.DA(this,w,x,b,1))}if(b>=z.length)return H.e(z,b)
-z[b]=c},"call$2","gj3",4,0,function(){return H.IG(function(a){return{func:"UR",void:true,args:[J.im,a]}},this.$receiver,"wn")},47,[],23,[],"[]=",351],
-gl0:[function(a){return P.lD.prototype.gl0.call(this,this)},null,null,1,0,366,"isEmpty",351],
-gor:[function(a){return P.lD.prototype.gor.call(this,this)},null,null,1,0,366,"isNotEmpty",351],
+z[b]=c},"call$2","gj3",4,0,function(){return H.IG(function(a){return{func:"UR",void:true,args:[J.im,a]}},this.$receiver,"wn")},47,[],23,[],"[]=",353],
+gl0:[function(a){return P.lD.prototype.gl0.call(this,this)},null,null,1,0,371,"isEmpty",353],
+gor:[function(a){return P.lD.prototype.gor.call(this,this)},null,null,1,0,371,"isNotEmpty",353],
h:[function(a,b){var z,y,x,w
z=this.h3
y=z.length
@@ -20018,7 +20388,7 @@
z=a===0
y=J.x(b)
this.ct(this,C.ai,z,y.n(b,0))
-this.ct(this,C.nZ,!z,!y.n(b,0))},"call$2","gdX",4,0,null,225,[],226,[]],
+this.ct(this,C.nZ,!z,!y.n(b,0))},"call$2","gdX",4,0,null,227,[],228,[]],
cv:[function(){var z,y,x
z=this.b3
if(z==null)return!1
@@ -20030,7 +20400,7 @@
if(x){x=H.VM(new P.Yp(y),[G.DA])
if(z.Gv>=4)H.vh(z.q7())
z.Iv(x)
-return!0}return!1},"call$0","gL6",0,0,366],
+return!0}return!1},"call$0","gL6",0,0,371],
$iswn:true,
static:{uX:function(a,b){var z=H.VM([],[b])
return H.VM(new Q.wn(null,null,z,null,null),[b])}}},
@@ -20052,18 +20422,18 @@
qC:{
"^":"Pi;Zp,AP,fn",
gvc:[function(a){var z=this.Zp
-return z.gvc(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"pD",ret:[P.cX,a]}},this.$receiver,"qC")},"keys",351],
+return z.gvc(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"pD",ret:[P.cX,a]}},this.$receiver,"qC")},"keys",353],
gUQ:[function(a){var z=this.Zp
-return z.gUQ(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"NE",ret:[P.cX,b]}},this.$receiver,"qC")},"values",351],
+return z.gUQ(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"NE",ret:[P.cX,b]}},this.$receiver,"qC")},"values",353],
gB:[function(a){var z=this.Zp
-return z.gB(z)},null,null,1,0,482,"length",351],
+return z.gB(z)},null,null,1,0,491,"length",353],
gl0:[function(a){var z=this.Zp
-return z.gB(z)===0},null,null,1,0,366,"isEmpty",351],
+return z.gB(z)===0},null,null,1,0,371,"isEmpty",353],
gor:[function(a){var z=this.Zp
-return z.gB(z)!==0},null,null,1,0,366,"isNotEmpty",351],
-di:[function(a){return this.Zp.di(a)},"call$1","gmc",2,0,557,23,[],"containsValue",351],
-x4:[function(a){return this.Zp.x4(a)},"call$1","gV9",2,0,557,42,[],"containsKey",351],
-t:[function(a,b){return this.Zp.t(0,b)},"call$1","gIA",2,0,function(){return H.IG(function(a,b){return{func:"JB",ret:b,args:[P.a]}},this.$receiver,"qC")},42,[],"[]",351],
+return z.gB(z)!==0},null,null,1,0,371,"isNotEmpty",353],
+di:[function(a){return this.Zp.di(a)},"call$1","gmc",2,0,569,23,[],"containsValue",353],
+x4:[function(a){return this.Zp.x4(a)},"call$1","gV9",2,0,569,42,[],"containsKey",353],
+t:[function(a,b){return this.Zp.t(0,b)},"call$1","gIA",2,0,function(){return H.IG(function(a,b){return{func:"JB",ret:b,args:[P.a]}},this.$receiver,"qC")},42,[],"[]",353],
u:[function(a,b,c){var z,y,x,w,v
z=this.Zp
y=z.gB(z)
@@ -20074,7 +20444,7 @@
w=v==null?w!=null:v!==w}else w=!1
if(w){z=z.gB(z)
if(y!==z){F.Wi(this,C.Wn,y,z)
-this.nq(this,H.VM(new V.HA(b,null,c,!0,!1),[null,null]))}else if(!J.de(x,c))this.nq(this,H.VM(new V.HA(b,x,c,!1,!1),[null,null]))}},"call$2","gj3",4,0,function(){return H.IG(function(a,b){return{func:"fK",void:true,args:[a,b]}},this.$receiver,"qC")},42,[],23,[],"[]=",351],
+this.nq(this,H.VM(new V.HA(b,null,c,!0,!1),[null,null]))}else if(!J.de(x,c))this.nq(this,H.VM(new V.HA(b,x,c,!1,!1),[null,null]))}},"call$2","gj3",4,0,function(){return H.IG(function(a,b){return{func:"fK",void:true,args:[a,b]}},this.$receiver,"qC")},42,[],23,[],"[]=",353],
FV:[function(a,b){J.kH(b,new V.zT(this))},"call$1","gDY",2,0,null,104,[]],
Rz:[function(a,b){var z,y,x,w,v
z=this.Zp
@@ -20109,7 +20479,7 @@
$isEH:true,
$signature:function(){return H.IG(function(a,b){return{func:"vPt",args:[a,b]}},this.a,"qC")}},
Lo:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z=this.a
z.nq(z,H.VM(new V.HA(a,b,null,!1,!0),[null,null]))},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true}}],["observe.src.path_observer","package:observe/src/path_observer.dart",,L,{
@@ -20133,7 +20503,7 @@
return x}}catch(v){x=H.Ru(v)
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$ismp){if(!L.M6(y,C.OV))throw v}else throw v}}}x=$.aT()
-if(x.Im(C.Ab))x.x9("can't get "+H.d(b)+" in "+H.d(a))
+if(x.Im(C.VZ))x.x9("can't get "+H.d(b)+" in "+H.d(a))
return},"call$2","MT",4,0,null,6,[],66,[]],
h6:[function(a,b,c){var z,y,x,w,v
if(a==null)return!1
@@ -20150,7 +20520,7 @@
return!0}}catch(v){x=H.Ru(v)
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$ismp){if(!L.M6(y,C.OV))throw v}else throw v}}}x=$.aT()
-if(x.Im(C.Ab))x.x9("can't set "+H.d(b)+" in "+H.d(a))
+if(x.Im(C.VZ))x.x9("can't set "+H.d(b)+" in "+H.d(a))
return!1},"call$3","nV",6,0,null,6,[],66,[],23,[]],
TH:[function(a,b){var z
for(;!J.de(a,$.aA());){z=a.gYK().nb
@@ -20165,12 +20535,12 @@
if(typeof x==="object"&&x!==null&&!!w.$isRY)return!0
if(y.x4(z))return!0
if(y.x4(C.OV))return!0
-a=L.pY(a)}return!1},"call$2","Jh",4,0,null,11,[],12,[]],
+a=L.pY(a)}return!1},"call$2","we",4,0,null,11,[],12,[]],
M6:[function(a,b){var z,y
for(;!J.de(a,$.aA());){z=a.gYK().nb.t(0,b)
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isRS&&z.guU())return!0
-a=L.pY(a)}return!1},"call$2","SU",4,0,null,11,[],12,[]],
+a=L.pY(a)}return!1},"call$2","Cp",4,0,null,11,[],12,[]],
pY:[function(a){var z,y
try{z=a.gAY()
return z}catch(y){H.Ru(y)
@@ -20192,7 +20562,7 @@
if(z!=null){y=z.iE
z=y==null?z!=null:y!==z}else z=!1
if(!z)this.ov()
-return C.Nm.grZ(this.kN)},null,null,1,0,108,"value",351],
+return C.Nm.grZ(this.kN)},null,null,1,0,108,"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
sP:[function(a,b){var z,y,x,w
z=this.BK
@@ -20209,7 +20579,7 @@
if(w>=z.length)return H.e(z,w)
if(L.h6(x,z[w],b)){z=this.kN
if(y>=z.length)return H.e(z,y)
-z[y]=b}},null,null,3,0,446,226,[],"value",351],
+z[y]=b}},null,null,3,0,456,228,[],"value",353],
k0:[function(a){O.Pi.prototype.k0.call(this,this)
this.ov()
this.XI()},"call$0","gqw",0,0,107],
@@ -20252,7 +20622,7 @@
t[s]=u}this.ij(a)
if(this.gUV(this)&&!J.de(v,u)){z=new T.qI(this,C.ls,v,u)
z.$builtinTypeInfo=[null]
-this.nq(this,z)}},"call$1$start","gWx",0,3,null,330,115,[]],
+this.nq(this,z)}},"call$1$start","gWx",0,3,null,332,115,[]],
Rl:[function(a,b){var z,y
if(b==null)b=this.BK.length
if(typeof b!=="number")return H.s(b)
@@ -20261,7 +20631,7 @@
if(z>=y.length)return H.e(y,z)
y=y[z]
if(y!=null)y.ed()
-this.Kh(z)}},function(){return this.Rl(0,null)},"XI",function(a){return this.Rl(a,null)},"ij","call$2",null,null,"gmi",0,4,null,330,77,115,[],116,[]],
+this.Kh(z)}},function(){return this.Rl(0,null)},"XI",function(a){return this.Rl(a,null)},"ij","call$2",null,null,"gmi",0,4,null,332,77,115,[],116,[]],
Kh:[function(a){var z,y,x,w,v
z=this.kN
if(a>=z.length)return H.e(z,a)
@@ -20285,7 +20655,7 @@
w.o7=P.VH(P.AY(),z)
w.Bd=z.Al(P.v3())
if(a>=v.length)return H.e(v,a)
-v[a]=w}}},"call$1","gCf",2,0,null,383,[]],
+v[a]=w}}},"call$1","gCf",2,0,null,390,[]],
d4:function(a,b,c){var z,y,x,w
if(this.YB)for(z=J.rr(b).split("."),z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]),y=this.BK;z.G();){x=z.lo
if(J.de(x,""))continue
@@ -20302,20 +20672,20 @@
z.d4(a,b,c)
return z}}},
qL:{
-"^":"Tp:223;",
-call$1:[function(a){return},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Px:{
-"^":"Tp:558;a,b,c",
+"^":"Tp:570;a,b,c",
call$1:[function(a){var z,y
for(z=J.GP(a),y=this.c;z.G();)if(z.gl().ck(y)){this.a.hd(this.b)
-return}},"call$1",null,2,0,null,251,[],"call"],
+return}},"call$1",null,2,0,null,253,[],"call"],
$isEH:true},
C4:{
-"^":"Tp:559;d,e,f",
+"^":"Tp:571;d,e,f",
call$1:[function(a){var z,y
for(z=J.GP(a),y=this.f;z.G();)if(L.Wa(z.gl(),y)){this.d.hd(this.e)
-return}},"call$1",null,2,0,null,251,[],"call"],
+return}},"call$1",null,2,0,null,253,[],"call"],
$isEH:true},
Md:{
"^":"Tp:108;",
@@ -20330,10 +20700,10 @@
return y}if(typeof a==="object"&&a!==null&&(a.constructor===Array||!!z.$iscX)){z=z.ez(a,R.np())
x=Q.uX(null,null)
x.FV(0,z)
-return x}return a},"call$1","np",2,0,223,23,[]],
+return x}return a},"call$1","np",2,0,225,23,[]],
km:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.u(0,R.Jk(a),R.Jk(b))},"call$2",null,4,0,null,417,[],272,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.u(0,R.Jk(a),R.Jk(b))},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true}}],["polymer","package:polymer/polymer.dart",,A,{
"^":"",
JX:[function(){var z,y
@@ -20360,18 +20730,18 @@
if(w)for(w=J.GP(y.gc9());w.G();){v=w.lo.gAx()
u=J.x(v)
if(typeof v==="object"&&v!==null&&!!u.$isyL){if(typeof y!=="object"||y===null||!x.$isRS||A.bc(a,y)){if(b==null)b=H.B7([],P.L5(null,null,null,null,null))
-b.u(0,y.gIf(),y)}break}}}return b},"call$2","Cd",4,0,null,253,[],254,[]],
+b.u(0,y.gIf(),y)}break}}}return b},"call$2","Cd",4,0,null,255,[],256,[]],
Oy:[function(a,b){var z,y
do{z=a.gYK().nb.t(0,b)
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isRS&&z.glT()&&A.bc(a,z)||typeof z==="object"&&z!==null&&!!y.$isRY)return z
a=a.gAY()}while(!J.de(a,$.Tf()))
-return},"call$2","il",4,0,null,253,[],66,[]],
+return},"call$2","il",4,0,null,255,[],66,[]],
bc:[function(a,b){var z,y
z=H.le(H.d(b.gIf().fN)+"=")
y=a.gYK().nb.t(0,new H.GD(z))
z=J.x(y)
-return typeof y==="object"&&y!==null&&!!z.$isRS&&y.ghB()},"call$2","i8",4,0,null,253,[],255,[]],
+return typeof y==="object"&&y!==null&&!!z.$isRS&&y.ghB()},"call$2","i8",4,0,null,255,[],257,[]],
YG:[function(a,b,c){var z,y,x
z=$.cM()
if(z==null||a==null)return
@@ -20380,7 +20750,7 @@
if(y==null)return
x=J.UQ(y,"ShadowCSS")
if(x==null)return
-x.V7("shimStyling",[a,b,c])},"call$3","OA",6,0,null,256,[],12,[],257,[]],
+x.V7("shimStyling",[a,b,c])},"call$3","OA",6,0,null,258,[],12,[],259,[]],
Hl:[function(a){var z,y,x,w,v,u,t
if(a==null)return""
w=J.RE(a)
@@ -20400,28 +20770,28 @@
if(typeof w==="object"&&w!==null&&!!t.$isNh){y=w
x=new H.XO(u,null)
$.vM().J4("failed to get stylesheet text href=\""+H.d(z)+"\" error: "+H.d(y)+", trace: "+H.d(x))
-return""}else throw u}},"call$1","Js",2,0,null,258,[]],
+return""}else throw u}},"call$1","NI",2,0,null,260,[]],
Ad:[function(a,b){var z
if(b==null)b=C.hG
$.Ej().u(0,a,b)
z=$.p2().Rz(0,a)
if(z!=null)J.Or(z)},"call$2","ZK",2,2,null,77,12,[],11,[]],
-zM:[function(a){A.Vx(a,new A.Mq())},"call$1","mo",2,0,null,259,[]],
+zM:[function(a){A.Vx(a,new A.Mq())},"call$1","mo",2,0,null,261,[]],
Vx:[function(a,b){var z
if(a==null)return
b.call$1(a)
-for(z=a.firstChild;z!=null;z=z.nextSibling)A.Vx(z,b)},"call$2","Dv",4,0,null,259,[],148,[]],
+for(z=a.firstChild;z!=null;z=z.nextSibling)A.Vx(z,b)},"call$2","Dv",4,0,null,261,[],151,[]],
lJ:[function(a,b,c,d){if(!J.co(b,"on-"))return d.call$3(a,b,c)
-return new A.L6(a,b)},"call$4","y4",8,0,null,260,[],12,[],259,[],261,[]],
+return new A.L6(a,b)},"call$4","y4",8,0,null,262,[],12,[],261,[],263,[]],
Hr:[function(a){var z
for(;z=J.RE(a),z.gKV(a)!=null;)a=z.gKV(a)
-return $.od().t(0,a)},"call$1","Fd",2,0,null,259,[]],
+return $.od().t(0,a)},"call$1","Fd",2,0,null,261,[]],
HR:[function(a,b,c){var z,y,x
z=H.vn(a)
y=A.Rk(H.jO(J.bB(z.Ax).LU),b)
if(y!=null){x=y.gMP()
x=x.ev(x,new A.uJ())
-C.Nm.sB(c,x.gB(x))}return z.CI(b,c).Ax},"call$3","xi",6,0,null,41,[],262,[],263,[]],
+C.Nm.sB(c,x.gB(x))}return z.CI(b,c).Ax},"call$3","xi",6,0,null,41,[],264,[],265,[]],
Rk:[function(a,b){var z,y
do{z=a.gYK().nb.t(0,b)
y=J.x(z)
@@ -20433,7 +20803,7 @@
z.textContent=a.textContent
y=a.getAttribute("element")
if(y!=null)z.setAttribute("element",y)
-b.appendChild(z)},"call$2","tO",4,0,null,264,[],265,[]],
+b.appendChild(z)},"call$2","tO",4,0,null,266,[],267,[]],
pX:[function(){var z=window
C.ol.hr(z)
C.ol.oB(z,W.aF(new A.hm()))},"call$0","ji",0,0,null],
@@ -20472,7 +20842,7 @@
t=y
if(t==null)H.vh(new P.AT("Error must not be null"))
if(u.Gv!==0)H.vh(new P.lj("Future already completed"))
-u.CG(t,x)}}},"call$0","vH",0,0,null],
+u.CG(t,x)}}},"call$0","xm",0,0,null],
GA:[function(a,b,c,d){var z,y,x,w,v,u
if(c==null)c=P.Ls(null,null,null,W.QF)
if(d==null){d=[]
@@ -20490,7 +20860,7 @@
x=!0}else{z="warning: more than one Dart script tag in "+H.d(b)+". Dartium currently only allows a single Dart script tag per document."
v=$.oK
if(v==null)H.qw(z)
-else v.call$1(z)}}return d},"call$4","fE",4,4,null,77,77,266,[],267,[],268,[],269,[]],
+else v.call$1(z)}}return d},"call$4","fE",4,4,null,77,77,268,[],269,[],270,[],271,[]],
pw:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i
z=$.RQ()
z.toString
@@ -20548,7 +20918,7 @@
p=k.gYj()
$.Ej().u(0,q,p)
i=$.p2().Rz(0,q)
-if(i!=null)J.Or(i)}}}},"call$1","Xz",2,0,null,270,[]],
+if(i!=null)J.Or(i)}}}},"call$1","Xz",2,0,null,272,[]],
ZB:[function(a,b){var z,y,x
for(z=J.GP(b.gc9());y=!1,z.G();)if(z.lo.gAx()===C.za){y=!0
break}if(!y)return
@@ -20562,10 +20932,10 @@
z=$.oK
if(z==null)H.qw(x)
else z.call$1(x)
-return}a.CI(b.gIf(),C.xD)},"call$2","K0n",4,0,null,93,[],215,[]],
+return}a.CI(b.gIf(),C.xD)},"call$2","K0n",4,0,null,93,[],217,[]],
Zj:{
-"^":"Tp:223;",
-call$1:[function(a){A.pX()},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){A.pX()},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
XP:{
"^":"qE;zx,kw,aa,RT,Q7=,NF=,hf=,xX=,cI,lD,Gd=,Ei",
@@ -20613,7 +20983,7 @@
if(a.hasAttribute("noscript")===!0)A.Ad(b,null)
return!0},"call$1","gLD",2,0,null,12,[]],
PM:[function(a,b){if(b!=null&&J.UU(b,"-")>=0)if(!$.cd().x4(b)){J.bi($.xY().to(b,new A.q6()),a)
-return!0}return!1},"call$1","gmL",2,0,null,257,[]],
+return!0}return!1},"call$1","gmL",2,0,null,259,[]],
Ba:[function(a,b){var z,y,x,w
for(z=a,y=null;z!=null;){x=J.RE(z)
y=x.gQg(z).MW.getAttribute("extends")
@@ -20641,14 +21011,14 @@
if(typeof console!="undefined")console.warn(t)
continue}y=a.Q7
if(y==null){y=H.B7([],P.L5(null,null,null,null,null))
-a.Q7=y}y.u(0,v,u)}}},"call$2","gvQ",4,0,null,253,[],560,[]],
+a.Q7=y}y.u(0,v,u)}}},"call$2","gvQ",4,0,null,255,[],572,[]],
Vk:[function(a){var z,y
z=P.L5(null,null,null,J.O,P.a)
a.xX=z
y=a.aa
if(y!=null)z.FV(0,J.Ng(y))
new W.i7(a).aN(0,new A.CK(a))},"call$0","gYi",0,0,null],
-W3:[function(a,b){new W.i7(a).aN(0,new A.LJ(b))},"call$1","gSX",2,0,null,561,[]],
+W3:[function(a,b){new W.i7(a).aN(0,new A.LJ(b))},"call$1","gSX",2,0,null,573,[]],
Mi:[function(a){var z=this.Hs(a,"[rel=stylesheet]")
a.cI=z
for(z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]);z.G();)J.QC(z.lo)},"call$0","gax",0,0,null],
@@ -20674,7 +21044,7 @@
y=z.br(z)
x=this.gZf(a)
if(x!=null)C.Nm.FV(y,J.pe(x,b))
-return y},function(a,b){return this.oP(a,b,null)},"Hs","call$2",null,"gKQ",2,2,null,77,452,[],562,[]],
+return y},function(a,b){return this.oP(a,b,null)},"Hs","call$2",null,"gKQ",2,2,null,77,462,[],574,[]],
kO:[function(a,b){var z,y,x,w,v,u
z=P.p9("")
y=new A.Oc("[polymer-scope="+b+"]")
@@ -20685,14 +21055,14 @@
z.vM=u+"\n\n"}for(x=a.lD,x.toString,y=H.VM(new H.U5(x,y),[null]),y=H.VM(new H.SO(J.GP(y.l6),y.T6),[H.Kp(y,0)]),x=y.OI;y.G();){w=x.gl().ghg()
w=z.vM+w
z.vM=w
-z.vM=w+"\n\n"}return z.vM},"call$1","gvf",2,0,null,563,[]],
+z.vM=w+"\n\n"}return z.vM},"call$1","gvf",2,0,null,575,[]],
J3:[function(a,b,c){var z
if(b==="")return
z=document.createElement("style",null)
z.textContent=b
z.toString
z.setAttribute("element",a.RT+"-"+c)
-return z},"call$2","gNG",4,0,null,564,[],563,[]],
+return z},"call$2","gNG",4,0,null,576,[],575,[]],
q1:[function(a,b){var z,y,x,w
if(J.de(b,$.Tf()))return
this.q1(a,b.gAY())
@@ -20703,10 +21073,10 @@
x=J.rY(w)
if(x.Tc(w,"Changed")&&!x.n(w,"attributeChanged")){if(a.hf==null)a.hf=P.L5(null,null,null,null,null)
w=x.Nj(w,0,J.xH(x.gB(w),7))
-a.hf.u(0,new H.GD(H.le(w)),y.gIf())}}},"call$1","gCB",2,0,null,253,[]],
+a.hf.u(0,new H.GD(H.le(w)),y.gIf())}}},"call$1","gHv",2,0,null,255,[]],
qC:[function(a,b){var z=P.L5(null,null,null,J.O,null)
b.aN(0,new A.MX(z))
-return z},"call$1","gir",2,0,null,565,[]],
+return z},"call$1","gir",2,0,null,577,[]],
du:function(a){a.RT=a.getAttribute("name")
this.yx(a)},
$isXP:true,
@@ -20719,11 +21089,11 @@
call$0:[function(){return[]},"call$0",null,0,0,null,"call"],
$isEH:true},
CK:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){if(C.kr.x4(a)!==!0&&!J.co(a,"on-"))this.a.xX.u(0,a,b)},"call$2",null,4,0,null,12,[],23,[],"call"],
$isEH:true},
LJ:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z,y,x
z=J.rY(a)
if(z.nC(a,"on-")){y=J.U6(b).u8(b,"{{")
@@ -20731,15 +21101,15 @@
if(y>=0&&x>=0)this.a.u(0,z.yn(a,3),C.xB.bS(C.xB.Nj(b,y+2,x)))}},"call$2",null,4,0,null,12,[],23,[],"call"],
$isEH:true},
ZG:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return J.Vs(a).MW.hasAttribute("polymer-scope")!==!0},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
Oc:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return J.RF(a,this.a)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
MX:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){this.a.u(0,J.Mz(J.GL(a)),b)},"call$2",null,4,0,null,12,[],23,[],"call"],
$isEH:true},
w9:{
@@ -20749,14 +21119,14 @@
return z},"call$0",null,0,0,null,"call"],
$isEH:true},
r3y:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,566,[],567,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,578,[],579,[],"call"],
$isEH:true},
yL:{
-"^":"nd;",
+"^":"ndx;",
$isyL:true},
zs:{
-"^":["a;KM:X0=-349",function(){return[C.nJ]}],
+"^":["a;KM:X0=-351",function(){return[C.nJ]}],
gpQ:function(a){return!1},
Pa:[function(a){if(W.Pv(this.gM0(a).defaultView)!=null||$.Bh>0)this.Ec(a)},"call$0","gu1",0,0,null],
Ec:[function(a){var z,y
@@ -20774,7 +21144,7 @@
this.BT(a,!0)},"call$0","gQd",0,0,null],
xo:[function(a){this.x3(a)},"call$0","gbt",0,0,null],
z2:[function(a,b){if(b!=null){this.z2(a,J.lB(b))
-this.d0(a,b)}},"call$1","gET",2,0,null,568,[]],
+this.d0(a,b)}},"call$1","gET",2,0,null,580,[]],
d0:[function(a,b){var z,y,x,w,v
z=J.RE(b)
y=z.Ja(b,"template")
@@ -20785,7 +21155,7 @@
if(typeof x!=="object"||x===null||!w.$isI0)return
v=z.gQg(b).MW.getAttribute("name")
if(v==null)return
-a.B7.u(0,v,x)},"call$1","gEB",2,0,null,569,[]],
+a.B7.u(0,v,x)},"call$1","gEB",2,0,null,581,[]],
Se:[function(a,b){var z,y
if(b==null)return
z=J.x(b)
@@ -20793,7 +21163,7 @@
y=z.ZK(a,a.SO)
this.jx(a,y)
this.lj(a,a)
-return y},"call$1","gAt",2,0,null,256,[]],
+return y},"call$1","gAt",2,0,null,258,[]],
Tp:[function(a,b){var z,y
if(b==null)return
this.gKE(a)
@@ -20805,12 +21175,12 @@
y=typeof b==="object"&&b!==null&&!!y.$ishs?b:M.Ky(b)
z.appendChild(y.ZK(a,a.SO))
this.lj(a,z)
-return z},"call$1","gPA",2,0,null,256,[]],
+return z},"call$1","gQb",2,0,null,258,[]],
lj:[function(a,b){var z,y,x,w
for(z=J.pe(b,"[id]"),z=z.gA(z),y=a.X0,x=J.w1(y);z.G();){w=z.lo
-x.u(y,J.F8(w),w)}},"call$1","gb7",2,0,null,570,[]],
+x.u(y,J.F8(w),w)}},"call$1","gb7",2,0,null,582,[]],
aC:[function(a,b,c,d){var z=J.x(b)
-if(!z.n(b,"class")&&!z.n(b,"style"))this.D3(a,b,d)},"call$3","gxR",6,0,null,12,[],225,[],226,[]],
+if(!z.n(b,"class")&&!z.n(b,"style"))this.D3(a,b,d)},"call$3","gxR",6,0,null,12,[],227,[],228,[]],
Z2:[function(a){J.Ng(a.dZ).aN(0,new A.WC(a))},"call$0","gGN",0,0,null],
fk:[function(a){if(J.ak(a.dZ)==null)return
this.gQg(a).aN(0,this.ghW(a))},"call$0","goQ",0,0,null],
@@ -20821,7 +21191,7 @@
y=H.vn(a)
x=y.rN(z.gIf()).gAx()
w=Z.Zh(c,x,A.al(x,z))
-if(w==null?x!=null:w!==x)y.PU(z.gIf(),w)},"call$2","ghW",4,0,571,12,[],23,[]],
+if(w==null?x!=null:w!==x)y.PU(z.gIf(),w)},"call$2","ghW",4,0,583,12,[],23,[]],
B2:[function(a,b){var z=J.ak(a.dZ)
if(z==null)return
return z.t(0,b)},"call$1","gHf",2,0,null,12,[]],
@@ -20852,7 +21222,7 @@
t.bw(a,y,c,d)
this.Id(a,z.gIf())
J.kW(J.QE(M.Ky(a)),b,t)
-return t}},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]],
+return t}},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]],
gCd:function(a){return J.QE(M.Ky(a))},
Ih:[function(a,b){return J.MV(M.Ky(a),b)},"call$1","gC8",2,0,null,12,[]],
x3:[function(a){var z,y
@@ -20880,7 +21250,7 @@
z=a.oq
if(z!=null){z.TP(0)
a.oq=null}if(b===!0)return
-A.Vx(this.gKE(a),new A.TV())},function(a){return this.BT(a,null)},"oW","call$1$preventCascade",null,"gF7",0,3,null,77,572,[]],
+A.Vx(this.gKE(a),new A.TV())},function(a){return this.BT(a,null)},"oW","call$1$preventCascade",null,"gF7",0,3,null,77,584,[]],
Xl:[function(a){var z,y,x,w,v,u
z=J.xR(a.dZ)
y=J.YP(a.dZ)
@@ -20894,7 +21264,7 @@
for(w=J.GP(b);w.G();){v=w.gl()
u=J.x(v)
if(typeof v!=="object"||v===null||!u.$isqI)continue
-J.iG(x.to(v.oc,new A.Oa(v)),v.zZ)}x.aN(0,new A.n1(a,b,z,y))},"call$1","gnu",2,0,573,574,[]],
+J.iG(x.to(v.oc,new A.Oa(v)),v.zZ)}x.aN(0,new A.n1(a,b,z,y))},"call$1","gnu",2,0,585,586,[]],
rJ:[function(a,b,c,d){var z,y,x,w,v
z=J.xR(a.dZ)
if(z==null)return
@@ -20914,7 +21284,7 @@
x=H.d(J.GL(b))+"__array"
v=a.Sa
if(v==null){v=P.L5(null,null,null,J.O,P.MO)
-a.Sa=v}v.u(0,x,w)}},"call$3","gDW",6,0,null,12,[],23,[],243,[]],
+a.Sa=v}v.u(0,x,w)}},"call$3","gDW",6,0,null,12,[],23,[],245,[]],
l5:[function(a,b){var z=a.Sa.Rz(0,b)
if(z==null)return!1
z.ed()
@@ -20938,7 +21308,7 @@
t=new W.Ov(0,w.uv,v,W.aF(d),u)
t.$builtinTypeInfo=[H.Kp(w,0)]
w=t.u7
-if(w!=null&&t.VP<=0)J.cZ(t.uv,v,w,u)}},"call$3","gPm",6,0,null,259,[],575,[],292,[]],
+if(w!=null&&t.VP<=0)J.cZ(t.uv,v,w,u)}},"call$3","gPm",6,0,null,261,[],587,[],294,[]],
iw:[function(a,b){var z,y,x,w,v,u,t
z=J.RE(b)
if(z.gXt(b)!==!0)return
@@ -20950,7 +21320,7 @@
u=J.UQ($.QX(),v)
t=w.t(0,u!=null?u:v)
if(t!=null){if(x)y.J4("["+this.gqn(a)+"] found host handler name ["+t+"]")
-this.ea(a,a,t,[b,typeof b==="object"&&b!==null&&!!z.$isHe?z.gey(b):null,a])}if(x)y.J4("<<< ["+this.gqn(a)+"]: hostEventListener("+H.d(z.gt5(b))+")")},"call$1","gD4",2,0,576,400,[]],
+this.ea(a,a,t,[b,typeof b==="object"&&b!==null&&!!z.$isHe?z.gey(b):null,a])}if(x)y.J4("<<< ["+this.gqn(a)+"]: hostEventListener("+H.d(z.gt5(b))+")")},"call$1","gD4",2,0,588,410,[]],
ea:[function(a,b,c,d){var z,y,x
z=$.SS()
y=z.Im(C.R5)
@@ -20959,7 +21329,7 @@
if(typeof c==="object"&&c!==null&&!!x.$isEH)H.Ek(c,d,P.Te(null))
else if(typeof c==="string")A.HR(b,new H.GD(H.le(c)),d)
else z.j2("invalid callback")
-if(y)z.To("<<< ["+this.gqn(a)+"]: dispatch "+H.d(c))},"call$3","gtW",6,0,null,6,[],577,[],263,[]],
+if(y)z.To("<<< ["+this.gqn(a)+"]: dispatch "+H.d(c))},"call$3","gtW",6,0,null,6,[],589,[],265,[]],
$iszs:true,
$ishs:true,
$isd3:true,
@@ -20968,7 +21338,7 @@
$isD0:true,
$isKV:true},
WC:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z=J.Vs(this.a)
if(z.x4(a)!==!0)z.u(0,a,new A.Xi(b).call$0())
z.t(0,a)},"call$2",null,4,0,null,12,[],23,[],"call"],
@@ -20978,21 +21348,21 @@
call$0:[function(){return this.b},"call$0",null,0,0,null,"call"],
$isEH:true},
TV:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.RE(a)
-if(typeof a==="object"&&a!==null&&!!z.$iszs)z.oW(a)},"call$1",null,2,0,null,287,[],"call"],
+if(typeof a==="object"&&a!==null&&!!z.$iszs)z.oW(a)},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
Mq:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return J.AA(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a))},"call$1",null,2,0,null,259,[],"call"],
+return J.AA(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a))},"call$1",null,2,0,null,261,[],"call"],
$isEH:true},
Oa:{
"^":"Tp:108;a",
call$0:[function(){return new A.bS(this.a.jL,null)},"call$0",null,0,0,null,"call"],
$isEH:true},
n1:{
-"^":"Tp:341;b,c,d,e",
+"^":"Tp:343;b,c,d,e",
call$2:[function(a,b){var z,y,x
z=this.e
if(z!=null&&z.x4(a))J.Jr(this.b,a)
@@ -21002,14 +21372,14 @@
if(y!=null){z=this.b
x=J.RE(b)
J.Ut(z,a,x.gzZ(b),x.gjL(b))
-A.HR(z,y,[x.gjL(b),x.gzZ(b),this.c])}},"call$2",null,4,0,null,12,[],578,[],"call"],
+A.HR(z,y,[x.gjL(b),x.gzZ(b),this.c])}},"call$2",null,4,0,null,12,[],590,[],"call"],
$isEH:true},
xf:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){A.HR(this.a,this.c,[this.b])},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){A.HR(this.a,this.c,[this.b])},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
L6:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z,y,x
z=$.SS()
if(z.Im(C.R5))z.J4("event: ["+H.d(b)+"]."+H.d(this.b)+" => ["+H.d(a)+"]."+this.a+"())")
@@ -21018,10 +21388,10 @@
if(x!=null)y=x
z=J.f5(b).t(0,y)
H.VM(new W.Ov(0,z.uv,z.Ph,W.aF(new A.Rs(this.a,a,b)),z.Sg),[H.Kp(z,0)]).Zz()
-return H.VM(new A.xh(null,null,null),[null])},"call$2",null,4,0,null,280,[],259,[],"call"],
+return H.VM(new A.xh(null,null,null),[null])},"call$2",null,4,0,null,282,[],261,[],"call"],
$isEH:true},
Rs:{
-"^":"Tp:223;c,d,e",
+"^":"Tp:225;c,d,e",
call$1:[function(a){var z,y,x,w,v,u
z=this.e
y=A.Hr(z)
@@ -21033,25 +21403,25 @@
u=L.ao(v,C.xB.yn(w,1),null)
w=u.gP(u)}else v=y
u=J.RE(a)
-x.ea(y,v,w,[a,typeof a==="object"&&a!==null&&!!u.$isHe?u.gey(a):null,z])},"call$1",null,2,0,null,400,[],"call"],
+x.ea(y,v,w,[a,typeof a==="object"&&a!==null&&!!u.$isHe?u.gey(a):null,z])},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
uJ:{
-"^":"Tp:223;",
-call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,579,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,591,[],"call"],
$isEH:true},
hm:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z,y,x
z=W.vD(document.querySelectorAll(".polymer-veiled"),null)
for(y=z.gA(z);y.G();){x=J.pP(y.lo)
x.h(0,"polymer-unveil")
x.Rz(x,"polymer-veiled")}if(z.gor(z)){y=C.hi.aM(window)
-y.gtH(y).ml(new A.Ji(z))}},"call$1",null,2,0,null,235,[],"call"],
+y.gtH(y).ml(new A.Ji(z))}},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Ji:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z
-for(z=this.a,z=z.gA(z);z.G();)J.pP(z.lo).Rz(0,"polymer-unveil")},"call$1",null,2,0,null,235,[],"call"],
+for(z=this.a,z=z.gA(z);z.G();)J.pP(z.lo).Rz(0,"polymer-unveil")},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Bf:{
"^":"TR;I6,iU,Jq,dY,qP,ZY,xS,PB,eS,ay",
@@ -21059,17 +21429,17 @@
this.Jq.ed()
X.TR.prototype.cO.call(this,this)},"call$0","gJK",0,0,null],
EC:[function(a){this.dY=a
-this.I6.PU(this.iU,a)},"call$1","gH0",2,0,null,226,[]],
+this.I6.PU(this.iU,a)},"call$1","gH0",2,0,null,228,[]],
ho:[function(a){var z,y,x,w,v
for(z=J.GP(a),y=this.iU;z.G();){x=z.gl()
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$isqI&&J.de(x.oc,y)){v=this.I6.rN(y).gAx()
z=this.dY
if(z==null?v!=null:z!==v)J.ta(this.xS,v)
-return}}},"call$1","giz",2,0,580,251,[]],
+return}}},"call$1","giz",2,0,592,253,[]],
bw:function(a,b,c,d){this.Jq=J.xq(a).yI(this.giz())}},
ir:{
-"^":["GN;AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["GN;AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
G6:function(a){this.Pa(a)},
static:{oa:function(a){var z,y,x,w
z=$.Nd()
@@ -21084,7 +21454,7 @@
C.Iv.G6(a)
return a}}},
jpR:{
-"^":["qE+zs;KM:X0=-349",function(){return[C.nJ]}],
+"^":["qE+zs;KM:X0=-351",function(){return[C.nJ]}],
$iszs:true,
$ishs:true,
$isd3:true,
@@ -21112,25 +21482,25 @@
"^":"a;ns",
$isV3:true},
Bl:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=$.mC().MM
if(z.Gv!==0)H.vh(new P.lj("Future already completed"))
z.OH(null)
-return},"call$1",null,2,0,null,235,[],"call"],
+return},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Fn:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isRS},"call$1",null,2,0,null,581,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isRS},"call$1",null,2,0,null,593,[],"call"],
$isEH:true},
e3:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isMs},"call$1",null,2,0,null,581,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isMs},"call$1",null,2,0,null,593,[],"call"],
$isEH:true},
pM:{
-"^":"Tp:223;",
-call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,579,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,591,[],"call"],
$isEH:true},
jh:{
"^":"a;"}}],["polymer.deserialize","package:polymer/deserialize.dart",,Z,{
@@ -21140,7 +21510,7 @@
if(z!=null)return z.call$2(a,b)
try{y=C.xr.kV(J.JA(a,"'","\""))
return y}catch(x){H.Ru(x)
-return a}},"call$3","nn",6,0,null,23,[],271,[],11,[]],
+return a}},"call$3","jo",6,0,null,23,[],273,[],11,[]],
W6:{
"^":"Tp:108;",
call$0:[function(){var z=P.L5(null,null,null,null,null)
@@ -21153,59 +21523,59 @@
return z},"call$0",null,0,0,null,"call"],
$isEH:true},
Lf:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],235,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],237,[],"call"],
$isEH:true},
fT:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],235,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],237,[],"call"],
$isEH:true},
pp:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){var z,y
try{z=P.Gl(a)
return z}catch(y){H.Ru(y)
-return b}},"call$2",null,4,0,null,21,[],582,[],"call"],
+return b}},"call$2",null,4,0,null,21,[],594,[],"call"],
$isEH:true},
nl:{
-"^":"Tp:341;",
-call$2:[function(a,b){return!J.de(a,"false")},"call$2",null,4,0,null,21,[],235,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return!J.de(a,"false")},"call$2",null,4,0,null,21,[],237,[],"call"],
$isEH:true},
ik:{
-"^":"Tp:341;",
-call$2:[function(a,b){return H.BU(a,null,new Z.mf(b))},"call$2",null,4,0,null,21,[],582,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return H.BU(a,null,new Z.mf(b))},"call$2",null,4,0,null,21,[],594,[],"call"],
$isEH:true},
mf:{
-"^":"Tp:223;a",
-call$1:[function(a){return this.a},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return this.a},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
LfS:{
-"^":"Tp:341;",
-call$2:[function(a,b){return H.IH(a,new Z.HK(b))},"call$2",null,4,0,null,21,[],582,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return H.IH(a,new Z.HK(b))},"call$2",null,4,0,null,21,[],594,[],"call"],
$isEH:true},
HK:{
-"^":"Tp:223;b",
-call$1:[function(a){return this.b},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;b",
+call$1:[function(a){return this.b},"call$1",null,2,0,null,237,[],"call"],
$isEH:true}}],["polymer_expressions","package:polymer_expressions/polymer_expressions.dart",,T,{
"^":"",
ul:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isZ0)z=J.vo(z.gvc(a),new T.o8(a)).zV(0," ")
else z=typeof a==="object"&&a!==null&&(a.constructor===Array||!!z.$iscX)?z.zV(a," "):a
-return z},"call$1","qP",2,0,187,272,[]],
+return z},"call$1","qP",2,0,190,274,[]],
PX:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isZ0)z=J.C0(z.gvc(a),new T.ex(a)).zV(0,";")
else z=typeof a==="object"&&a!==null&&(a.constructor===Array||!!z.$iscX)?z.zV(a,";"):a
-return z},"call$1","Fx",2,0,187,272,[]],
+return z},"call$1","Fx",2,0,190,274,[]],
o8:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.de(this.a.t(0,a),!0)},"call$1",null,2,0,null,417,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.de(this.a.t(0,a),!0)},"call$1",null,2,0,null,427,[],"call"],
$isEH:true},
ex:{
-"^":"Tp:223;a",
-call$1:[function(a){return H.d(a)+": "+H.d(this.a.t(0,a))},"call$1",null,2,0,null,417,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return H.d(a)+": "+H.d(this.a.t(0,a))},"call$1",null,2,0,null,427,[],"call"],
$isEH:true},
e9:{
-"^":"T4;",
+"^":"ve;",
cl:[function(a,b,c){var z,y,x
if(a==null)return
z=new Y.hc(H.VM([],[Y.Pn]),P.p9(""),new P.WU(a,0,0,null),null)
@@ -21220,24 +21590,24 @@
if(z.n(b,"bind")||z.n(b,"repeat")){z=J.x(x)
z=typeof x==="object"&&x!==null&&!!z.$isEZ}else z=!1}else z=!1
if(z)return
-return new T.Xy(this,b,x)},"call$3","gca",6,0,583,260,[],12,[],259,[]],
-CE:[function(a){return new T.G0(this)},"call$1","gb4",2,0,null,256,[]]},
+return new T.Xy(this,b,x)},"call$3","gca",6,0,595,262,[],12,[],261,[]],
+CE:[function(a){return new T.G0(this)},"call$1","gb4",2,0,null,258,[]]},
Xy:{
-"^":"Tp:341;a,b,c",
+"^":"Tp:343;a,b,c",
call$2:[function(a,b){var z=J.x(a)
if(typeof a!=="object"||a===null||!z.$isz6){z=this.a.nF
a=new K.z6(null,a,V.WF(z==null?H.B7([],P.L5(null,null,null,null,null)):z,null,null),null)}z=J.x(b)
z=typeof b==="object"&&b!==null&&!!z.$iscv
if(z&&J.de(this.b,"class"))return T.FL(this.c,a,T.qP())
if(z&&J.de(this.b,"style"))return T.FL(this.c,a,T.Fx())
-return T.FL(this.c,a,null)},"call$2",null,4,0,null,280,[],259,[],"call"],
+return T.FL(this.c,a,null)},"call$2",null,4,0,null,282,[],261,[],"call"],
$isEH:true},
G0:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isz6)z=a
else{z=this.a.nF
-z=new K.z6(null,a,V.WF(z==null?H.B7([],P.L5(null,null,null,null,null)):z,null,null),null)}return z},"call$1",null,2,0,null,280,[],"call"],
+z=new K.z6(null,a,V.WF(z==null?H.B7([],P.L5(null,null,null,null,null)):z,null,null),null)}return z},"call$1",null,2,0,null,282,[],"call"],
$isEH:true},
mY:{
"^":"Pi;a9,Cu,uI,Y7,AP,fn",
@@ -21247,14 +21617,14 @@
y=J.x(a)
if(typeof a==="object"&&a!==null&&!!y.$isfk){y=J.C0(a.bm,new T.mB(this,a)).tt(0,!1)
this.Y7=y}else{y=this.uI==null?a:this.u0(a)
-this.Y7=y}F.Wi(this,C.ls,z,y)},"call$1","gUG",2,0,223,272,[]],
-gP:[function(a){return this.Y7},null,null,1,0,108,"value",351],
+this.Y7=y}F.Wi(this,C.ls,z,y)},"call$1","gUG",2,0,225,274,[]],
+gP:[function(a){return this.Y7},null,null,1,0,108,"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
sP:[function(a,b){var z,y,x,w
try{K.jX(this.Cu,b,this.a9)}catch(y){x=H.Ru(y)
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$isB0){z=x
-$.eH().j2("Error evaluating expression '"+H.d(this.Cu)+"': "+J.yj(z))}else throw y}},null,null,3,0,223,272,[],"value",351],
+$.eH().j2("Error evaluating expression '"+H.d(this.Cu)+"': "+J.yj(z))}else throw y}},null,null,3,0,225,274,[],"value",353],
yB:function(a,b,c){var z,y,x,w,v
y=this.Cu
y.gju().yI(this.gUG()).fm(0,new T.GX(this))
@@ -21268,14 +21638,14 @@
z.yB(a,b,c)
return z}}},
GX:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){$.eH().j2("Error evaluating expression '"+H.d(this.a.Cu)+"': "+H.d(J.yj(a)))},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
mB:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){var z=P.L5(null,null,null,null,null)
z.u(0,this.b.kF,a)
-return new K.z6(this.a.a9,null,V.WF(z,null,null),null)},"call$1",null,2,0,null,383,[],"call"],
+return new K.z6(this.a.a9,null,V.WF(z,null,null),null)},"call$1",null,2,0,null,390,[],"call"],
$isEH:true}}],["polymer_expressions.async","package:polymer_expressions/async.dart",,B,{
"^":"",
XF:{
@@ -21288,13 +21658,13 @@
bX:{
"^":"Tp;a,b",
call$1:[function(a){var z=this.b
-z.L1=F.Wi(z,C.ls,z.L1,a)},"call$1",null,2,0,null,383,[],"call"],
+z.L1=F.Wi(z,C.ls,z.L1,a)},"call$1",null,2,0,null,390,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"CJ",args:[a]}},this.b,"XF")}}}],["polymer_expressions.eval","package:polymer_expressions/eval.dart",,K,{
"^":"",
OH:[function(a,b){var z=J.UK(a,new K.G1(b,P.NZ(null,null)))
J.UK(z,new K.Ed(b))
-return z.gLv()},"call$2","ly",4,0,null,273,[],265,[]],
+return z.gLv()},"call$2","ly",4,0,null,275,[],267,[]],
jX:[function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p
z={}
z.a=a
@@ -21324,75 +21694,75 @@
throw H.b(K.kG("filter must implement Transformer: "+H.d(r)))}p=K.OH(t,c)
if(p==null)throw H.b(K.kG("Can't assign to null: "+H.d(t)))
if(s)J.kW(p,u,b)
-else H.vn(p).PU(new H.GD(H.le(u)),b)},"call$3","wA",6,0,null,273,[],23,[],265,[]],
+else H.vn(p).PU(new H.GD(H.le(u)),b)},"call$3","wA",6,0,null,275,[],23,[],267,[]],
ci:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isqh)return B.z4(a,null)
-return a},"call$1","Af",2,0,null,272,[]],
+return a},"call$1","Af",2,0,null,274,[]],
lP:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.WB(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.WB(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Uf:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.xH(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.xH(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Ra:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.p0(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.p0(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
wJY:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.FW(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.FW(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
zOQ:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.de(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.de(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
W6o:{
-"^":"Tp:341;",
-call$2:[function(a,b){return!J.de(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return!J.de(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
MdQ:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.z8(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.z8(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
YJG:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.J5(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.J5(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
DOe:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.u6(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.u6(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
lPa:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.Hb(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.Hb(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Ufa:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a===!0||b===!0},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a===!0||b===!0},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Raa:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a===!0&&b===!0},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a===!0&&b===!0},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
w0:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){var z=H.uK(P.a)
z=H.KT(z,[z]).BD(b)
if(z)return b.call$1(a)
throw H.b(K.kG("Filters must be a one-argument function."))},"call$2",null,4,0,null,123,[],110,[],"call"],
$isEH:true},
w4:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
w5:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return J.Z7(a)},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
w7:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a!==!0},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
c4:{
@@ -21425,7 +21795,7 @@
if(z.Zp.x4(a))return z
else{z=H.le(a)
if(Z.y1(H.jO(J.bB(this.gCH().Ax).LU),new H.GD(z))!=null)return this.k8}}z=this.eT
-if(z!=null)return z.tI(a)},"call$1","gVy",2,0,null,12,[]],
+if(z!=null)return z.tI(a)},"call$1","gXe",2,0,null,12,[]],
tg:[function(a,b){var z
if(this.bq.Zp.x4(b))return!0
else{z=H.le(b)
@@ -21433,16 +21803,16 @@
if(z!=null)return z.tg(0,b)
return!1},"call$1","gdj",2,0,null,12,[]],
$isz6:true},
-Mb:{
+Ay0:{
"^":"a;bO?,Lv<",
gju:function(){var z=this.k6
return H.VM(new P.Ik(z),[H.Kp(z,0)])},
gLl:function(){return this.Lv},
-Qh:[function(a){},"call$1","gVj",2,0,null,265,[]],
+Qh:[function(a){},"call$1","gVj",2,0,null,267,[]],
DX:[function(a){var z
this.yc(0,a)
z=this.bO
-if(z!=null)z.DX(a)},"call$1","gFO",2,0,null,265,[]],
+if(z!=null)z.DX(a)},"call$1","gFO",2,0,null,267,[]],
yc:[function(a,b){var z,y,x
z=this.tj
if(z!=null){z.ed()
@@ -21451,14 +21821,14 @@
z=this.Lv
if(z==null?y!=null:z!==y){x=this.k6
if(x.Gv>=4)H.vh(x.q7())
-x.Iv(z)}},"call$1","gcz",2,0,null,265,[]],
+x.Iv(z)}},"call$1","gcz",2,0,null,267,[]],
bu:[function(a){return this.KL.bu(0)},"call$0","gXo",0,0,null],
$ishw:true},
Ed:{
"^":"cfS;Jd",
xn:[function(a){a.yc(0,this.Jd)},"call$1","gBe",2,0,null,18,[]],
ky:[function(a){J.UK(a.gT8(),this)
-a.yc(0,this.Jd)},"call$1","gXf",2,0,null,278,[]]},
+a.yc(0,this.Jd)},"call$1","gXf",2,0,null,280,[]]},
G1:{
"^":"fr;Jd,Le",
W9:[function(a){return new K.Wh(a,null,null,null,P.bK(null,null,!1,null))},"call$1","glO",2,0,null,18,[]],
@@ -21467,14 +21837,14 @@
z=J.UK(a.ghP(),this)
y=new K.vl(z,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(y)
-return y},"call$1","gEW",2,0,null,346,[]],
+return y},"call$1","gEW",2,0,null,348,[]],
CU:[function(a){var z,y,x
z=J.UK(a.ghP(),this)
y=J.UK(a.gJn(),this)
x=new K.iT(z,y,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(x)
y.sbO(x)
-return x},"call$1","gA2",2,0,null,383,[]],
+return x},"call$1","gA2",2,0,null,390,[]],
ZR:[function(a){var z,y,x,w,v
z=J.UK(a.ghP(),this)
y=a.gre()
@@ -21484,21 +21854,21 @@
x=H.VM(new H.A8(y,w),[null,null]).tt(0,!1)}v=new K.fa(z,x,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(v)
if(x!=null){x.toString
-H.bQ(x,new K.Os(v))}return v},"call$1","gES",2,0,null,383,[]],
-ti:[function(a){return new K.x5(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gXj",2,0,null,274,[]],
+H.bQ(x,new K.Os(v))}return v},"call$1","gES",2,0,null,390,[]],
+ti:[function(a){return new K.x5(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gXj",2,0,null,276,[]],
o0:[function(a){var z,y
z=H.VM(new H.A8(a.gPu(a),this.gnG()),[null,null]).tt(0,!1)
y=new K.ev(z,a,null,null,null,P.bK(null,null,!1,null))
H.bQ(z,new K.B8(y))
-return y},"call$1","gX7",2,0,null,274,[]],
+return y},"call$1","gX7",2,0,null,276,[]],
YV:[function(a){var z,y,x
z=J.UK(a.gG3(a),this)
y=J.UK(a.gv4(),this)
x=new K.qR(z,y,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(x)
y.sbO(x)
-return x},"call$1","gbU",2,0,null,18,[]],
-qv:[function(a){return new K.ek(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gFs",2,0,null,383,[]],
+return x},"call$1","gvO",2,0,null,18,[]],
+qv:[function(a){return new K.ek(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gFs",2,0,null,390,[]],
im:[function(a){var z,y,x
z=J.UK(a.gBb(),this)
y=J.UK(a.gT8(),this)
@@ -21510,64 +21880,64 @@
z=J.UK(a.gwz(),this)
y=new K.mv(z,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(y)
-return y},"call$1","gKY",2,0,null,91,[]],
+return y},"call$1","ghe",2,0,null,91,[]],
ky:[function(a){var z,y,x
z=J.UK(a.gBb(),this)
y=J.UK(a.gT8(),this)
x=new K.VA(z,y,a,null,null,null,P.bK(null,null,!1,null))
y.sbO(x)
-return x},"call$1","gXf",2,0,null,383,[]]},
+return x},"call$1","gXf",2,0,null,390,[]]},
Os:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
a.sbO(z)
return z},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
B8:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
a.sbO(z)
return z},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Wh:{
-"^":"Mb;KL,bO,tj,Lv,k6",
-Qh:[function(a){this.Lv=a.k8},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.EZ]},
+"^":"Ay0;KL,bO,tj,Lv,k6",
+Qh:[function(a){this.Lv=a.k8},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.EZ]},
$isEZ:true,
$ishw:true},
x5:{
-"^":"Mb;KL,bO,tj,Lv,k6",
+"^":"Ay0;KL,bO,tj,Lv,k6",
gP:function(a){var z=this.KL
return z.gP(z)},
r6:function(a,b){return this.gP(this).call$1(b)},
Qh:[function(a){var z=this.KL
-this.Lv=z.gP(z)},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.no]},
+this.Lv=z.gP(z)},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.no]},
$asno:function(){return[null]},
$isno:true,
$ishw:true},
ev:{
-"^":"Mb;Pu>,KL,bO,tj,Lv,k6",
-Qh:[function(a){this.Lv=H.n3(this.Pu,P.L5(null,null,null,null,null),new K.ID())},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.kB]},
+"^":"Ay0;Pu>,KL,bO,tj,Lv,k6",
+Qh:[function(a){this.Lv=H.n3(this.Pu,P.L5(null,null,null,null,null),new K.ID())},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.kB]},
$iskB:true,
$ishw:true},
ID:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){J.kW(a,J.WI(b).gLv(),b.gv4().gLv())
-return a},"call$2",null,4,0,null,183,[],18,[],"call"],
+return a},"call$2",null,4,0,null,186,[],18,[],"call"],
$isEH:true},
qR:{
-"^":"Mb;G3>,v4<,KL,bO,tj,Lv,k6",
-RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.ae]},
+"^":"Ay0;G3>,v4<,KL,bO,tj,Lv,k6",
+RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.ae]},
$isae:true,
$ishw:true},
ek:{
-"^":"Mb;KL,bO,tj,Lv,k6",
+"^":"Ay0;KL,bO,tj,Lv,k6",
gP:function(a){var z=this.KL
return z.gP(z)},
r6:function(a,b){return this.gP(this).call$1(b)},
@@ -21577,22 +21947,22 @@
y=a.tI(z.gP(z))
x=J.RE(y)
if(typeof y==="object"&&y!==null&&!!x.$isd3){z=H.le(z.gP(z))
-this.tj=x.gUj(y).yI(new K.Qv(this,a,new H.GD(z)))}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.w6]},
+this.tj=x.gUj(y).yI(new K.Qv(this,a,new H.GD(z)))}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.w6]},
$isw6:true,
$ishw:true},
Qv:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.Xm(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.Xm(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
Xm:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
mv:{
-"^":"Mb;wz<,KL,bO,tj,Lv,k6",
+"^":"Ay0;wz<,KL,bO,tj,Lv,k6",
gkp:function(a){var z=this.KL
return z.gkp(z)},
Qh:[function(a){var z,y
@@ -21600,13 +21970,13 @@
y=$.ww().t(0,z.gkp(z))
if(J.de(z.gkp(z),"!")){z=this.wz.gLv()
this.Lv=y.call$1(z==null?!1:z)}else{z=this.wz
-this.Lv=z.gLv()==null?null:y.call$1(z.gLv())}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.jK]},
+this.Lv=z.gLv()==null?null:y.call$1(z.gLv())}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.jK]},
$isjK:true,
$ishw:true},
mG:{
-"^":"Mb;Bb<,T8<,KL,bO,tj,Lv,k6",
+"^":"Ay0;Bb<,T8<,KL,bO,tj,Lv,k6",
gkp:function(a){var z=this.KL
return z.gkp(z)},
Qh:[function(a){var z,y,x,w
@@ -21623,17 +21993,17 @@
w=typeof z==="object"&&z!==null&&!!w.$iswn
z=w}else z=!1
if(z)this.tj=H.Go(x.gLv(),"$iswn").gvp().yI(new K.uA(this,a))
-this.Lv=y.call$2(x.gLv(),this.T8.gLv())}}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.uk]},
+this.Lv=y.call$2(x.gLv(),this.T8.gLv())}}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.uk]},
$isuk:true,
$ishw:true},
uA:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
vl:{
-"^":"Mb;hP<,KL,bO,tj,Lv,k6",
+"^":"Ay0;hP<,KL,bO,tj,Lv,k6",
goc:function(a){var z=this.KL
return z.goc(z)},
Qh:[function(a){var z,y,x
@@ -21643,44 +22013,44 @@
x=new H.GD(H.le(y.goc(y)))
this.Lv=H.vn(z).rN(x).gAx()
y=J.RE(z)
-if(typeof z==="object"&&z!==null&&!!y.$isd3)this.tj=y.gUj(z).yI(new K.Li(this,a,x))},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.x9]},
+if(typeof z==="object"&&z!==null&&!!y.$isd3)this.tj=y.gUj(z).yI(new K.Li(this,a,x))},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.x9]},
$isx9:true,
$ishw:true},
Li:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.WK(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.WK(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
WK:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
iT:{
-"^":"Mb;hP<,Jn<,KL,bO,tj,Lv,k6",
+"^":"Ay0;hP<,Jn<,KL,bO,tj,Lv,k6",
Qh:[function(a){var z,y,x
z=this.hP.gLv()
if(z==null){this.Lv=null
return}y=this.Jn.gLv()
x=J.U6(z)
this.Lv=x.t(z,y)
-if(typeof z==="object"&&z!==null&&!!x.$isd3)this.tj=x.gUj(z).yI(new K.ja(this,a,y))},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.zX]},
+if(typeof z==="object"&&z!==null&&!!x.$isd3)this.tj=x.gUj(z).yI(new K.ja(this,a,y))},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.zX]},
$iszX:true,
$ishw:true},
ja:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.zw(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.zw(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
zw:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isHA&&J.de(a.G3,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isHA&&J.de(a.G3,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
fa:{
-"^":"Mb;hP<,re<,KL,bO,tj,Lv,k6",
+"^":"Ay0;hP<,re<,KL,bO,tj,Lv,k6",
gbP:function(a){var z=this.KL
return z.gbP(z)},
Qh:[function(a){var z,y,x,w
@@ -21694,26 +22064,26 @@
this.Lv=K.ci(typeof x==="object"&&x!==null&&!!z.$iswL?x.lR.F2(x.ex,y,null).Ax:H.Ek(x,y,P.Te(null)))}else{w=new H.GD(H.le(z.gbP(z)))
this.Lv=H.vn(x).F2(w,y,null).Ax
z=J.RE(x)
-if(typeof x==="object"&&x!==null&&!!z.$isd3)this.tj=z.gUj(x).yI(new K.vQ(this,a,w))}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.Jy]},
+if(typeof x==="object"&&x!==null&&!!z.$isd3)this.tj=z.gUj(x).yI(new K.vQ(this,a,w))}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.Jy]},
$isJy:true,
$ishw:true},
WW:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a.gLv()},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
vQ:{
-"^":"Tp:559;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.a9(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:571;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.a9(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
a9:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
VA:{
-"^":"Mb;Bb<,T8<,KL,bO,tj,Lv,k6",
+"^":"Ay0;Bb<,T8<,KL,bO,tj,Lv,k6",
Qh:[function(a){var z,y,x,w
z=this.Bb
y=this.T8.gLv()
@@ -21722,21 +22092,21 @@
if(typeof y==="object"&&y!==null&&!!x.$iswn)this.tj=y.gvp().yI(new K.J1(this,a))
x=J.Vm(z)
w=y!=null?y:C.xD
-this.Lv=new K.fk(x,w)},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.K9]},
+this.Lv=new K.fk(x,w)},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.K9]},
$isK9:true,
$ishw:true},
J1:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
fk:{
"^":"a;kF,bm",
$isfk:true},
wL:{
-"^":"a:223;lR,ex",
-call$1:[function(a){return this.lR.F2(this.ex,[a],null).Ax},"call$1","gtm",2,0,null,584,[]],
+"^":"a:225;lR,ex",
+call$1:[function(a){return this.lR.F2(this.ex,[a],null).Ax},"call$1","gtm",2,0,null,596,[]],
$iswL:true,
$isEH:true},
B0:{
@@ -21756,33 +22126,33 @@
if(!(y<x))break
x=z.t(a,y)
if(y>=b.length)return H.e(b,y)
-if(!J.de(x,b[y]))return!1;++y}return!0},"call$2","OE",4,0,null,123,[],180,[]],
+if(!J.de(x,b[y]))return!1;++y}return!0},"call$2","OE",4,0,null,123,[],183,[]],
au:[function(a){a.toString
-return U.Up(H.n3(a,0,new U.xs()))},"call$1","bT",2,0,null,274,[]],
+return U.Up(H.n3(a,0,new U.xs()))},"call$1","bT",2,0,null,276,[]],
Zm:[function(a,b){var z=J.WB(a,b)
if(typeof z!=="number")return H.s(z)
a=536870911&z
a=536870911&a+((524287&a)<<10>>>0)
-return a^a>>>6},"call$2","uN",4,0,null,275,[],23,[]],
+return a^a>>>6},"call$2","uN",4,0,null,277,[],23,[]],
Up:[function(a){if(typeof a!=="number")return H.s(a)
a=536870911&a+((67108863&a)<<3>>>0)
a=(a^a>>>11)>>>0
-return 536870911&a+((16383&a)<<15>>>0)},"call$1","fM",2,0,null,275,[]],
+return 536870911&a+((16383&a)<<15>>>0)},"call$1","Hj",2,0,null,277,[]],
tc:{
"^":"a;",
-Bf:[function(a,b,c){return new U.zX(b,c)},"call$2","gvH",4,0,585,18,[],123,[]],
-F2:[function(a,b,c){return new U.Jy(a,b,c)},"call$3","gb2",6,0,null,18,[],183,[],123,[]]},
+Bf:[function(a,b,c){return new U.zX(b,c)},"call$2","gvH",4,0,597,18,[],123,[]],
+F2:[function(a,b,c){return new U.Jy(a,b,c)},"call$3","gb2",6,0,null,18,[],186,[],123,[]]},
hw:{
"^":"a;",
$ishw:true},
EZ:{
"^":"hw;",
-RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,274,[]],
$isEZ:true},
no:{
"^":"hw;P>",
r6:function(a,b){return this.P.call$1(b)},
-RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){var z=this.P
return typeof z==="string"?"\""+H.d(z)+"\"":H.d(z)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
@@ -21793,7 +22163,7 @@
$isno:true},
kB:{
"^":"hw;Pu>",
-RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"{"+H.d(this.Pu)+"}"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21803,7 +22173,7 @@
$iskB:true},
ae:{
"^":"hw;G3>,v4<",
-RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.G3)+": "+H.d(this.v4)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21816,7 +22186,7 @@
$isae:true},
XC:{
"^":"hw;wz",
-RR:[function(a,b){return b.LT(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.LT(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"("+H.d(this.wz)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21827,7 +22197,7 @@
w6:{
"^":"hw;P>",
r6:function(a,b){return this.P.call$1(b)},
-RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return this.P},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21837,7 +22207,7 @@
$isw6:true},
jK:{
"^":"hw;kp>,wz<",
-RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.kp)+" "+H.d(this.wz)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21850,7 +22220,7 @@
$isjK:true},
uk:{
"^":"hw;kp>,Bb<,T8<",
-RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"("+H.d(this.Bb)+" "+H.d(this.kp)+" "+H.d(this.T8)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21864,7 +22234,7 @@
$isuk:true},
K9:{
"^":"hw;Bb<,T8<",
-RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"("+H.d(this.Bb)+" in "+H.d(this.T8)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21878,7 +22248,7 @@
$isK9:true},
zX:{
"^":"hw;hP<,Jn<",
-RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.hP)+"["+H.d(this.Jn)+"]"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21891,7 +22261,7 @@
$iszX:true},
x9:{
"^":"hw;hP<,oc>",
-RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.hP)+"."+H.d(this.oc)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21904,7 +22274,7 @@
$isx9:true},
Jy:{
"^":"hw;hP<,bP>,re<",
-RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.hP)+"."+H.d(this.bP)+"("+H.d(this.re)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21917,8 +22287,8 @@
return U.Up(U.Zm(U.Zm(U.Zm(0,z),y),x))},
$isJy:true},
xs:{
-"^":"Tp:341;",
-call$2:[function(a,b){return U.Zm(a,J.v1(b))},"call$2",null,4,0,null,586,[],587,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return U.Zm(a,J.v1(b))},"call$2",null,4,0,null,598,[],599,[],"call"],
$isEH:true}}],["polymer_expressions.parser","package:polymer_expressions/parser.dart",,T,{
"^":"",
FX:{
@@ -21927,7 +22297,7 @@
if(!(a!=null&&!J.de(J.Iz(this.fL.lo),a)))z=b!=null&&!J.de(J.Vm(this.fL.lo),b)
else z=!0
if(z)throw H.b(Y.RV("Expected "+b+": "+H.d(this.fL.lo)))
-this.fL.G()},function(){return this.XJ(null,null)},"w5","call$2",null,"gXO",0,4,null,77,77,588,[],23,[]],
+this.fL.G()},function(){return this.XJ(null,null)},"w5","call$2",null,"gXO",0,4,null,77,77,600,[],23,[]],
o9:[function(){if(this.fL.lo==null){this.Sk.toString
return C.OL}var z=this.Dl()
return z==null?null:this.BH(z,0)},"call$0","gKx",0,0,null],
@@ -21945,7 +22315,7 @@
z.toString
a=new U.K9(a,v)}else if(J.de(J.Iz(this.fL.lo),8)&&J.J5(this.fL.lo.gG8(),b))a=this.Tw(a)
else break
-return a},"call$2","gHr",4,0,null,126,[],589,[]],
+return a},"call$2","gHr",4,0,null,126,[],601,[]],
qL:[function(a,b){var z,y
if(typeof b==="object"&&b!==null&&!!b.$isw6){z=b.gP(b)
this.Sk.toString
@@ -21988,7 +22358,7 @@
return new U.jK(z,w)}}}else if(y.n(z,"!")){this.w5()
w=this.BH(this.Ai(),11)
this.Sk.toString
-return new U.jK(z,w)}}return this.Ai()},"call$0","gNb",0,0,null],
+return new U.jK(z,w)}}return this.Ai()},"call$0","gna",0,0,null],
Ai:[function(){var z,y,x
switch(J.Iz(this.fL.lo)){case 10:z=J.Vm(this.fL.lo)
y=J.x(z)
@@ -22063,28 +22433,28 @@
this.Sk.toString
y=H.VM(new U.no(z),[null])
this.w5()
-return y},function(){return this.pT("")},"Ud","call$1",null,"gwo",0,2,null,328,590,[]],
+return y},function(){return this.pT("")},"Ud","call$1",null,"gwo",0,2,null,330,602,[]],
Fj:[function(a){var z,y
z=H.IH(H.d(a)+H.d(J.Vm(this.fL.lo)),null)
this.Sk.toString
y=H.VM(new U.no(z),[null])
this.w5()
-return y},function(){return this.Fj("")},"tw","call$1",null,"gSE",0,2,null,328,590,[]]}}],["polymer_expressions.src.globals","package:polymer_expressions/src/globals.dart",,K,{
+return y},function(){return this.Fj("")},"tw","call$1",null,"gSE",0,2,null,330,602,[]]}}],["polymer_expressions.src.globals","package:polymer_expressions/src/globals.dart",,K,{
"^":"",
-Dc:[function(a){return H.VM(new K.Bt(a),[null])},"call$1","UM",2,0,276,109,[]],
+Dc:[function(a){return H.VM(new K.Bt(a),[null])},"call$1","UM",2,0,278,109,[]],
Ae:{
-"^":"a;vH>-475,P>-591",
+"^":"a;vH>-484,P>-603",
r6:function(a,b){return this.P.call$1(b)},
n:[function(a,b){var z
if(b==null)return!1
z=J.x(b)
-return typeof b==="object"&&b!==null&&!!z.$isAe&&J.de(b.vH,this.vH)&&J.de(b.P,this.P)},"call$1","gUJ",2,0,223,91,[],"=="],
-giO:[function(a){return J.v1(this.P)},null,null,1,0,482,"hashCode"],
-bu:[function(a){return"("+H.d(this.vH)+", "+H.d(this.P)+")"},"call$0","gXo",0,0,362,"toString"],
+return typeof b==="object"&&b!==null&&!!z.$isAe&&J.de(b.vH,this.vH)&&J.de(b.P,this.P)},"call$1","gUJ",2,0,225,91,[],"=="],
+giO:[function(a){return J.v1(this.P)},null,null,1,0,491,"hashCode"],
+bu:[function(a){return"("+H.d(this.vH)+", "+H.d(this.P)+")"},"call$0","gXo",0,0,367,"toString"],
$isAe:true,
"@":function(){return[C.nJ]},
"<>":[3],
-static:{i0:[function(a,b,c){return H.VM(new K.Ae(a,b),[c])},null,null,4,0,function(){return H.IG(function(a){return{func:"GR",args:[J.im,a]}},this.$receiver,"Ae")},47,[],23,[],"new IndexedValue"]}},
+static:{iz:[function(a,b,c){return H.VM(new K.Ae(a,b),[c])},null,null,4,0,function(){return H.IG(function(a){return{func:"GR",args:[J.im,a]}},this.$receiver,"Ae")},47,[],23,[],"new IndexedValue"]}},
"+IndexedValue":[0],
Bt:{
"^":"mW;YR",
@@ -22121,14 +22491,14 @@
z=a.gAY()
if(z!=null&&!J.de(z.gUx(),C.PU)){y=Z.y1(a.gAY(),b)
if(y!=null)return y}for(x=J.GP(a.gkZ());x.G();){y=Z.y1(x.lo,b)
-if(y!=null)return y}return},"call$2","tm",4,0,null,277,[],12,[]]}],["polymer_expressions.tokenizer","package:polymer_expressions/tokenizer.dart",,Y,{
+if(y!=null)return y}return},"call$2","tm",4,0,null,279,[],12,[]]}],["polymer_expressions.tokenizer","package:polymer_expressions/tokenizer.dart",,Y,{
"^":"",
aK:[function(a){switch(a){case 102:return 12
case 110:return 10
case 114:return 13
case 116:return 9
case 118:return 11
-default:return a}},"call$1","aN",2,0,null,278,[]],
+default:return a}},"call$1","aN",2,0,null,280,[]],
Pn:{
"^":"a;fY>,P>,G8<",
r6:function(a,b){return this.P.call$1(b)},
@@ -22234,41 +22604,41 @@
"^":"",
fr:{
"^":"a;",
-DV:[function(a){return J.UK(a,this)},"call$1","gnG",2,0,592,86,[]]},
+DV:[function(a){return J.UK(a,this)},"call$1","gnG",2,0,604,86,[]]},
cfS:{
"^":"fr;",
W9:[function(a){return this.xn(a)},"call$1","glO",2,0,null,18,[]],
LT:[function(a){a.wz.RR(0,this)
this.xn(a)},"call$1","gff",2,0,null,18,[]],
co:[function(a){J.UK(a.ghP(),this)
-this.xn(a)},"call$1","gEW",2,0,null,383,[]],
+this.xn(a)},"call$1","gEW",2,0,null,390,[]],
CU:[function(a){J.UK(a.ghP(),this)
J.UK(a.gJn(),this)
-this.xn(a)},"call$1","gA2",2,0,null,383,[]],
+this.xn(a)},"call$1","gA2",2,0,null,390,[]],
ZR:[function(a){var z
J.UK(a.ghP(),this)
z=a.gre()
if(z!=null)for(z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]);z.G();)J.UK(z.lo,this)
-this.xn(a)},"call$1","gES",2,0,null,383,[]],
-ti:[function(a){return this.xn(a)},"call$1","gXj",2,0,null,274,[]],
+this.xn(a)},"call$1","gES",2,0,null,390,[]],
+ti:[function(a){return this.xn(a)},"call$1","gXj",2,0,null,276,[]],
o0:[function(a){var z
for(z=a.gPu(a),z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]);z.G();)J.UK(z.lo,this)
-this.xn(a)},"call$1","gX7",2,0,null,274,[]],
+this.xn(a)},"call$1","gX7",2,0,null,276,[]],
YV:[function(a){J.UK(a.gG3(a),this)
J.UK(a.gv4(),this)
-this.xn(a)},"call$1","gbU",2,0,null,18,[]],
-qv:[function(a){return this.xn(a)},"call$1","gFs",2,0,null,383,[]],
+this.xn(a)},"call$1","gvO",2,0,null,18,[]],
+qv:[function(a){return this.xn(a)},"call$1","gFs",2,0,null,390,[]],
im:[function(a){J.UK(a.gBb(),this)
J.UK(a.gT8(),this)
this.xn(a)},"call$1","glf",2,0,null,91,[]],
Hx:[function(a){J.UK(a.gwz(),this)
-this.xn(a)},"call$1","gKY",2,0,null,91,[]],
+this.xn(a)},"call$1","ghe",2,0,null,91,[]],
ky:[function(a){J.UK(a.gBb(),this)
J.UK(a.gT8(),this)
-this.xn(a)},"call$1","gXf",2,0,null,278,[]]}}],["response_viewer_element","package:observatory/src/observatory_elements/response_viewer.dart",,Q,{
+this.xn(a)},"call$1","gXf",2,0,null,280,[]]}}],["response_viewer_element","package:observatory/src/observatory_elements/response_viewer.dart",,Q,{
"^":"",
JG:{
-"^":["uL;hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["uL;hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.Is]},
static:{Zo:[function(a){var z,y,x,w
z=$.Nd()
@@ -22282,22 +22652,22 @@
C.Cc.ZL(a)
C.Cc.G6(a)
return a},null,null,0,0,108,"new ResponseViewerElement$created"]}},
-"+ResponseViewerElement":[474]}],["script_ref_element","package:observatory/src/observatory_elements/script_ref.dart",,A,{
+"+ResponseViewerElement":[483]}],["script_ref_element","package:observatory/src/observatory_elements/script_ref.dart",,A,{
"^":"",
knI:{
-"^":["qe;zw%-475,AP,fn,tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gRd:[function(a){return a.zw},null,null,1,0,482,"line",351,352],
-sRd:[function(a,b){a.zw=this.ct(a,C.Cv,a.zw,b)},null,null,3,0,385,23,[],"line",351],
+"^":["T5;zw%-484,AP,fn,tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gRd:[function(a){return a.zw},null,null,1,0,491,"line",353,354],
+sRd:[function(a,b){a.zw=this.ct(a,C.Cv,a.zw,b)},null,null,3,0,392,23,[],"line",353],
gO3:[function(a){var z
if(a.hm!=null&&a.tY!=null){z=this.Mq(a,J.UQ(a.tY,"id"))
if(J.u6(a.zw,0))return z
-else return z+"?line="+H.d(a.zw)}return""},null,null,1,0,362,"url"],
+else return z+"?line="+H.d(a.zw)}return""},null,null,1,0,367,"url"],
gJp:[function(a){var z,y
if(a.tY==null)return""
z=J.u6(a.zw,0)
y=a.tY
if(z)return J.UQ(y,"user_name")
-else return H.d(J.UQ(y,"user_name"))+":"+H.d(a.zw)},null,null,1,0,362,"hoverText"],
+else return H.d(J.UQ(y,"user_name"))+":"+H.d(a.zw)},null,null,1,0,367,"hoverText"],
goc:[function(a){var z,y,x
z=a.tY
if(z==null)return""
@@ -22305,7 +22675,7 @@
z=J.U6(y)
x=z.yn(y,J.WB(z.cn(y,"/"),1))
if(J.u6(a.zw,0))return x
-else return x+":"+H.d(a.zw)},null,null,1,0,362,"name"],
+else return x+":"+H.d(a.zw)},null,null,1,0,367,"name"],
"@":function(){return[C.Ur]},
static:{Th:[function(a){var z,y,x,w
z=$.Nd()
@@ -22322,24 +22692,24 @@
C.c0.ZL(a)
C.c0.G6(a)
return a},null,null,0,0,108,"new ScriptRefElement$created"]}},
-"+ScriptRefElement":[593],
-qe:{
+"+ScriptRefElement":[605],
+T5:{
"^":"xI+Pi;",
$isd3:true}}],["script_view_element","package:observatory/src/observatory_elements/script_view.dart",,U,{
"^":"",
fI:{
-"^":["V13;Uz%-594,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gNl:[function(a){return a.Uz},null,null,1,0,595,"script",351,352],
-sNl:[function(a,b){a.Uz=this.ct(a,C.fX,a.Uz,b)},null,null,3,0,596,23,[],"script",351],
+"^":["V19;Uz%-606,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gNl:[function(a){return a.Uz},null,null,1,0,607,"script",353,354],
+sNl:[function(a,b){a.Uz=this.ct(a,C.fX,a.Uz,b)},null,null,3,0,608,23,[],"script",353],
PQ:[function(a,b){if(J.de(b.gu9(),-1))return"min-width:32px;"
else if(J.de(b.gu9(),0))return"min-width:32px;background-color:red"
-return"min-width:32px;background-color:green"},"call$1","gXa",2,0,597,173,[],"hitsStyle"],
+return"min-width:32px;background-color:green"},"call$1","gXa",2,0,609,176,[],"hitsStyle"],
wH:[function(a,b,c,d){var z,y,x
z=a.hm.gZ6().R6()
y=a.hm.gnI().AQ(z)
if(y==null){N.Jx("").To("No isolate found.")
return}x="/"+z+"/coverage"
-a.hm.gDF().fB(x).ml(new U.qq(a,y)).OA(new U.FC())},"call$3","gWp",6,0,369,18,[],301,[],74,[],"refreshCoverage"],
+a.hm.gDF().fB(x).ml(new U.qq(a,y)).OA(new U.FC())},"call$3","gWp",6,0,374,18,[],303,[],74,[],"refreshCoverage"],
"@":function(){return[C.I3]},
static:{Ry:[function(a){var z,y,x,w
z=$.Nd()
@@ -22353,56 +22723,57 @@
C.cJ.ZL(a)
C.cJ.G6(a)
return a},null,null,0,0,108,"new ScriptViewElement$created"]}},
-"+ScriptViewElement":[598],
-V13:{
+"+ScriptViewElement":[610],
+V19:{
"^":"uL+Pi;",
$isd3:true},
qq:{
-"^":"Tp:353;a-77,b-77",
+"^":"Tp:355;a-77,b-77",
call$1:[function(a){var z,y
this.b.oe(J.UQ(a,"coverage"))
z=this.a
y=J.RE(z)
-y.ct(z,C.YH,"",y.gXa(z))},"call$1",null,2,0,353,599,[],"call"],
+y.ct(z,C.YH,"",y.gXa(z))},"call$1",null,2,0,355,611,[],"call"],
$isEH:true},
-"+ScriptViewElement_refreshCoverage_closure":[467],
+"+ScriptViewElement_refreshCoverage_closure":[358],
FC:{
-"^":"Tp:341;",
-call$2:[function(a,b){P.JS("refreshCoverage "+H.d(a)+" "+H.d(b))},"call$2",null,4,0,341,18,[],468,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){P.JS("refreshCoverage "+H.d(a)+" "+H.d(b))},"call$2",null,4,0,343,18,[],478,[],"call"],
$isEH:true},
-"+ScriptViewElement_refreshCoverage_closure":[467]}],["service_ref_element","package:observatory/src/observatory_elements/service_ref.dart",,Q,{
+"+ScriptViewElement_refreshCoverage_closure":[358]}],["service_ref_element","package:observatory/src/observatory_elements/service_ref.dart",,Q,{
"^":"",
xI:{
-"^":["Ds;tY%-347,Pe%-355,m0%-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gnv:[function(a){return a.tY},null,null,1,0,350,"ref",351,352],
-snv:[function(a,b){a.tY=this.ct(a,C.kY,a.tY,b)},null,null,3,0,353,23,[],"ref",351],
-gjT:[function(a){return a.Pe},null,null,1,0,366,"internal",351,352],
-sjT:[function(a,b){a.Pe=this.ct(a,C.zD,a.Pe,b)},null,null,3,0,367,23,[],"internal",351],
-gAq:[function(a){return a.m0},null,null,1,0,493,"isolate",351,352],
-sAq:[function(a,b){a.m0=this.ct(a,C.Z8,a.m0,b)},null,null,3,0,494,23,[],"isolate",351],
+"^":["Ds;tY%-349,Pe%-360,m0%-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gnv:[function(a){return a.tY},null,null,1,0,352,"ref",353,354],
+snv:[function(a,b){a.tY=this.ct(a,C.kY,a.tY,b)},null,null,3,0,355,23,[],"ref",353],
+gjT:[function(a){return a.Pe},null,null,1,0,371,"internal",353,354],
+sjT:[function(a,b){a.Pe=this.ct(a,C.zD,a.Pe,b)},null,null,3,0,372,23,[],"internal",353],
+gAq:[function(a){return a.m0},null,null,1,0,502,"isolate",353,354],
+sAq:[function(a,b){a.m0=this.ct(a,C.Z8,a.m0,b)},null,null,3,0,503,23,[],"isolate",353],
aZ:[function(a,b){this.ct(a,C.Fh,"",this.gO3(a))
this.ct(a,C.YS,[],this.goc(a))
-this.ct(a,C.bA,"",this.gJp(a))},"call$1","gma",2,0,150,225,[],"refChanged"],
+this.ct(a,C.bA,"",this.gJp(a))},"call$1","gma",2,0,153,227,[],"refChanged"],
gO3:[function(a){var z=a.tY
if(z!=null)return this.Mq(a,J.UQ(z,"id"))
-return""},null,null,1,0,362,"url"],
+return""},null,null,1,0,367,"url"],
gJp:[function(a){var z,y
z=a.tY
if(z==null)return""
y=J.UQ(z,"name")
-return y!=null?y:""},null,null,1,0,362,"hoverText"],
+return y!=null?y:""},null,null,1,0,367,"hoverText"],
goc:[function(a){var z,y
z=a.tY
-if(z==null)return""
+if(z==null)return"NULL REF"
y=a.Pe===!0?"name":"user_name"
if(J.UQ(z,y)!=null)return J.UQ(a.tY,y)
else if(J.UQ(a.tY,"name")!=null)return J.UQ(a.tY,"name")
-return""},null,null,1,0,362,"name"],
-tx:[function(a,b){this.ct(a,C.bD,0,1)},"call$1","gQ1",2,0,150,225,[],"isolateChanged"],
+else if(J.UQ(a.tY,"user_name")!=null)return J.UQ(a.tY,"user_name")
+return""},null,null,1,0,367,"name"],
+vD:[function(a,b){this.ct(a,C.bD,0,1)},"call$1","gQ1",2,0,153,227,[],"isolateChanged"],
Mq:[function(a,b){var z=a.hm
if(z==null)return""
else if(a.m0==null)return z.gZ6().kP(b)
-else return J.uY(z.gZ6(),J.F8(a.m0),b)},"call$1","gLc",2,0,504,505,[],"relativeLink",365],
+else return J.uY(z.gZ6(),J.F8(a.m0),b)},"call$1","gLc",2,0,534,612,[],"relativeLink",370],
"@":function(){return[C.JD]},
static:{lK:[function(a){var z,y,x,w
z=$.Nd()
@@ -22418,19 +22789,15 @@
C.wU.ZL(a)
C.wU.G6(a)
return a},null,null,0,0,108,"new ServiceRefElement$created"]}},
-"+ServiceRefElement":[600],
+"+ServiceRefElement":[613],
Ds:{
"^":"uL+Pi;",
$isd3:true}}],["stack_frame_element","package:observatory/src/observatory_elements/stack_frame.dart",,K,{
"^":"",
nm:{
-"^":["V14;Va%-347,Mt%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gz1:[function(a){return a.Va},null,null,1,0,350,"frame",351,352],
-sz1:[function(a,b){a.Va=this.ct(a,C.rE,a.Va,b)},null,null,3,0,353,23,[],"frame",351],
-goE:[function(a){return a.Mt},null,null,1,0,366,"expanded",351,352],
-soE:[function(a,b){a.Mt=this.ct(a,C.mr,a.Mt,b)},null,null,3,0,367,23,[],"expanded",351],
-AZ:[function(a,b,c,d){var z=a.Mt
-a.Mt=this.ct(a,C.mr,z,z!==!0)},"call$3","ghM",6,0,470,123,[],180,[],278,[],"toggleExpand"],
+"^":["V20;Va%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gz1:[function(a){return a.Va},null,null,1,0,352,"frame",353,354],
+sz1:[function(a,b){a.Va=this.ct(a,C.rE,a.Va,b)},null,null,3,0,355,23,[],"frame",353],
"@":function(){return[C.pE]},
static:{an:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
@@ -22441,26 +22808,25 @@
v=W.cv
v=H.VM(new V.qC(P.Py(null,null,null,w,v),null,null),[w,v])
a.Va=z
-a.Mt=!1
a.SO=y
a.B7=x
a.X0=v
C.dX.ZL(a)
C.dX.G6(a)
return a},null,null,0,0,108,"new StackFrameElement$created"]}},
-"+StackFrameElement":[601],
-V14:{
+"+StackFrameElement":[614],
+V20:{
"^":"uL+Pi;",
$isd3:true}}],["stack_trace_element","package:observatory/src/observatory_elements/stack_trace.dart",,X,{
"^":"",
Vu:{
-"^":["V15;V4%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gtN:[function(a){return a.V4},null,null,1,0,350,"trace",351,352],
-stN:[function(a,b){a.V4=this.ct(a,C.kw,a.V4,b)},null,null,3,0,353,23,[],"trace",351],
-Ak:[function(a,b,c,d){var z=a.hm.gZ6().kP("stacktrace")
-a.hm.gDF().fB(z).ml(new X.At(a)).OA(new X.Sb())},"call$3","gBq",6,0,369,18,[],301,[],74,[],"refresh"],
+"^":["V21;V4%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtN:[function(a){return a.V4},null,null,1,0,352,"trace",353,354],
+stN:[function(a,b){a.V4=this.ct(a,C.kw,a.V4,b)},null,null,3,0,355,23,[],"trace",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP("stacktrace")
+a.hm.gDF().fB(z).ml(new X.At(a)).OA(new X.Sb()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.js]},
-static:{B4:[function(a){var z,y,x,w,v
+static:{bV:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
z=R.Jk(z)
y=$.Nd()
@@ -22475,23 +22841,23 @@
C.bg.ZL(a)
C.bg.G6(a)
return a},null,null,0,0,108,"new StackTraceElement$created"]}},
-"+StackTraceElement":[602],
-V15:{
+"+StackTraceElement":[615],
+V21:{
"^":"uL+Pi;",
$isd3:true},
At:{
-"^":"Tp:223;a-77",
+"^":"Tp:225;a-77",
call$1:[function(a){var z,y
z=this.a
y=J.RE(z)
-y.sV4(z,y.ct(z,C.kw,y.gV4(z),a))},"call$1",null,2,0,223,144,[],"call"],
+y.sV4(z,y.ct(z,C.kw,y.gV4(z),a))},"call$1",null,2,0,225,144,[],"call"],
$isEH:true},
-"+StackTraceElement_refresh_closure":[467],
+"+StackTraceElement_refresh_closure":[358],
Sb:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").hh("Error while reloading stack trace: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,341,18,[],472,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while reloading stack trace: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
$isEH:true},
-"+StackTraceElement_refresh_closure":[467]}],["template_binding","package:template_binding/template_binding.dart",,M,{
+"+StackTraceElement_refresh_closure":[358]}],["template_binding","package:template_binding/template_binding.dart",,M,{
"^":"",
IP:[function(a){var z=J.RE(a)
if(typeof a==="object"&&a!==null&&!!z.$isQl)return C.i3.f0(a)
@@ -22509,7 +22875,7 @@
if(s==null)continue
if(u==null)u=P.Py(null,null,null,null,null)
u.u(0,t,s)}if(z==null&&u==null&&w==null)return
-return new M.XI(z,u,w,t)},"call$2","Nc",4,0,null,259,[],279,[]],
+return new M.XI(z,u,w,t)},"call$2","Nc",4,0,null,261,[],281,[]],
HP:[function(a,b,c,d,e){var z,y,x
if(b==null)return
if(b.gN2()!=null){z=b.gN2()
@@ -22519,16 +22885,16 @@
if(z.gwd(b)==null)return
y=b.gTe()-a.childNodes.length
for(x=a.firstChild;x!=null;x=x.nextSibling,++y){if(y<0)continue
-M.HP(x,J.UQ(z.gwd(b),y),c,d,e)}},"call$5","Yy",10,0,null,259,[],144,[],280,[],279,[],281,[]],
+M.HP(x,J.UQ(z.gwd(b),y),c,d,e)}},"call$5","Yy",10,0,null,261,[],144,[],282,[],281,[],283,[]],
bM:[function(a){var z
for(;z=J.RE(a),z.gKV(a)!=null;)a=z.gKV(a)
if(typeof a==="object"&&a!==null&&!!z.$isQF||typeof a==="object"&&a!==null&&!!z.$isI0||typeof a==="object"&&a!==null&&!!z.$ishy)return a
-return},"call$1","ay",2,0,null,259,[]],
+return},"call$1","ay",2,0,null,261,[]],
pN:[function(a,b){var z,y
z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$iscv)return M.F5(a,b)
if(typeof a==="object"&&a!==null&&!!z.$iskJ){y=M.F4(a.textContent,"text",a,b)
-if(y!=null)return["text",y]}return},"call$2","SG",4,0,null,259,[],279,[]],
+if(y!=null)return["text",y]}return},"call$2","SG",4,0,null,261,[],281,[]],
F5:[function(a,b){var z,y,x
z={}
z.a=null
@@ -22539,7 +22905,7 @@
if(y==null){x=[]
z.a=x
y=x}y.push("bind")
-y.push(M.F4("{{}}","bind",a,b))}return z.a},"call$2","OT",4,0,null,124,[],279,[]],
+y.push(M.F4("{{}}","bind",a,b))}return z.a},"call$2","OT",4,0,null,124,[],281,[]],
Iu:[function(a,b,c,d){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i
for(z=J.U6(a),y=d!=null,x=J.x(b),x=typeof b==="object"&&b!==null&&!!x.$ishs,w=0;w<z.gB(a);w+=2){v=z.t(a,w)
u=z.t(a,w+1)
@@ -22569,7 +22935,7 @@
t.push(L.ao(j,l,null))}o.wE(0)
p=o
s="value"}i=J.Jj(x?b:M.Ky(b),v,p,s)
-if(y)d.push(i)}},"call$4","S5",6,2,null,77,286,[],259,[],280,[],281,[]],
+if(y)d.push(i)}},"call$4","S5",6,2,null,77,288,[],261,[],282,[],283,[]],
F4:[function(a,b,c,d){var z,y,x,w,v,u,t,s,r
z=a.length
if(z===0)return
@@ -22587,13 +22953,13 @@
v=t+2}if(v===z)w.push("")
z=new M.HS(w,null)
z.Yn(w)
-return z},"call$4","jF",8,0,null,86,[],12,[],259,[],279,[]],
+return z},"call$4","jF",8,0,null,86,[],12,[],261,[],281,[]],
SH:[function(a,b){var z,y
z=a.firstChild
if(z==null)return
y=new M.yp(z,a.lastChild,b)
for(;z!=null;){M.Ky(z).sCk(y)
-z=z.nextSibling}},"call$2","KQ",4,0,null,199,[],280,[]],
+z=z.nextSibling}},"call$2","KQ",4,0,null,202,[],282,[]],
Ky:[function(a){var z,y,x,w
z=$.rw()
z.toString
@@ -22608,12 +22974,12 @@
else w=!0
x=w?new M.DT(null,null,null,!1,null,null,null,null,null,a,null,null):new M.V2(a,null,null)}else x=typeof a==="object"&&a!==null&&!!w.$iskJ?new M.XT(a,null,null):new M.hs(a,null,null)
z.u(0,a,x)
-return x},"call$1","La",2,0,null,259,[]],
+return x},"call$1","La",2,0,null,261,[]],
wR:[function(a){var z=J.RE(a)
if(typeof a==="object"&&a!==null&&!!z.$iscv)if(z.gqn(a)!=="template")z=z.gQg(a).MW.hasAttribute("template")===!0&&C.uE.x4(z.gqn(a))===!0
else z=!0
else z=!1
-return z},"call$1","xS",2,0,null,287,[]],
+return z},"call$1","xS",2,0,null,289,[]],
V2:{
"^":"hs;N1,mD,Ck",
Z1:[function(a,b,c,d){var z,y,x,w,v
@@ -22636,7 +23002,7 @@
z=d!=null?d:""
x=new M.D8(w,y,c,null,null,v,z)
x.Og(y,v,c,d)}this.gCd(this).u(0,b,x)
-return x},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return x},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
D8:{
"^":"TR;Y0,qP,ZY,xS,PB,eS,ay",
EC:[function(a){var z,y
@@ -22658,7 +23024,7 @@
u=x}else{v=null
u=null}}else{v=null
u=null}M.NP.prototype.EC.call(this,a)
-if(u!=null&&u.gqP()!=null&&!J.de(y.gP(z),v))u.FC(null)},"call$1","gH0",2,0,null,226,[]]},
+if(u!=null&&u.gqP()!=null&&!J.de(y.gP(z),v))u.FC(null)},"call$1","gH0",2,0,null,228,[]]},
H2:{
"^":"TR;",
cO:[function(a){if(this.qP==null)return
@@ -22682,25 +23048,25 @@
return x.length===1?C.mt:C.Nm.gtH(x)},"call$0",null,0,0,null,"call"],
$isEH:true},
fTP:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.push(C.pi)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
ppY:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){this.b.push(C.mt)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
NP:{
"^":"H2;Ca,qP,ZY,xS,PB,eS,ay",
gH:function(){return X.TR.prototype.gH.call(this)},
EC:[function(a){var z=this.gH()
-J.ta(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,226,[]],
+J.ta(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,228,[]],
FC:[function(a){var z=J.Vm(this.gH())
J.ta(this.xS,z)
-O.Y3()},"call$1","gqf",2,0,150,18,[]]},
+O.Y3()},"call$1","gqf",2,0,153,18,[]]},
jt:{
"^":"H2;Ca,qP,ZY,xS,PB,eS,ay",
EC:[function(a){var z=X.TR.prototype.gH.call(this)
-J.rP(z,null!=a&&!1!==a)},"call$1","gH0",2,0,null,226,[]],
+J.rP(z,null!=a&&!1!==a)},"call$1","gH0",2,0,null,228,[]],
FC:[function(a){var z,y,x,w
z=J.Hf(X.TR.prototype.gH.call(this))
J.ta(this.xS,z)
@@ -22709,7 +23075,7 @@
if(typeof z==="object"&&z!==null&&!!y.$isMi&&J.de(J.zH(X.TR.prototype.gH.call(this)),"radio"))for(z=J.GP(M.kv(X.TR.prototype.gH.call(this)));z.G();){x=z.gl()
y=J.x(x)
w=J.UQ(J.QE(typeof x==="object"&&x!==null&&!!y.$ishs?x:M.Ky(x)),"checked")
-if(w!=null)J.ta(w,!1)}O.Y3()},"call$1","gqf",2,0,150,18,[]],
+if(w!=null)J.ta(w,!1)}O.Y3()},"call$1","gqf",2,0,153,18,[]],
static:{kv:[function(a){var z,y,x
z=J.RE(a)
if(z.gMB(a)!=null){z=z.gMB(a)
@@ -22720,7 +23086,7 @@
x=J.MK(y,"input[type=\"radio\"][name=\""+H.d(z.goc(a))+"\"]")
return x.ev(x,new M.jz(a))}},"call$1","VE",2,0,null,124,[]]}},
r0:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y
z=this.a
y=J.x(a)
@@ -22729,12 +23095,12 @@
z=y==null?z==null:y===z}else z=!1
else z=!1
else z=!1
-return z},"call$1",null,2,0,null,283,[],"call"],
+return z},"call$1",null,2,0,null,285,[],"call"],
$isEH:true},
jz:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){var z=J.x(a)
-return!z.n(a,this.b)&&z.gMB(a)==null},"call$1",null,2,0,null,283,[],"call"],
+return!z.n(a,this.b)&&z.gMB(a)==null},"call$1",null,2,0,null,285,[],"call"],
$isEH:true},
SA:{
"^":"H2;Dh,Ca,qP,ZY,xS,PB,eS,ay",
@@ -22743,7 +23109,7 @@
if(this.Gh(a)===!0)return
z=new (window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)(H.tR(W.K2(new M.hB(this)),2))
C.S2.yN(z,X.TR.prototype.gH.call(this),!0,!0)
-this.Dh=z},"call$1","gH0",2,0,null,226,[]],
+this.Dh=z},"call$1","gH0",2,0,null,228,[]],
Gh:[function(a){var z,y,x
z=this.eS
y=J.x(z)
@@ -22752,7 +23118,7 @@
z=J.m4(X.TR.prototype.gH.call(this))
return z==null?x==null:z===x}else if(y.n(z,"value")){z=X.TR.prototype.gH.call(this)
J.ta(z,a==null?"":H.d(a))
-return J.de(J.Vm(X.TR.prototype.gH.call(this)),a)}},"call$1","goz",2,0,null,226,[]],
+return J.de(J.Vm(X.TR.prototype.gH.call(this)),a)}},"call$1","goz",2,0,null,228,[]],
C7:[function(){var z=this.Dh
if(z!=null){z.disconnect()
this.Dh=null}},"call$0","gln",0,0,null],
@@ -22762,18 +23128,18 @@
y=J.x(z)
if(y.n(z,"selectedIndex")){z=J.m4(X.TR.prototype.gH.call(this))
J.ta(this.xS,z)}else if(y.n(z,"value")){z=J.Vm(X.TR.prototype.gH.call(this))
-J.ta(this.xS,z)}},"call$1","gqf",2,0,150,18,[]],
+J.ta(this.xS,z)}},"call$1","gqf",2,0,153,18,[]],
$isSA:true,
static:{qb:[function(a){if(typeof a==="string")return H.BU(a,null,new M.nv())
return typeof a==="number"&&Math.floor(a)===a?a:0},"call$1","v7",2,0,null,23,[]]}},
hB:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z=this.a
-if(z.Gh(J.Vm(z.xS))===!0)z.C7()},"call$2",null,4,0,null,21,[],603,[],"call"],
+if(z.Gh(J.Vm(z.xS))===!0)z.C7()},"call$2",null,4,0,null,21,[],616,[],"call"],
$isEH:true},
nv:{
-"^":"Tp:223;",
-call$1:[function(a){return 0},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return 0},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
ee:{
"^":"V2;N1,mD,Ck",
@@ -22797,7 +23163,7 @@
x.Og(z,"checked",c,d)
x.Ca=M.IP(z).yI(x.gqf())
z=x}y.u(0,b,z)
-return z},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return z},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
XI:{
"^":"a;Cd>,wd>,N2<,Te<"},
hs:{
@@ -22807,7 +23173,7 @@
z=$.pl()
y="Unhandled binding to Node: "+H.d(this)+" "+H.d(b)+" "+H.d(c)+" "+H.d(d)
z.toString
-if(typeof console!="undefined")console.error(y)},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]],
+if(typeof console!="undefined")console.error(y)},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]],
Ih:[function(a,b){var z
if(this.mD==null)return
z=this.gCd(this).Rz(0,b)
@@ -22844,7 +23210,7 @@
y.Og(x,b,c,d)
y.Ca=M.IP(x).yI(y.gqf())
z.u(0,b,y)
-return y},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return y},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
DT:{
"^":"V2;lr,xT?,kr<,Mf,QO?,jH?,mj?,IT,dv@,N1,mD,Ck",
gN1:function(){return this.N1},
@@ -22877,7 +23243,7 @@
z=new M.p8(this,c,b,d)
this.gCd(this).u(0,b,z)
return z
-default:return M.V2.prototype.Z1.call(this,this,b,c,d)}},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]],
+default:return M.V2.prototype.Z1.call(this,this,b,c,d)}},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]],
Ih:[function(a,b){var z
switch(b){case"bind":z=this.kr
if(z==null)return
@@ -22924,7 +23290,7 @@
y=u}t=M.Fz(x,y)
M.HP(t,w,a,b,c)
M.SH(t,a)
-return t},function(a,b){return this.a5(a,b,null)},"ZK","call$3",null,"gmJ",0,6,null,77,77,77,280,[],279,[],281,[]],
+return t},function(a,b){return this.a5(a,b,null)},"ZK","call$3",null,"gmJ",0,6,null,77,77,77,282,[],281,[],283,[]],
gzH:function(){return this.xT},
gnv:function(a){var z,y,x,w,v
this.Sy()
@@ -22963,7 +23329,7 @@
if(a!=null)v.sQO(a)
else if(w)M.KE(v,this.N1,u)
else M.GM(J.nX(v))
-return!0},function(){return this.wh(null)},"Sy","call$1",null,"ga6",0,2,null,77,604,[]],
+return!0},function(){return this.wh(null)},"Sy","call$1",null,"ga6",0,2,null,77,617,[]],
$isDT:true,
static:{"^":"mn,EW,Sf,To",Fz:[function(a,b){var z,y,x
z=J.Lh(b,a,!1)
@@ -22973,13 +23339,13 @@
else y=!1
if(y)return z
for(x=J.cO(a);x!=null;x=x.nextSibling)z.appendChild(M.Fz(x,b))
-return z},"call$2","Tkw",4,0,null,259,[],282,[]],TA:[function(a){var z,y,x,w
+return z},"call$2","Tkw",4,0,null,261,[],284,[]],TA:[function(a){var z,y,x,w
z=J.VN(a)
if(W.Pv(z.defaultView)==null)return z
y=$.LQ().t(0,z)
if(y==null){y=z.implementation.createHTMLDocument("")
for(;x=y.lastChild,x!=null;){w=x.parentNode
-if(w!=null)w.removeChild(x)}$.LQ().u(0,z,y)}return y},"call$1","nt",2,0,null,256,[]],pZ:[function(a){var z,y,x,w,v,u
+if(w!=null)w.removeChild(x)}$.LQ().u(0,z,y)}return y},"call$1","nt",2,0,null,258,[]],pZ:[function(a){var z,y,x,w,v,u
z=J.RE(a)
y=z.gM0(a).createElement("template",null)
z.gKV(a).insertBefore(y,a)
@@ -22994,27 +23360,27 @@
v.removeAttribute(w)
y.setAttribute(w,u)
break
-default:}}return y},"call$1","fo",2,0,null,283,[]],KE:[function(a,b,c){var z,y,x,w
+default:}}return y},"call$1","fo",2,0,null,285,[]],KE:[function(a,b,c){var z,y,x,w
z=J.nX(a)
if(c){J.Kv(z,b)
-return}for(y=J.RE(b),x=J.RE(z);w=y.gq6(b),w!=null;)x.jx(z,w)},"call$3","BZ",6,0,null,256,[],283,[],284,[]],GM:[function(a){var z,y
+return}for(y=J.RE(b),x=J.RE(z);w=y.gq6(b),w!=null;)x.jx(z,w)},"call$3","BZ",6,0,null,258,[],285,[],286,[]],GM:[function(a){var z,y
z=new M.OB()
y=J.MK(a,$.cz())
if(M.wR(a))z.call$1(a)
-y.aN(y,z)},"call$1","DR",2,0,null,285,[]],oR:[function(){if($.To===!0)return
+y.aN(y,z)},"call$1","DR",2,0,null,287,[]],oR:[function(){if($.To===!0)return
$.To=!0
var z=document.createElement("style",null)
z.textContent=$.cz()+" { display: none; }"
document.head.appendChild(z)},"call$0","Lv",0,0,null]}},
OB:{
-"^":"Tp:150;",
+"^":"Tp:153;",
call$1:[function(a){var z
if(!M.Ky(a).wh(null)){z=J.x(a)
-M.GM(J.nX(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a)))}},"call$1",null,2,0,null,256,[],"call"],
+M.GM(J.nX(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a)))}},"call$1",null,2,0,null,258,[],"call"],
$isEH:true},
DO:{
-"^":"Tp:223;",
-call$1:[function(a){return H.d(a)+"[template]"},"call$1",null,2,0,null,417,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return H.d(a)+"[template]"},"call$1",null,2,0,null,427,[],"call"],
$isEH:true},
p8:{
"^":"a;ud,lr,eS,ay",
@@ -23033,7 +23399,7 @@
this.ud=null},"call$0","gJK",0,0,null],
$isTR:true},
NW:{
-"^":"Tp:341;a,b,c,d",
+"^":"Tp:343;a,b,c,d",
call$2:[function(a,b){var z,y,x,w
for(;z=J.U6(a),J.de(z.t(a,0),"_");)a=z.yn(a,1)
if(this.d)if(z.n(a,"if")){this.a.b=!0
@@ -23064,7 +23430,7 @@
if(0>=z.length)return H.e(z,0)
y=H.d(z[0])+H.d(a)
if(3>=z.length)return H.e(z,3)
-return y+H.d(z[3])},"call$1","gBg",2,0,605,23,[]],
+return y+H.d(z[3])},"call$1","gBg",2,0,618,23,[]],
DJ:[function(a){var z,y,x,w,v,u,t
z=this.EJ
if(0>=z.length)return H.e(z,0)
@@ -23075,7 +23441,7 @@
if(t>=z.length)return H.e(z,t)
u=z[t]
u=typeof u==="string"?u:H.d(u)
-y.vM=y.vM+u}return y.vM},"call$1","gqD",2,0,606,607,[]],
+y.vM=y.vM+u}return y.vM},"call$1","gqD",2,0,619,620,[]],
Yn:function(a){this.bX=this.EJ.length===4?this.gBg():this.gqD()}},
TG:{
"^":"a;e9,YC,xG,pq,t9,A7,js,Q3,JM,d6,rV,yO,XV,eD,FS,IY,U9,DO,Fy",
@@ -23109,7 +23475,7 @@
x=this.xG
x=x!=null?x:[]
w=G.jj(x,0,J.q8(x),y,0,J.q8(y))
-if(w.length!==0)this.El(w)},"call$1","ghC",2,0,null,226,[]],
+if(w.length!==0)this.El(w)},"call$1","ghC",2,0,null,228,[]],
wx:[function(a){var z,y,x,w
z=J.x(a)
if(z.n(a,-1))return this.e9.N1
@@ -23135,7 +23501,7 @@
v=J.TZ(this.e9.N1)
u=J.tx(y)
if(x)v.insertBefore(b,u)
-else if(c!=null)for(z=J.GP(c);z.G();)v.insertBefore(z.gl(),u)},"call$4","gaF",8,0,null,47,[],199,[],608,[],281,[]],
+else if(c!=null)for(z=J.GP(c);z.G();)v.insertBefore(z.gl(),u)},"call$4","gaF",8,0,null,47,[],202,[],621,[],283,[]],
MC:[function(a){var z,y,x,w,v,u,t,s
z=[]
z.$builtinTypeInfo=[W.KV]
@@ -23152,7 +23518,7 @@
if(s==null?w==null:s===w)w=x
v=s.parentNode
if(v!=null)v.removeChild(s)
-z.push(s)}return new M.Ya(z,t)},"call$1","gLu",2,0,null,47,[]],
+z.push(s)}return new M.Ya(z,t)},"call$1","gtx",2,0,null,47,[]],
El:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k
if(this.pq)return
z=this.e9
@@ -23178,9 +23544,9 @@
k=null}else{m=[]
if(this.DO!=null)o=this.Mv(o)
k=o!=null?z.a5(o,v,m):null
-l=null}this.lP(p,k,l,m)}}for(z=u.gUQ(u),z=H.VM(new H.MH(null,J.GP(z.l6),z.T6),[H.Kp(z,0),H.Kp(z,1)]);z.G();)this.uS(J.AB(z.lo))},"call$1","gZX",2,0,609,250,[]],
+l=null}this.lP(p,k,l,m)}}for(z=u.gUQ(u),z=H.VM(new H.MH(null,J.GP(z.l6),z.T6),[H.Kp(z,0),H.Kp(z,1)]);z.G();)this.uS(J.AB(z.lo))},"call$1","gZX",2,0,622,252,[]],
uS:[function(a){var z
-for(z=J.GP(a);z.G();)J.wC(z.gl())},"call$1","gZC",2,0,null,281,[]],
+for(z=J.GP(a);z.G();)J.wC(z.gl())},"call$1","gYl",2,0,null,283,[]],
Gb:[function(){var z=this.IY
if(z==null)return
z.ed()
@@ -23195,21 +23561,21 @@
this.FS=null}this.e9.kr=null
this.pq=!0},"call$0","gJK",0,0,null]},
ts:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return[a]},"call$1",null,2,0,null,21,[],"call"],
$isEH:true},
Kj:{
-"^":"Tp:484;a",
+"^":"Tp:493;a",
call$1:[function(a){var z,y,x
z=J.U6(a)
y=z.t(a,0)
x=z.t(a,1)
if(!(null!=x&&!1!==x))return
-return this.a?y:[y]},"call$1",null,2,0,null,607,[],"call"],
+return this.a?y:[y]},"call$1",null,2,0,null,620,[],"call"],
$isEH:true},
VU:{
-"^":"Tp:223;b",
-call$1:[function(a){return this.b.Az(J.iZ(J.MQ(a)))},"call$1",null,2,0,null,368,[],"call"],
+"^":"Tp:225;b",
+call$1:[function(a){return this.b.Az(J.iZ(J.MQ(a)))},"call$1",null,2,0,null,373,[],"call"],
$isEH:true},
Ya:{
"^":"a;yT>,kU>",
@@ -23225,11 +23591,11 @@
x=new M.ic(y,c,null,null,"text",x)
x.Og(y,"text",c,d)
z.u(0,b,x)
-return x},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return x},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
ic:{
"^":"TR;qP,ZY,xS,PB,eS,ay",
EC:[function(a){var z=this.qP
-J.c9(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,226,[]]},
+J.c9(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,228,[]]},
wl:{
"^":"V2;N1,mD,Ck",
gN1:function(){return this.N1},
@@ -23246,9 +23612,9 @@
y.Og(x,"value",c,d)
y.Ca=M.IP(x).yI(y.gqf())
z.u(0,b,y)
-return y},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]}}],["template_binding.src.binding_delegate","package:template_binding/src/binding_delegate.dart",,O,{
+return y},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]}}],["template_binding.src.binding_delegate","package:template_binding/src/binding_delegate.dart",,O,{
"^":"",
-T4:{
+ve:{
"^":"a;"}}],["template_binding.src.node_binding","package:template_binding/src/node_binding.dart",,X,{
"^":"",
TR:{
@@ -23276,43 +23642,43 @@
this.EC(J.Vm(this.xS))},
$isTR:true},
VD:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
-return z.EC(J.Vm(z.xS))},"call$1",null,2,0,null,368,[],"call"],
+return z.EC(J.Vm(z.xS))},"call$1",null,2,0,null,373,[],"call"],
$isEH:true}}],])
I.$finishClasses($$,$,null)
$$=null
J.O.$isString=true
-J.O.$isfR=true
-J.O.$asfR=[J.O]
+J.O.$isTx=true
+J.O.$asTx=[J.O]
J.O.$isa=true
-J.P.$isfR=true
-J.P.$asfR=[J.P]
+J.P.$isTx=true
+J.P.$asTx=[J.P]
J.P.$isa=true
J.im.$isint=true
-J.im.$isfR=true
-J.im.$asfR=[J.P]
-J.im.$isfR=true
-J.im.$asfR=[J.P]
-J.im.$isfR=true
-J.im.$asfR=[J.P]
+J.im.$isTx=true
+J.im.$asTx=[J.P]
+J.im.$isTx=true
+J.im.$asTx=[J.P]
+J.im.$isTx=true
+J.im.$asTx=[J.P]
J.im.$isa=true
J.GW.$isdouble=true
-J.GW.$isfR=true
-J.GW.$asfR=[J.P]
-J.GW.$isfR=true
-J.GW.$asfR=[J.P]
+J.GW.$isTx=true
+J.GW.$asTx=[J.P]
+J.GW.$isTx=true
+J.GW.$asTx=[J.P]
J.GW.$isa=true
W.KV.$isKV=true
W.KV.$isD0=true
W.KV.$isa=true
W.M5.$isa=true
-N.qV.$isfR=true
-N.qV.$asfR=[N.qV]
+N.qV.$isTx=true
+N.qV.$asTx=[N.qV]
N.qV.$isa=true
P.a6.$isa6=true
-P.a6.$isfR=true
-P.a6.$asfR=[P.a6]
+P.a6.$isTx=true
+P.a6.$asTx=[P.a6]
P.a6.$isa=true
P.Od.$isa=true
J.Q.$isList=true
@@ -23483,8 +23849,8 @@
P.jp.$isa=true
W.D0.$isD0=true
W.D0.$isa=true
-P.fR.$isfR=true
-P.fR.$isa=true
+P.Tx.$isTx=true
+P.Tx.$isa=true
P.aY.$isaY=true
P.aY.$isa=true
P.lO.$islO=true
@@ -23494,11 +23860,11 @@
P.nP.$isnP=true
P.nP.$isa=true
P.iP.$isiP=true
-P.iP.$isfR=true
-P.iP.$asfR=[null]
+P.iP.$isTx=true
+P.iP.$asTx=[null]
P.iP.$isa=true
-P.lx.$islx=true
-P.lx.$isa=true
+P.ti.$isti=true
+P.ti.$isa=true
P.b8.$isb8=true
P.b8.$isa=true
P.EH.$isEH=true
@@ -23536,7 +23902,7 @@
return J.ks(a)}
J.x=function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.im.prototype
return J.GW.prototype}if(typeof a=="string")return J.O.prototype
-if(a==null)return J.ht.prototype
+if(a==null)return J.Jh.prototype
if(typeof a=="boolean")return J.kn.prototype
if(a.constructor==Array)return J.Q.prototype
if(typeof a!="object")return a
@@ -23599,6 +23965,7 @@
J.QC=function(a){return J.w1(a).wg(a)}
J.QE=function(a){return J.RE(a).gCd(a)}
J.QM=function(a,b){return J.RE(a).Rg(a,b)}
+J.QQ=function(a,b,c,d,e){return J.w1(a).YW(a,b,c,d,e)}
J.RF=function(a,b){return J.RE(a).WO(a,b)}
J.TD=function(a){return J.RE(a).i4(a)}
J.TZ=function(a){return J.RE(a).gKV(a)}
@@ -23614,7 +23981,6 @@
J.Ut=function(a,b,c,d){return J.RE(a).rJ(a,b,c,d)}
J.V1=function(a,b){return J.w1(a).Rz(a,b)}
J.VN=function(a){return J.RE(a).gM0(a)}
-J.VZ=function(a,b,c,d,e){return J.w1(a).YW(a,b,c,d,e)}
J.Vm=function(a){return J.RE(a).gP(a)}
J.Vq=function(a){return J.RE(a).xo(a)}
J.Vs=function(a){return J.RE(a).gQg(a)}
@@ -23640,6 +24006,7 @@
J.bs=function(a){return J.RE(a).JP(a)}
J.c1=function(a,b){return J.Wx(a).O(a,b)}
J.c9=function(a,b){return J.RE(a).sa4(a,b)}
+J.cG=function(a){return J.RE(a).Ki(a)}
J.cO=function(a){return J.RE(a).gq6(a)}
J.cZ=function(a,b,c,d){return J.RE(a).On(a,b,c,d)}
J.co=function(a,b){return J.rY(a).nC(a,b)}
@@ -23647,9 +24014,9 @@
if(typeof a!="object")return b!=null&&a===b
return J.x(a).n(a,b)}
J.e2=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){return J.RE(a).nH(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)}
+J.eJ=function(a,b){return J.U6(a).cn(a,b)}
J.eh=function(a,b){return J.RE(a).Ne(a,b)}
J.f5=function(a){return J.RE(a).gI(a)}
-J.ff=function(a,b,c){return J.U6(a).Pk(a,b,c)}
J.hf=function(a,b,c){return J.U6(a).XU(a,b,c)}
J.i4=function(a,b){return J.w1(a).Zv(a,b)}
J.iG=function(a,b){return J.RE(a).szZ(a,b)}
@@ -23672,6 +24039,7 @@
J.on=function(a){return J.RE(a).gtT(a)}
J.p0=function(a,b){if(typeof a=="number"&&typeof b=="number")return a*b
return J.Wx(a).U(a,b)}
+J.pB=function(a,b,c){return J.U6(a).Pk(a,b,c)}
J.pO=function(a){return J.U6(a).gor(a)}
J.pP=function(a){return J.RE(a).gDD(a)}
J.pb=function(a,b){return J.w1(a).Vr(a,b)}
@@ -23718,16 +24086,17 @@
C.Fm=new J.kn()
C.yX=new J.GW()
C.wq=new J.im()
-C.x0=new J.ht()
+C.x0=new J.Jh()
C.oD=new J.P()
C.Kn=new J.O()
-C.mI=new K.nd()
+C.mI=new K.ndx()
C.Us=new A.yL()
C.nJ=new K.vly()
C.Wj=new P.JF()
C.za=new A.jh()
C.NU=new P.R8()
C.v8=new P.nU()
+C.xE=A.wM.prototype
C.YZ=Q.Tg.prototype
C.kk=Z.Ps.prototype
C.WA=new L.WAE("Collected")
@@ -23735,38 +24104,46 @@
C.nj=new L.WAE("Native")
C.IK=O.CN.prototype
C.YD=F.vc.prototype
-C.j8=R.i6.prototype
-C.AR=new A.V3("navigation-bar-isolate")
+C.j8=R.E0.prototype
+C.O0=R.lw.prototype
C.Vy=new A.V3("disassembly-entry")
C.Br=new A.V3("observatory-element")
C.dA=new A.V3("heap-profile")
C.I3=new A.V3("script-view")
+C.XG=new A.V3("nav-refresh")
C.E6=new A.V3("field-ref")
C.aM=new A.V3("isolate-summary")
C.Is=new A.V3("response-viewer")
+C.qT=new A.V3("nav-menu-item")
+C.KI=new A.V3("library-nav-menu")
C.nu=new A.V3("function-view")
C.jR=new A.V3("isolate-profile")
C.xW=new A.V3("code-view")
-C.aQ=new A.V3("class-view")
+C.aQx=new A.V3("class-view")
C.Gg=new A.V3("library-view")
C.U8=new A.V3("code-ref")
C.rc=new A.V3("message-viewer")
+C.NT=new A.V3("top-nav-menu")
C.js=new A.V3("stack-trace")
C.Ur=new A.V3("script-ref")
C.OS=new A.V3("class-ref")
C.jFV=new A.V3("isolate-list")
-C.lT=new A.V3("breakpoint-list")
-C.KG=new A.V3("navigation-bar")
+C.jy=new A.V3("breakpoint-list")
C.VW=new A.V3("instance-ref")
C.Gu=new A.V3("collapsible-content")
C.pE=new A.V3("stack-frame")
C.y2=new A.V3("observatory-application")
+C.zaS=new A.V3("isolate-nav-menu")
+C.t9=new A.V3("class-nav-menu")
C.uW=new A.V3("error-view")
+C.pc=new A.V3("nav-menu")
C.KH=new A.V3("json-view")
C.YQ=new A.V3("function-ref")
C.QU=new A.V3("library-ref")
C.Tq=new A.V3("field-view")
C.JD=new A.V3("service-ref")
+C.nW=new A.V3("nav-bar")
+C.DKS=new A.V3("curly-block")
C.be=new A.V3("instance-view")
C.er=E.Fv.prototype
C.ny=new P.a6(0)
@@ -23780,19 +24157,20 @@
C.ph=H.VM(new W.e0("message"),[W.DD])
C.MC=D.m8.prototype
C.LT=A.Gk.prototype
-C.Xo=U.GG.prototype
+C.Xo=U.AX.prototype
C.Yu=N.yb.prototype
C.Vc=K.NM.prototype
C.W3=W.zU.prototype
C.cp=B.pR.prototype
C.yK=Z.hx.prototype
C.b9=L.u7.prototype
+C.RR=A.fl.prototype
C.XH=X.E7.prototype
C.Qt=D.St.prototype
C.Nm=J.Q.prototype
C.ON=J.GW.prototype
C.jn=J.im.prototype
-C.jN=J.ht.prototype
+C.jN=J.Jh.prototype
C.CD=J.P.prototype
C.xB=J.O.prototype
C.Mc=function(hooks) {
@@ -23927,13 +24305,14 @@
}
C.xr=new P.by(null,null)
C.A3=new P.Cf(null)
-C.Ap=new P.dI(null)
+C.Ap=new P.pD(null)
C.GB=Z.vj.prototype
-C.Ab=new N.qV("FINER",400)
+C.VZ=new N.qV("FINER",400)
C.R5=new N.qV("FINE",500)
C.IF=new N.qV("INFO",800)
C.cV=new N.qV("SEVERE",1000)
C.UP=new N.qV("WARNING",900)
+C.S3=A.Zt.prototype
C.Z3=R.LU.prototype
C.MG=M.T2.prototype
I.makeConstantList = function(list) {
@@ -23968,10 +24347,12 @@
C.va=new H.LPe(1,{enumerate:K.UM()},C.MEG)
C.Wp=L.PF.prototype
C.S2=W.H9.prototype
-C.Xg=Q.qT.prototype
-C.Vn=F.Xd.prototype
+C.kD=A.F1.prototype
+C.SU=A.aQ.prototype
+C.nn=A.Qa.prototype
+C.J7=A.vI.prototype
C.t5=W.yk.prototype
-C.k0=V.F1.prototype
+C.k0=V.lI.prototype
C.Pf=Z.uL.prototype
C.xk=A.XP.prototype
C.Iv=A.ir.prototype
@@ -23985,15 +24366,18 @@
C.N4=new H.GD("dart.core.DateTime")
C.Ts=new H.GD("dart.core.bool")
C.fz=new H.GD("[]")
+C.aP=new H.GD("active")
+C.Es=new H.GD("anchor")
C.wh=new H.GD("app")
+C.S4=new H.GD("busy")
C.Ka=new H.GD("call")
+C.AV=new H.GD("callback")
C.XA=new H.GD("cls")
C.b1=new H.GD("code")
C.EX=new H.GD("codeRef")
C.C2=new H.GD("coveredPercentageFormatted")
C.h1=new H.GD("currentHash")
C.tv=new H.GD("currentHashUri")
-C.T7=new H.GD("currentIsolateName")
C.Na=new H.GD("devtools")
C.Jw=new H.GD("displayValue")
C.nN=new H.GD("dynamic")
@@ -24016,18 +24400,19 @@
C.Di=new H.GD("iconClass")
C.EN=new H.GD("id")
C.fn=new H.GD("instance")
-C.eJ=new H.GD("instruction")
+C.i6=new H.GD("instruction")
C.zD=new H.GD("internal")
C.ai=new H.GD("isEmpty")
C.nZ=new H.GD("isNotEmpty")
C.Z8=new H.GD("isolate")
C.Gd=new H.GD("json")
C.fy=new H.GD("kind")
+C.QL=new H.GD("last")
C.Wn=new H.GD("length")
C.EV=new H.GD("library")
C.cg=new H.GD("libraryRef")
C.Cv=new H.GD("line")
-C.AX=new H.GD("links")
+C.dB=new H.GD("link")
C.PC=new H.GD("dart.core.int")
C.zu=new H.GD("members")
C.US=new H.GD("messageType")
@@ -24050,6 +24435,7 @@
C.fX=new H.GD("script")
C.Be=new H.GD("scriptRef")
C.eC=new H.GD("[]=")
+C.Kt=new H.GD("shortName")
C.MB=new H.GD("text")
C.p1=new H.GD("ticks")
C.jI=new H.GD("topExclusiveCodes")
@@ -24060,7 +24446,9 @@
C.ct=new H.GD("userName")
C.ls=new H.GD("value")
C.eR=new H.GD("valueType")
+C.KS=new H.GD("vmName")
C.z9=new H.GD("void")
+C.lx=A.tz.prototype
C.SX=H.mm('qC')
C.WP=new H.Lm(C.SX,"K",0)
C.SL=H.mm('Ae')
@@ -24070,19 +24458,22 @@
C.Gsc=H.mm('wn')
C.io=new H.Lm(C.Gsc,"E",0)
C.nz=new H.Lm(C.SX,"V",0)
-C.Ye=H.mm('hx')
-C.q0=H.mm('Dg')
+C.RP=H.mm('hx')
+C.Ln=H.mm('Dg')
C.z6Y=H.mm('Tg')
-C.Dl=H.mm('F1')
C.eY=H.mm('n6')
C.Vh=H.mm('Pz')
-C.RJ=H.mm('JG')
+C.zq=H.mm('Qa')
+C.tf=H.mm('Zt')
+C.I5=H.mm('JG')
C.z7=H.mm('G6')
+C.GTO=H.mm('F1')
C.nY=H.mm('a')
C.Yc=H.mm('iP')
-C.Qa=H.mm('u7')
+C.kA=H.mm('u7')
C.PT=H.mm('I2')
C.Wup=H.mm('LZ')
+C.P0k=H.mm('lI')
C.T1=H.mm('Wy')
C.hG=H.mm('ir')
C.aj=H.mm('fI')
@@ -24091,37 +24482,41 @@
C.G4=H.mm('CN')
C.O4=H.mm('double')
C.yw=H.mm('int')
-C.nW=H.mm('knI')
+C.RcY=H.mm('aQ')
+C.ld=H.mm('AX')
+C.yiu=H.mm('knI')
C.iN=H.mm('yc')
C.HI=H.mm('Pg')
C.ila=H.mm('xI')
C.lk=H.mm('mJ')
-C.KI=H.mm('LU')
+C.lpG=H.mm('LU')
+C.mR=H.mm('fl')
C.jV=H.mm('rF')
C.JZ=H.mm('E7')
C.wd=H.mm('vj')
-C.Oi=H.mm('Xd')
-C.Pa=H.mm('St')
+C.CTH=H.mm('St')
C.Rg=H.mm('yb')
C.cx5=H.mm('m8')
C.l49=H.mm('uL')
C.yQ=H.mm('EH')
C.Im=H.mm('X6')
-C.vW6=H.mm('PF')
+C.GG=H.mm('PF')
+C.FU=H.mm('lw')
+C.rd6=H.mm('E0')
C.nG=H.mm('zt')
C.Xb=H.mm('vc')
C.yG=H.mm('nm')
+C.px=H.mm('tz')
C.ow=H.mm('E9')
+C.PV=H.mm('wM')
C.Db=H.mm('String')
C.EP=H.mm('NM')
-C.bh=H.mm('i6')
+C.FsU=H.mm('vI')
C.Bm=H.mm('XP')
C.Tn=H.mm('T2')
C.hg=H.mm('hd')
C.dd=H.mm('pR')
C.Ud8=H.mm('Ps')
-C.zy=H.mm('GG')
-C.pn=H.mm('qT')
C.HL=H.mm('bool')
C.Qf=H.mm('Null')
C.HH=H.mm('dynamic')
@@ -24167,8 +24562,8 @@
$.Bh=0
$.uP=!0
$.To=null
-$.Dq=["AZ","Ak","B2","BN","BT","BX","Ba","Bf","Bk","C","C0","C4","CL","Ch","D","D3","D6","Dd","De","E","Ec","F","FL","FV","Fr","G6","GB","GG","GT","HG","Hn","Hs","IW","Id","Ih","Is","J","J2","J3","JG","JP","JV","Ja","Jk","KI","Kb","LV","LZ","M8","Md","Mi","Mq","Mu","NC","NZ","Ne","Nj","O","Om","On","PM","PQ","PZ","Pa","Pk","Pv","Pz","Q0","Qi","Qq","R3","R4","RB","RP","RR","Rg","Rz","SS","Se","T","TJ","TP","TW","Ta","Tc","Tk","Tp","U","UD","UH","UZ","Ub","Uc","V","V1","VR","Vk","Vr","W","W3","W4","WL","WO","WZ","Wt","X6","XG","XL","XU","Xl","Y","Y9","YF","YU","YW","Z","Z1","Z2","ZB","ZL","Zc","Ze","Zv","aC","aN","aZ","bA","bS","bj","br","bu","cO","cU","cn","cp","ct","d0","dR","dd","du","eR","ea","ek","eo","er","es","ev","ez","f6","f9","fk","fm","fz","g","gA","gAq","gAy","gB","gB1","gBA","gBW","gCO","gCY","gCd","gCj","gDD","gEh","gF0","gF8","gG0","gG1","gG3","gGQ","gGd","gGj","gHX","gHm","gHu","gI","gIF","gIt","gJ0","gJS","gJf","gJp","gKE","gKM","gKV","gLA","gLm","gLx","gM0","gMB","gMj","gMt","gN","gN7","gNF","gNI","gNa","gNh","gNl","gO3","gOc","gOl","gP","gP1","gPe","gPu","gPw","gPy","gQ7","gQW","gQg","gQr","gRA","gRd","gRn","gRu","gTq","gUQ","gUV","gUj","gUy","gUz","gV4","gVa","gVl","gW0","gWT","gX3","gXc","gXh","gXt","gZ8","gZf","ga4","gaK","gai","gan","gbG","gbP","gbx","gcC","ge6","geJ","geT","geb","gey","gfN","gfY","gfb","gfc","ghU","ghf","ghm","gi9","giC","giO","gig","gjL","gjO","gjT","gjb","gk5","gkG","gkU","gkc","gkf","gkp","gl0","gl7","glc","gm0","gm2","gmH","gmW","gmm","gng","gnv","goE","goc","gor","gpQ","gpo","gq6","gqO","gqX","gqY","gqn","grK","grZ","grj","grs","gt0","gt5","gtD","gtH","gtN","gtT","gtY","gtp","guD","guw","gvH","gvL","gvc","gvt","gwd","gx8","gxX","gxj","gxr","gyH","gyT","gys","gz1","gzP","gzZ","gzh","gzj","gzw","h","h8","hZ","hc","hr","i","i4","iM","iw","j","jh","jp","jx","k0","kO","ka","l5","lj","m","mK","n","nB","nC","nH","ni","nq","nt","oB","oC","oP","oW","oZ","od","oo","pM","pZ","pr","ps","q1","qA","qC","qH","qZ","r4","r6","rJ","sAq","sAy","sB","sB1","sBA","sBW","sCO","sCY","sCd","sCj","sEh","sF0","sF8","sG1","sG3","sGQ","sGd","sGj","sHX","sHm","sHu","sIF","sIt","sJ0","sJS","sKM","sKV","sLA","sLx","sM0","sMB","sMj","sMt","sN","sN7","sNF","sNI","sNa","sNh","sNl","sO3","sOc","sOl","sP","sPe","sPu","sPw","sPy","sQ7","sQr","sRA","sRd","sRn","sRu","sTq","sUQ","sUy","sUz","sV4","sVa","sWT","sX3","sXc","sXh","sXt","sZ8","sa4","saK","sai","san","sbG","sbP","scC","se6","seJ","seT","seb","sfN","sfY","sfb","sfc","shU","shf","shm","siC","sig","sjL","sjO","sjT","sjb","sk5","skG","skU","skc","skf","skp","sl7","sm0","sm2","smH","sng","snv","soE","soc","spQ","spo","sq6","sqO","sqX","sqY","srK","srs","st0","st5","stD","stN","stT","stY","suD","suw","svH","svL","svt","swd","sxX","sxj","sxr","syH","syT","sys","sz1","szZ","szh","szj","szw","t","tZ","tg","tt","tx","u","u8","uB","w","wE","wH","wL","wR","wW","wg","x3","xc","xe","xo","y0","yC","yF","yG","yM","yN","yc","ym","yn","yq","yu","yx","yy","z2","zV","zr"]
-$.Au=[C.Ye,Z.hx,{created:Z.HC},C.q0,H.Dg,{"":H.bu},C.z6Y,Q.Tg,{created:Q.rt},C.Dl,V.F1,{created:V.fv},C.RJ,Q.JG,{created:Q.Zo},C.z7,B.G6,{created:B.Dw},C.Qa,L.u7,{created:L.Cu},C.Wup,H.LZ,{"":H.UI},C.hG,A.ir,{created:A.oa},C.aj,U.fI,{created:U.Ry},C.Qw,E.Fv,{created:E.AH},C.G4,O.CN,{created:O.On},C.nW,A.knI,{created:A.Th},C.HI,H.Pg,{"":H.aR},C.ila,Q.xI,{created:Q.lK},C.KI,R.LU,{created:R.rA},C.JZ,X.E7,{created:X.jD},C.wd,Z.vj,{created:Z.mA},C.Oi,F.Xd,{created:F.L1},C.Pa,D.St,{created:D.JR},C.Rg,N.yb,{created:N.N0},C.cx5,D.m8,{created:D.Tt},C.l49,Z.uL,{created:Z.Hx},C.vW6,L.PF,{created:L.A5},C.Xb,F.vc,{created:F.Fe},C.yG,K.nm,{created:K.an},C.ow,F.E9,{created:F.TW},C.EP,K.NM,{created:K.op},C.bh,R.i6,{created:R.Hv},C.Bm,A.XP,{created:A.XL},C.Tn,M.T2,{created:M.SP},C.hg,W.hd,{},C.dd,B.pR,{created:B.b4},C.Ud8,Z.Ps,{created:Z.zg},C.zy,U.GG,{created:U.v9},C.pn,Q.qT,{created:Q.BW},C.ri,W.yy,{},C.Hk,A.Gk,{created:A.cY},C.IWi,X.Vu,{created:X.B4}]
+$.Dq=["AZ","B2","BN","BT","BX","Ba","Bf","Bk","C","C0","C4","CL","Ch","D","D3","D6","Dd","De","Dy","E","Ec","F","FL","FV","Fr","G6","GB","GG","GT","HG","Hn","Hs","IW","Id","Ih","Is","J","J2","J3","JG","JP","JV","Ja","Jk","K1","KI","Kb","LV","LZ","M8","Md","Mi","Mq","Mu","NC","NZ","Ne","Nj","O","Om","On","PA","PM","PQ","PZ","Pa","Pk","Pv","Q0","Qi","Qq","Qx","R3","R4","RB","RF","RP","RR","Rg","Rz","SF","SS","Se","T","TJ","TP","TW","Tc","Tk","Tp","Ty","U","UD","UH","UZ","Uc","V","V1","VI","VR","Vk","Vr","W","W3","W4","WL","WO","WZ","Wt","X6","XG","XL","XU","Xl","Y","Y9","YF","YU","YW","Z","Z1","Z2","ZB","ZL","Ze","Zv","aC","aN","aZ","bA","bS","bj","br","bu","cO","cU","cn","ct","d0","dR","dd","du","eR","ea","ek","eo","er","es","ev","ez","f6","f9","fk","fm","fz","g","gA","gAp","gAq","gAu","gAy","gB","gB1","gBA","gBW","gCO","gCY","gCd","gCj","gDD","gDt","gEh","gF0","gF8","gFR","gFw","gG0","gG1","gG3","gGQ","gGV","gGd","gGj","gHX","gHm","gHu","gI","gIF","gIt","gJ0","gJS","gJf","gJo","gJp","gKE","gKM","gKU","gKV","gLA","gLY","gLm","gLx","gM0","gMB","gMj","gN","gN7","gNF","gNI","gNh","gNl","gO3","gO9","gOc","gOl","gP","gP1","gPe","gPj","gPu","gPw","gPy","gQ7","gQW","gQg","gQr","gRA","gRd","gRn","gRu","gSB","gTq","gUQ","gUV","gUj","gUy","gUz","gV4","gVa","gVl","gW0","gWT","gX3","gXc","gXh","gXt","gZ8","gZC","gZf","ga4","gaK","gai","gbG","gbP","gbV","gbx","gcC","gcL","gdU","geJ","geT","geb","gey","gfN","gfY","gfb","gfc","ghU","ghf","ghm","gi9","giC","giO","gig","giy","gjL","gjO","gjT","gjb","gk5","gkG","gkU","gkc","gkf","gkp","gl0","gl7","glc","gm0","gm2","gmH","gmW","gmm","gng","gnv","gnx","goE","goc","gor","gpQ","gpo","gq3","gq6","gqO","gqY","gqn","grK","grU","grZ","grs","gt0","gt5","gtD","gtH","gtN","gtT","gtY","gtp","guD","guw","gvH","gvL","gvR","gvc","gvt","gwd","gx8","gxX","gxj","gxr","gxw","gyH","gyT","gys","gz1","gzP","gzZ","gzh","gzj","gzw","h","h8","hZ","hc","hr","i","i4","iF","iM","ii","iw","j","jh","jp","jx","k0","kO","ka","l5","lj","m","mK","n","nB","nC","nH","ni","nq","nt","oB","oC","oP","oW","oZ","od","oo","pM","pZ","pr","ps","q1","qA","qC","qH","qZ","r4","r6","rJ","sAp","sAq","sAu","sAy","sB","sB1","sBA","sBW","sCO","sCY","sCd","sCj","sDt","sEh","sF0","sF8","sFR","sFw","sG1","sG3","sGQ","sGV","sGd","sGj","sHX","sHm","sHu","sIF","sIt","sJ0","sJS","sJo","sKM","sKU","sKV","sLA","sLY","sLx","sM0","sMB","sMj","sN","sN7","sNF","sNI","sNh","sNl","sO3","sO9","sOc","sOl","sP","sPe","sPj","sPu","sPw","sPy","sQ7","sQr","sRA","sRd","sRn","sRu","sSB","sTq","sUQ","sUy","sUz","sV4","sVa","sWT","sX3","sXc","sXh","sXt","sZ8","sZC","sa4","saK","sai","sbG","sbP","sbV","scC","scL","sdU","seJ","seT","seb","sfN","sfY","sfb","sfc","shU","shf","shm","siC","sig","siy","sjL","sjO","sjT","sjb","sk5","skG","skU","skc","skf","skp","sl7","sm0","sm2","smH","sng","snv","snx","soE","soc","spQ","spo","sq3","sq6","sqO","sqY","srU","srZ","srs","st0","st5","stD","stN","stT","stY","suD","suw","svH","svL","svR","svt","swd","sxX","sxj","sxr","sxw","syH","syT","sys","sz1","szZ","szh","szj","szw","t","tZ","tg","tt","u","u8","uB","vD","w","wE","wH","wL","wR","wW","wY","wg","x3","xc","xe","xo","y0","yC","yF","yG","yM","yN","yc","ym","yn","yq","yu","yx","yy","z2","zV","zr"]
+$.Au=[C.RP,Z.hx,{created:Z.HC},C.Ln,H.Dg,{"":H.bu},C.z6Y,Q.Tg,{created:Q.rt},C.zq,A.Qa,{created:A.EL},C.tf,A.Zt,{created:A.IV},C.I5,Q.JG,{created:Q.Zo},C.z7,B.G6,{created:B.Dw},C.GTO,A.F1,{created:A.z5},C.kA,L.u7,{created:L.Cu},C.Wup,H.LZ,{"":H.UI},C.P0k,V.lI,{created:V.fv},C.hG,A.ir,{created:A.oa},C.aj,U.fI,{created:U.Ry},C.Qw,E.Fv,{created:E.AH},C.G4,O.CN,{created:O.On},C.RcY,A.aQ,{created:A.AJ},C.ld,U.AX,{created:U.v9},C.yiu,A.knI,{created:A.Th},C.HI,H.Pg,{"":H.aR},C.ila,Q.xI,{created:Q.lK},C.lpG,R.LU,{created:R.rA},C.mR,A.fl,{created:A.Yt},C.JZ,X.E7,{created:X.jD},C.wd,Z.vj,{created:Z.mA},C.CTH,D.St,{created:D.JR},C.Rg,N.yb,{created:N.N0},C.cx5,D.m8,{created:D.Tt},C.l49,Z.uL,{created:Z.Hx},C.GG,L.PF,{created:L.A5},C.FU,R.lw,{created:R.fR},C.rd6,R.E0,{created:R.Hv},C.Xb,F.vc,{created:F.Fe},C.yG,K.nm,{created:K.an},C.px,A.tz,{created:A.J8},C.ow,F.E9,{created:F.TW},C.PV,A.wM,{created:A.lT},C.EP,K.NM,{created:K.op},C.FsU,A.vI,{created:A.ZC},C.Bm,A.XP,{created:A.XL},C.Tn,M.T2,{created:M.SP},C.hg,W.hd,{},C.dd,B.pR,{created:B.b4},C.Ud8,Z.Ps,{created:Z.zg},C.ri,W.yy,{},C.Hk,A.Gk,{created:A.cY},C.IWi,X.Vu,{created:X.bV}]
I.$lazy($,"globalThis","DX","jk",function(){return function() { return this; }()})
I.$lazy($,"globalWindow","pG","Qm",function(){return $.jk().window})
I.$lazy($,"globalWorker","zA","Nl",function(){return $.jk().Worker})
@@ -24274,7 +24669,7 @@
I.$lazy($,"_expando","fF","rw",function(){return H.VM(new P.kM("template_binding"),[null])})
init.functionAliases={}
-init.metadata=[P.a,C.WP,C.nz,C.xC,C.io,C.wW,"object","interceptor","proto","extension","indexability","type","name","codeUnit","isolate","function","entry","sender","e","msg","message","x","record","value","memberName",{func:"pL",args:[J.O]},"string","source","radix","handleError","array","codePoints","charCodes","years","month","day","hours","minutes","seconds","milliseconds","isUtc","receiver","key","positionalArguments","namedArguments","className","argument","index","ex","expression","keyValuePairs","result","closure","numberOfArguments","arg1","arg2","arg3","arg4","arity","functions","reflectionInfo","isStatic","jsArguments","propertyName","isIntercepted","fieldName","property","staticName","list","returnType","parameterTypes","optionalParameterTypes","rti","typeArguments","target","typeInfo","substitutionName",,"onTypeVariable","types","startIndex","substitution","arguments","isField","checks","asField","s","t","signature","context","contextName","o","allowShorter","obj","tag","interceptorClass","transformer","hooks","pattern","multiLine","caseSensitive","global","needle","haystack","other","from","to",{func:"kl",void:true},{func:"NT"},"iterable","f","initialValue","combine","leftDelimiter","rightDelimiter","start","end","skipCount","src","srcStart","dst","dstStart","count","a","element","endIndex","left","right","compare","symbol",{func:"pB",ret:P.vr,args:[P.a]},"reflectee","mangledName","methods","variables","mixinNames","code","typeVariables","owner","simpleName","victim","fieldSpecification","jsMangledNames","isGlobal","map","errorHandler","zone","listeners","callback","notificationHandler",{func:"G5",void:true,args:[null]},{func:"Vx",void:true,args:[null],opt:[P.MN]},"error","stackTrace","userCode","onSuccess","onError","subscription","future","duration",{func:"cX",void:true,args:[P.JB,P.e4,P.JB,null,P.MN]},"self","parent",{func:"aD",args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"wD",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]},null]},"arg",{func:"ta",args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]},null,null]},{func:"HQ",ret:{func:"NT"},args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"v7",ret:{func:"Dv",args:[null]},args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"IU",ret:{func:"bh",args:[null,null]},args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]}]},{func:"iV",void:true,args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"zo",ret:P.lO,args:[P.JB,P.e4,P.JB,P.a6,{func:"kl",void:true}]},{func:"Zb",void:true,args:[P.JB,P.e4,P.JB,J.O]},"line",{func:"xM",void:true,args:[J.O]},{func:"Nf",ret:P.JB,args:[P.JB,P.e4,P.JB,P.aY,[P.Z0,P.wv,null]]},"specification","zoneValues","table",{func:"Ib",ret:J.kn,args:[null,null]},"b",{func:"Re",ret:J.im,args:[null]},"parts","m","number","json","reviver",{func:"uJ",ret:P.a,args:[null]},"toEncodable","sb",{func:"xh",ret:J.im,args:[P.fR,P.fR]},"formattedString",{func:"E0",ret:J.kn,args:[P.a,P.a]},{func:"DZ",ret:J.im,args:[P.a]},{func:"K4",ret:J.im,args:[J.O],named:{onError:{func:"Tl",ret:J.im,args:[J.O]},radix:J.im}},"host","scheme","query","queryParameters","fragment","component","val","val1","val2",C.xM,!1,"canonicalTable","text","encoding","spaceToPlus",{func:"Tf",ret:J.O,args:[W.D0]},"typeExtension","url","onProgress","withCredentials","method","mimeType","requestHeaders","responseType","sendData","thing","win","constructor",{func:"Dv",args:[null]},{func:"jn",args:[null,null,null,null]},"oldValue","newValue","document","extendsTagName","w","captureThis","data","createProxy","mustCopy","total","_","id","members",{func:"qE",ret:J.O,args:[J.im,J.im]},"pad","current","currentStart","currentEnd","old","oldStart","oldEnd","distances","arr1","arr2","searchLength","splices","records","field","cls","props","getter","template","extendee","sheet","node","path","originalPrepareBinding","methodName","args","style","scope","doc","baseUri","seen","scripts","uriString","currentValue","v","expr","l","hash",{func:"qq",ret:[P.cX,K.Ae],args:[P.cX]},"classMirror","c","delegate","model","bound","stagingDocument","el","useRoot","content","bindings","n","elementId","deep","selectors","relativeSelectors","listener","useCapture","async","password","user","timestamp","canBubble","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","attributeFilter","attributeOldValue","attributes","characterData","characterDataOldValue","childList","subtree","otherNode","newChild","refChild","oldChild","targetOrigin","messagePorts","length","invocation","collection","","separator",0,!0,"growable","fractionDigits","str","authentification","resume","portId","port","dataEvent","info",{func:"bh",args:[null,null]},"parameter","jsConstructor",{func:"Za",args:[J.O,null]},{func:"TS",args:[null,J.O]},"g",P.Z0,L.mL,[P.Z0,J.O,W.cv],{func:"qo",ret:P.Z0},C.nJ,C.Us,{func:"Hw",args:[P.Z0]},B.Vf,J.kn,L.bv,Q.xI,Z.pv,L.kx,{func:"bR",ret:L.kx},{func:"VI",args:[L.kx]},{func:"I0",ret:J.O},F.Vfx,J.O,C.mI,{func:"Uf",ret:J.kn},{func:"zk",args:[J.kn]},"r",{func:"Np",void:true,args:[W.ea,null,W.KV]},R.Dsd,"action","test","library",{func:"h0",args:[H.Uz]},{func:"rm",args:[P.wv,P.ej]},"reflectiveName","useEval",{func:"lv",args:[P.wv,null]},"typeArgument","tv","methodOwner","fieldOwner","i",{func:"qe",ret:P.Ms,args:[J.im]},{func:"Z5",args:[J.im]},{func:"K6",ret:P.X9,args:[J.im]},{func:"Pt",ret:J.O,args:[J.im]},{func:"ag",args:[J.O,J.O]},"eventId",{func:"uu",void:true,args:[P.a],opt:[P.MN]},{func:"YP",void:true,opt:[null]},{func:"BG",args:[null],opt:[null]},"ignored","convert","isMatch","cancelOnError","handleData","handleDone","resumeSignal","event","wasInputPaused","onData","onDone","dispatch",{func:"ha",args:[null,P.MN]},"sink",{func:"aR",void:true,args:[null,P.MN]},"inputEvent","otherZone","runGuarded","bucket","each","ifAbsent","cell","objects","orElse","k","elements","offset","comp","key1","key2",{func:"Q5",ret:J.kn,args:[P.jp]},{func:"dc",args:[J.O,P.a]},"leadingSurrogate","nextCodeUnit","matched",{func:"Tl",ret:J.im,args:[J.O]},{func:"Zh",ret:J.GW,args:[J.O]},"factor","quotient","pathSegments","base","reference","ss","ch",{func:"cd",ret:J.kn,args:[J.im]},"digit",{func:"Dt",ret:J.im,args:[J.im]},"part",{func:"wJ",ret:J.im,args:[null,null]},"byteString",{func:"BC",ret:J.im,args:[J.im,J.im]},"byte","buffer",{func:"YI",void:true,args:[P.a]},"title","xhr","header","shouldAdd","prevValue","selector","stream","pos",L.DP,{func:"JA",ret:L.DP},{func:"Qs",args:[L.DP]},E.tuj,F.Vct,A.D13,N.WZq,{func:"Xb",args:[P.Z0,J.im]},{func:"hN",ret:J.O,args:[J.kn]},"newSpace",K.pva,"response",H.Tp,"st",{func:"iR",args:[J.im,null]},{func:"ZT",void:true,args:[null,null,null]},B.T5,"trace",Z.cda,Z.uL,J.im,[J.Q,L.Y2],[J.Q,J.O],"codeCaller",{func:"UO",args:[L.Vi]},J.Q,L.XN,{func:"cH",ret:J.im},{func:"r5",ret:J.Q},{func:"mR",args:[J.Q]},{func:"ub",void:true,args:[L.bv,J.im,P.Z0]},"totalSamples",{func:"F9",void:true,args:[L.bv]},{func:"bN",ret:J.O,args:[L.Y2]},"row",{func:"Sz",void:true,args:[W.ea,null,W.cv]},X.waa,"profile",{func:"Wy",ret:L.bv},{func:"Gt",args:[L.bv]},D.V0,Z.V4,M.V10,"logLevel","rec",{func:"IM",args:[N.HV]},{func:"cr",ret:[J.Q,P.Z0]},{func:"he",ret:[J.Q,J.O]},{func:"ZD",args:[[J.Q,J.O]]},{func:"zs",ret:J.O,args:[J.O]},"link",F.V11,L.dZ,L.Nu,L.yU,"label",[P.Z0,J.O,L.rj],[J.Q,L.kx],[P.Z0,J.O,J.GW],{func:"Ik",ret:L.CM},{func:"Ve",args:[L.CM]},"address","coverages","timer",[P.Z0,J.O,L.bv],"E",{func:"EU",ret:P.iD},{func:"Y4",args:[P.iD]},"scriptURL",{func:"jN",ret:J.O,args:[J.O,J.O]},"isolateId",{func:"fP",ret:J.GW},{func:"mV",args:[J.GW]},[J.Q,L.DP],"calls","codes","instructionList","profileCode",{func:"VL",args:[L.kx,L.kx]},[J.Q,L.c2],{func:"dt",ret:P.cX},"lineNumber","hits",{func:"D8",args:[[J.Q,P.Z0]]},"responseString","requestString",{func:"Tz",void:true,args:[null,null]},"children","rowIndex",V.V12,{func:"AG",void:true,args:[J.O,J.O,J.O]},{func:"ru",ret:L.mL},{func:"pu",args:[L.mL]},{func:"nx",ret:J.O,args:[J.GW]},"time","bytes",{func:"kX",ret:J.O,args:[P.Z0]},"frame",{func:"h6",ret:J.kn,args:[J.O]},Z.LP,{func:"Aa",args:[P.e4,P.JB]},{func:"TB",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"S5",ret:J.kn,args:[P.a]},{func:"na",args:[[J.Q,G.DA]]},{func:"mRV",args:[[J.Q,T.z2]]},"superDecl","delegates","matcher","scopeDescriptor","cssText","properties","onName","eventType","declaration","elementElement","root",{func:"qk",void:true,args:[J.O,J.O]},"preventCascade",{func:"KT",void:true,args:[[P.cX,T.z2]]},"changes","events",{func:"WW",void:true,args:[W.ea]},"callbackOrMethod","pair","p",{func:"YT",void:true,args:[[J.Q,T.z2]]},"d","def",{func:"Zu",args:[J.O,null,null]},"arg0",{func:"pp",ret:U.zX,args:[U.hw,U.hw]},"h","item","kind","precedence","prefix",3,{func:"Nt",args:[U.hw]},A.qe,L.rj,{func:"LW",ret:L.rj},{func:"PF",args:[L.rj]},{func:"Yg",ret:J.O,args:[L.c2]},U.V13,"coverage",Q.Ds,K.V14,X.V15,"y","instanceRef",{func:"en",ret:J.O,args:[P.a]},{func:"IK",ret:J.O,args:[[J.Q,P.a]]},"values","instanceNodes",{func:"K7",void:true,args:[[J.Q,G.DA]]},];$=null
+init.metadata=[P.a,C.WP,C.nz,C.xC,C.io,C.wW,"object","interceptor","proto","extension","indexability","type","name","codeUnit","isolate","function","entry","sender","e","msg","message","x","record","value","memberName",{func:"pL",args:[J.O]},"string","source","radix","handleError","array","codePoints","charCodes","years","month","day","hours","minutes","seconds","milliseconds","isUtc","receiver","key","positionalArguments","namedArguments","className","argument","index","ex","expression","keyValuePairs","result","closure","numberOfArguments","arg1","arg2","arg3","arg4","arity","functions","reflectionInfo","isStatic","jsArguments","propertyName","isIntercepted","fieldName","property","staticName","list","returnType","parameterTypes","optionalParameterTypes","rti","typeArguments","target","typeInfo","substitutionName",,"onTypeVariable","types","startIndex","substitution","arguments","isField","checks","asField","s","t","signature","context","contextName","o","allowShorter","obj","tag","interceptorClass","transformer","hooks","pattern","multiLine","caseSensitive","global","needle","haystack","other","from","to",{func:"kl",void:true},{func:"NT"},"iterable","f","initialValue","combine","leftDelimiter","rightDelimiter","start","end","skipCount","src","srcStart","dst","dstStart","count","a","element","endIndex","left","right","compare","symbol",{func:"pB",ret:P.vr,args:[P.a]},"reflectee","mangledName","methods","variables","mixinNames","code","typeVariables","owner","simpleName","victim","fieldSpecification","jsMangledNames","isGlobal","map","errorHandler","zone",!1,"futures","eagerError","listeners","callback","notificationHandler",{func:"G5",void:true,args:[null]},{func:"Vx",void:true,args:[null],opt:[P.MN]},"error","stackTrace","userCode","onSuccess","onError","subscription","future","duration",{func:"cX",void:true,args:[P.JB,P.e4,P.JB,null,P.MN]},"self","parent",{func:"aD",args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"wD",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]},null]},"arg",{func:"ta",args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]},null,null]},{func:"HQ",ret:{func:"NT"},args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"v7",ret:{func:"Dv",args:[null]},args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"IU",ret:{func:"bh",args:[null,null]},args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]}]},{func:"iV",void:true,args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"zo",ret:P.lO,args:[P.JB,P.e4,P.JB,P.a6,{func:"kl",void:true}]},{func:"Zb",void:true,args:[P.JB,P.e4,P.JB,J.O]},"line",{func:"xM",void:true,args:[J.O]},{func:"Nf",ret:P.JB,args:[P.JB,P.e4,P.JB,P.aY,[P.Z0,P.wv,null]]},"specification","zoneValues","table",{func:"Ib",ret:J.kn,args:[null,null]},"b",{func:"Re",ret:J.im,args:[null]},"parts","m","number","json","reviver",{func:"uJ",ret:P.a,args:[null]},"toEncodable","sb",{func:"xh",ret:J.im,args:[P.Tx,P.Tx]},"formattedString",{func:"E0",ret:J.kn,args:[P.a,P.a]},{func:"DZ",ret:J.im,args:[P.a]},{func:"K4",ret:J.im,args:[J.O],named:{onError:{func:"Tl",ret:J.im,args:[J.O]},radix:J.im}},"host","scheme","query","queryParameters","fragment","component","val","val1","val2",C.xM,"canonicalTable","text","encoding","spaceToPlus",{func:"Tf",ret:J.O,args:[W.D0]},"typeExtension","url","onProgress","withCredentials","method","mimeType","requestHeaders","responseType","sendData","thing","win","constructor",{func:"Dv",args:[null]},{func:"jn",args:[null,null,null,null]},"oldValue","newValue","document","extendsTagName","w","captureThis","data","createProxy","mustCopy","total","_","id","members",{func:"qE",ret:J.O,args:[J.im,J.im]},"pad","current","currentStart","currentEnd","old","oldStart","oldEnd","distances","arr1","arr2","searchLength","splices","records","field","cls","props","getter","template","extendee","sheet","node","path","originalPrepareBinding","methodName","args","style","scope","doc","baseUri","seen","scripts","uriString","currentValue","v","expr","l","hash",{func:"qq",ret:[P.cX,K.Ae],args:[P.cX]},"classMirror","c","delegate","model","bound","stagingDocument","el","useRoot","content","bindings","n","elementId","deep","selectors","relativeSelectors","listener","useCapture","async","password","user","timestamp","canBubble","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","attributeFilter","attributeOldValue","attributes","characterData","characterDataOldValue","childList","subtree","otherNode","newChild","refChild","oldChild","targetOrigin","messagePorts","length","invocation","collection","","separator",0,!0,"growable","fractionDigits","str","authentification","resume","portId","port","dataEvent","info",{func:"bh",args:[null,null]},"parameter","jsConstructor",{func:"Za",args:[J.O,null]},{func:"TS",args:[null,J.O]},"g",P.Z0,L.mL,[P.Z0,J.O,W.cv],{func:"qo",ret:P.Z0},C.nJ,C.Us,{func:"Hw",args:[P.Z0]},"done",B.Vf,H.Tp,"trace",J.kn,L.bv,Q.xI,Z.pv,L.kx,{func:"bR",ret:L.kx},{func:"oX",args:[L.kx]},{func:"I0",ret:J.O},F.Vfx,J.O,C.mI,{func:"Uf",ret:J.kn},{func:"zk",args:[J.kn]},"r",{func:"Np",void:true,args:[W.ea,null,W.KV]},R.Dsd,{func:"ZT",void:true,args:[null,null,null]},R.Nr,"action","test","library",{func:"h0",args:[H.Uz]},{func:"rm",args:[P.wv,P.ej]},"reflectiveName","useEval",{func:"lv",args:[P.wv,null]},"typeArgument","tv","methodOwner","fieldOwner","i",{func:"qe",ret:P.Ms,args:[J.im]},{func:"Z5",args:[J.im]},{func:"K6",ret:P.X9,args:[J.im]},{func:"Pt",ret:J.O,args:[J.im]},{func:"ag",args:[J.O,J.O]},"eventId",{func:"uu",void:true,args:[P.a],opt:[P.MN]},"theError","theStackTrace",{func:"rf",args:[P.a]},{func:"YP",void:true,opt:[null]},{func:"BG",args:[null],opt:[null]},"ignored","convert","isMatch","cancelOnError","handleData","handleDone","resumeSignal","event","wasInputPaused","onData","onDone","dispatch",{func:"ha",args:[null,P.MN]},"sink",{func:"aR",void:true,args:[null,P.MN]},"inputEvent","otherZone","runGuarded","bucket","each","ifAbsent","cell","objects","orElse","k","elements","offset","comp","key1","key2",{func:"Q5",ret:J.kn,args:[P.jp]},{func:"dc",args:[J.O,P.a]},"leadingSurrogate","nextCodeUnit","matched",{func:"Tl",ret:J.im,args:[J.O]},{func:"Zh",ret:J.GW,args:[J.O]},"factor","quotient","pathSegments","base","reference","ss","ch",{func:"cd",ret:J.kn,args:[J.im]},"digit",{func:"an",ret:J.im,args:[J.im]},"part",{func:"wJ",ret:J.im,args:[null,null]},"byteString",{func:"BC",ret:J.im,args:[J.im,J.im]},"byte","buffer",{func:"YI",void:true,args:[P.a]},"title","xhr","header","shouldAdd","prevValue","selector","stream","pos",L.DP,{func:"JA",ret:L.DP},{func:"Qs",args:[L.DP]},E.tuj,F.Vct,A.D13,N.WZq,{func:"Rs",ret:J.kn,args:[P.Z0]},{func:"Xb",args:[P.Z0,J.im]},{func:"hN",ret:J.O,args:[J.kn]},"newSpace",K.pva,"response","st",{func:"iR",args:[J.im,null]},{func:"pw",void:true,args:[J.kn,null]},"expand",Z.cda,Z.uL,J.im,[J.Q,L.Y2],[J.Q,J.O],"codeCaller",{func:"UO",args:[L.Vi]},J.Q,L.XN,{func:"cH",ret:J.im},{func:"r5",ret:J.Q},{func:"mR",args:[J.Q]},{func:"ub",void:true,args:[L.bv,J.im,P.Z0]},"totalSamples",{func:"F9",void:true,args:[L.bv]},{func:"bN",ret:J.O,args:[L.Y2]},"row",{func:"Sz",void:true,args:[W.ea,null,W.cv]},X.waa,"profile",{func:"Wy",ret:L.bv},{func:"Gt",args:[L.bv]},D.V0,Z.V4,M.V10,"logLevel","rec",{func:"IM",args:[N.HV]},{func:"cr",ret:[J.Q,P.Z0]},A.V11,A.V12,A.V13,A.V14,A.V15,A.V16,A.V17,L.dZ,L.Nu,L.yU,"label",[P.Z0,J.O,L.rj],[J.Q,L.kx],[P.Z0,J.O,J.GW],{func:"Ik",ret:L.CM},{func:"Ve",args:[L.CM]},"address","coverages","timer",[P.Z0,J.O,L.bv],"E",{func:"EU",ret:P.iD},{func:"Y4",args:[P.iD]},{func:"zs",ret:J.O,args:[J.O]},"scriptURL",{func:"jN",ret:J.O,args:[J.O,J.O]},"isolateId",{func:"fP",ret:J.GW},{func:"mV",args:[J.GW]},[J.Q,L.DP],"calls","codes","instructionList","profileCode",{func:"VL",args:[L.kx,L.kx]},[J.Q,L.c2],{func:"dt",ret:P.cX},"lineNumber","hits",{func:"ZD",args:[[J.Q,P.Z0]]},"responseString","requestString",{func:"Tz",void:true,args:[null,null]},"children","rowIndex",V.V18,{func:"AG",void:true,args:[J.O,J.O,J.O]},{func:"ru",ret:L.mL},{func:"pu",args:[L.mL]},{func:"nxg",ret:J.O,args:[J.GW]},"time","bytes",{func:"kX",ret:J.O,args:[P.Z0]},"frame",{func:"h6",ret:J.kn,args:[J.O]},Z.LP,{func:"Aa",args:[P.e4,P.JB]},{func:"TB",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"S5",ret:J.kn,args:[P.a]},{func:"D8",args:[[J.Q,G.DA]]},{func:"Gm",args:[[J.Q,T.z2]]},"superDecl","delegates","matcher","scopeDescriptor","cssText","properties","onName","eventType","declaration","elementElement","root",{func:"rj",void:true,args:[J.O,J.O]},"preventCascade",{func:"KT",void:true,args:[[P.cX,T.z2]]},"changes","events",{func:"WW",void:true,args:[W.ea]},"callbackOrMethod","pair","p",{func:"YT",void:true,args:[[J.Q,T.z2]]},"d","def",{func:"Zu",args:[J.O,null,null]},"arg0",{func:"pp",ret:U.zX,args:[U.hw,U.hw]},"h","item","kind","precedence","prefix",3,{func:"Nt",args:[U.hw]},A.T5,L.rj,{func:"LW",ret:L.rj},{func:"PF",args:[L.rj]},{func:"Yg",ret:J.O,args:[L.c2]},U.V19,"coverage","link",Q.Ds,K.V20,X.V21,"y","instanceRef",{func:"en",ret:J.O,args:[P.a]},{func:"QF",ret:J.O,args:[[J.Q,P.a]]},"values","instanceNodes",{func:"K7",void:true,args:[[J.Q,G.DA]]},];$=null
I = I.$finishIsolateConstructor(I)
$=new I()
function convertToFastObject(properties) {
@@ -24343,9 +24738,9 @@
init.currentScript = currentScript;
if (typeof dartMainRunner === "function") {
- dartMainRunner(function() { H.oT(E.Pc()); });
+ dartMainRunner(function() { H.oT(E.nE()); });
} else {
- H.oT(E.Pc());
+ H.oT(E.nE());
}
})
function init(){I.p={}
@@ -24473,11 +24868,11 @@
$desc=$collectedClasses.qE
if($desc instanceof Array)$desc=$desc[1]
qE.prototype=$desc
-function SV(){}SV.builtin$cls="SV"
-if(!"name" in SV)SV.name="SV"
-$desc=$collectedClasses.SV
+function ho(){}ho.builtin$cls="ho"
+if(!"name" in ho)ho.name="ho"
+$desc=$collectedClasses.ho
if($desc instanceof Array)$desc=$desc[1]
-SV.prototype=$desc
+ho.prototype=$desc
function Gh(){}Gh.builtin$cls="Gh"
if(!"name" in Gh)Gh.name="Gh"
$desc=$collectedClasses.Gh
@@ -24569,19 +24964,19 @@
$desc=$collectedClasses.Ny
if($desc instanceof Array)$desc=$desc[1]
Ny.prototype=$desc
-function nx(){}nx.builtin$cls="nx"
-if(!"name" in nx)nx.name="nx"
-$desc=$collectedClasses.nx
+function Zv(){}Zv.builtin$cls="Zv"
+if(!"name" in Zv)Zv.name="Zv"
+$desc=$collectedClasses.Zv
if($desc instanceof Array)$desc=$desc[1]
-nx.prototype=$desc
-nx.prototype.gRn=function(receiver){return receiver.data}
-nx.prototype.gB=function(receiver){return receiver.length}
-function QQ(){}QQ.builtin$cls="QQ"
-if(!"name" in QQ)QQ.name="QQ"
-$desc=$collectedClasses.QQ
+Zv.prototype=$desc
+Zv.prototype.gRn=function(receiver){return receiver.data}
+Zv.prototype.gB=function(receiver){return receiver.length}
+function QQS(){}QQS.builtin$cls="QQS"
+if(!"name" in QQS)QQS.name="QQS"
+$desc=$collectedClasses.QQS
if($desc instanceof Array)$desc=$desc[1]
-QQ.prototype=$desc
-QQ.prototype.gtT=function(receiver){return receiver.code}
+QQS.prototype=$desc
+QQS.prototype.gtT=function(receiver){return receiver.code}
function BR(){}BR.builtin$cls="BR"
if(!"name" in BR)BR.name="BR"
$desc=$collectedClasses.BR
@@ -24800,11 +25195,11 @@
zU.prototype.giC=function(receiver){return receiver.responseText}
zU.prototype.gys=function(receiver){return receiver.status}
zU.prototype.gpo=function(receiver){return receiver.statusText}
-function pk(){}pk.builtin$cls="pk"
-if(!"name" in pk)pk.name="pk"
-$desc=$collectedClasses.pk
+function rk(){}rk.builtin$cls="rk"
+if(!"name" in rk)rk.name="rk"
+$desc=$collectedClasses.rk
if($desc instanceof Array)$desc=$desc[1]
-pk.prototype=$desc
+rk.prototype=$desc
function tX(){}tX.builtin$cls="tX"
if(!"name" in tX)tX.name="tX"
$desc=$collectedClasses.tX
@@ -25108,11 +25503,11 @@
$desc=$collectedClasses.FH
if($desc instanceof Array)$desc=$desc[1]
FH.prototype=$desc
-function iL(){}iL.builtin$cls="iL"
-if(!"name" in iL)iL.name="iL"
-$desc=$collectedClasses.iL
+function SN(){}SN.builtin$cls="SN"
+if(!"name" in SN)SN.name="SN"
+$desc=$collectedClasses.SN
if($desc instanceof Array)$desc=$desc[1]
-iL.prototype=$desc
+SN.prototype=$desc
function HD(){}HD.builtin$cls="HD"
if(!"name" in HD)HD.name="HD"
$desc=$collectedClasses.HD
@@ -25211,35 +25606,35 @@
lp.prototype.gt5=function(receiver){return receiver.type}
lp.prototype.gP=function(receiver){return receiver.value}
lp.prototype.sP=function(receiver,v){return receiver.value=v}
-function pD(){}pD.builtin$cls="pD"
-if(!"name" in pD)pD.name="pD"
-$desc=$collectedClasses.pD
+function kd(){}kd.builtin$cls="kd"
+if(!"name" in kd)kd.name="kd"
+$desc=$collectedClasses.kd
if($desc instanceof Array)$desc=$desc[1]
-pD.prototype=$desc
+kd.prototype=$desc
function I0(){}I0.builtin$cls="I0"
if(!"name" in I0)I0.name="I0"
$desc=$collectedClasses.I0
if($desc instanceof Array)$desc=$desc[1]
I0.prototype=$desc
I0.prototype.gpQ=function(receiver){return receiver.applyAuthorStyles}
-function QR(){}QR.builtin$cls="QR"
-if(!"name" in QR)QR.name="QR"
-$desc=$collectedClasses.QR
+function CY(){}CY.builtin$cls="CY"
+if(!"name" in CY)CY.name="CY"
+$desc=$collectedClasses.CY
if($desc instanceof Array)$desc=$desc[1]
-QR.prototype=$desc
-QR.prototype.gLA=function(receiver){return receiver.src}
-QR.prototype.gt5=function(receiver){return receiver.type}
-QR.prototype.st5=function(receiver,v){return receiver.type=v}
-function Cp(){}Cp.builtin$cls="Cp"
-if(!"name" in Cp)Cp.name="Cp"
-$desc=$collectedClasses.Cp
+CY.prototype=$desc
+CY.prototype.gLA=function(receiver){return receiver.src}
+CY.prototype.gt5=function(receiver){return receiver.type}
+CY.prototype.st5=function(receiver,v){return receiver.type=v}
+function Wt(){}Wt.builtin$cls="Wt"
+if(!"name" in Wt)Wt.name="Wt"
+$desc=$collectedClasses.Wt
if($desc instanceof Array)$desc=$desc[1]
-Cp.prototype=$desc
-function Ta(){}Ta.builtin$cls="Ta"
-if(!"name" in Ta)Ta.name="Ta"
-$desc=$collectedClasses.Ta
+Wt.prototype=$desc
+function uaa(){}uaa.builtin$cls="uaa"
+if(!"name" in uaa)uaa.name="uaa"
+$desc=$collectedClasses.uaa
if($desc instanceof Array)$desc=$desc[1]
-Ta.prototype=$desc
+uaa.prototype=$desc
function zD9(){}zD9.builtin$cls="zD9"
if(!"name" in zD9)zD9.name="zD9"
$desc=$collectedClasses.zD9
@@ -25267,13 +25662,13 @@
bk.prototype.gzZ=function(receiver){return receiver.newValue}
bk.prototype.gjL=function(receiver){return receiver.oldValue}
bk.prototype.gO3=function(receiver){return receiver.url}
-function fq(){}fq.builtin$cls="fq"
-if(!"name" in fq)fq.name="fq"
-$desc=$collectedClasses.fq
+function Lx(){}Lx.builtin$cls="Lx"
+if(!"name" in Lx)Lx.name="Lx"
+$desc=$collectedClasses.Lx
if($desc instanceof Array)$desc=$desc[1]
-fq.prototype=$desc
-fq.prototype.gt5=function(receiver){return receiver.type}
-fq.prototype.st5=function(receiver,v){return receiver.type=v}
+Lx.prototype=$desc
+Lx.prototype.gt5=function(receiver){return receiver.type}
+Lx.prototype.st5=function(receiver,v){return receiver.type=v}
function Er(){}Er.builtin$cls="Er"
if(!"name" in Er)Er.name="Er"
$desc=$collectedClasses.Er
@@ -25352,11 +25747,11 @@
RH.prototype.gfY=function(receiver){return receiver.kind}
RH.prototype.sfY=function(receiver,v){return receiver.kind=v}
RH.prototype.gLA=function(receiver){return receiver.src}
-function ho(){}ho.builtin$cls="ho"
-if(!"name" in ho)ho.name="ho"
-$desc=$collectedClasses.ho
+function pU(){}pU.builtin$cls="pU"
+if(!"name" in pU)pU.name="pU"
+$desc=$collectedClasses.pU
if($desc instanceof Array)$desc=$desc[1]
-ho.prototype=$desc
+pU.prototype=$desc
function OJ(){}OJ.builtin$cls="OJ"
if(!"name" in OJ)OJ.name="OJ"
$desc=$collectedClasses.OJ
@@ -25382,11 +25777,11 @@
$desc=$collectedClasses.aG
if($desc instanceof Array)$desc=$desc[1]
aG.prototype=$desc
-function J6(){}J6.builtin$cls="J6"
-if(!"name" in J6)J6.name="J6"
-$desc=$collectedClasses.J6
+function fA(){}fA.builtin$cls="fA"
+if(!"name" in fA)fA.name="fA"
+$desc=$collectedClasses.fA
if($desc instanceof Array)$desc=$desc[1]
-J6.prototype=$desc
+fA.prototype=$desc
function u9(){}u9.builtin$cls="u9"
if(!"name" in u9)u9.name="u9"
$desc=$collectedClasses.u9
@@ -25443,21 +25838,21 @@
$desc=$collectedClasses.F2
if($desc instanceof Array)$desc=$desc[1]
F2.prototype=$desc
-function VB(){}VB.builtin$cls="VB"
-if(!"name" in VB)VB.name="VB"
-$desc=$collectedClasses.VB
+function nL(){}nL.builtin$cls="nL"
+if(!"name" in nL)nL.name="nL"
+$desc=$collectedClasses.nL
if($desc instanceof Array)$desc=$desc[1]
-VB.prototype=$desc
+nL.prototype=$desc
function QV(){}QV.builtin$cls="QV"
if(!"name" in QV)QV.name="QV"
$desc=$collectedClasses.QV
if($desc instanceof Array)$desc=$desc[1]
QV.prototype=$desc
-function Zv(){}Zv.builtin$cls="Zv"
-if(!"name" in Zv)Zv.name="Zv"
-$desc=$collectedClasses.Zv
+function q0(){}q0.builtin$cls="q0"
+if(!"name" in q0)q0.name="q0"
+$desc=$collectedClasses.q0
if($desc instanceof Array)$desc=$desc[1]
-Zv.prototype=$desc
+q0.prototype=$desc
function Q7(){}Q7.builtin$cls="Q7"
if(!"name" in Q7)Q7.name="Q7"
$desc=$collectedClasses.Q7
@@ -25480,12 +25875,12 @@
Dh.prototype=$desc
Dh.prototype.gN=function(receiver){return receiver.target}
Dh.prototype.gmH=function(receiver){return receiver.href}
-function ZJ(){}ZJ.builtin$cls="ZJ"
-if(!"name" in ZJ)ZJ.name="ZJ"
-$desc=$collectedClasses.ZJ
+function Ue(){}Ue.builtin$cls="Ue"
+if(!"name" in Ue)Ue.name="Ue"
+$desc=$collectedClasses.Ue
if($desc instanceof Array)$desc=$desc[1]
-ZJ.prototype=$desc
-ZJ.prototype.gmH=function(receiver){return receiver.href}
+Ue.prototype=$desc
+Ue.prototype.gmH=function(receiver){return receiver.href}
function mU(){}mU.builtin$cls="mU"
if(!"name" in mU)mU.name="mU"
$desc=$collectedClasses.mU
@@ -25551,13 +25946,13 @@
$desc=$collectedClasses.eG
if($desc instanceof Array)$desc=$desc[1]
eG.prototype=$desc
-function lv(){}lv.builtin$cls="lv"
-if(!"name" in lv)lv.name="lv"
-$desc=$collectedClasses.lv
+function bd(){}bd.builtin$cls="bd"
+if(!"name" in bd)bd.name="bd"
+$desc=$collectedClasses.bd
if($desc instanceof Array)$desc=$desc[1]
-lv.prototype=$desc
-lv.prototype.gt5=function(receiver){return receiver.type}
-lv.prototype.gUQ=function(receiver){return receiver.values}
+bd.prototype=$desc
+bd.prototype.gt5=function(receiver){return receiver.type}
+bd.prototype.gUQ=function(receiver){return receiver.values}
function pf(){}pf.builtin$cls="pf"
if(!"name" in pf)pf.name="pf"
$desc=$collectedClasses.pf
@@ -25714,11 +26109,11 @@
$desc=$collectedClasses.vd
if($desc instanceof Array)$desc=$desc[1]
vd.prototype=$desc
-function Jq(){}Jq.builtin$cls="Jq"
-if(!"name" in Jq)Jq.name="Jq"
-$desc=$collectedClasses.Jq
+function uzr(){}uzr.builtin$cls="uzr"
+if(!"name" in uzr)uzr.name="uzr"
+$desc=$collectedClasses.uzr
if($desc instanceof Array)$desc=$desc[1]
-Jq.prototype=$desc
+uzr.prototype=$desc
function Yd(){}Yd.builtin$cls="Yd"
if(!"name" in Yd)Yd.name="Yd"
$desc=$collectedClasses.Yd
@@ -25760,14 +26155,14 @@
$desc=$collectedClasses.NJ
if($desc instanceof Array)$desc=$desc[1]
NJ.prototype=$desc
-function Ue(){}Ue.builtin$cls="Ue"
-if(!"name" in Ue)Ue.name="Ue"
-$desc=$collectedClasses.Ue
+function nd(){}nd.builtin$cls="nd"
+if(!"name" in nd)nd.name="nd"
+$desc=$collectedClasses.nd
if($desc instanceof Array)$desc=$desc[1]
-Ue.prototype=$desc
-Ue.prototype.gt5=function(receiver){return receiver.type}
-Ue.prototype.st5=function(receiver,v){return receiver.type=v}
-Ue.prototype.gmH=function(receiver){return receiver.href}
+nd.prototype=$desc
+nd.prototype.gt5=function(receiver){return receiver.type}
+nd.prototype.st5=function(receiver,v){return receiver.type=v}
+nd.prototype.gmH=function(receiver){return receiver.href}
function vt(){}vt.builtin$cls="vt"
if(!"name" in vt)vt.name="vt"
$desc=$collectedClasses.vt
@@ -25778,13 +26173,13 @@
$desc=$collectedClasses.rQ
if($desc instanceof Array)$desc=$desc[1]
rQ.prototype=$desc
-function Lx(){}Lx.builtin$cls="Lx"
-if(!"name" in Lx)Lx.name="Lx"
-$desc=$collectedClasses.Lx
+function Lu(){}Lu.builtin$cls="Lu"
+if(!"name" in Lu)Lu.name="Lu"
+$desc=$collectedClasses.Lu
if($desc instanceof Array)$desc=$desc[1]
-Lx.prototype=$desc
-Lx.prototype.gt5=function(receiver){return receiver.type}
-Lx.prototype.st5=function(receiver,v){return receiver.type=v}
+Lu.prototype=$desc
+Lu.prototype.gt5=function(receiver){return receiver.type}
+Lu.prototype.st5=function(receiver,v){return receiver.type=v}
function LR(){}LR.builtin$cls="LR"
if(!"name" in LR)LR.name="LR"
$desc=$collectedClasses.LR
@@ -26001,11 +26396,11 @@
$desc=$collectedClasses.L3
if($desc instanceof Array)$desc=$desc[1]
L3.prototype=$desc
-function xj(){}xj.builtin$cls="xj"
-if(!"name" in xj)xj.name="xj"
-$desc=$collectedClasses.xj
+function zz(){}zz.builtin$cls="zz"
+if(!"name" in zz)zz.name="zz"
+$desc=$collectedClasses.zz
if($desc instanceof Array)$desc=$desc[1]
-xj.prototype=$desc
+zz.prototype=$desc
function dE(){}dE.builtin$cls="dE"
if(!"name" in dE)dE.name="dE"
$desc=$collectedClasses.dE
@@ -26052,11 +26447,11 @@
$desc=$collectedClasses.kn
if($desc instanceof Array)$desc=$desc[1]
kn.prototype=$desc
-function ht(){}ht.builtin$cls="Null"
-if(!"name" in ht)ht.name="ht"
-$desc=$collectedClasses.ht
+function Jh(){}Jh.builtin$cls="Null"
+if(!"name" in Jh)Jh.name="Jh"
+$desc=$collectedClasses.Jh
if($desc instanceof Array)$desc=$desc[1]
-ht.prototype=$desc
+Jh.prototype=$desc
function QI(){}QI.builtin$cls="QI"
if(!"name" in QI)QI.name="QI"
$desc=$collectedClasses.QI
@@ -26082,11 +26477,11 @@
$desc=$collectedClasses.nM
if($desc instanceof Array)$desc=$desc[1]
nM.prototype=$desc
-function ZC(){}ZC.builtin$cls="ZC"
-if(!"name" in ZC)ZC.name="ZC"
-$desc=$collectedClasses.ZC
+function iY(){}iY.builtin$cls="iY"
+if(!"name" in iY)iY.name="iY"
+$desc=$collectedClasses.iY
if($desc instanceof Array)$desc=$desc[1]
-ZC.prototype=$desc
+iY.prototype=$desc
function Jt(){}Jt.builtin$cls="Jt"
if(!"name" in Jt)Jt.name="Jt"
$desc=$collectedClasses.Jt
@@ -26292,11 +26687,11 @@
$desc=$collectedClasses.hz
if($desc instanceof Array)$desc=$desc[1]
hz.prototype=$desc
-function iY(){}iY.builtin$cls="iY"
-if(!"name" in iY)iY.name="iY"
-$desc=$collectedClasses.iY
+function AP(){}AP.builtin$cls="AP"
+if(!"name" in AP)AP.name="AP"
+$desc=$collectedClasses.AP
if($desc instanceof Array)$desc=$desc[1]
-iY.prototype=$desc
+AP.prototype=$desc
function yH(Kf,zu,p9){this.Kf=Kf
this.zu=zu
this.p9=p9}yH.builtin$cls="yH"
@@ -26688,6 +27083,16 @@
$desc=$collectedClasses.Vf
if($desc instanceof Array)$desc=$desc[1]
Vf.prototype=$desc
+function j3(a){this.a=a}j3.builtin$cls="j3"
+if(!"name" in j3)j3.name="j3"
+$desc=$collectedClasses.j3
+if($desc instanceof Array)$desc=$desc[1]
+j3.prototype=$desc
+function i0(){}i0.builtin$cls="i0"
+if(!"name" in i0)i0.name="i0"
+$desc=$collectedClasses.i0
+if($desc instanceof Array)$desc=$desc[1]
+i0.prototype=$desc
function Tg(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
@@ -26739,6 +27144,16 @@
$desc=$collectedClasses.pv
if($desc instanceof Array)$desc=$desc[1]
pv.prototype=$desc
+function RI(a){this.a=a}RI.builtin$cls="RI"
+if(!"name" in RI)RI.name="RI"
+$desc=$collectedClasses.RI
+if($desc instanceof Array)$desc=$desc[1]
+RI.prototype=$desc
+function Ye(){}Ye.builtin$cls="Ye"
+if(!"name" in Ye)Ye.name="Ye"
+$desc=$collectedClasses.Ye
+if($desc instanceof Array)$desc=$desc[1]
+Ye.prototype=$desc
function CN(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
@@ -26790,7 +27205,7 @@
$desc=$collectedClasses.Vfx
if($desc instanceof Array)$desc=$desc[1]
Vfx.prototype=$desc
-function i6(zh,HX,Uy,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.zh=zh
+function E0(zh,HX,Uy,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.zh=zh
this.HX=HX
this.Uy=Uy
this.AP=AP
@@ -26807,28 +27222,64 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}i6.builtin$cls="i6"
-if(!"name" in i6)i6.name="i6"
-$desc=$collectedClasses.i6
+this.X0=X0}E0.builtin$cls="E0"
+if(!"name" in E0)E0.name="E0"
+$desc=$collectedClasses.E0
if($desc instanceof Array)$desc=$desc[1]
-i6.prototype=$desc
-i6.prototype.gzh=function(receiver){return receiver.zh}
-i6.prototype.gzh.$reflectable=1
-i6.prototype.szh=function(receiver,v){return receiver.zh=v}
-i6.prototype.szh.$reflectable=1
-i6.prototype.gHX=function(receiver){return receiver.HX}
-i6.prototype.gHX.$reflectable=1
-i6.prototype.sHX=function(receiver,v){return receiver.HX=v}
-i6.prototype.sHX.$reflectable=1
-i6.prototype.gUy=function(receiver){return receiver.Uy}
-i6.prototype.gUy.$reflectable=1
-i6.prototype.sUy=function(receiver,v){return receiver.Uy=v}
-i6.prototype.sUy.$reflectable=1
+E0.prototype=$desc
+E0.prototype.gzh=function(receiver){return receiver.zh}
+E0.prototype.gzh.$reflectable=1
+E0.prototype.szh=function(receiver,v){return receiver.zh=v}
+E0.prototype.szh.$reflectable=1
+E0.prototype.gHX=function(receiver){return receiver.HX}
+E0.prototype.gHX.$reflectable=1
+E0.prototype.sHX=function(receiver,v){return receiver.HX=v}
+E0.prototype.sHX.$reflectable=1
+E0.prototype.gUy=function(receiver){return receiver.Uy}
+E0.prototype.gUy.$reflectable=1
+E0.prototype.sUy=function(receiver,v){return receiver.Uy=v}
+E0.prototype.sUy.$reflectable=1
function Dsd(){}Dsd.builtin$cls="Dsd"
if(!"name" in Dsd)Dsd.name="Dsd"
$desc=$collectedClasses.Dsd
if($desc instanceof Array)$desc=$desc[1]
Dsd.prototype=$desc
+function lw(GV,Hu,nx,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.GV=GV
+this.Hu=Hu
+this.nx=nx
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}lw.builtin$cls="lw"
+if(!"name" in lw)lw.name="lw"
+$desc=$collectedClasses.lw
+if($desc instanceof Array)$desc=$desc[1]
+lw.prototype=$desc
+lw.prototype.gGV=function(receiver){return receiver.GV}
+lw.prototype.gGV.$reflectable=1
+lw.prototype.sGV=function(receiver,v){return receiver.GV=v}
+lw.prototype.sGV.$reflectable=1
+lw.prototype.gHu=function(receiver){return receiver.Hu}
+lw.prototype.gHu.$reflectable=1
+lw.prototype.sHu=function(receiver,v){return receiver.Hu=v}
+lw.prototype.sHu.$reflectable=1
+lw.prototype.gnx=function(receiver){return receiver.nx}
+lw.prototype.gnx.$reflectable=1
+lw.prototype.snx=function(receiver,v){return receiver.nx=v}
+lw.prototype.snx.$reflectable=1
+function Nr(){}Nr.builtin$cls="Nr"
+if(!"name" in Nr)Nr.name="Nr"
+$desc=$collectedClasses.Nr
+if($desc instanceof Array)$desc=$desc[1]
+Nr.prototype=$desc
function wJ(){}wJ.builtin$cls="wJ"
if(!"name" in wJ)wJ.name="wJ"
$desc=$collectedClasses.wJ
@@ -27371,6 +27822,19 @@
$desc=$collectedClasses.b8
if($desc instanceof Array)$desc=$desc[1]
b8.prototype=$desc
+function j7(a,b){this.a=a
+this.b=b}j7.builtin$cls="j7"
+if(!"name" in j7)j7.name="j7"
+$desc=$collectedClasses.j7
+if($desc instanceof Array)$desc=$desc[1]
+j7.prototype=$desc
+function ff(a,c,d){this.a=a
+this.c=c
+this.d=d}ff.builtin$cls="ff"
+if(!"name" in ff)ff.name="ff"
+$desc=$collectedClasses.ff
+if($desc instanceof Array)$desc=$desc[1]
+ff.prototype=$desc
function Ia(){}Ia.builtin$cls="Ia"
if(!"name" in Ia)Ia.name="Ia"
$desc=$collectedClasses.Ia
@@ -27468,6 +27932,7 @@
$desc=$collectedClasses.OM
if($desc instanceof Array)$desc=$desc[1]
OM.prototype=$desc
+OM.prototype.gFR=function(receiver){return this.FR}
OM.prototype.gaw=function(){return this.aw}
OM.prototype.saw=function(v){return this.aw=v}
function qh(){}qh.builtin$cls="qh"
@@ -27671,13 +28136,13 @@
$desc=$collectedClasses.ez
if($desc instanceof Array)$desc=$desc[1]
ez.prototype=$desc
-function lx(aw){this.aw=aw}lx.builtin$cls="lx"
-if(!"name" in lx)lx.name="lx"
-$desc=$collectedClasses.lx
+function ti(aw){this.aw=aw}ti.builtin$cls="ti"
+if(!"name" in ti)ti.name="ti"
+$desc=$collectedClasses.ti
if($desc instanceof Array)$desc=$desc[1]
-lx.prototype=$desc
-lx.prototype.gaw=function(){return this.aw}
-lx.prototype.saw=function(v){return this.aw=v}
+ti.prototype=$desc
+ti.prototype.gaw=function(){return this.aw}
+ti.prototype.saw=function(v){return this.aw=v}
function LV(P,aw){this.P=P
this.aw=aw}LV.builtin$cls="LV"
if(!"name" in LV)LV.name="LV"
@@ -27699,11 +28164,11 @@
$desc=$collectedClasses.JF
if($desc instanceof Array)$desc=$desc[1]
JF.prototype=$desc
-function Je(){}Je.builtin$cls="Je"
-if(!"name" in Je)Je.name="Je"
-$desc=$collectedClasses.Je
+function ht(){}ht.builtin$cls="ht"
+if(!"name" in ht)ht.name="ht"
+$desc=$collectedClasses.ht
if($desc instanceof Array)$desc=$desc[1]
-Je.prototype=$desc
+ht.prototype=$desc
function CR(a,b){this.a=a
this.b=b}CR.builtin$cls="CR"
if(!"name" in CR)CR.name="CR"
@@ -27886,11 +28351,11 @@
$desc=$collectedClasses.eM
if($desc instanceof Array)$desc=$desc[1]
eM.prototype=$desc
-function Uez(a){this.a=a}Uez.builtin$cls="Uez"
-if(!"name" in Uez)Uez.name="Uez"
-$desc=$collectedClasses.Uez
+function Ha(a){this.a=a}Ha.builtin$cls="Ha"
+if(!"name" in Ha)Ha.name="Ha"
+$desc=$collectedClasses.Ha
if($desc instanceof Array)$desc=$desc[1]
-Uez.prototype=$desc
+Ha.prototype=$desc
function nU(){}nU.builtin$cls="nU"
if(!"name" in nU)nU.name="nU"
$desc=$collectedClasses.nU
@@ -28289,11 +28754,11 @@
$desc=$collectedClasses.by
if($desc instanceof Array)$desc=$desc[1]
by.prototype=$desc
-function dI(Xi){this.Xi=Xi}dI.builtin$cls="dI"
-if(!"name" in dI)dI.name="dI"
-$desc=$collectedClasses.dI
+function pD(Xi){this.Xi=Xi}pD.builtin$cls="pD"
+if(!"name" in pD)pD.name="pD"
+$desc=$collectedClasses.pD
if($desc instanceof Array)$desc=$desc[1]
-dI.prototype=$desc
+pD.prototype=$desc
function Cf(N5){this.N5=N5}Cf.builtin$cls="Cf"
if(!"name" in Cf)Cf.name="Cf"
$desc=$collectedClasses.Cf
@@ -28349,11 +28814,11 @@
$desc=$collectedClasses.a2
if($desc instanceof Array)$desc=$desc[1]
a2.prototype=$desc
-function fR(){}fR.builtin$cls="fR"
-if(!"name" in fR)fR.name="fR"
-$desc=$collectedClasses.fR
+function Tx(){}Tx.builtin$cls="Tx"
+if(!"name" in Tx)Tx.name="Tx"
+$desc=$collectedClasses.Tx
if($desc instanceof Array)$desc=$desc[1]
-fR.prototype=$desc
+Tx.prototype=$desc
function iP(y3,aL){this.y3=y3
this.aL=aL}iP.builtin$cls="iP"
if(!"name" in iP)iP.name="iP"
@@ -28885,7 +29350,7 @@
$desc=$collectedClasses.RX
if($desc instanceof Array)$desc=$desc[1]
RX.prototype=$desc
-function bO(xY){this.xY=xY}bO.builtin$cls="bO"
+function bO(Vy){this.Vy=Vy}bO.builtin$cls="bO"
if(!"name" in bO)bO.name="bO"
$desc=$collectedClasses.bO
if($desc instanceof Array)$desc=$desc[1]
@@ -29211,7 +29676,17 @@
$desc=$collectedClasses.D13
if($desc instanceof Array)$desc=$desc[1]
D13.prototype=$desc
-function GG(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
+function e5(a){this.a=a}e5.builtin$cls="e5"
+if(!"name" in e5)e5.name="e5"
+$desc=$collectedClasses.e5
+if($desc instanceof Array)$desc=$desc[1]
+e5.prototype=$desc
+function Ni(){}Ni.builtin$cls="Ni"
+if(!"name" in Ni)Ni.name="Ni"
+$desc=$collectedClasses.Ni
+if($desc instanceof Array)$desc=$desc[1]
+Ni.prototype=$desc
+function AX(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
this.AP=AP
@@ -29228,11 +29703,11 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}GG.builtin$cls="GG"
-if(!"name" in GG)GG.name="GG"
-$desc=$collectedClasses.GG
+this.X0=X0}AX.builtin$cls="AX"
+if(!"name" in AX)AX.name="AX"
+$desc=$collectedClasses.AX
if($desc instanceof Array)$desc=$desc[1]
-GG.prototype=$desc
+AX.prototype=$desc
function yb(Z8,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Z8=Z8
this.AP=AP
this.fn=fn
@@ -29262,12 +29737,24 @@
$desc=$collectedClasses.WZq
if($desc instanceof Array)$desc=$desc[1]
WZq.prototype=$desc
-function NM(GQ,J0,Oc,CO,e6,an,Ol,X3,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.GQ=GQ
+function QR(a){this.a=a}QR.builtin$cls="QR"
+if(!"name" in QR)QR.name="QR"
+$desc=$collectedClasses.QR
+if($desc instanceof Array)$desc=$desc[1]
+QR.prototype=$desc
+function Yx(){}Yx.builtin$cls="Yx"
+if(!"name" in Yx)Yx.name="Yx"
+$desc=$collectedClasses.Yx
+if($desc instanceof Array)$desc=$desc[1]
+Yx.prototype=$desc
+function NM(GQ,J0,Oc,CO,bV,vR,LY,q3,Ol,X3,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.GQ=GQ
this.J0=J0
this.Oc=Oc
this.CO=CO
-this.e6=e6
-this.an=an
+this.bV=bV
+this.vR=vR
+this.LY=LY
+this.q3=q3
this.Ol=Ol
this.X3=X3
this.AP=AP
@@ -29305,14 +29792,22 @@
NM.prototype.gCO.$reflectable=1
NM.prototype.sCO=function(receiver,v){return receiver.CO=v}
NM.prototype.sCO.$reflectable=1
-NM.prototype.ge6=function(receiver){return receiver.e6}
-NM.prototype.ge6.$reflectable=1
-NM.prototype.se6=function(receiver,v){return receiver.e6=v}
-NM.prototype.se6.$reflectable=1
-NM.prototype.gan=function(receiver){return receiver.an}
-NM.prototype.gan.$reflectable=1
-NM.prototype.san=function(receiver,v){return receiver.an=v}
-NM.prototype.san.$reflectable=1
+NM.prototype.gbV=function(receiver){return receiver.bV}
+NM.prototype.gbV.$reflectable=1
+NM.prototype.sbV=function(receiver,v){return receiver.bV=v}
+NM.prototype.sbV.$reflectable=1
+NM.prototype.gvR=function(receiver){return receiver.vR}
+NM.prototype.gvR.$reflectable=1
+NM.prototype.svR=function(receiver,v){return receiver.vR=v}
+NM.prototype.svR.$reflectable=1
+NM.prototype.gLY=function(receiver){return receiver.LY}
+NM.prototype.gLY.$reflectable=1
+NM.prototype.sLY=function(receiver,v){return receiver.LY=v}
+NM.prototype.sLY.$reflectable=1
+NM.prototype.gq3=function(receiver){return receiver.q3}
+NM.prototype.gq3.$reflectable=1
+NM.prototype.sq3=function(receiver,v){return receiver.q3=v}
+NM.prototype.sq3.$reflectable=1
NM.prototype.gOl=function(receiver){return receiver.Ol}
NM.prototype.gOl.$reflectable=1
NM.prototype.sOl=function(receiver,v){return receiver.Ol=v}
@@ -29326,16 +29821,26 @@
$desc=$collectedClasses.pva
if($desc instanceof Array)$desc=$desc[1]
pva.prototype=$desc
-function bd(a){this.a=a}bd.builtin$cls="bd"
-if(!"name" in bd)bd.name="bd"
-$desc=$collectedClasses.bd
+function nx(a){this.a=a}nx.builtin$cls="nx"
+if(!"name" in nx)nx.name="nx"
+$desc=$collectedClasses.nx
if($desc instanceof Array)$desc=$desc[1]
-bd.prototype=$desc
-function LS(){}LS.builtin$cls="LS"
-if(!"name" in LS)LS.name="LS"
-$desc=$collectedClasses.LS
+nx.prototype=$desc
+function jm(){}jm.builtin$cls="jm"
+if(!"name" in jm)jm.name="jm"
+$desc=$collectedClasses.jm
if($desc instanceof Array)$desc=$desc[1]
-LS.prototype=$desc
+jm.prototype=$desc
+function xj(a){this.a=a}xj.builtin$cls="xj"
+if(!"name" in xj)xj.name="xj"
+$desc=$collectedClasses.xj
+if($desc instanceof Array)$desc=$desc[1]
+xj.prototype=$desc
+function VB(){}VB.builtin$cls="VB"
+if(!"name" in VB)VB.name="VB"
+$desc=$collectedClasses.VB
+if($desc instanceof Array)$desc=$desc[1]
+VB.prototype=$desc
function aI(b,c){this.b=b
this.c=c}aI.builtin$cls="aI"
if(!"name" in aI)aI.name="aI"
@@ -29430,10 +29935,7 @@
$desc=$collectedClasses.GS
if($desc instanceof Array)$desc=$desc[1]
GS.prototype=$desc
-function pR(qX,AP,fn,tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.qX=qX
-this.AP=AP
-this.fn=fn
-this.tY=tY
+function pR(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
this.AP=AP
@@ -29455,25 +29957,16 @@
$desc=$collectedClasses.pR
if($desc instanceof Array)$desc=$desc[1]
pR.prototype=$desc
-pR.prototype.gqX=function(receiver){return receiver.qX}
-pR.prototype.gqX.$reflectable=1
-pR.prototype.sqX=function(receiver,v){return receiver.qX=v}
-pR.prototype.sqX.$reflectable=1
-function T5(){}T5.builtin$cls="T5"
-if(!"name" in T5)T5.name="T5"
-$desc=$collectedClasses.T5
+function Js(a){this.a=a}Js.builtin$cls="Js"
+if(!"name" in Js)Js.name="Js"
+$desc=$collectedClasses.Js
if($desc instanceof Array)$desc=$desc[1]
-T5.prototype=$desc
-function YE(a){this.a=a}YE.builtin$cls="YE"
-if(!"name" in YE)YE.name="YE"
-$desc=$collectedClasses.YE
+Js.prototype=$desc
+function fM(){}fM.builtin$cls="fM"
+if(!"name" in fM)fM.name="fM"
+$desc=$collectedClasses.fM
if($desc instanceof Array)$desc=$desc[1]
-YE.prototype=$desc
-function we(){}we.builtin$cls="we"
-if(!"name" in we)we.name="we"
-$desc=$collectedClasses.we
-if($desc instanceof Array)$desc=$desc[1]
-we.prototype=$desc
+fM.prototype=$desc
function hx(Xh,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Xh=Xh
this.AP=AP
this.fn=fn
@@ -29520,11 +30013,16 @@
$desc=$collectedClasses.u7
if($desc instanceof Array)$desc=$desc[1]
u7.prototype=$desc
-function fW(){}fW.builtin$cls="fW"
+function fW(a){this.a=a}fW.builtin$cls="fW"
if(!"name" in fW)fW.name="fW"
$desc=$collectedClasses.fW
if($desc instanceof Array)$desc=$desc[1]
fW.prototype=$desc
+function Ey(b){this.b=b}Ey.builtin$cls="Ey"
+if(!"name" in Ey)Ey.name="Ey"
+$desc=$collectedClasses.Ey
+if($desc instanceof Array)$desc=$desc[1]
+Ey.prototype=$desc
function qm(Aq,tT,eT,yt,wd,oH,np,AP,fn){this.Aq=Aq
this.tT=tT
this.eT=eT
@@ -29591,17 +30089,17 @@
$desc=$collectedClasses.waa
if($desc instanceof Array)$desc=$desc[1]
waa.prototype=$desc
-function RR(a,b){this.a=a
-this.b=b}RR.builtin$cls="RR"
-if(!"name" in RR)RR.name="RR"
-$desc=$collectedClasses.RR
+function SV(a,b){this.a=a
+this.b=b}SV.builtin$cls="SV"
+if(!"name" in SV)SV.name="SV"
+$desc=$collectedClasses.SV
if($desc instanceof Array)$desc=$desc[1]
-RR.prototype=$desc
-function EL(c){this.c=c}EL.builtin$cls="EL"
-if(!"name" in EL)EL.name="EL"
-$desc=$collectedClasses.EL
+SV.prototype=$desc
+function vH(c){this.c=c}vH.builtin$cls="vH"
+if(!"name" in vH)vH.name="vH"
+$desc=$collectedClasses.vH
if($desc instanceof Array)$desc=$desc[1]
-EL.prototype=$desc
+vH.prototype=$desc
function St(Pw,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Pw=Pw
this.AP=AP
this.fn=fn
@@ -29716,6 +30214,16 @@
$desc=$collectedClasses.V10
if($desc instanceof Array)$desc=$desc[1]
V10.prototype=$desc
+function Jq(a){this.a=a}Jq.builtin$cls="Jq"
+if(!"name" in Jq)Jq.name="Jq"
+$desc=$collectedClasses.Jq
+if($desc instanceof Array)$desc=$desc[1]
+Jq.prototype=$desc
+function RJ(){}RJ.builtin$cls="RJ"
+if(!"name" in RJ)RJ.name="RJ"
+$desc=$collectedClasses.RJ
+if($desc instanceof Array)$desc=$desc[1]
+RJ.prototype=$desc
function TJ(oc,eT,n2,Cj,wd,Gs){this.oc=oc
this.eT=eT
this.n2=n2
@@ -29791,17 +30299,17 @@
PF.prototype.gGj.$reflectable=1
PF.prototype.sGj=function(receiver,v){return receiver.Gj=v}
PF.prototype.sGj.$reflectable=1
-function fA(T9,Jt){this.T9=T9
-this.Jt=Jt}fA.builtin$cls="fA"
-if(!"name" in fA)fA.name="fA"
-$desc=$collectedClasses.fA
+function T4(T9,Jt){this.T9=T9
+this.Jt=Jt}T4.builtin$cls="T4"
+if(!"name" in T4)T4.name="T4"
+$desc=$collectedClasses.T4
if($desc instanceof Array)$desc=$desc[1]
-fA.prototype=$desc
-function tz(){}tz.builtin$cls="tz"
-if(!"name" in tz)tz.name="tz"
-$desc=$collectedClasses.tz
+T4.prototype=$desc
+function Qz(){}Qz.builtin$cls="Qz"
+if(!"name" in Qz)Qz.name="Qz"
+$desc=$collectedClasses.Qz
if($desc instanceof Array)$desc=$desc[1]
-tz.prototype=$desc
+Qz.prototype=$desc
function jA(oc){this.oc=oc}jA.builtin$cls="jA"
if(!"name" in jA)jA.name="jA"
$desc=$collectedClasses.jA
@@ -29818,7 +30326,7 @@
$desc=$collectedClasses.c5
if($desc instanceof Array)$desc=$desc[1]
c5.prototype=$desc
-function qT(hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.hm=hm
+function F1(hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.hm=hm
this.AP=AP
this.fn=fn
this.AP=AP
@@ -29830,12 +30338,14 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}qT.builtin$cls="qT"
-if(!"name" in qT)qT.name="qT"
-$desc=$collectedClasses.qT
+this.X0=X0}F1.builtin$cls="F1"
+if(!"name" in F1)F1.name="F1"
+$desc=$collectedClasses.F1
if($desc instanceof Array)$desc=$desc[1]
-qT.prototype=$desc
-function Xd(rK,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.rK=rK
+F1.prototype=$desc
+function aQ(KU,ZC,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.KU=KU
+this.ZC=ZC
+this.Jo=Jo
this.AP=AP
this.fn=fn
this.hm=hm
@@ -29850,20 +30360,227 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}Xd.builtin$cls="Xd"
-if(!"name" in Xd)Xd.name="Xd"
-$desc=$collectedClasses.Xd
+this.X0=X0}aQ.builtin$cls="aQ"
+if(!"name" in aQ)aQ.name="aQ"
+$desc=$collectedClasses.aQ
if($desc instanceof Array)$desc=$desc[1]
-Xd.prototype=$desc
-Xd.prototype.grK=function(receiver){return receiver.rK}
-Xd.prototype.grK.$reflectable=1
-Xd.prototype.srK=function(receiver,v){return receiver.rK=v}
-Xd.prototype.srK.$reflectable=1
+aQ.prototype=$desc
+aQ.prototype.gKU=function(receiver){return receiver.KU}
+aQ.prototype.gKU.$reflectable=1
+aQ.prototype.sKU=function(receiver,v){return receiver.KU=v}
+aQ.prototype.sKU.$reflectable=1
+aQ.prototype.gZC=function(receiver){return receiver.ZC}
+aQ.prototype.gZC.$reflectable=1
+aQ.prototype.sZC=function(receiver,v){return receiver.ZC=v}
+aQ.prototype.sZC.$reflectable=1
+aQ.prototype.gJo=function(receiver){return receiver.Jo}
+aQ.prototype.gJo.$reflectable=1
+aQ.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+aQ.prototype.sJo.$reflectable=1
function V11(){}V11.builtin$cls="V11"
if(!"name" in V11)V11.name="V11"
$desc=$collectedClasses.V11
if($desc instanceof Array)$desc=$desc[1]
V11.prototype=$desc
+function Qa(KU,ZC,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.KU=KU
+this.ZC=ZC
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}Qa.builtin$cls="Qa"
+if(!"name" in Qa)Qa.name="Qa"
+$desc=$collectedClasses.Qa
+if($desc instanceof Array)$desc=$desc[1]
+Qa.prototype=$desc
+Qa.prototype.gKU=function(receiver){return receiver.KU}
+Qa.prototype.gKU.$reflectable=1
+Qa.prototype.sKU=function(receiver,v){return receiver.KU=v}
+Qa.prototype.sKU.$reflectable=1
+Qa.prototype.gZC=function(receiver){return receiver.ZC}
+Qa.prototype.gZC.$reflectable=1
+Qa.prototype.sZC=function(receiver,v){return receiver.ZC=v}
+Qa.prototype.sZC.$reflectable=1
+function V12(){}V12.builtin$cls="V12"
+if(!"name" in V12)V12.name="V12"
+$desc=$collectedClasses.V12
+if($desc instanceof Array)$desc=$desc[1]
+V12.prototype=$desc
+function vI(rU,SB,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.rU=rU
+this.SB=SB
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}vI.builtin$cls="vI"
+if(!"name" in vI)vI.name="vI"
+$desc=$collectedClasses.vI
+if($desc instanceof Array)$desc=$desc[1]
+vI.prototype=$desc
+vI.prototype.grU=function(receiver){return receiver.rU}
+vI.prototype.grU.$reflectable=1
+vI.prototype.srU=function(receiver,v){return receiver.rU=v}
+vI.prototype.srU.$reflectable=1
+vI.prototype.gSB=function(receiver){return receiver.SB}
+vI.prototype.gSB.$reflectable=1
+vI.prototype.sSB=function(receiver,v){return receiver.SB=v}
+vI.prototype.sSB.$reflectable=1
+function V13(){}V13.builtin$cls="V13"
+if(!"name" in V13)V13.name="V13"
+$desc=$collectedClasses.V13
+if($desc instanceof Array)$desc=$desc[1]
+V13.prototype=$desc
+function tz(Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}tz.builtin$cls="tz"
+if(!"name" in tz)tz.name="tz"
+$desc=$collectedClasses.tz
+if($desc instanceof Array)$desc=$desc[1]
+tz.prototype=$desc
+tz.prototype.gJo=function(receiver){return receiver.Jo}
+tz.prototype.gJo.$reflectable=1
+tz.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+tz.prototype.sJo.$reflectable=1
+function V14(){}V14.builtin$cls="V14"
+if(!"name" in V14)V14.name="V14"
+$desc=$collectedClasses.V14
+if($desc instanceof Array)$desc=$desc[1]
+V14.prototype=$desc
+function fl(iy,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.iy=iy
+this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}fl.builtin$cls="fl"
+if(!"name" in fl)fl.name="fl"
+$desc=$collectedClasses.fl
+if($desc instanceof Array)$desc=$desc[1]
+fl.prototype=$desc
+fl.prototype.giy=function(receiver){return receiver.iy}
+fl.prototype.giy.$reflectable=1
+fl.prototype.siy=function(receiver,v){return receiver.iy=v}
+fl.prototype.siy.$reflectable=1
+fl.prototype.gJo=function(receiver){return receiver.Jo}
+fl.prototype.gJo.$reflectable=1
+fl.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+fl.prototype.sJo.$reflectable=1
+function V15(){}V15.builtin$cls="V15"
+if(!"name" in V15)V15.name="V15"
+$desc=$collectedClasses.V15
+if($desc instanceof Array)$desc=$desc[1]
+V15.prototype=$desc
+function Zt(Ap,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Ap=Ap
+this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}Zt.builtin$cls="Zt"
+if(!"name" in Zt)Zt.name="Zt"
+$desc=$collectedClasses.Zt
+if($desc instanceof Array)$desc=$desc[1]
+Zt.prototype=$desc
+Zt.prototype.gAp=function(receiver){return receiver.Ap}
+Zt.prototype.gAp.$reflectable=1
+Zt.prototype.sAp=function(receiver,v){return receiver.Ap=v}
+Zt.prototype.sAp.$reflectable=1
+Zt.prototype.gJo=function(receiver){return receiver.Jo}
+Zt.prototype.gJo.$reflectable=1
+Zt.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+Zt.prototype.sJo.$reflectable=1
+function V16(){}V16.builtin$cls="V16"
+if(!"name" in V16)V16.name="V16"
+$desc=$collectedClasses.V16
+if($desc instanceof Array)$desc=$desc[1]
+V16.prototype=$desc
+function wM(Au,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Au=Au
+this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}wM.builtin$cls="wM"
+if(!"name" in wM)wM.name="wM"
+$desc=$collectedClasses.wM
+if($desc instanceof Array)$desc=$desc[1]
+wM.prototype=$desc
+wM.prototype.gAu=function(receiver){return receiver.Au}
+wM.prototype.gAu.$reflectable=1
+wM.prototype.sAu=function(receiver,v){return receiver.Au=v}
+wM.prototype.sAu.$reflectable=1
+wM.prototype.gJo=function(receiver){return receiver.Jo}
+wM.prototype.gJo.$reflectable=1
+wM.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+wM.prototype.sJo.$reflectable=1
+function V17(){}V17.builtin$cls="V17"
+if(!"name" in V17)V17.name="V17"
+$desc=$collectedClasses.V17
+if($desc instanceof Array)$desc=$desc[1]
+V17.prototype=$desc
function mL(Z6,DF,nI,AP,fn){this.Z6=Z6
this.DF=DF
this.nI=nI
@@ -29892,13 +30609,14 @@
if($desc instanceof Array)$desc=$desc[1]
qu.prototype=$desc
qu.prototype.gbG=function(receiver){return this.bG}
-function bv(WP,XR,Z0,md,mY,F3,rU,LE,iP,mU,mM,Td,AP,fn){this.WP=WP
+function bv(WP,XR,Z0,md,mY,e8,F3,Gg,LE,iP,mU,mM,Td,AP,fn){this.WP=WP
this.XR=XR
this.Z0=Z0
this.md=md
this.mY=mY
+this.e8=e8
this.F3=F3
-this.rU=rU
+this.Gg=Gg
this.LE=LE
this.iP=iP
this.mU=mU
@@ -30083,8 +30801,9 @@
c2.prototype=$desc
c2.prototype.gRd=function(receiver){return this.Rd}
c2.prototype.gRd.$reflectable=1
-function rj(W6,xN,Hz,Sw,UK,AP,fn){this.W6=W6
+function rj(W6,xN,ei,Hz,Sw,UK,AP,fn){this.W6=W6
this.xN=xN
+this.ei=ei
this.Hz=Hz
this.Sw=Sw
this.UK=UK
@@ -30181,7 +30900,7 @@
XN.prototype=$desc
XN.prototype.gWT=function(receiver){return this.WT}
XN.prototype.gWT.$reflectable=1
-function F1(k5,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.k5=k5
+function lI(k5,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.k5=k5
this.AP=AP
this.fn=fn
this.hm=hm
@@ -30196,20 +30915,20 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}F1.builtin$cls="F1"
-if(!"name" in F1)F1.name="F1"
-$desc=$collectedClasses.F1
+this.X0=X0}lI.builtin$cls="lI"
+if(!"name" in lI)lI.name="lI"
+$desc=$collectedClasses.lI
if($desc instanceof Array)$desc=$desc[1]
-F1.prototype=$desc
-F1.prototype.gk5=function(receiver){return receiver.k5}
-F1.prototype.gk5.$reflectable=1
-F1.prototype.sk5=function(receiver,v){return receiver.k5=v}
-F1.prototype.sk5.$reflectable=1
-function V12(){}V12.builtin$cls="V12"
-if(!"name" in V12)V12.name="V12"
-$desc=$collectedClasses.V12
+lI.prototype=$desc
+lI.prototype.gk5=function(receiver){return receiver.k5}
+lI.prototype.gk5.$reflectable=1
+lI.prototype.sk5=function(receiver,v){return receiver.k5=v}
+lI.prototype.sk5.$reflectable=1
+function V18(){}V18.builtin$cls="V18"
+if(!"name" in V18)V18.name="V18"
+$desc=$collectedClasses.V18
if($desc instanceof Array)$desc=$desc[1]
-V12.prototype=$desc
+V18.prototype=$desc
function uL(hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.hm=hm
this.AP=AP
this.fn=fn
@@ -30322,11 +31041,11 @@
DA.prototype=$desc
DA.prototype.gWA=function(){return this.WA}
DA.prototype.gIl=function(){return this.Il}
-function nd(){}nd.builtin$cls="nd"
-if(!"name" in nd)nd.name="nd"
-$desc=$collectedClasses.nd
+function ndx(){}ndx.builtin$cls="ndx"
+if(!"name" in ndx)ndx.name="ndx"
+$desc=$collectedClasses.ndx
if($desc instanceof Array)$desc=$desc[1]
-nd.prototype=$desc
+ndx.prototype=$desc
function vly(){}vly.builtin$cls="vly"
if(!"name" in vly)vly.name="vly"
$desc=$collectedClasses.vly
@@ -30876,14 +31595,14 @@
if($desc instanceof Array)$desc=$desc[1]
z6.prototype=$desc
z6.prototype.geT=function(receiver){return this.eT}
-function Mb(bO,Lv){this.bO=bO
-this.Lv=Lv}Mb.builtin$cls="Mb"
-if(!"name" in Mb)Mb.name="Mb"
-$desc=$collectedClasses.Mb
+function Ay0(bO,Lv){this.bO=bO
+this.Lv=Lv}Ay0.builtin$cls="Ay0"
+if(!"name" in Ay0)Ay0.name="Ay0"
+$desc=$collectedClasses.Ay0
if($desc instanceof Array)$desc=$desc[1]
-Mb.prototype=$desc
-Mb.prototype.sbO=function(v){return this.bO=v}
-Mb.prototype.gLv=function(){return this.Lv}
+Ay0.prototype=$desc
+Ay0.prototype.sbO=function(v){return this.bO=v}
+Ay0.prototype.gLv=function(){return this.Lv}
function Ed(Jd){this.Jd=Jd}Ed.builtin$cls="Ed"
if(!"name" in Ed)Ed.name="Ed"
$desc=$collectedClasses.Ed
@@ -31331,11 +32050,11 @@
knI.prototype.gzw.$reflectable=1
knI.prototype.szw=function(receiver,v){return receiver.zw=v}
knI.prototype.szw.$reflectable=1
-function qe(){}qe.builtin$cls="qe"
-if(!"name" in qe)qe.name="qe"
-$desc=$collectedClasses.qe
+function T5(){}T5.builtin$cls="T5"
+if(!"name" in T5)T5.name="T5"
+$desc=$collectedClasses.T5
if($desc instanceof Array)$desc=$desc[1]
-qe.prototype=$desc
+T5.prototype=$desc
function fI(Uz,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Uz=Uz
this.AP=AP
this.fn=fn
@@ -31360,11 +32079,11 @@
fI.prototype.gUz.$reflectable=1
fI.prototype.sUz=function(receiver,v){return receiver.Uz=v}
fI.prototype.sUz.$reflectable=1
-function V13(){}V13.builtin$cls="V13"
-if(!"name" in V13)V13.name="V13"
-$desc=$collectedClasses.V13
+function V19(){}V19.builtin$cls="V19"
+if(!"name" in V19)V19.name="V19"
+$desc=$collectedClasses.V19
if($desc instanceof Array)$desc=$desc[1]
-V13.prototype=$desc
+V19.prototype=$desc
function qq(a,b){this.a=a
this.b=b}qq.builtin$cls="qq"
if(!"name" in qq)qq.name="qq"
@@ -31415,8 +32134,7 @@
$desc=$collectedClasses.Ds
if($desc instanceof Array)$desc=$desc[1]
Ds.prototype=$desc
-function nm(Va,Mt,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Va=Va
-this.Mt=Mt
+function nm(Va,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Va=Va
this.AP=AP
this.fn=fn
this.hm=hm
@@ -31440,15 +32158,11 @@
nm.prototype.gVa.$reflectable=1
nm.prototype.sVa=function(receiver,v){return receiver.Va=v}
nm.prototype.sVa.$reflectable=1
-nm.prototype.gMt=function(receiver){return receiver.Mt}
-nm.prototype.gMt.$reflectable=1
-nm.prototype.sMt=function(receiver,v){return receiver.Mt=v}
-nm.prototype.sMt.$reflectable=1
-function V14(){}V14.builtin$cls="V14"
-if(!"name" in V14)V14.name="V14"
-$desc=$collectedClasses.V14
+function V20(){}V20.builtin$cls="V20"
+if(!"name" in V20)V20.name="V20"
+$desc=$collectedClasses.V20
if($desc instanceof Array)$desc=$desc[1]
-V14.prototype=$desc
+V20.prototype=$desc
function Vu(V4,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.V4=V4
this.AP=AP
this.fn=fn
@@ -31473,11 +32187,11 @@
Vu.prototype.gV4.$reflectable=1
Vu.prototype.sV4=function(receiver,v){return receiver.V4=v}
Vu.prototype.sV4.$reflectable=1
-function V15(){}V15.builtin$cls="V15"
-if(!"name" in V15)V15.name="V15"
-$desc=$collectedClasses.V15
+function V21(){}V21.builtin$cls="V21"
+if(!"name" in V21)V21.name="V21"
+$desc=$collectedClasses.V21
if($desc instanceof Array)$desc=$desc[1]
-V15.prototype=$desc
+V21.prototype=$desc
function At(a){this.a=a}At.builtin$cls="At"
if(!"name" in At)At.name="At"
$desc=$collectedClasses.At
@@ -31759,11 +32473,11 @@
$desc=$collectedClasses.wl
if($desc instanceof Array)$desc=$desc[1]
wl.prototype=$desc
-function T4(){}T4.builtin$cls="T4"
-if(!"name" in T4)T4.name="T4"
-$desc=$collectedClasses.T4
+function ve(){}ve.builtin$cls="ve"
+if(!"name" in ve)ve.name="ve"
+$desc=$collectedClasses.ve
if($desc instanceof Array)$desc=$desc[1]
-T4.prototype=$desc
+ve.prototype=$desc
function TR(qP){this.qP=qP}TR.builtin$cls="TR"
if(!"name" in TR)TR.name="TR"
$desc=$collectedClasses.TR
@@ -31775,4 +32489,4 @@
$desc=$collectedClasses.VD
if($desc instanceof Array)$desc=$desc[1]
VD.prototype=$desc
-return[qE,SV,Gh,A0,na,Mr,zx,P2,Xk,W2,it,Az,QP,QW,jr,Ny,nx,QQ,BR,di,d7,yJ,He,vz,vHT,n0,Em,pt,rV,K4,QF,Aj,cm,Nh,wj,cv,Fs,Ty,ea,D0,as,hH,Aa,u5,h4,W4,jP,Hd,tA,wa,Uq,QH,Rt,X2,zU,pk,tX,Sg,pA,Mi,Gt,In,wP,eP,mF,Qj,cS,YI,El,zm,Y7,aB,fJ,BK,Rv,HO,Kk,ZY,DD,EeC,Qb,PG,xe,Hw,bn,Imr,Ve,Oq,H9,o4,oU,ih,KV,yk,KY,G7,l9,Ql,Xp,bP,FH,iL,HD,ni,jg,qj,nC,KR,ew,fs,LY,BL,fe,By,j2,X4,lp,pD,I0,QR,Cp,Ta,zD9,Ul,G5,bk,fq,Er,qk,GI,Tb,tV,BT,yY,kJ,AE,xV,Dn,y6,RH,ho,OJ,Mf,dp,vw,aG,J6,u9,Bn,hq,UL,tZ,kc,AK,ty,Nf,F2,VB,QV,Zv,Q7,hF,OF,Dh,ZJ,mU,NE,lC,y5,jQ,Kg,ui,mk,DQ,Sm,LM,es,eG,lv,pf,NV,W1,mCz,kK,n5,bb,NdT,lc,Xu,qM,tk,me,oB,nh,EI,MI,ca,um,eW,kL,Fu,QN,N9,BA,d0,zp,br,PIw,vd,Jq,Yd,kN,lZ,Gr,XE,GH,lo,NJ,Ue,vt,rQ,Lx,LR,d5,hy,mq,Ke,CG,Xe,y0,Rk4,Eo,tL,pyk,ZD,rD,wD,Wv,yz,Fi,Ja,mj,cB,Mh,yR,GK,xJ,Nn,Et,NC,nb,Zn,xt,wx,P0,xlX,SQ,qD,TM,WZ,rn,df,Hg,L3,xj,dE,Eb,dT,N2,eE,V6,Lt,Gv,kn,ht,QI,FP,is,Q,nM,ZC,Jt,P,im,GW,vT,VP,BQ,O,PK,JO,f0,aX,cC,RA,IY,JH,jl,Iy,Z6,Ua,ns,yo,NA,NO,II,fP,X1,HU,oo,OW,hz,iY,yH,FA,Av,ku,Zd,xQ,F0,oH,LPe,bw,WT,jJ,XR,LI,A2,IW,F3,FD,Cj,u8,Zr,W0,az,vV,Am,XO,dr,TL,KX,uZ,OQ,Tp,Bp,v,Ll,dN,GT,Pe,Eq,lb,tD,hJ,tu,fw,Zz,cu,Lm,dC,wN,VX,VR,EK,KW,Pb,tQ,G6,Vf,Tg,Ps,pv,CN,vc,Vfx,i6,Dsd,wJ,aL,nH,a7,i1,xy,MH,A8,U5,SO,kV,rR,H6,wB,U1,SJ,SU7,Qr,w2Y,iK,GD,Sn,nI,TY,Lj,mb,am,cw,EE,Uz,uh,IB,oP,YX,BI,Un,M2,iu,mg,bl,tB,Oo,Tc,Ax,Wf,vk,Ei,U7,t0,Ld,Sz,Zk,fu,wt,ng,TN,Ar,rh,jB,ye,O1,Oh,Xh,Ca,Ik,JI,Ks,dz,tK,OR,Bg,DL,b8,Ia,Zf,vs,da,xw,dm,rH,ZL,rq,RW,RT,jZ,FZ,OM,qh,tG,jv,LB,zn,lz,Rl,Jb,M4,Jp,h7,pr,eN,PI,uO,j4,i9,VV,Dy,lU,OC,UH,Z5,ii,ib,MO,O9,oh,nP,KA,Vo,qB,ez,lx,LV,DS,JF,Je,CR,Qk,v1y,uR,Q0,YR,fB,nO,t3,dq,lO,aY,zG,e4,JB,Id,WH,TF,K5,Cg,Hs,dv,pV,uo,pK,eM,Uez,nU,R8,k6,oi,ce,DJ,PL,Fq,jG,fG,EQ,YB,a1,ou,S9,ey,xd,v6,db,i5,N6,Rr,YO,oz,b6,ef,zQ,Yp,lN,mW,ar,lD,ZQ,Sw,o0,qv,jp,vX,Ba,An,bF,LD,S6B,OG,uM,DN,ZM,HW,JC,f1,Uk,wI,Zi,Ud,K8,by,dI,Cf,Sh,tF,z0,E3,Rw,HB,CL,p4,a2,fR,iP,MF,Rq,Hn,Zl,B5,a6,P7,DW,Ge,LK,AT,bJ,Np,mp,ub,ds,lj,UV,VS,t7,HG,aE,eV,kM,EH,cX,Yl,Z0,L9,a,Od,MN,WU,Rn,wv,uq,iD,hb,XX,Kd,yZ,Gs,pm,Tw,wm,FB,Lk,XZ,Mx,C9,kZ,JT,d9,rI,QZ,VG,wz,B1,M5,Jn,DM,RAp,Gb,Kx,iO,bU,Yg,e7,nNL,ecX,kI,yoo,w1p,tJ,Zc,i7,nF,FK,Si,vf,Iw,Fc,hD,I4,e0,RO,eu,ie,Ea,pu,i2,b0,Ov,qO,RX,bO,Gm,Of,Qg,W9,vZ,dW,Dk,O7,IU,E4,Gn,r7,Tz,Wk,DV,Hp,Nz,Jd,QS,ej,NL,vr,D4,X9,Ms,ac,RS,RY,Ys,WS4,Gj,U4,B8q,Nx,LZ,Dg,Ob,Ip,Pg,Nb,nA,Fv,tuj,E9,Vct,m8,Gk,D13,GG,yb,WZq,NM,pva,bd,LS,aI,rG,yh,wO,Tm,q1,CA,YL,KC,xL,As,GE,rl,uQ,D7,hT,GS,pR,T5,YE,we,hx,cda,u7,fW,qm,vO,E7,waa,RR,EL,St,V0,vj,V4,LU,T2,V10,TJ,dG,qV,HV,em,Lb,PF,fA,tz,jA,PO,c5,qT,Xd,V11,mL,Kf,qu,bv,eS,IQ,TI,yU,Ub,dY,vY,zZ,dS,dZ,Qe,DP,WAE,N8,Vi,kx,fx,CM,xn,vu,c2,rj,Nu,Q4,aJ,u4,pF,Q2,r1,Rb,Y2,XN,F1,V12,uL,LP,Pi,z2,qI,J3,E5,o5,b5,zI,Zb,id,iV,DA,nd,vly,d3,lS,xh,wn,Ay,Bj,HA,qC,zT,Lo,WR,qL,Px,C4,Md,km,Zj,XP,q6,CK,LJ,ZG,Oc,MX,w9,r3y,yL,zs,WC,Xi,TV,Mq,Oa,n1,xf,L6,Rs,uJ,hm,Ji,Bf,ir,jpR,GN,bS,HJ,S0,V3,Bl,Fn,e3,pM,jh,W6,Lf,fT,pp,nl,ik,mf,LfS,HK,o8,ex,e9,Xy,G0,mY,GX,mB,XF,bX,lP,Uf,Ra,wJY,zOQ,W6o,MdQ,YJG,DOe,lPa,Ufa,Raa,w0,w4,w5,w7,c4,z6,Mb,Ed,G1,Os,B8,Wh,x5,ev,ID,qR,ek,Qv,Xm,mv,mG,uA,vl,Li,WK,iT,ja,zw,fa,WW,vQ,a9,VA,J1,fk,wL,B0,tc,hw,EZ,no,kB,ae,XC,w6,jK,uk,K9,zX,x9,Jy,xs,FX,Ae,Bt,vR,Pn,hc,hA,fr,cfS,JG,knI,qe,fI,V13,qq,FC,xI,Ds,nm,V14,Vu,V15,At,Sb,V2,D8,jY,H2,YJ,fTP,ppY,NP,jt,r0,jz,SA,hB,nv,ee,XI,hs,yp,ug,DT,OB,DO,p8,NW,HS,TG,ts,Kj,VU,Ya,XT,ic,wl,T4,TR,VD]}
\ No newline at end of file
+return[qE,ho,Gh,A0,na,Mr,zx,P2,Xk,W2,it,Az,QP,QW,jr,Ny,Zv,QQS,BR,di,d7,yJ,He,vz,vHT,n0,Em,pt,rV,K4,QF,Aj,cm,Nh,wj,cv,Fs,Ty,ea,D0,as,hH,Aa,u5,h4,W4,jP,Hd,tA,wa,Uq,QH,Rt,X2,zU,rk,tX,Sg,pA,Mi,Gt,In,wP,eP,mF,Qj,cS,YI,El,zm,Y7,aB,fJ,BK,Rv,HO,Kk,ZY,DD,EeC,Qb,PG,xe,Hw,bn,Imr,Ve,Oq,H9,o4,oU,ih,KV,yk,KY,G7,l9,Ql,Xp,bP,FH,SN,HD,ni,jg,qj,nC,KR,ew,fs,LY,BL,fe,By,j2,X4,lp,kd,I0,CY,Wt,uaa,zD9,Ul,G5,bk,Lx,Er,qk,GI,Tb,tV,BT,yY,kJ,AE,xV,Dn,y6,RH,pU,OJ,Mf,dp,vw,aG,fA,u9,Bn,hq,UL,tZ,kc,AK,ty,Nf,F2,nL,QV,q0,Q7,hF,OF,Dh,Ue,mU,NE,lC,y5,jQ,Kg,ui,mk,DQ,Sm,LM,es,eG,bd,pf,NV,W1,mCz,kK,n5,bb,NdT,lc,Xu,qM,tk,me,oB,nh,EI,MI,ca,um,eW,kL,Fu,QN,N9,BA,d0,zp,br,PIw,vd,uzr,Yd,kN,lZ,Gr,XE,GH,lo,NJ,nd,vt,rQ,Lu,LR,d5,hy,mq,Ke,CG,Xe,y0,Rk4,Eo,tL,pyk,ZD,rD,wD,Wv,yz,Fi,Ja,mj,cB,Mh,yR,GK,xJ,Nn,Et,NC,nb,Zn,xt,wx,P0,xlX,SQ,qD,TM,WZ,rn,df,Hg,L3,zz,dE,Eb,dT,N2,eE,V6,Lt,Gv,kn,Jh,QI,FP,is,Q,nM,iY,Jt,P,im,GW,vT,VP,BQ,O,PK,JO,f0,aX,cC,RA,IY,JH,jl,Iy,Z6,Ua,ns,yo,NA,NO,II,fP,X1,HU,oo,OW,hz,AP,yH,FA,Av,ku,Zd,xQ,F0,oH,LPe,bw,WT,jJ,XR,LI,A2,IW,F3,FD,Cj,u8,Zr,W0,az,vV,Am,XO,dr,TL,KX,uZ,OQ,Tp,Bp,v,Ll,dN,GT,Pe,Eq,lb,tD,hJ,tu,fw,Zz,cu,Lm,dC,wN,VX,VR,EK,KW,Pb,tQ,G6,Vf,j3,i0,Tg,Ps,pv,RI,Ye,CN,vc,Vfx,E0,Dsd,lw,Nr,wJ,aL,nH,a7,i1,xy,MH,A8,U5,SO,kV,rR,H6,wB,U1,SJ,SU7,Qr,w2Y,iK,GD,Sn,nI,TY,Lj,mb,am,cw,EE,Uz,uh,IB,oP,YX,BI,Un,M2,iu,mg,bl,tB,Oo,Tc,Ax,Wf,vk,Ei,U7,t0,Ld,Sz,Zk,fu,wt,ng,TN,Ar,rh,jB,ye,O1,Oh,Xh,Ca,Ik,JI,Ks,dz,tK,OR,Bg,DL,b8,j7,ff,Ia,Zf,vs,da,xw,dm,rH,ZL,rq,RW,RT,jZ,FZ,OM,qh,tG,jv,LB,zn,lz,Rl,Jb,M4,Jp,h7,pr,eN,PI,uO,j4,i9,VV,Dy,lU,OC,UH,Z5,ii,ib,MO,O9,oh,nP,KA,Vo,qB,ez,ti,LV,DS,JF,ht,CR,Qk,v1y,uR,Q0,YR,fB,nO,t3,dq,lO,aY,zG,e4,JB,Id,WH,TF,K5,Cg,Hs,dv,pV,uo,pK,eM,Ha,nU,R8,k6,oi,ce,DJ,PL,Fq,jG,fG,EQ,YB,a1,ou,S9,ey,xd,v6,db,i5,N6,Rr,YO,oz,b6,ef,zQ,Yp,lN,mW,ar,lD,ZQ,Sw,o0,qv,jp,vX,Ba,An,bF,LD,S6B,OG,uM,DN,ZM,HW,JC,f1,Uk,wI,Zi,Ud,K8,by,pD,Cf,Sh,tF,z0,E3,Rw,HB,CL,p4,a2,Tx,iP,MF,Rq,Hn,Zl,B5,a6,P7,DW,Ge,LK,AT,bJ,Np,mp,ub,ds,lj,UV,VS,t7,HG,aE,eV,kM,EH,cX,Yl,Z0,L9,a,Od,MN,WU,Rn,wv,uq,iD,hb,XX,Kd,yZ,Gs,pm,Tw,wm,FB,Lk,XZ,Mx,C9,kZ,JT,d9,rI,QZ,VG,wz,B1,M5,Jn,DM,RAp,Gb,Kx,iO,bU,Yg,e7,nNL,ecX,kI,yoo,w1p,tJ,Zc,i7,nF,FK,Si,vf,Iw,Fc,hD,I4,e0,RO,eu,ie,Ea,pu,i2,b0,Ov,qO,RX,bO,Gm,Of,Qg,W9,vZ,dW,Dk,O7,IU,E4,Gn,r7,Tz,Wk,DV,Hp,Nz,Jd,QS,ej,NL,vr,D4,X9,Ms,ac,RS,RY,Ys,WS4,Gj,U4,B8q,Nx,LZ,Dg,Ob,Ip,Pg,Nb,nA,Fv,tuj,E9,Vct,m8,Gk,D13,e5,Ni,AX,yb,WZq,QR,Yx,NM,pva,nx,jm,xj,VB,aI,rG,yh,wO,Tm,q1,CA,YL,KC,xL,As,GE,rl,uQ,D7,hT,GS,pR,Js,fM,hx,cda,u7,fW,Ey,qm,vO,E7,waa,SV,vH,St,V0,vj,V4,LU,T2,V10,Jq,RJ,TJ,dG,qV,HV,em,Lb,PF,T4,Qz,jA,PO,c5,F1,aQ,V11,Qa,V12,vI,V13,tz,V14,fl,V15,Zt,V16,wM,V17,mL,Kf,qu,bv,eS,IQ,TI,yU,Ub,dY,vY,zZ,dS,dZ,Qe,DP,WAE,N8,Vi,kx,fx,CM,xn,vu,c2,rj,Nu,Q4,aJ,u4,pF,Q2,r1,Rb,Y2,XN,lI,V18,uL,LP,Pi,z2,qI,J3,E5,o5,b5,zI,Zb,id,iV,DA,ndx,vly,d3,lS,xh,wn,Ay,Bj,HA,qC,zT,Lo,WR,qL,Px,C4,Md,km,Zj,XP,q6,CK,LJ,ZG,Oc,MX,w9,r3y,yL,zs,WC,Xi,TV,Mq,Oa,n1,xf,L6,Rs,uJ,hm,Ji,Bf,ir,jpR,GN,bS,HJ,S0,V3,Bl,Fn,e3,pM,jh,W6,Lf,fT,pp,nl,ik,mf,LfS,HK,o8,ex,e9,Xy,G0,mY,GX,mB,XF,bX,lP,Uf,Ra,wJY,zOQ,W6o,MdQ,YJG,DOe,lPa,Ufa,Raa,w0,w4,w5,w7,c4,z6,Ay0,Ed,G1,Os,B8,Wh,x5,ev,ID,qR,ek,Qv,Xm,mv,mG,uA,vl,Li,WK,iT,ja,zw,fa,WW,vQ,a9,VA,J1,fk,wL,B0,tc,hw,EZ,no,kB,ae,XC,w6,jK,uk,K9,zX,x9,Jy,xs,FX,Ae,Bt,vR,Pn,hc,hA,fr,cfS,JG,knI,T5,fI,V19,qq,FC,xI,Ds,nm,V20,Vu,V21,At,Sb,V2,D8,jY,H2,YJ,fTP,ppY,NP,jt,r0,jz,SA,hB,nv,ee,XI,hs,yp,ug,DT,OB,DO,p8,NW,HS,TG,ts,Kj,VU,Ya,XT,ic,wl,ve,TR,VD]}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/deployed/web/index_devtools.html b/runtime/bin/vmservice/client/deployed/web/index_devtools.html
index 39f599b..5ed394e 100644
--- a/runtime/bin/vmservice/client/deployed/web/index_devtools.html
+++ b/runtime/bin/vmservice/client/deployed/web/index_devtools.html
@@ -12,8 +12,201 @@
</head>
<body><polymer-element name="observatory-element">
-</polymer-element><polymer-element name="breakpoint-list" extends="observatory-element">
+</polymer-element>
+<polymer-element name="nav-bar" extends="observatory-element">
<template>
+ <style>
+ nav ul {
+ display: inline-table;
+ position: relative;
+ list-style: none;
+ padding-left: 0;
+ margin-left: 0;
+ width: 100%;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background-color: #0489c3;
+ }
+ nav ul:after {
+ content: ""; clear: both; display: block;
+ }
+ </style>
+ <nav>
+ <ul>
+ <content></content>
+ </ul>
+ </nav>
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-menu" extends="observatory-element">
+ <template>
+ <style>
+ .menu, .spacer {
+ float: left;
+ }
+ .menu a, .spacer {
+ display: block;
+ padding: 12px 8px;
+ color: White;
+ text-decoration: none;
+ }
+ .menu:hover {
+ background: #455;
+ }
+ .menu ul {
+ display: none;
+ position: absolute;
+ top: 100%;
+ list-style: none;
+ padding: 0;
+ margin-left: 0;
+ width: auto;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background: #567;
+ }
+ .menu ul:after {
+ content: ""; clear: both; display: block;
+ }
+ .menu:hover > ul {
+ display: block;
+ }
+ </style>
+
+ <li class="menu"><a href="{{ link }}">{{ anchor }}</a>
+ <ul><content></content></ul>
+ </li>
+ <template if="{{ !last }}">
+ <li class="spacer">></li>
+ </template>
+
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-menu-item" extends="observatory-element">
+ <template>
+ <style>
+ li {
+ float: none;
+ border-top: 1px solid #677;
+ border-bottom: 1px solid #556; position: relative;
+ }
+ li:hover {
+ background: #455;
+ }
+ li ul {
+ display: none;
+ position: absolute;
+ top:0;
+ left: 100%;
+ list-style: none;
+ padding: 0;
+ margin-left: 0;
+ width: auto;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background: #567;
+ }
+ li ul:after {
+ content: ""; clear: both; display: block;
+ }
+ li:hover > ul {
+ display: block;
+ }
+ li a {
+ display: block;
+ padding: 12px 12px;
+ color: white;
+ text-decoration: none;
+ }
+ </style>
+ <li><a href="{{ link }}">{{ anchor }}</a>
+ <ul><content></content></ul>
+ </li>
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-refresh" extends="observatory-element">
+ <template>
+ <style>
+ .active {
+ color: #aaa;
+ cursor: wait;
+ }
+ .idle {
+ color: #000;
+ }
+ li {
+ float: right;
+ margin: 0;
+ }
+ li button {
+ margin: 3px;
+ padding: 8px;
+ }
+ </style>
+ <li>
+ <template if="{{ active }}">
+ <button class="active" on-click="{{ buttonClick }}">Refresh</button>
+ </template>
+ <template if="{{ !active }}">
+ <button class="idle" on-click="{{ buttonClick }}">Refresh</button>
+ </template>
+ </li>
+ </template>
+</polymer-element>
+
+<polymer-element name="top-nav-menu">
+ <template>
+ <nav-menu link="#" anchor="Observatory" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="isolate-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="#" anchor="{{ isolate.name }}" last="{{ last }}">
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('stacktrace') }}" anchor="stack trace"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('profile') }}" anchor="cpu profile"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('allocationprofile') }}" anchor="heap profile"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('debug/breakpoints') }}" anchor="breakpoints"></nav-menu-item>
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="library-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="{{ app.locationManager.currentIsolateRelativeLink(library['id']) }}" anchor="{{ library['name'] }}" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="class-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="{{ app.locationManager.currentIsolateRelativeLink(cls['id']) }}" anchor="{{ cls['user_name'] }}" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+
+<polymer-element name="breakpoint-list" extends="observatory-element">
+ <template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="breakpoints" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<template if="{{ msg['breakpoints'].isEmpty }}">
<div class="panel panel-warning">
<div class="panel-body">No breakpoints</div>
@@ -30,7 +223,8 @@
</template>
</template>
-</polymer-element><polymer-element name="service-ref" extends="observatory-element">
+</polymer-element>
+<polymer-element name="service-ref" extends="observatory-element">
</polymer-element><polymer-element name="class-ref" extends="service-ref">
<template>
@@ -70,17 +264,52 @@
<a title="{{ hoverText }}" href="{{ url }}">{{ name }}</a>
</template>
-</polymer-element><polymer-element name="instance-ref" extends="service-ref">
+</polymer-element><polymer-element name="curly-block">
<template>
<style>
- .memberList {
- margin-left: 3em;
- border-spacing: 0;
- border-collapse: collapse;
+ .idle {
+ display: inline-block;
+ color: #0489c3;
+ cursor: pointer;
}
+ .busy {
+ display: inline-block;
+ color: white;
+ cursor: wait;
+ }
+ </style>
+ <template if="{{ expanded }}">
+ <template if="{{ busy }}">
+ {<div class="busy"> ⊟ </div>
+ <br>
+ <content></content>
+ }
+ </template>
+ <template if="{{ !busy }}">
+ {<a on-click="{{ toggleExpand }}"><div class="idle"> ⊟ </div></a>
+ <br>
+ <content></content>
+ }
+ </template>
+ </template>
+
+ <template if="{{ !expanded }}">
+ <template if="{{ busy }}">
+ {<div class="busy"> ⊞ </div>}
+ </template>
+ <template if="{{ !busy }}">
+ {<a on-click="{{ toggleExpand }}"><div class="idle"> ⊞ </div></a>}
+ </template>
+ </template>
+ </template>
+
+</polymer-element>
+<polymer-element name="instance-ref" extends="service-ref">
+ <template>
+ <style>
.member {
- vertical-align: top;
- padding: 0 1em;
+ vertical-align: top;
+ padding: 0 0 0 1em;
}
</style>
<div>
@@ -105,27 +334,23 @@
</template>
<template if="{{ isInstanceRef(ref['type']) }}">
- <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> {
- <a on-click="{{ toggleExpand }}">...</a>
- <template if="{{ expanded }}">
- <table class="memberList">
+ <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a>
+ <curly-block callback="{{ expander() }}">
+ <table>
<tbody><tr template="" repeat="{{ field in ref['fields'] }}">
-
<td class="member">{{ field['decl']['user_name'] }}</td>
<td class="member">
<instance-ref app="{{ app }}" ref="{{ field['value'] }}"></instance-ref>
</td>
</tr>
</tbody></table>
- </template>
- }
+ </curly-block>
</template>
<template if="{{ isListRef(ref['type']) }}">
- <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['length']}})</a> {
- <a on-click="{{ toggleExpand }}">...</a>
- <template if="{{ expanded }}">
- <table class="memberList">
+ <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['length']}})</a>
+ <curly-block callback="{{ expander() }}">
+ <table>
<tbody><tr template="" repeat="{{ element in ref['elements'] }}">
<td class="member">[{{ element['index']}}]</td>
<td class="member">
@@ -133,8 +358,7 @@
</td>
</tr>
</tbody></table>
- </template>
- }
+ </curly-block>
</template>
</div>
@@ -148,6 +372,15 @@
</polymer-element><polymer-element name="class-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ cls['library'] }}"></library-nav-menu>
+ <class-nav-menu app="{{ app }}" cls="{{ cls }}" last="{{ true }}"></class-nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -236,6 +469,14 @@
</polymer-element><polymer-element name="code-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="{{ code.functionRef['user_name'] }}" last="{{ true }}"></nav-menu>
+ <!-- TODO(turnidge): Implement code refresh -->
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="{{ cssPanelClass }}">
@@ -258,7 +499,8 @@
</div>
</template>
-</polymer-element><polymer-element name="collapsible-content" extends="observatory-element">
+</polymer-element>
+<polymer-element name="collapsible-content" extends="observatory-element">
<template>
<div class="well row">
<a on-click="toggleDisplay" class="btn muted unselectable">
@@ -272,6 +514,21 @@
</polymer-element><polymer-element name="field-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <template if="{{ field['owner']['type'] == '@Class' }}">
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ field['owner'] }}"></class-nav-menu>
+ </template>
+ <template if="{{ field['owner']['type'] == '@Library' }}">
+ <library-nav-menu app="{{ app }}" library="{{ field['owner'] }}"></library-nav-menu>
+ </template>
+ <nav-menu link="." anchor="{{ field['user_name'] }}" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -308,8 +565,24 @@
</div>
</template>
-</polymer-element><polymer-element name="function-view" extends="observatory-element">
+</polymer-element>
+<polymer-element name="function-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <template if="{{ function['owner']['type'] == '@Class' }}">
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ function['owner'] }}"></class-nav-menu>
+ </template>
+ <template if="{{ function['owner']['type'] == '@Library' }}">
+ <library-nav-menu app="{{ app }}" library="{{ function['owner'] }}"></library-nav-menu>
+ </template>
+ <nav-menu link="." anchor="{{ function['user_name'] }}" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -356,7 +629,8 @@
</div>
</template>
-</polymer-element><polymer-element name="script-ref" extends="service-ref">
+</polymer-element>
+<polymer-element name="script-ref" extends="service-ref">
<template>
<a title="{{ hoverText }}" href="{{ url }}">{{ name }}</a>
</template>
@@ -369,7 +643,7 @@
<img src="img/isolate_icon.png" class="img-polaroid">
</div>
- <div class="col-md-1">{{ isolate.name }}</div>
+ <div class="col-md-1">{{ isolate.vmName }}</div>
<!-- TODO(turnidge): Use function-ref when it can take isolate param -->
<div class="col-md-4">
@@ -377,12 +651,11 @@
<div class="row">
<template if="{{ isolate.entry['id'] != null }}">
<a href="{{ app.locationManager.relativeLink(isolate.id, isolate.entry['id']) }}">
- {{ isolate.entry['name'] }}
+ {{ isolate.name }}
</a>
</template>
<template if="{{ isolate.entry['id'] == null }}">
- <!-- fred -->
- root isolate
+ {{ isolate.name }}
</template>
</div>
@@ -456,7 +729,11 @@
</polymer-element>
<polymer-element name="isolate-list" extends="observatory-element">
<template>
- <button type="button" on-click="{{refresh}}">Refresh</button>
+ <nav-bar>
+ <top-nav-menu last="{{ true }}"></top-nav-menu>
+ <!-- TODO(turnidge): Why doesn't "this.refresh" work? -->
+ <nav-refresh callback="{{ refresh } }}"></nav-refresh>
+ </nav-bar>
<ul class="list-group">
<template repeat="{{ isolate in app.isolateManager.isolates.values }}">
<li class="list-group-item">
@@ -470,6 +747,16 @@
</polymer-element>
<polymer-element name="instance-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ instance['class'] }}"></class-nav-menu>
+ <nav-menu link="." anchor="instance" last="{{ true }}"></nav-menu>
+ <!-- TODO(turnidge): Add nav refresh here. -->
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -538,7 +825,14 @@
</polymer-element>
<polymer-element name="library-view" extends="observatory-element">
<template>
- <div class="alert alert-success">Library {{ library['name'] }}</div>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ library }}" last="{{ true }}"></library-nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="alert alert-info">Scripts</div>
<table class="table table-hover">
<tbody>
@@ -606,9 +900,15 @@
</polymer-element>
<polymer-element name="heap-profile" extends="observatory-element">
<template>
- <div>
- <button type="button" on-click="{{refreshData}}">Refresh</button>
- </div>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="heap profile" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
+ <button type="button" on-click="{{resetAccumulator}}">Reset Accumulator</button>
<div class="row">
<div id="newPieChart" class="col-md-4" style="height: 400px">
</div>
@@ -637,21 +937,30 @@
<tbody>
<tr>
<td>Collections</td>
- <td>{{ formattedCollections(true) }}</td>
+ <td>{{ formattedCollections(false) }}</td>
</tr>
<tr>
<td>Average Collection Time</td>
- <td>{{ formattedAverage(true) }}</td>
+ <td>{{ formattedAverage(false) }}</td>
</tr>
<tr>
<td>Cumulative Collection Time</td>
- <td>{{ formattedTotalCollectionTime(true) }}</td>
+ <td>{{ formattedTotalCollectionTime(false) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
+ <p class="col-md-2">Aggregate heap table</p>
+ </div>
+ <div class="row">
+ <div id="simpleTable" class="col-md-12" style="height: 800px"></div>
+ </div>
+ <div class="row">
+ <p class="col-md-2">Individual heap table</p>
+ </div>
+ <div class="row">
<div id="table" class="col-md-12" style="height: 800px"></div>
</div>
</template>
@@ -659,6 +968,14 @@
</polymer-element>
<polymer-element name="script-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ script.libraryRef }}"></library-nav-menu>
+ <nav-menu link="." anchor="{{ script.shortName }}" last="{{ true }}"></nav-menu>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel-heading">
@@ -681,17 +998,13 @@
</div>
</template>
-</polymer-element><polymer-element name="stack-frame" extends="observatory-element">
+</polymer-element>
+<polymer-element name="stack-frame" extends="observatory-element">
<template>
<style>
- .memberList {
- margin-left: 3em;
- border-spacing: 0;
- border-collapse: collapse;
- }
.member {
- vertical-align: top;
- padding: 0 1em;
+ vertical-align: top;
+ padding: 0 0 0 1em;
}
</style>
<div class="row">
@@ -702,11 +1015,9 @@
<div class="col-md-9">
<function-ref app="{{ app }}" ref="{{ frame['function'] }}"></function-ref>
( <script-ref app="{{ app }}" ref="{{ frame['script'] }}" line="{{ frame['line'] }}">
- </script-ref> ) {
- <a on-click="{{ toggleExpand }}">...</a>
-
- <template if="{{ expanded }}">
- <table class="memberList">
+ </script-ref> )
+ <curly-block>
+ <table>
<tbody><tr template="" repeat="{{ v in frame['vars'] }}">
<td class="member">{{ v['name']}}</td>
<td class="member">
@@ -714,8 +1025,7 @@
</td>
</tr>
</tbody></table>
- </template>
- }
+ </curly-block>
</div>
<div class="col-md-1"></div>
@@ -727,7 +1037,14 @@
</polymer-element>
<polymer-element name="stack-trace" extends="observatory-element">
<template>
- <button type="button" on-click="{{refresh}}">Refresh</button>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="stack trace" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<template if="{{ trace['members'].isEmpty }}">
<div class="col-md-1"></div>
<div class="col-md-11">
@@ -815,34 +1132,17 @@
</template>
</polymer-element>
-<polymer-element name="navigation-bar-isolate" extends="observatory-element">
- <template>
- <ul class="nav navbar-nav">
- <li><a href="{{ currentIsolateLink('') }}"> {{currentIsolateName()}}</a></li>
- <template repeat="{{link in links}}">
- <li><a href="{{ currentIsolateLink(link) }}">{{ link }}</a></li>
- </template>
- </ul>
- </template>
-
-</polymer-element><polymer-element name="navigation-bar" extends="observatory-element">
+<polymer-element name="isolate-profile" extends="observatory-element">
<template>
- <nav class="navbar navbar-default" role="navigation">
- <div class="navbar-header">
- <a class="navbar-brand" href="#/isolates">Observatory</a>
- </div>
- <template if="{{ app.locationManager.hasCurrentIsolate }}">
- <div class="collapse navbar-collapse navbar-ex1-collapse">
- <navigation-bar-isolate app="{{ app }}"></navigation-bar-isolate>
- </div>
- </template>
- </nav>
- </template>
-
-</polymer-element><polymer-element name="isolate-profile" extends="observatory-element">
- <template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="cpu profile" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div>
- <button type="button" on-click="{{refreshData}}">Refresh profile data</button>
<span>Top</span>
<select selectedindex="{{methodCountSelected}}" value="{{methodCounts[methodCountSelected]}}">
<option template="" repeat="{{count in methodCounts}}">{{count}}</option>
@@ -881,7 +1181,6 @@
</polymer-element><polymer-element name="observatory-application" extends="observatory-element">
<template>
- <navigation-bar app="{{ app }}"></navigation-bar>
<template if="{{ app.locationManager.profile }}">
<isolate-profile app="{{ app }}"></isolate-profile>
</template>
@@ -891,6 +1190,8 @@
</template>
</polymer-element>
+
+
<observatory-application devtools="true"></observatory-application>
</body></html>
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/deployed/web/index_devtools.html_bootstrap.dart.js b/runtime/bin/vmservice/client/deployed/web/index_devtools.html_bootstrap.dart.js
index 7740667..3b22d34 100644
--- a/runtime/bin/vmservice/client/deployed/web/index_devtools.html_bootstrap.dart.js
+++ b/runtime/bin/vmservice/client/deployed/web/index_devtools.html_bootstrap.dart.js
@@ -8597,7 +8597,7 @@
init()
$=I.p
var $$={}
-;init.mangledNames={gBA:"__$methodCountSelected",gBW:"__$msg",gCO:"_oldPieChart",gDF:"requestManager",gF0:"__$cls",gF8:"__$instruction",gGQ:"_newPieDataTable",gGj:"_message",gHX:"__$displayValue",gHm:"tree",gJ0:"_newPieChart",gKM:"$",gL4:"human",gLE:"timers",gMt:"__$expanded",gN7:"__$library",gOc:"_oldPieDataTable",gOl:"__$profile",gP:"value",gPe:"__$internal",gPw:"__$isolate",gPy:"__$error",gRd:"line",gSw:"lines",gUy:"_collapsed",gUz:"__$script",gV4:"__$trace",gVa:"__$frame",gWT:"rows",gX3:"_first",gXR:"scripts",gXh:"__$instance",gYu:"address",gZ0:"codes",gZ6:"locationManager",gZ8:"__$function",ga:"a",gan:"_tableChart",gb:"b",gc:"c",ge6:"_tableDataTable",geJ:"__$code",geb:"__$json",gfb:"methodCounts",ghm:"__$app",gi2:"isolates",gk5:"__$devtools",gkf:"_count",gm0:"__$isolate",gm7:"machine",gnI:"isolateManager",goH:"columns",gqO:"_id",gqX:"__$expanded",gqY:"__$topExclusiveCodes",grK:"__$links",gtT:"code",gtY:"__$ref",gvH:"index",gva:"instructions",gvt:"__$field",gwd:"children",gyt:"depth",gzh:"__$iconClass",gzw:"__$line"};init.mangledGlobalNames={BO:"ALLOCATED_BEFORE_GC",DI:"_closeIconClass",V1g:"LIVE_AFTER_GC_SIZE",Vl:"_openIconClass",Xa:"ALLOCATED_BEFORE_GC_SIZE",d6:"ALLOCATED_SINCE_GC_SIZE",r1K:"ALLOCATED_SINCE_GC",xK:"LIVE_AFTER_GC"};(function (reflectionData) {
+;init.mangledNames={gAp:"__$library",gAu:"__$cls",gBA:"__$methodCountSelected",gBW:"__$msg",gCO:"_oldPieChart",gDF:"requestManager",gF0:"__$cls",gF8:"__$instruction",gGQ:"_newPieDataTable",gGV:"__$expanded",gGj:"_message",gHX:"__$displayValue",gHm:"tree",gHu:"__$busy",gJ0:"_newPieChart",gJo:"__$last",gKM:"$",gKU:"__$link",gL4:"human",gLE:"timers",gLY:"_fullDataTable",gN7:"__$library",gOc:"_oldPieDataTable",gOl:"__$profile",gP:"value",gPe:"__$internal",gPw:"__$isolate",gPy:"__$error",gRd:"line",gSB:"__$active",gSw:"lines",gUy:"_collapsed",gUz:"__$script",gV4:"__$trace",gVa:"__$frame",gWT:"rows",gX3:"_first",gXR:"scripts",gXh:"__$instance",gYu:"address",gZ0:"codes",gZ6:"locationManager",gZ8:"__$function",gZC:"__$anchor",ga:"a",gb:"b",gbV:"_combinedDataTable",gc:"c",geJ:"__$code",geb:"__$json",gfb:"methodCounts",ghm:"__$app",gi2:"isolates",giy:"__$isolate",gk5:"__$devtools",gkf:"_count",gm0:"__$isolate",gm7:"machine",gnI:"isolateManager",gnx:"__$callback",goH:"columns",gq3:"_fullChart",gqO:"_id",gqY:"__$topExclusiveCodes",grU:"__$callback",gtT:"code",gtY:"__$ref",gvH:"index",gvR:"_combinedChart",gva:"instructions",gvt:"__$field",gwd:"children",gyt:"depth",gzh:"__$iconClass",gzw:"__$line"};init.mangledGlobalNames={BO:"ALLOCATED_BEFORE_GC",DI:"_closeIconClass",DY2:"ACCUMULATED_SIZE",V1g:"LIVE_AFTER_GC_SIZE",Vl:"_openIconClass",bQj:"ALLOCATED_BEFORE_GC_SIZE",d6:"ALLOCATED_SINCE_GC_SIZE",pC:"ACCUMULATED",r1K:"ALLOCATED_SINCE_GC",xK:"LIVE_AFTER_GC"};(function (reflectionData) {
"use strict";
function map(x){x={x:x};delete x.x;return x}
function processStatics(descriptor) {
@@ -8839,7 +8839,7 @@
n:[function(a,b){return a===b},"call$1","gUJ",2,0,null,104,[]],
giO:function(a){return H.eQ(a)},
bu:[function(a){return H.a5(a)},"call$0","gXo",0,0,null],
-T:[function(a,b){throw H.b(P.lr(a,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,326,[]],
+T:[function(a,b){throw H.b(P.lr(a,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,328,[]],
gbx:function(a){return new H.cu(H.dJ(a),null)},
$isGv:true,
"%":"DOMImplementation|SVGAnimatedEnumeration|SVGAnimatedNumberList|SVGAnimatedString"},
@@ -8849,7 +8849,7 @@
giO:function(a){return a?519018:218159},
gbx:function(a){return C.HL},
$isbool:true},
-ht:{
+Jh:{
"^":"Null/Gv;",
n:[function(a,b){return null==b},"call$1","gUJ",2,0,null,104,[]],
bu:[function(a){return"null"},"call$0","gXo",0,0,null],
@@ -8879,7 +8879,7 @@
return!0}return!1},"call$1","gRI",2,0,null,124,[]],
ev:[function(a,b){return H.VM(new H.U5(a,b),[null])},"call$1","gIR",2,0,null,110,[]],
FV:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(a,z.gl())},"call$1","gDY",2,0,null,327,[]],
+for(z=J.GP(b);z.G();)this.h(a,z.gl())},"call$1","gDY",2,0,null,329,[]],
V1:[function(a){this.sB(a,0)},"call$0","gyP",0,0,null],
aN:[function(a,b){return H.bQ(a,b)},"call$1","gjw",2,0,null,110,[]],
ez:[function(a,b){return H.VM(new H.A8(a,b),[null,null])},"call$1","gIr",2,0,null,110,[]],
@@ -8889,8 +8889,8 @@
y.fixed$length=init
for(x=0;x<a.length;++x){w=H.d(a[x])
if(x>=z)return H.e(y,x)
-y[x]=w}return y.join(b)},"call$1","gnr",0,2,null,328,329,[]],
-eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gZo",2,0,null,287,[]],
+y[x]=w}return y.join(b)},"call$1","gnr",0,2,null,330,331,[]],
+eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gZo",2,0,null,289,[]],
Zv:[function(a,b){if(b>>>0!==b||b>=a.length)return H.e(a,b)
return a[b]},"call$1","goY",2,0,null,47,[]],
D6:[function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(new P.AT(b))
@@ -8920,7 +8920,7 @@
Vr:[function(a,b){return H.Ck(a,b)},"call$1","gG2",2,0,null,110,[]],
GT:[function(a,b){if(!!a.immutable$list)H.vh(P.f("sort"))
H.ZE(a,0,a.length-1,b)},"call$1","gH7",0,2,null,77,128,[]],
-XU:[function(a,b,c){return H.TK(a,b,c,a.length)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,124,[],115,[]],
+XU:[function(a,b,c){return H.TK(a,b,c,a.length)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,124,[],115,[]],
Pk:[function(a,b,c){return H.eX(a,b,a.length-1)},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,124,[],115,[]],
tg:[function(a,b){var z
for(z=0;z<a.length;++z)if(J.de(a[z],b))return!0
@@ -8932,7 +8932,7 @@
if(b)return H.VM(a.slice(),[H.Kp(a,0)])
else{z=H.VM(a.slice(),[H.Kp(a,0)])
z.fixed$length=init
-return z}},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+return z}},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
gA:function(a){return H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)])},
giO:function(a){return H.eQ(a)},
gB:function(a){return a.length},
@@ -8961,7 +8961,7 @@
nM:{
"^":"Q;",
$isnM:true},
-ZC:{
+iY:{
"^":"nM;"},
Jt:{
"^":"nM;",
@@ -8976,11 +8976,11 @@
if(this.gzP(a)===z)return 0
if(this.gzP(a))return-1
return 1}return 0}else if(isNaN(a)){if(this.gG0(b))return 0
-return 1}else return-1},"call$1","gYc",2,0,null,180,[]],
+return 1}else return-1},"call$1","gYc",2,0,null,183,[]],
gzP:function(a){return a===0?1/a<0:a<0},
gG0:function(a){return isNaN(a)},
gx8:function(a){return isFinite(a)},
-JV:[function(a,b){return a%b},"call$1","gKG",2,0,null,180,[]],
+JV:[function(a,b){return a%b},"call$1","gKG",2,0,null,183,[]],
yu:[function(a){var z
if(a>=-2147483648&&a<=2147483647)return a|0
if(isFinite(a)){z=a<0?Math.ceil(a):Math.floor(a)
@@ -8992,7 +8992,7 @@
if(b>20)throw H.b(P.C3(b))
z=a.toFixed(b)
if(a===0&&this.gzP(a))return"-"+z
-return z},"call$1","gfE",2,0,null,333,[]],
+return z},"call$1","gfE",2,0,null,335,[]],
WZ:[function(a,b){if(b<2||b>36)throw H.b(P.C3(b))
return a.toString(b)},"call$1","gEI",2,0,null,28,[]],
bu:[function(a){if(a===0&&1/a<0)return"-0.0"
@@ -9028,7 +9028,7 @@
else{z=b>31?31:b
z=a>>z>>>0}return z},"call$1","gMe",2,0,null,104,[]],
i:[function(a,b){if(typeof b!=="number")throw H.b(new P.AT(b))
-return(a&b)>>>0},"call$1","gAp",2,0,null,104,[]],
+return(a&b)>>>0},"call$1","gAU",2,0,null,104,[]],
w:[function(a,b){if(typeof b!=="number")throw H.b(P.u(b))
return(a^b)>>>0},"call$1","gttE",2,0,null,104,[]],
C:[function(a,b){if(typeof b!=="number")throw H.b(P.u(b))
@@ -9064,7 +9064,7 @@
if(b<0)throw H.b(P.N(b))
if(b>=a.length)throw H.b(P.N(b))
return a.charCodeAt(b)},"call$1","gSu",2,0,null,47,[]],
-dd:[function(a,b){return H.ZT(a,b)},"call$1","gYv",2,0,null,334,[]],
+dd:[function(a,b){return H.ZT(a,b)},"call$1","gYv",2,0,null,336,[]],
wL:[function(a,b,c){var z,y,x,w
if(c<0||c>b.length)throw H.b(P.TE(c,0,b.length))
z=a.length
@@ -9075,7 +9075,7 @@
if(w>=y)H.vh(P.N(w))
w=b.charCodeAt(w)
if(x>=z)H.vh(P.N(x))
-if(w!==a.charCodeAt(x))return}return new H.tQ(c,b,a)},"call$2","grS",2,2,null,330,26,[],115,[]],
+if(w!==a.charCodeAt(x))return}return new H.tQ(c,b,a)},"call$2","grS",2,2,null,332,26,[],115,[]],
g:[function(a,b){if(typeof b!=="string")throw H.b(new P.AT(b))
return a+b},"call$1","gF1n",2,0,null,104,[]],
Tc:[function(a,b){var z,y
@@ -9089,7 +9089,7 @@
if(c>a.length)throw H.b(P.TE(c,0,a.length))
if(typeof b==="string"){z=c+b.length
if(z>a.length)return!1
-return b===a.substring(c,z)}return J.I8(b,a,c)!=null},function(a,b){return this.Qi(a,b,0)},"nC","call$2",null,"gcV",2,2,null,330,98,[],47,[]],
+return b===a.substring(c,z)}return J.I8(b,a,c)!=null},function(a,b){return this.Qi(a,b,0)},"nC","call$2",null,"gcV",2,2,null,332,98,[],47,[]],
Nj:[function(a,b,c){var z
if(typeof b!=="number"||Math.floor(b)!==b)H.vh(P.u(b))
if(c==null)c=a.length
@@ -9118,7 +9118,7 @@
z=J.rY(b)
if(typeof b==="object"&&b!==null&&!!z.$isVR){y=b.yk(a,c)
return y==null?-1:y.QK.index}for(x=a.length,w=c;w<=x;++w)if(z.wL(b,a,w)!=null)return w
-return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,98,[],115,[]],
+return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,98,[],115,[]],
Pk:[function(a,b,c){var z,y,x
c=a.length
if(typeof b==="string"){z=b.length
@@ -9132,7 +9132,7 @@
if(z.wL(b,a,x)!=null)return x;--x}return-1},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,98,[],115,[]],
Is:[function(a,b,c){if(b==null)H.vh(new P.AT(null))
if(c>a.length)throw H.b(P.TE(c,0,a.length))
-return H.m2(a,b,c)},function(a,b){return this.Is(a,b,0)},"tg","call$2",null,"gdj",2,2,null,330,104,[],80,[]],
+return H.m2(a,b,c)},function(a,b){return this.Is(a,b,0)},"tg","call$2",null,"gdj",2,2,null,332,104,[],80,[]],
gl0:function(a){return a.length===0},
gor:function(a){return a.length!==0},
iM:[function(a,b){var z
@@ -9297,7 +9297,7 @@
aX:{
"^":"a;jO>,Gx,fW,En<,EE<,Qy,RW<,C9<,lJ",
v8:[function(a,b){if(!this.Qy.n(0,a))return
-if(this.lJ.h(0,b)&&!this.RW)this.RW=!0},"call$2","gfU",4,0,null,335,[],336,[]],
+if(this.lJ.h(0,b)&&!this.RW)this.RW=!0},"call$2","gfU",4,0,null,337,[],338,[]],
NR:[function(a){var z,y,x,w,v,u
if(!this.RW)return
z=this.lJ
@@ -9313,7 +9313,7 @@
if(w<0||w>=u)return H.e(v,w)
v[w]=x
if(w===y.eZ)y.VW()
-y.qT=y.qT+1}this.RW=!1}},"call$1","gtS",2,0,null,336,[]],
+y.qT=y.qT+1}this.RW=!1}},"call$1","gtS",2,0,null,338,[]],
vV:[function(a){var z,y
z=init.globalState.N0
init.globalState.N0=this
@@ -9327,10 +9327,10 @@
case"resume":this.NR(z.t(a,1))
break
default:P.JS("UNKOWN MESSAGE: "+H.d(a))}},"call$1","gNo",2,0,null,20,[]],
-Zt:[function(a){return this.Gx.t(0,a)},"call$1","gQB",2,0,null,337,[]],
+Zt:[function(a){return this.Gx.t(0,a)},"call$1","gQB",2,0,null,339,[]],
aU:[function(a,b){var z=this.Gx
if(z.x4(a))throw H.b(P.FM("Registry: ports must be registered only once."))
-z.u(0,a,b)},"call$2","gPn",4,0,null,337,[],338,[]],
+z.u(0,a,b)},"call$2","gPn",4,0,null,339,[],340,[]],
PC:[function(){var z=this.jO
if(this.Gx.X5-this.fW.X5>0)init.globalState.i2.u(0,z,this)
else init.globalState.i2.Rz(0,z)},"call$0","gi8",0,0,null],
@@ -9465,7 +9465,7 @@
z.fW.Rz(0,y)
z.PC()},"call$0","gJK",0,0,null],
FL:[function(a,b){if(this.P0)return
-this.wy(b)},"call$1","gT5",2,0,null,339,[]],
+this.wy(b)},"call$1","gT5",2,0,null,341,[]],
$isyo:true,
static:{"^":"Vz"}},
NA:{
@@ -9483,7 +9483,7 @@
yf:[function(a){if(!!a.$isku)return new H.ku(a.ng)
throw H.b("Capability not serializable: "+H.d(a))},"call$1","gbM",2,0,null,21,[]]},
II:{
-"^":"iY;RZ",
+"^":"AP;RZ",
Vf:[function(a){var z,y,x,w,v,u
z=J.U6(a)
y=z.t(a,1)
@@ -9499,7 +9499,7 @@
"^":"a;MD",
t:[function(a,b){return b.__MessageTraverser__attached_info__},"call$1","gIA",2,0,null,6,[]],
u:[function(a,b,c){this.MD.push(b)
-b.__MessageTraverser__attached_info__=c},"call$2","gj3",4,0,null,6,[],340,[]],
+b.__MessageTraverser__attached_info__=c},"call$2","gj3",4,0,null,6,[],342,[]],
Hn:[function(a){this.MD=[]},"call$0","gb6",0,0,null],
Xq:[function(){var z,y,x
for(z=this.MD.length,y=0;y<z;++y){x=this.MD
@@ -9508,7 +9508,7 @@
X1:{
"^":"a;",
t:[function(a,b){return},"call$1","gIA",2,0,null,6,[]],
-u:[function(a,b,c){},"call$2","gj3",4,0,null,6,[],340,[]],
+u:[function(a,b,c){},"call$2","gj3",4,0,null,6,[],342,[]],
Hn:[function(a){},"call$0","gb6",0,0,null],
Xq:[function(){return},"call$0","gt6",0,0,null]},
HU:{
@@ -9555,9 +9555,9 @@
DE:[function(a){return H.vh(P.SY(null))},"call$1","goi",2,0,null,21,[]],
yf:[function(a){return H.vh(P.SY(null))},"call$1","gbM",2,0,null,21,[]]},
OW:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z=this.b
-J.kW(this.a.a,z.I8(a),z.I8(b))},"call$2",null,4,0,null,42,[],201,[],"call"],
+J.kW(this.a.a,z.I8(a),z.I8(b))},"call$2",null,4,0,null,42,[],204,[],"call"],
$isEH:true},
hz:{
"^":"HU;",
@@ -9588,7 +9588,7 @@
x[w]=v}return x},"call$1","gBv",2,0,null,68,[]],
DE:[function(a){return H.vh(P.SY(null))},"call$1","goi",2,0,null,21,[]],
yf:[function(a){return H.vh(P.SY(null))},"call$1","gbM",2,0,null,21,[]]},
-iY:{
+AP:{
"^":"a;",
QS:[function(a){if(H.ZR(a))return a
this.RZ=P.Py(null,null,null,null,null)
@@ -9851,7 +9851,7 @@
z.dartException=a
if("defineProperty" in Object){Object.defineProperty(z, "message", { get: H.Ju })
z.name=""}else z.toString=H.Ju
-throw z},"call$1","xE",2,0,null,48,[]],
+throw z},"call$1","wZ",2,0,null,48,[]],
Ru:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
z=new H.Am(a)
if(a==null)return
@@ -9989,7 +9989,7 @@
x="return function("+v+"){return this."+H.d(H.oN())+"."+z+"(this."+H.d(H.Wz())+","+v+");"
w=$.OK
$.OK=J.WB(w,1)
-return new Function(x+H.d(w)+"}")()}else return H.Z4(y,z,a)},"call$1","S4",2,0,null,15,[]],
+return new Function(x+H.d(w)+"}")()}else return H.Z4(y,z,a)},"call$1","n9",2,0,null,15,[]],
Kq:[function(a,b,c,d,e,f){b.fixed$length=init
c.fixed$length=init
return H.iA(a,b,c,!!d,e,f)},"call$6","lu",12,0,null,41,[],59,[],60,[],61,[],62,[],12,[]],
@@ -10033,7 +10033,7 @@
u=typeof u==="string"?u:H.d(u)
z.vM=z.vM+u}return w?"":"<"+H.d(z)+">"},"call$3$onTypeVariable","iM",4,3,null,77,79,[],80,[],78,[]],
dJ:[function(a){var z=typeof a==="object"&&a!==null&&a.constructor===Array?"List":J.x(a).constructor.builtin$cls
-return z+H.ia(a.$builtinTypeInfo,0,null)},"call$1","Yx",2,0,null,6,[]],
+return z+H.ia(a.$builtinTypeInfo,0,null)},"call$1","om",2,0,null,6,[]],
Y9:[function(a,b){if(typeof a==="object"&&a!==null&&a.constructor===Array)b=a
else if(typeof a=="function"){a=H.ml(a,null,b)
if(typeof a==="object"&&a!==null&&a.constructor===Array)b=a
@@ -10075,7 +10075,7 @@
if(!y&&t==null||!w)return!0
y=y?a.slice(1):null
w=w?b.slice(1):null
-return H.hv(H.Y9(t,y),w)},"call$2","jm",4,0,null,86,[],87,[]],
+return H.hv(H.Y9(t,y),w)},"call$2","Mb",4,0,null,86,[],87,[]],
Hc:[function(a,b,c){var z,y,x,w,v
if(b==null&&a==null)return!0
if(b==null)return c
@@ -10119,7 +10119,7 @@
if(!(H.t1(o,n)||H.t1(n,o)))return!1}for(m=0;m<q;++l,++m){o=v[l]
n=u[m]
if(!(H.t1(o,n)||H.t1(n,o)))return!1}}return H.Vt(a.named,b.named)},"call$2","Sj",4,0,null,86,[],87,[]],
-ml:[function(a,b,c){return a.apply(b,c)},"call$3","Ey",6,0,null,15,[],41,[],82,[]],
+ml:[function(a,b,c){return a.apply(b,c)},"call$3","lv",6,0,null,15,[],41,[],82,[]],
uc:[function(a){var z=$.NF
return"Instance of "+(z==null?"<Unknown>":z.call$1(a))},"call$1","zB",2,0,null,93,[]],
Su:[function(a){return H.eQ(a)},"call$1","cx",2,0,null,6,[]],
@@ -10234,7 +10234,7 @@
gor:function(a){return!J.de(this.gB(this),0)},
bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
Ix:[function(){throw H.b(P.f("Cannot modify unmodifiable Map"))},"call$0","gPb",0,0,null],
-u:[function(a,b,c){return this.Ix()},"call$2","gj3",4,0,null,42,[],201,[]],
+u:[function(a,b,c){return this.Ix()},"call$2","gj3",4,0,null,42,[],204,[]],
Rz:[function(a,b){return this.Ix()},"call$1","gRI",2,0,null,42,[]],
V1:[function(a){return this.Ix()},"call$0","gyP",0,0,null],
FV:[function(a,b){return this.Ix()},"call$1","gDY",2,0,null,104,[]],
@@ -10258,11 +10258,11 @@
$isEH:true,
$signature:function(){return H.IG(function(a,b){return{func:"JF",args:[b]}},this.a,"LPe")}},
WT:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){return this.b.call$2(a,this.a.t(0,a))},"call$1",null,2,0,null,42,[],"call"],
$isEH:true},
jJ:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,42,[],"call"],
$isEH:true},
XR:{
@@ -10356,18 +10356,18 @@
"^":"a;e0?",
gpf:function(){return!0},
Bj:[function(a,b){var z=this.e0
-return J.jf(z==null?a:z,b)},"call$2","gUT",4,0,null,140,[],326,[]]},
+return J.jf(z==null?a:z,b)},"call$2","gUT",4,0,null,140,[],328,[]]},
FD:{
"^":"a;mr,Rn>,XZ,Rv,hG,Mo,AM",
BX:[function(a,b){var z=this.Rv
if(b<z)return
-return this.Rn[3+b-z]},"call$1","gkv",2,0,null,342,[]],
+return this.Rn[3+b-z]},"call$1","gkv",2,0,null,344,[]],
hl:[function(a){var z,y
z=this.AM
if(typeof z=="number")return init.metadata[z]
else if(typeof z=="function"){y=new a()
H.VM(y,y["<>"])
-return z.apply({$receiver:y})}else throw H.b(H.Ef("Unexpected function type"))},"call$1","gIX",2,0,null,343,[]],
+return z.apply({$receiver:y})}else throw H.b(H.Ef("Unexpected function type"))},"call$1","gIX",2,0,null,345,[]],
gx5:function(){return this.mr.$reflectionName},
static:{"^":"t4,FV,C1,bt",zh:function(a){var z,y,x,w
z=a.$reflectionInfo
@@ -10379,7 +10379,7 @@
w=z[1]
return new H.FD(a,z,(y&1)===1,x,w>>1,(w&1)===1,z[2])}}},
Cj:{
-"^":"Tp:344;a,b,c",
+"^":"Tp:346;a,b,c",
call$2:[function(a,b){var z=this.a
z.b=z.b+"$"+H.d(a)
this.c.push(a)
@@ -10387,10 +10387,10 @@
z.a=z.a+1},"call$2",null,4,0,null,12,[],46,[],"call"],
$isEH:true},
u8:{
-"^":"Tp:344;a,b",
+"^":"Tp:346;a,b",
call$2:[function(a,b){var z=this.b
if(z.x4(a))z.u(0,a,b)
-else this.a.a=!0},"call$2",null,4,0,null,342,[],23,[],"call"],
+else this.a.a=!0},"call$2",null,4,0,null,344,[],23,[],"call"],
$isEH:true},
Zr:{
"^":"a;bT,rq,Xs,Fa,Ga,EP",
@@ -10425,7 +10425,7 @@
} catch (e) {
return e.message;
}
-}(a)},"call$1","XG",2,0,null,49,[]],Mj:[function(a){return function($expr$) {
+}(a)},"call$1","LS",2,0,null,49,[]],Mj:[function(a){return function($expr$) {
try {
$expr$.$method$;
} catch (e) {
@@ -10459,10 +10459,10 @@
bu:[function(a){var z=this.K9
return C.xB.gl0(z)?"Error":"Error: "+z},"call$0","gXo",0,0,null]},
Am:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isGe)if(a.$thrownJsError==null)a.$thrownJsError=this.a
-return a},"call$1",null,2,0,null,152,[],"call"],
+return a},"call$1",null,2,0,null,155,[],"call"],
$isEH:true},
XO:{
"^":"a;lA,ui",
@@ -10636,11 +10636,11 @@
Lm:{
"^":"a;XP<,oc>,kU>"},
dC:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return this.a(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
wN:{
-"^":"Tp:345;b",
+"^":"Tp:347;b",
call$2:[function(a,b){return this.b(a,b)},"call$2",null,4,0,null,91,[],94,[],"call"],
$isEH:true},
VX:{
@@ -10665,10 +10665,10 @@
if(typeof a!=="string")H.vh(new P.AT(a))
z=this.Ej.exec(a)
if(z==null)return
-return H.yx(this,z)},"call$1","gvz",2,0,null,334,[]],
+return H.yx(this,z)},"call$1","gvz",2,0,null,336,[]],
zD:[function(a){if(typeof a!=="string")H.vh(new P.AT(a))
-return this.Ej.test(a)},"call$1","guf",2,0,null,334,[]],
-dd:[function(a,b){return new H.KW(this,b)},"call$1","gYv",2,0,null,334,[]],
+return this.Ej.test(a)},"call$1","guf",2,0,null,336,[]],
+dd:[function(a,b){return new H.KW(this,b)},"call$1","gYv",2,0,null,336,[]],
yk:[function(a,b){var z,y
z=this.gF4()
z.lastIndex=b
@@ -10691,7 +10691,7 @@
if(typeof z!=="number")return H.s(z)
z=c>z}else z=!0
if(z)throw H.b(P.TE(c,0,J.q8(b)))
-return this.Bh(b,c)},function(a,b){return this.wL(a,b,0)},"R4","call$2",null,"grS",2,2,null,330,26,[],115,[]],
+return this.Bh(b,c)},function(a,b){return this.wL(a,b,0)},"R4","call$2",null,"grS",2,2,null,332,26,[],115,[]],
$isVR:true,
$iscT:true,
static:{v4:[function(a,b,c,d){var z,y,x,w,v
@@ -10737,18 +10737,20 @@
tQ:{
"^":"a;M,J9,zO",
t:[function(a,b){if(!J.de(b,0))H.vh(P.N(b))
-return this.zO},"call$1","gIA",2,0,null,346,[]],
+return this.zO},"call$1","gIA",2,0,null,348,[]],
$isOd:true}}],["app_bootstrap","index_devtools.html_bootstrap.dart",,E,{
"^":"",
-QL:[function(){$.x2=["package:observatory/src/observatory_elements/observatory_element.dart","package:observatory/src/observatory_elements/breakpoint_list.dart","package:observatory/src/observatory_elements/service_ref.dart","package:observatory/src/observatory_elements/class_ref.dart","package:observatory/src/observatory_elements/error_view.dart","package:observatory/src/observatory_elements/field_ref.dart","package:observatory/src/observatory_elements/function_ref.dart","package:observatory/src/observatory_elements/instance_ref.dart","package:observatory/src/observatory_elements/library_ref.dart","package:observatory/src/observatory_elements/class_view.dart","package:observatory/src/observatory_elements/code_ref.dart","package:observatory/src/observatory_elements/disassembly_entry.dart","package:observatory/src/observatory_elements/code_view.dart","package:observatory/src/observatory_elements/collapsible_content.dart","package:observatory/src/observatory_elements/field_view.dart","package:observatory/src/observatory_elements/function_view.dart","package:observatory/src/observatory_elements/script_ref.dart","package:observatory/src/observatory_elements/isolate_summary.dart","package:observatory/src/observatory_elements/isolate_list.dart","package:observatory/src/observatory_elements/instance_view.dart","package:observatory/src/observatory_elements/json_view.dart","package:observatory/src/observatory_elements/library_view.dart","package:observatory/src/observatory_elements/heap_profile.dart","package:observatory/src/observatory_elements/script_view.dart","package:observatory/src/observatory_elements/stack_frame.dart","package:observatory/src/observatory_elements/stack_trace.dart","package:observatory/src/observatory_elements/message_viewer.dart","package:observatory/src/observatory_elements/navigation_bar_isolate.dart","package:observatory/src/observatory_elements/navigation_bar.dart","package:observatory/src/observatory_elements/isolate_profile.dart","package:observatory/src/observatory_elements/response_viewer.dart","package:observatory/src/observatory_elements/observatory_application.dart","main.dart"]
+YF:[function(){$.x2=["package:observatory/src/observatory_elements/observatory_element.dart","package:observatory/src/observatory_elements/nav_bar.dart","package:observatory/src/observatory_elements/breakpoint_list.dart","package:observatory/src/observatory_elements/service_ref.dart","package:observatory/src/observatory_elements/class_ref.dart","package:observatory/src/observatory_elements/error_view.dart","package:observatory/src/observatory_elements/field_ref.dart","package:observatory/src/observatory_elements/function_ref.dart","package:observatory/src/observatory_elements/curly_block.dart","package:observatory/src/observatory_elements/instance_ref.dart","package:observatory/src/observatory_elements/library_ref.dart","package:observatory/src/observatory_elements/class_view.dart","package:observatory/src/observatory_elements/code_ref.dart","package:observatory/src/observatory_elements/disassembly_entry.dart","package:observatory/src/observatory_elements/code_view.dart","package:observatory/src/observatory_elements/collapsible_content.dart","package:observatory/src/observatory_elements/field_view.dart","package:observatory/src/observatory_elements/function_view.dart","package:observatory/src/observatory_elements/script_ref.dart","package:observatory/src/observatory_elements/isolate_summary.dart","package:observatory/src/observatory_elements/isolate_list.dart","package:observatory/src/observatory_elements/instance_view.dart","package:observatory/src/observatory_elements/json_view.dart","package:observatory/src/observatory_elements/library_view.dart","package:observatory/src/observatory_elements/heap_profile.dart","package:observatory/src/observatory_elements/script_view.dart","package:observatory/src/observatory_elements/stack_frame.dart","package:observatory/src/observatory_elements/stack_trace.dart","package:observatory/src/observatory_elements/message_viewer.dart","package:observatory/src/observatory_elements/isolate_profile.dart","package:observatory/src/observatory_elements/response_viewer.dart","package:observatory/src/observatory_elements/observatory_application.dart","main.dart"]
$.uP=!1
-F.E2()},"call$0","Pc",0,0,107]},1],["breakpoint_list_element","package:observatory/src/observatory_elements/breakpoint_list.dart",,B,{
+F.E2()},"call$0","nE",0,0,107]},1],["breakpoint_list_element","package:observatory/src/observatory_elements/breakpoint_list.dart",,B,{
"^":"",
G6:{
-"^":["Vf;BW%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-grs:[function(a){return a.BW},null,null,1,0,350,"msg",351,352],
-srs:[function(a,b){a.BW=this.ct(a,C.UX,a.BW,b)},null,null,3,0,353,23,[],"msg",351],
-"@":function(){return[C.lT]},
+"^":["Vf;BW%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+grs:[function(a){return a.BW},null,null,1,0,352,"msg",353,354],
+srs:[function(a,b){a.BW=this.ct(a,C.UX,a.BW,b)},null,null,3,0,355,23,[],"msg",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP("breakpoints")
+a.hm.gDF().fB(z).ml(new B.j3(a)).OA(new B.i0()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
+"@":function(){return[C.jy]},
static:{Dw:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
z=R.Jk(z)
@@ -10764,13 +10766,26 @@
C.J0.ZL(a)
C.J0.G6(a)
return a},null,null,0,0,108,"new BreakpointListElement$created"]}},
-"+BreakpointListElement":[354],
+"+BreakpointListElement":[357],
Vf:{
"^":"uL+Pi;",
-$isd3:true}}],["class_ref_element","package:observatory/src/observatory_elements/class_ref.dart",,Q,{
+$isd3:true},
+j3:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sBW(z,y.ct(z,C.UX,y.gBW(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+BreakpointListElement_refresh_closure":[358],
+i0:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing breakpoint-list: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+BreakpointListElement_refresh_closure":[358]}],["class_ref_element","package:observatory/src/observatory_elements/class_ref.dart",,Q,{
"^":"",
Tg:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.OS]},
static:{rt:[function(a){var z,y,x,w
z=$.Nd()
@@ -10786,13 +10801,15 @@
C.YZ.ZL(a)
C.YZ.G6(a)
return a},null,null,0,0,108,"new ClassRefElement$created"]}},
-"+ClassRefElement":[357]}],["class_view_element","package:observatory/src/observatory_elements/class_view.dart",,Z,{
+"+ClassRefElement":[362]}],["class_view_element","package:observatory/src/observatory_elements/class_view.dart",,Z,{
"^":"",
Ps:{
-"^":["pv;F0%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gRu:[function(a){return a.F0},null,null,1,0,350,"cls",351,352],
-sRu:[function(a,b){a.F0=this.ct(a,C.XA,a.F0,b)},null,null,3,0,353,23,[],"cls",351],
-"@":function(){return[C.aQ]},
+"^":["pv;F0%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gRu:[function(a){return a.F0},null,null,1,0,352,"cls",353,354],
+sRu:[function(a,b){a.F0=this.ct(a,C.XA,a.F0,b)},null,null,3,0,355,23,[],"cls",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.F0,"id"))
+a.hm.gDF().fB(z).ml(new Z.RI(a)).OA(new Z.Ye()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
+"@":function(){return[C.aQx]},
static:{zg:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
@@ -10805,13 +10822,26 @@
C.kk.ZL(a)
C.kk.G6(a)
return a},null,null,0,0,108,"new ClassViewElement$created"]}},
-"+ClassViewElement":[358],
+"+ClassViewElement":[363],
pv:{
"^":"uL+Pi;",
-$isd3:true}}],["code_ref_element","package:observatory/src/observatory_elements/code_ref.dart",,O,{
+$isd3:true},
+RI:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sF0(z,y.ct(z,C.XA,y.gF0(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+ClassViewElement_refresh_closure":[358],
+Ye:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing class-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+ClassViewElement_refresh_closure":[358]}],["code_ref_element","package:observatory/src/observatory_elements/code_ref.dart",,O,{
"^":"",
CN:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.U8]},
static:{On:[function(a){var z,y,x,w
z=$.Nd()
@@ -10827,13 +10857,13 @@
C.IK.ZL(a)
C.IK.G6(a)
return a},null,null,0,0,108,"new CodeRefElement$created"]}},
-"+CodeRefElement":[357]}],["code_view_element","package:observatory/src/observatory_elements/code_view.dart",,F,{
+"+CodeRefElement":[362]}],["code_view_element","package:observatory/src/observatory_elements/code_view.dart",,F,{
"^":"",
vc:{
-"^":["Vfx;eJ%-359,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gtT:[function(a){return a.eJ},null,null,1,0,360,"code",351,352],
-stT:[function(a,b){a.eJ=this.ct(a,C.b1,a.eJ,b)},null,null,3,0,361,23,[],"code",351],
-grj:[function(a){return"panel panel-success"},null,null,1,0,362,"cssPanelClass"],
+"^":["Vfx;eJ%-364,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtT:[function(a){return a.eJ},null,null,1,0,365,"code",353,354],
+stT:[function(a,b){a.eJ=this.ct(a,C.b1,a.eJ,b)},null,null,3,0,366,23,[],"code",353],
+grK:[function(a){return"panel panel-success"},null,null,1,0,367,"cssPanelClass"],
"@":function(){return[C.xW]},
static:{Fe:[function(a){var z,y,x,w
z=$.Nd()
@@ -10847,25 +10877,25 @@
C.YD.ZL(a)
C.YD.G6(a)
return a},null,null,0,0,108,"new CodeViewElement$created"]}},
-"+CodeViewElement":[363],
+"+CodeViewElement":[368],
Vfx:{
"^":"uL+Pi;",
$isd3:true}}],["collapsible_content_element","package:observatory/src/observatory_elements/collapsible_content.dart",,R,{
"^":"",
-i6:{
-"^":["Dsd;zh%-364,HX%-364,Uy%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gl7:[function(a){return a.zh},null,null,1,0,362,"iconClass",351,365],
-sl7:[function(a,b){a.zh=this.ct(a,C.Di,a.zh,b)},null,null,3,0,25,23,[],"iconClass",351],
-gai:[function(a){return a.HX},null,null,1,0,362,"displayValue",351,365],
-sai:[function(a,b){a.HX=this.ct(a,C.Jw,a.HX,b)},null,null,3,0,25,23,[],"displayValue",351],
-gxj:[function(a){return a.Uy},null,null,1,0,366,"collapsed"],
+E0:{
+"^":["Dsd;zh%-369,HX%-369,Uy%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gl7:[function(a){return a.zh},null,null,1,0,367,"iconClass",353,370],
+sl7:[function(a,b){a.zh=this.ct(a,C.Di,a.zh,b)},null,null,3,0,25,23,[],"iconClass",353],
+gai:[function(a){return a.HX},null,null,1,0,367,"displayValue",353,370],
+sai:[function(a,b){a.HX=this.ct(a,C.Jw,a.HX,b)},null,null,3,0,25,23,[],"displayValue",353],
+gxj:[function(a){return a.Uy},null,null,1,0,371,"collapsed"],
sxj:[function(a,b){a.Uy=b
-this.SS(a)},null,null,3,0,367,368,[],"collapsed"],
+this.SS(a)},null,null,3,0,372,373,[],"collapsed"],
i4:[function(a){Z.uL.prototype.i4.call(this,a)
this.SS(a)},"call$0","gQd",0,0,107,"enteredView"],
jp:[function(a,b,c,d){a.Uy=a.Uy!==!0
this.SS(a)
-this.SS(a)},"call$3","gl8",6,0,369,18,[],301,[],74,[],"toggleDisplay"],
+this.SS(a)},"call$3","gl8",6,0,374,18,[],303,[],74,[],"toggleDisplay"],
SS:[function(a){var z,y
z=a.Uy
y=a.zh
@@ -10873,7 +10903,7 @@
a.HX=this.ct(a,C.Jw,a.HX,"none")}else{a.zh=this.ct(a,C.Di,y,"glyphicon glyphicon-chevron-up")
a.HX=this.ct(a,C.Jw,a.HX,"block")}},"call$0","glg",0,0,107,"_refresh"],
"@":function(){return[C.Gu]},
-static:{"^":"Vl<-364,DI<-364",Hv:[function(a){var z,y,x,w
+static:{"^":"Vl<-369,DI<-369",Hv:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
x=J.O
@@ -10888,9 +10918,50 @@
C.j8.ZL(a)
C.j8.G6(a)
return a},null,null,0,0,108,"new CollapsibleContentElement$created"]}},
-"+CollapsibleContentElement":[370],
+"+CollapsibleContentElement":[375],
Dsd:{
"^":"uL+Pi;",
+$isd3:true}}],["curly_block_element","package:observatory/src/observatory_elements/curly_block.dart",,R,{
+"^":"",
+lw:{
+"^":["Nr;GV%-360,Hu%-360,nx%-77,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+goE:[function(a){return a.GV},null,null,1,0,371,"expanded",353,370],
+soE:[function(a,b){a.GV=this.ct(a,C.mr,a.GV,b)},null,null,3,0,372,23,[],"expanded",353],
+gO9:[function(a){return a.Hu},null,null,1,0,371,"busy",353,370],
+sO9:[function(a,b){a.Hu=this.ct(a,C.S4,a.Hu,b)},null,null,3,0,372,23,[],"busy",353],
+gFR:[function(a){return a.nx},null,null,1,0,108,"callback",353,354],
+Ki:function(a){return this.gFR(a).call$0()},
+AV:function(a,b,c){return this.gFR(a).call$2(b,c)},
+sFR:[function(a,b){a.nx=this.ct(a,C.AV,a.nx,b)},null,null,3,0,225,23,[],"callback",353],
+PA:[function(a){var z
+P.JS("done callback")
+z=a.GV
+a.GV=this.ct(a,C.mr,z,z!==!0)
+a.Hu=this.ct(a,C.S4,a.Hu,!1)},"call$0","goJ",0,0,107,"doneCallback"],
+AZ:[function(a,b,c,d){var z=a.Hu
+if(z===!0)return
+if(a.nx!=null){a.Hu=this.ct(a,C.S4,z,!0)
+this.AV(a,a.GV!==!0,this.goJ(a))}else{z=a.GV
+a.GV=this.ct(a,C.mr,z,z!==!0)}},"call$3","ghM",6,0,376,123,[],183,[],280,[],"toggleExpand"],
+"@":function(){return[C.DKS]},
+static:{fR:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.GV=!1
+a.Hu=!1
+a.nx=null
+a.SO=z
+a.B7=y
+a.X0=w
+C.O0.ZL(a)
+C.O0.G6(a)
+return a},null,null,0,0,108,"new CurlyBlockElement$created"]}},
+"+CurlyBlockElement":[377],
+Nr:{
+"^":"ir+Pi;",
$isd3:true}}],["custom_element.polyfill","package:custom_element/polyfill.dart",,B,{
"^":"",
G9:function(){var z,y
@@ -10901,9 +10972,8 @@
return J.de(J.UQ(y,"ready"),!0)},
wJ:{
"^":"Tp:108;",
-call$0:[function(){if(B.G9()){var z=H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[null])
-z.L7(null,null)
-return z}z=H.VM(new W.RO(document,"WebComponentsReady",!1),[null])
+call$0:[function(){if(B.G9())return P.Ab(null,null)
+var z=H.VM(new W.RO(document,"WebComponentsReady",!1),[null])
return z.gtH(z)},"call$0",null,0,0,null,"call"],
$isEH:true}}],["dart._internal","dart:_internal",,H,{
"^":"",
@@ -11084,7 +11154,7 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){b.call$1(this.Zv(0,y))
-if(z!==this.gB(this))throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.gB(this))throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,378,[]],
gl0:function(a){return J.de(this.gB(this),0)},
grZ:function(a){if(J.de(this.gB(this),0))throw H.b(new P.lj("No elements"))
return this.Zv(0,J.xH(this.gB(this),1))},
@@ -11099,7 +11169,7 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){if(b.call$1(this.Zv(0,y))===!0)return!0
-if(z!==this.gB(this))throw H.b(P.a4(this))}return!1},"call$1","gG2",2,0,null,372,[]],
+if(z!==this.gB(this))throw H.b(P.a4(this))}return!1},"call$1","gG2",2,0,null,379,[]],
zV:[function(a,b){var z,y,x,w,v,u
z=this.gB(this)
if(b.length!==0){y=J.x(z)
@@ -11119,8 +11189,8 @@
for(;v<z;++v){u=this.Zv(0,v)
u=typeof u==="string"?u:H.d(u)
w.vM=w.vM+u
-if(z!==this.gB(this))throw H.b(P.a4(this))}return w.vM}},"call$1","gnr",0,2,null,328,329,[]],
-ev:[function(a,b){return P.mW.prototype.ev.call(this,this,b)},"call$1","gIR",2,0,null,372,[]],
+if(z!==this.gB(this))throw H.b(P.a4(this))}return w.vM}},"call$1","gnr",0,2,null,330,331,[]],
+ev:[function(a,b){return P.mW.prototype.ev.call(this,this,b)},"call$1","gIR",2,0,null,379,[]],
ez:[function(a,b){return H.VM(new H.A8(this,b),[null,null])},"call$1","gIr",2,0,null,110,[]],
es:[function(a,b,c){var z,y,x
z=this.gB(this)
@@ -11142,7 +11212,7 @@
if(!(x<y))break
y=this.Zv(0,x)
if(x>=z.length)return H.e(z,x)
-z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
$isyN:true},
nH:{
"^":"aL;l6,SH,AN",
@@ -11267,7 +11337,7 @@
return!0},"call$0","gqy",0,0,null]},
H6:{
"^":"mW;l6,FT",
-eR:[function(a,b){return H.ke(this.l6,this.FT+b,H.Kp(this,0))},"call$1","gZo",2,0,null,287,[]],
+eR:[function(a,b){return H.ke(this.l6,this.FT+b,H.Kp(this,0))},"call$1","gZo",2,0,null,289,[]],
gA:function(a){var z=this.l6
z=new H.U1(z.gA(z),this.FT)
z.$builtinTypeInfo=this.$builtinTypeInfo
@@ -11318,7 +11388,7 @@
GT:[function(a,b){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$1","gH7",0,2,null,77,128,[]],
V1:[function(a){throw H.b(P.f("Cannot clear an unmodifiable list"))},"call$0","gyP",0,0,null],
KI:[function(a,b){throw H.b(P.f("Cannot remove from an unmodifiable list"))},"call$1","gNM",2,0,null,47,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot modify an unmodifiable list"))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isList:true,
$asWO:null,
$isyN:true,
@@ -11525,7 +11595,7 @@
"^":"a;",
bu:[function(a){return this.gOO()},"call$0","gXo",0,0,null],
IB:[function(a){throw H.b(P.SY(null))},"call$1","gft",2,0,null,41,[]],
-Hy:[function(a,b){throw H.b(P.SY(null))},"call$2","gdk",4,0,null,41,[],165,[]],
+Hy:[function(a,b){throw H.b(P.SY(null))},"call$2","gdk",4,0,null,41,[],168,[]],
$isej:true},
Lj:{
"^":"TY;MA",
@@ -11534,8 +11604,8 @@
return z.gUQ(z).XG(0,new H.mb())},
$isej:true},
mb:{
-"^":"Tp:374;",
-call$1:[function(a){return a.gGD()},"call$1",null,2,0,null,373,[],"call"],
+"^":"Tp:381;",
+call$1:[function(a){return a.gGD()},"call$1",null,2,0,null,380,[],"call"],
$isEH:true},
am:{
"^":"TY;If<",
@@ -11600,7 +11670,7 @@
if(w==null)w=this.gcc().nb.t(0,a)
if(w==null)throw H.b(P.lr(this,H.X7(a),[b],null,null))
w.Hy(this,b)
-return H.vn(b)},"call$2","gtd",4,0,null,65,[],165,[]],
+return H.vn(b)},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){var z=this.gQH().nb.t(0,a)
if(z==null)throw H.b(P.lr(this,a,[],null,null))
return H.vn(z.IB(this))},"call$1","gPo",2,0,null,65,[]],
@@ -11700,11 +11770,11 @@
"^":"am+M2;",
$isej:true},
IB:{
-"^":"Tp:375;a",
+"^":"Tp:382;a",
call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
oP:{
-"^":"Tp:375;a",
+"^":"Tp:382;a",
call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
YX:{
@@ -11726,7 +11796,7 @@
gYK:function(){return this.XW.gYK()},
F2:[function(a,b,c){throw H.b(P.lr(this,a,b,c,null))},function(a,b){return this.F2(a,b,null)},"CI","call$3",null,"gb2",4,2,null,77,24,[],43,[],44,[]],
rN:[function(a){throw H.b(P.lr(this,a,null,null,null))},"call$1","gPo",2,0,null,65,[]],
-PU:[function(a,b){throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],165,[]],
+PU:[function(a,b){throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],168,[]],
gkZ:function(){return[this.XW]},
gHA:function(){return!0},
gJi:function(){return this},
@@ -11764,10 +11834,10 @@
y=v.ZU(this.Ax)
z[c]=y}else v=null
if(y.gpf()){if(v==null)v=new H.LI(a,$.I6().t(0,c),b,d,[],null)
-return H.vn(y.Bj(this.Ax,v))}else return H.vn(y.Bj(this.Ax,d))},"call$4","gqi",8,0,null,12,[],11,[],376,[],82,[]],
+return H.vn(y.Bj(this.Ax,v))}else return H.vn(y.Bj(this.Ax,d))},"call$4","gqi",8,0,null,12,[],11,[],383,[],82,[]],
PU:[function(a,b){var z=H.d(a.gfN(a))+"="
this.tu(H.YC(z),2,z,[b])
-return H.vn(b)},"call$2","gtd",4,0,null,65,[],165,[]],
+return H.vn(b)},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){var z,y,x,w
$loop$0:{z=this.xq
if(typeof z=="number"||typeof a.$p=="undefined")break $loop$0
@@ -11797,12 +11867,12 @@
t.v=t.m=w
return y},"call$1","gFf",2,0,null,65,[]],
ds:[function(a,b){if(b)return(function(b){return eval(b)})("(function probe$"+H.d(a)+"(c){return c."+H.d(a)+"})")
-else return(function(n){return(function(c){return c[n]})})(a)},"call$2","gfu",4,0,null,236,[],377,[]],
+else return(function(n){return(function(c){return c[n]})})(a)},"call$2","gfu",4,0,null,238,[],384,[]],
x0:[function(a,b){if(!b)return(function(n){return(function(o){return o[n]()})})(a)
-return(function(b){return eval(b)})("(function "+this.Ax.constructor.name+"$"+H.d(a)+"(o){return o."+H.d(a)+"()})")},"call$2","gER",4,0,null,12,[],377,[]],
+return(function(b){return eval(b)})("(function "+this.Ax.constructor.name+"$"+H.d(a)+"(o){return o."+H.d(a)+"()})")},"call$2","gER",4,0,null,12,[],384,[]],
QN:[function(a,b){var z=J.x(this.Ax)
if(!b)return(function(n,i){return(function(o){return i[n](o)})})(a,z)
-return(function(b,i){return eval(b)})("(function "+z.constructor.name+"$"+H.d(a)+"(o){return i."+H.d(a)+"(o)})",z)},"call$2","gpa",4,0,null,12,[],377,[]],
+return(function(b,i){return eval(b)})("(function "+z.constructor.name+"$"+H.d(a)+"(o){return i."+H.d(a)+"(o)})",z)},"call$2","gpa",4,0,null,12,[],384,[]],
n:[function(a,b){var z,y
if(b==null)return!1
z=J.x(b)
@@ -11818,7 +11888,7 @@
$isvr:true,
$isej:true},
mg:{
-"^":"Tp:378;a",
+"^":"Tp:385;a",
call$2:[function(a,b){var z,y
z=a.gfN(a)
y=this.a
@@ -11878,7 +11948,7 @@
z=H.VM(new H.Oh(y),[P.wv,P.NL])
this.Db=z
return z},
-PU:[function(a,b){return this.NK.PU(a,b)},"call$2","gtd",4,0,null,65,[],165,[]],
+PU:[function(a,b){return this.NK.PU(a,b)},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){return this.NK.rN(a)},"call$1","gPo",2,0,null,65,[]],
gXP:function(){return this.NK.gXP()},
gc9:function(){return this.NK.gc9()},
@@ -11912,20 +11982,20 @@
y=this.a
if(J.de(z,-1))y.push(H.jO(J.rr(a)))
else{x=init.metadata[z]
-y.push(new H.cw(P.re(x.gXP()),x,z,null,H.YC(J.O6(x))))}},"call$1",null,2,0,null,379,[],"call"],
+y.push(new H.cw(P.re(x.gXP()),x,z,null,H.YC(J.O6(x))))}},"call$1",null,2,0,null,386,[],"call"],
$isEH:true},
Oo:{
-"^":"Tp:223;",
-call$1:[function(a){return-1},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return-1},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Tc:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){return this.b.call$1(a)},"call$1",null,2,0,null,87,[],"call"],
$isEH:true},
Ax:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.u(0,a.gIf(),a)
-return a},"call$1",null,2,0,null,380,[],"call"],
+return a},"call$1",null,2,0,null,387,[],"call"],
$isEH:true},
Wf:{
"^":"vk;Cr<,Tx<,H8,Ht,pz,le,qN,qu,zE,b0,FU,T1,fX,M2,uA,Db,xO,qm,UF,eL,RH,nz,If",
@@ -11963,7 +12033,7 @@
p=H.ys(n,"$",".")}}else continue
s=H.Sd(p,q,!o,o)
x.push(s)
-s.nz=a}return x},"call$1","gN4",2,0,null,381,[]],
+s.nz=a}return x},"call$1","gN4",2,0,null,388,[]],
gEO:function(){var z=this.qu
if(z!=null)return z
z=this.ly(this)
@@ -11979,7 +12049,7 @@
C.Nm.FV(x,y)}H.jw(a,x,!1,z)
w=init.statics[this.Cr]
if(w!=null)H.jw(a,w["^"],!0,z)
-return z},"call$1","gkW",2,0,null,382,[]],
+return z},"call$1","gkW",2,0,null,389,[]],
gTH:function(){var z=this.zE
if(z!=null)return z
z=this.ws(this)
@@ -12019,7 +12089,7 @@
if(z!=null&&z.gFo()&&!z.gV5()){y=z.gao()
if(!(y in $))throw H.b(H.Ef("Cannot find \""+y+"\" in current isolate."))
$[y]=b
-return H.vn(b)}throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],165,[]],
+return H.vn(b)}throw H.b(P.lr(this,H.X7(a),[b],null,null))},"call$2","gtd",4,0,null,65,[],168,[]],
rN:[function(a){var z,y
z=this.gcc().nb.t(0,a)
if(z!=null&&z.gFo()){y=z.gao()
@@ -12098,17 +12168,17 @@
"^":"EE+M2;",
$isej:true},
Ei:{
-"^":"Tp:375;a",
+"^":"Tp:382;a",
call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
U7:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){this.b.u(0,a.gIf(),a)
-return a},"call$1",null,2,0,null,380,[],"call"],
+return a},"call$1",null,2,0,null,387,[],"call"],
$isEH:true},
t0:{
-"^":"Tp:384;a",
-call$1:[function(a){return H.Jf(this.a,init.metadata[a])},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:391;a",
+call$1:[function(a){return H.Jf(this.a,init.metadata[a])},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
Ld:{
"^":"am;ao<,V5<,Fo<,n6,nz,Ay>,le,If",
@@ -12121,7 +12191,7 @@
this.le=z}return J.C0(z,H.Yf()).br(0)},
IB:[function(a){return $[this.ao]},"call$1","gft",2,0,null,41,[]],
Hy:[function(a,b){if(this.V5)throw H.b(P.lr(this,H.X7(this.If),[b],null,null))
-$[this.ao]=b},"call$2","gdk",4,0,null,41,[],165,[]],
+$[this.ao]=b},"call$2","gdk",4,0,null,41,[],168,[]],
$isRY:true,
$isNL:true,
$isej:true,
@@ -12226,7 +12296,7 @@
IB:[function(a){if(this.lT)return this.jd([],null)
else throw H.b(P.SY("getField on "+H.d(a)))},"call$1","gft",2,0,null,41,[]],
Hy:[function(a,b){if(this.hB)return this.jd([b],null)
-else throw H.b(P.lr(this,H.X7(this.If),[],null,null))},"call$2","gdk",4,0,null,41,[],165,[]],
+else throw H.b(P.lr(this,H.X7(this.If),[],null,null))},"call$2","gdk",4,0,null,41,[],168,[]],
guU:function(){return!this.lT&&!this.hB&&!this.xV},
$isZk:true,
$isRS:true,
@@ -12259,8 +12329,8 @@
$isNL:true,
$isej:true},
wt:{
-"^":"Tp:385;",
-call$1:[function(a){return H.vn(init.metadata[a])},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:392;",
+call$1:[function(a){return H.vn(init.metadata[a])},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
ng:{
"^":"am;Cr<,CM,If",
@@ -12340,7 +12410,7 @@
$isX9:true,
$isNL:true},
rh:{
-"^":"Tp:386;a",
+"^":"Tp:393;a",
call$1:[function(a){var z,y,x
z=init.metadata[a]
y=this.a
@@ -12348,7 +12418,7 @@
return J.UQ(y.a.gw8(),x)},"call$1",null,2,0,null,47,[],"call"],
$isEH:true},
jB:{
-"^":"Tp:387;b",
+"^":"Tp:394;b",
call$1:[function(a){var z,y
z=this.b.call$1(a)
y=J.x(z)
@@ -12359,12 +12429,12 @@
return z.gCr()},"call$1",null,2,0,null,47,[],"call"],
$isEH:true},
ye:{
-"^":"Tp:385;",
-call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:392;",
+call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
O1:{
-"^":"Tp:385;",
-call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,383,[],"call"],
+"^":"Tp:392;",
+call$1:[function(a){return init.metadata[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
Oh:{
"^":"a;nb",
@@ -12408,16 +12478,36 @@
z.fixed$length=init
return z},"call$1","wp",2,0,null,140,[]],
Xh:{
-"^":"Tp:388;a",
-call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,132,[],376,[],"call"],
+"^":"Tp:395;a",
+call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,132,[],383,[],"call"],
$isEH:true}}],["dart.async","dart:async",,P,{
"^":"",
VH:[function(a,b){var z=H.N7()
z=H.KT(z,[z,z]).BD(a)
if(z)return b.O8(a)
else return b.cR(a)},"call$2","p3",4,0,null,145,[],146,[]],
+pH:[function(a,b){var z,y,x,w,v,u,t
+z={}
+z.a=null
+z.b=null
+z.c=0
+z.d=null
+z.e=null
+y=new P.j7(z,b)
+for(x=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]);x.G();){w=x.lo
+v=z.c
+z.c=v+1
+w.Rx(new P.ff(z,b,v),y)}y=z.c
+if(y===0)return P.Ab(C.xD,null)
+u=Array(y)
+u.fixed$length=init
+z.b=u
+y=J.Q
+t=H.VM(new P.Zf(P.Dt(y)),[y])
+z.a=t
+return t.MM},"call$2$eagerError","pk",2,3,null,147,148,[],149,[]],
Cx:[function(){var z=$.S6
-for(;z!=null;){z.Ki()
+for(;z!=null;){J.cG(z)
z=z.gaw()
$.S6=z}$.k8=null},"call$0","So",0,0,null],
BG:[function(){var z
@@ -12432,11 +12522,11 @@
$.S6=z
P.jL(C.ny,P.qZ())}else{y=new P.OM(a,null)
z.aw=y
-$.k8=y}},"call$1","xc",2,0,null,148,[]],
+$.k8=y}},"call$1","xc",2,0,null,151,[]],
rb:[function(a){var z
if(J.de($.X3,C.NU)){$.X3.wr(a)
return}z=$.X3
-z.wr(z.xi(a,!0))},"call$1","Rf",2,0,null,148,[]],
+z.wr(z.xi(a,!0))},"call$1","Rf",2,0,null,151,[]],
bK:function(a,b,c,d){var z
if(c){z=H.VM(new P.dz(b,a,0,null,null,null,null),[d])
z.SJ=z
@@ -12452,56 +12542,56 @@
return}catch(u){w=H.Ru(u)
y=w
x=new H.XO(u,null)
-$.X3.hk(y,x)}},"call$1","DC",2,0,null,149,[]],
-SN:[function(a){},"call$1","bV",2,0,150,23,[]],
-SZ:[function(a,b){$.X3.hk(a,b)},function(a){return P.SZ(a,null)},null,"call$2","call$1","AY",2,2,151,77,152,[],153,[]],
+$.X3.hk(y,x)}},"call$1","DC",2,0,null,152,[]],
+YE:[function(a){},"call$1","bZ",2,0,153,23,[]],
+SZ:[function(a,b){$.X3.hk(a,b)},function(a){return P.SZ(a,null)},null,"call$2","call$1","AY",2,2,154,77,155,[],156,[]],
dL:[function(){return},"call$0","v3",0,0,107],
FE:[function(a,b,c){var z,y,x,w
try{b.call$1(a.call$0())}catch(x){w=H.Ru(x)
z=w
y=new H.XO(x,null)
-c.call$2(z,y)}},"call$3","CV",6,0,null,154,[],155,[],156,[]],
+c.call$2(z,y)}},"call$3","CV",6,0,null,157,[],158,[],159,[]],
NX:[function(a,b,c,d){a.ed()
-b.K5(c,d)},"call$4","QD",8,0,null,157,[],158,[],152,[],153,[]],
-TB:[function(a,b){return new P.uR(a,b)},"call$2","cH",4,0,null,157,[],158,[]],
+b.K5(c,d)},"call$4","QD",8,0,null,160,[],161,[],155,[],156,[]],
+TB:[function(a,b){return new P.uR(a,b)},"call$2","cH",4,0,null,160,[],161,[]],
Bb:[function(a,b,c){a.ed()
-b.rX(c)},"call$3","iB",6,0,null,157,[],158,[],23,[]],
+b.rX(c)},"call$3","iB",6,0,null,160,[],161,[],23,[]],
rT:function(a,b){var z
if(J.de($.X3,C.NU))return $.X3.uN(a,b)
z=$.X3
return z.uN(a,z.xi(b,!0))},
jL:[function(a,b){var z=C.jn.cU(a.Fq,1000)
-return H.cy(z<0?0:z,b)},"call$2","et",4,0,null,159,[],148,[]],
+return H.cy(z<0?0:z,b)},"call$2","et",4,0,null,162,[],151,[]],
PJ:[function(a){var z=$.X3
$.X3=a
return z},"call$1","kb",2,0,null,146,[]],
-L2:[function(a,b,c,d,e){a.Gr(new P.pK(d,e))},"call$5","xP",10,0,160,161,[],162,[],146,[],152,[],153,[]],
+L2:[function(a,b,c,d,e){a.Gr(new P.pK(d,e))},"call$5","xP",10,0,163,164,[],165,[],146,[],155,[],156,[]],
T8:[function(a,b,c,d){var z,y
if(J.de($.X3,c))return d.call$0()
z=P.PJ(c)
try{y=d.call$0()
-return y}finally{$.X3=z}},"call$4","AI",8,0,163,161,[],162,[],146,[],110,[]],
+return y}finally{$.X3=z}},"call$4","AI",8,0,166,164,[],165,[],146,[],110,[]],
V7:[function(a,b,c,d,e){var z,y
if(J.de($.X3,c))return d.call$1(e)
z=P.PJ(c)
try{y=d.call$1(e)
-return y}finally{$.X3=z}},"call$5","MM",10,0,164,161,[],162,[],146,[],110,[],165,[]],
+return y}finally{$.X3=z}},"call$5","MM",10,0,167,164,[],165,[],146,[],110,[],168,[]],
Qx:[function(a,b,c,d,e,f){var z,y
if(J.de($.X3,c))return d.call$2(e,f)
z=P.PJ(c)
try{y=d.call$2(e,f)
-return y}finally{$.X3=z}},"call$6","l4",12,0,166,161,[],162,[],146,[],110,[],54,[],55,[]],
-Ee:[function(a,b,c,d){return d},"call$4","EU",8,0,167,161,[],162,[],146,[],110,[]],
-cQ:[function(a,b,c,d){return d},"call$4","zi",8,0,168,161,[],162,[],146,[],110,[]],
-VI:[function(a,b,c,d){return d},"call$4","uu",8,0,169,161,[],162,[],146,[],110,[]],
-Tk:[function(a,b,c,d){P.IA(C.NU!==c?c.ce(d):d)},"call$4","G2",8,0,170,161,[],162,[],146,[],110,[]],
-h8:[function(a,b,c,d,e){return P.jL(d,C.NU!==c?c.ce(e):e)},"call$5","KF",10,0,171,161,[],162,[],146,[],159,[],148,[]],
-XB:[function(a,b,c,d){H.qw(d)},"call$4","YM",8,0,172,161,[],162,[],146,[],173,[]],
-CI:[function(a){J.O2($.X3,a)},"call$1","Fl",2,0,174,173,[]],
+return y}finally{$.X3=z}},"call$6","l4",12,0,169,164,[],165,[],146,[],110,[],54,[],55,[]],
+Ee:[function(a,b,c,d){return d},"call$4","EU",8,0,170,164,[],165,[],146,[],110,[]],
+cQ:[function(a,b,c,d){return d},"call$4","zi",8,0,171,164,[],165,[],146,[],110,[]],
+VI:[function(a,b,c,d){return d},"call$4","uu",8,0,172,164,[],165,[],146,[],110,[]],
+Tk:[function(a,b,c,d){P.IA(C.NU!==c?c.ce(d):d)},"call$4","G2",8,0,173,164,[],165,[],146,[],110,[]],
+h8:[function(a,b,c,d,e){return P.jL(d,C.NU!==c?c.ce(e):e)},"call$5","KF",10,0,174,164,[],165,[],146,[],162,[],151,[]],
+XB:[function(a,b,c,d){H.qw(d)},"call$4","YM",8,0,175,164,[],165,[],146,[],176,[]],
+CI:[function(a){J.O2($.X3,a)},"call$1","Fl",2,0,177,176,[]],
UA:[function(a,b,c,d,e){var z
$.oK=P.Fl()
z=P.Py(null,null,null,null,null)
-return new P.uo(c,d,z)},"call$5","hn",10,0,175,161,[],162,[],146,[],176,[],177,[]],
+return new P.uo(c,d,z)},"call$5","hn",10,0,178,164,[],165,[],146,[],179,[],180,[]],
Ca:{
"^":"a;kc>,I4<",
$isGe:true},
@@ -12512,10 +12602,10 @@
gY8:function(){return this.Y8},
uR:[function(a){var z=this.Ae
if(typeof z!=="number")return z.i()
-return(z&1)===a},"call$1","gLM",2,0,null,389,[]],
+return(z&1)===a},"call$1","gLM",2,0,null,396,[]],
Ac:[function(){var z=this.Ae
if(typeof z!=="number")return z.w()
-this.Ae=z^1},"call$0","goX",0,0,null],
+this.Ae=z^1},"call$0","gUe",0,0,null],
gP4:function(){var z=this.Ae
if(typeof z!=="number")return z.i()
return(z&2)!==0},
@@ -12543,17 +12633,17 @@
z.siE(y)
y.sSJ(z)
a.sSJ(a)
-a.siE(a)},"call$1","gOo",2,0,null,157,[]],
+a.siE(a)},"call$1","gOo",2,0,null,160,[]],
j0:[function(a){if(a.giE()===a)return
if(a.gP4())a.dK()
else{this.p1(a)
-if((this.Gv&2)===0&&this.iE===this)this.Of()}},"call$1","gOr",2,0,null,157,[]],
+if((this.Gv&2)===0&&this.iE===this)this.Of()}},"call$1","gOr",2,0,null,160,[]],
q7:[function(){if((this.Gv&4)!==0)return new P.lj("Cannot add new events after calling close")
return new P.lj("Cannot add new events while doing an addStream")},"call$0","gVo",0,0,null],
h:[function(a,b){if(this.Gv>=4)throw H.b(this.q7())
-this.Iv(b)},"call$1","ght",2,0,function(){return H.IG(function(a){return{func:"lU",void:true,args:[a]}},this.$receiver,"Ks")},231,[]],
+this.Iv(b)},"call$1","ght",2,0,function(){return H.IG(function(a){return{func:"lU",void:true,args:[a]}},this.$receiver,"Ks")},233,[]],
fDe:[function(a,b){if(this.Gv>=4)throw H.b(this.q7())
-this.pb(a,b)},function(a){return this.fDe(a,null)},"JT","call$2","call$1","gXB",2,2,390,77,152,[],153,[]],
+this.pb(a,b)},function(a){return this.fDe(a,null)},"JT","call$2","call$1","gXB",2,2,397,77,155,[],156,[]],
cO:[function(a){var z,y
z=this.Gv
if((z&4)!==0)return this.Ip
@@ -12562,8 +12652,8 @@
y=this.SL()
this.SY()
return y},"call$0","gJK",0,0,null],
-Rg:[function(a,b){this.Iv(b)},"call$1","gHR",2,0,null,231,[]],
-V8:[function(a,b){this.pb(a,b)},"call$2","grd",4,0,null,152,[],153,[]],
+Rg:[function(a,b){this.Iv(b)},"call$1","gHR",2,0,null,233,[]],
+V8:[function(a,b){this.pb(a,b)},"call$2","grd",4,0,null,155,[],156,[]],
Qj:[function(){var z=this.WX
this.WX=null
this.Gv=this.Gv&4294967287
@@ -12587,7 +12677,7 @@
y.sAe(z&4294967293)
y=w}else y=y.giE()
this.Gv=this.Gv&4294967293
-if(this.iE===this)this.Of()},"call$1","gxd",2,0,null,371,[]],
+if(this.iE===this)this.Of()},"call$1","gxd",2,0,null,378,[]],
Of:[function(){if((this.Gv&4)!==0&&this.Ip.Gv===0)this.Ip.OH(null)
P.ot(this.QC)},"call$0","gVg",0,0,null]},
dz:{
@@ -12598,24 +12688,24 @@
this.iE.Rg(0,a)
this.Gv=this.Gv&4294967293
if(this.iE===this)this.Of()
-return}this.nE(new P.tK(this,a))},"call$1","gm9",2,0,null,231,[]],
+return}this.nE(new P.tK(this,a))},"call$1","gm9",2,0,null,233,[]],
pb:[function(a,b){if(this.iE===this)return
-this.nE(new P.OR(this,a,b))},"call$2","gTb",4,0,null,152,[],153,[]],
+this.nE(new P.OR(this,a,b))},"call$2","gTb",4,0,null,155,[],156,[]],
SY:[function(){if(this.iE!==this)this.nE(new P.Bg(this))
else this.Ip.OH(null)},"call$0","gXm",0,0,null]},
tK:{
"^":"Tp;a,b",
-call$1:[function(a){a.Rg(0,this.b)},"call$1",null,2,0,null,157,[],"call"],
+call$1:[function(a){a.Rg(0,this.b)},"call$1",null,2,0,null,160,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"DU",args:[[P.KA,a]]}},this.a,"dz")}},
OR:{
"^":"Tp;a,b,c",
-call$1:[function(a){a.V8(this.b,this.c)},"call$1",null,2,0,null,157,[],"call"],
+call$1:[function(a){a.V8(this.b,this.c)},"call$1",null,2,0,null,160,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"DU",args:[[P.KA,a]]}},this.a,"dz")}},
Bg:{
"^":"Tp;a",
-call$1:[function(a){a.Qj()},"call$1",null,2,0,null,157,[],"call"],
+call$1:[function(a){a.Qj()},"call$1",null,2,0,null,160,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"Zj",args:[[P.JI,a]]}},this.a,"dz")}},
DL:{
@@ -12623,27 +12713,53 @@
Iv:[function(a){var z,y
for(z=this.iE;z!==this;z=z.giE()){y=new P.LV(a,null)
y.$builtinTypeInfo=[null]
-z.w6(y)}},"call$1","gm9",2,0,null,231,[]],
+z.w6(y)}},"call$1","gm9",2,0,null,233,[]],
pb:[function(a,b){var z
-for(z=this.iE;z!==this;z=z.giE())z.w6(new P.DS(a,b,null))},"call$2","gTb",4,0,null,152,[],153,[]],
+for(z=this.iE;z!==this;z=z.giE())z.w6(new P.DS(a,b,null))},"call$2","gTb",4,0,null,155,[],156,[]],
SY:[function(){var z=this.iE
if(z!==this)for(;z!==this;z=z.giE())z.w6(C.Wj)
else this.Ip.OH(null)},"call$0","gXm",0,0,null]},
b8:{
"^":"a;",
$isb8:true},
+j7:{
+"^":"Tp:343;a,b",
+call$2:[function(a,b){var z,y,x
+z=this.a
+y=z.b
+z.b=null
+x=z.c-1
+z.c=x
+if(y!=null)if(x===0||this.b)z.a.w0(a,b)
+else{z.d=a
+z.e=b}else if(x===0&&!this.b)z.a.w0(z.d,z.e)},"call$2",null,4,0,null,398,[],399,[],"call"],
+$isEH:true},
+ff:{
+"^":"Tp:400;a,c,d",
+call$1:[function(a){var z,y,x,w
+z=this.a
+y=z.c-1
+z.c=y
+x=z.b
+if(x!=null){w=this.d
+if(w<0||w>=x.length)return H.e(x,w)
+x[w]=a
+if(y===0){z=z.a.MM
+if(z.Gv!==0)H.vh(new P.lj("Future already completed"))
+z.OH(x)}}else if(y===0&&!this.c)z.a.w0(z.d,z.e)},"call$1",null,2,0,null,23,[],"call"],
+$isEH:true},
Ia:{
"^":"a;"},
Zf:{
"^":"Ia;MM",
oo:[function(a,b){var z=this.MM
if(z.Gv!==0)throw H.b(P.w("Future already completed"))
-z.OH(b)},function(a){return this.oo(a,null)},"tZ","call$1","call$0","gv6",0,2,391,77,23,[]],
+z.OH(b)},function(a){return this.oo(a,null)},"tZ","call$1","call$0","gv6",0,2,401,77,23,[]],
w0:[function(a,b){var z
if(a==null)throw H.b(new P.AT("Error must not be null"))
z=this.MM
if(z.Gv!==0)throw H.b(new P.lj("Future already completed"))
-z.CG(a,b)},function(a){return this.w0(a,null)},"pm","call$2","call$1","gYJ",2,2,390,77,152,[],153,[]]},
+z.CG(a,b)},function(a){return this.w0(a,null)},"pm","call$2","call$1","gYJ",2,2,397,77,155,[],156,[]]},
vs:{
"^":"a;Gv,Lj<,jk,BQ@,OY,As,qV,o4",
gcg:function(){return this.Gv>=4},
@@ -12658,22 +12774,28 @@
z=$.X3
y=H.VM(new P.vs(0,z,null,null,z.cR(a),null,P.VH(b,$.X3),null),[null])
this.au(y)
-return y},function(a){return this.Rx(a,null)},"ml","call$2$onError",null,"grf",2,3,null,77,110,[],156,[]],
+return y},function(a){return this.Rx(a,null)},"ml","call$2$onError",null,"gxY",2,3,null,77,110,[],159,[]],
yd:[function(a,b){var z,y,x
z=$.X3
y=P.VH(a,z)
x=H.VM(new P.vs(0,z,null,null,null,$.X3.cR(b),y,null),[null])
this.au(x)
-return x},function(a){return this.yd(a,null)},"OA","call$2$test",null,"gue",2,3,null,77,156,[],372,[]],
+return x},function(a){return this.yd(a,null)},"OA","call$2$test",null,"gue",2,3,null,77,159,[],379,[]],
+YM:[function(a){var z,y
+z=$.X3
+y=new P.vs(0,z,null,null,null,null,null,z.Al(a))
+y.$builtinTypeInfo=this.$builtinTypeInfo
+this.au(y)
+return y},"call$1","gE1",2,0,null,378,[]],
gDL:function(){return this.jk},
gcG:function(){return this.jk},
Am:[function(a){this.Gv=4
-this.jk=a},"call$1","gAu",2,0,null,23,[]],
+this.jk=a},"call$1","goU",2,0,null,23,[]],
E6:[function(a,b){this.Gv=8
-this.jk=new P.Ca(a,b)},"call$2","gM6",4,0,null,152,[],153,[]],
+this.jk=new P.Ca(a,b)},"call$2","gM6",4,0,null,155,[],156,[]],
au:[function(a){if(this.Gv>=4)this.Lj.wr(new P.da(this,a))
else{a.sBQ(this.jk)
-this.jk=a}},"call$1","gXA",2,0,null,292,[]],
+this.jk=a}},"call$1","gXA",2,0,null,294,[]],
L3:[function(){var z,y,x
z=this.jk
this.jk=null
@@ -12687,7 +12809,7 @@
P.HZ(this,y)},"call$1","gJJ",2,0,null,23,[]],
K5:[function(a,b){var z=this.L3()
this.E6(a,b)
-P.HZ(this,z)},function(a){return this.K5(a,null)},"Lp","call$2","call$1","gbY",2,2,151,77,152,[],153,[]],
+P.HZ(this,z)},function(a){return this.K5(a,null)},"Lp","call$2","call$1","gbY",2,2,154,77,155,[],156,[]],
OH:[function(a){var z,y
z=J.x(a)
y=typeof a==="object"&&a!==null&&!!z.$isb8
@@ -12699,11 +12821,13 @@
this.Lj.wr(new P.rH(this,a))},"call$1","gZV",2,0,null,23,[]],
CG:[function(a,b){if(this.Gv!==0)H.vh(new P.lj("Future already completed"))
this.Gv=1
-this.Lj.wr(new P.ZL(this,a,b))},"call$2","glC",4,0,null,152,[],153,[]],
+this.Lj.wr(new P.ZL(this,a,b))},"call$2","glC",4,0,null,155,[],156,[]],
L7:function(a,b){this.OH(a)},
$isvs:true,
$isb8:true,
-static:{"^":"ewM,JE,C3n,oN1,NK",Dt:function(a){return H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[a])},GZ:[function(a,b){var z
+static:{"^":"ewM,JE,C3n,oN1,NK",Dt:function(a){return H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[a])},Ab:function(a,b){var z=H.VM(new P.vs(0,$.X3,null,null,null,null,null,null),[b])
+z.L7(a,b)
+return z},GZ:[function(a,b){var z
b.swG(!0)
z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isvs)if(a.Gv>=4)P.HZ(a,b)
@@ -12713,7 +12837,7 @@
b.sBQ(null)
P.HZ(a,b)
if(z!=null){b=z
-continue}else break}while(!0)},"call$2","cN",4,0,null,27,[],147,[]],HZ:[function(a,b){var z,y,x,w,v,u,t,s,r,q,p
+continue}else break}while(!0)},"call$2","cN",4,0,null,27,[],150,[]],HZ:[function(a,b){var z,y,x,w,v,u,t,s,r,q,p
z={}
z.e=a
for(y=a;!0;){x={}
@@ -12754,18 +12878,18 @@
v=x.c
b.E6(J.w8(v),v.gI4())}z.e=b
y=b
-b=p}},"call$2","WY",4,0,null,27,[],147,[]]}},
+b=p}},"call$2","WY",4,0,null,27,[],150,[]]}},
da:{
"^":"Tp:108;a,b",
call$0:[function(){P.HZ(this.a,this.b)},"call$0",null,0,0,null,"call"],
$isEH:true},
xw:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.rX(a)},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
dm:{
-"^":"Tp:392;b",
-call$2:[function(a,b){this.b.K5(a,b)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,152,[],153,[],"call"],
+"^":"Tp:402;b",
+call$2:[function(a,b){this.b.K5(a,b)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,155,[],156,[],"call"],
$isEH:true},
rH:{
"^":"Tp:108;a,b",
@@ -12776,7 +12900,7 @@
call$0:[function(){this.a.K5(this.b,this.c)},"call$0",null,0,0,null,"call"],
$isEH:true},
rq:{
-"^":"Tp:366;b,c,d,e",
+"^":"Tp:371;b,c,d,e",
call$0:[function(){var z,y,x,w
try{this.b.c=this.e.FI(this.d.gO1(),this.c.e.gDL())
return!0}catch(x){w=H.Ru(x)
@@ -12844,25 +12968,25 @@
z.a.Rx(new P.jZ(this.c,v),new P.FZ(z,v))}},"call$0",null,0,0,null,"call"],
$isEH:true},
jZ:{
-"^":"Tp:223;c,w3",
-call$1:[function(a){P.HZ(this.c.e,this.w3)},"call$1",null,2,0,null,393,[],"call"],
+"^":"Tp:225;c,w3",
+call$1:[function(a){P.HZ(this.c.e,this.w3)},"call$1",null,2,0,null,403,[],"call"],
$isEH:true},
FZ:{
-"^":"Tp:392;a,HZ",
+"^":"Tp:402;a,HZ",
call$2:[function(a,b){var z,y,x,w
z=this.a
y=z.a
x=J.x(y)
if(typeof y!=="object"||y===null||!x.$isvs){w=P.Dt(null)
z.a=w
-w.E6(a,b)}P.HZ(z.a,this.HZ)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,152,[],153,[],"call"],
+w.E6(a,b)}P.HZ(z.a,this.HZ)},function(a){return this.call$2(a,null)},"call$1","call$2",null,null,2,2,null,77,155,[],156,[],"call"],
$isEH:true},
OM:{
-"^":"a;FR,aw@",
-Ki:function(){return this.FR.call$0()}},
+"^":"a;FR>,aw@",
+Ki:function(a){return this.FR.call$0()}},
qh:{
"^":"a;",
-ez:[function(a,b){return H.VM(new P.t3(b,this),[H.ip(this,"qh",0),null])},"call$1","gIr",2,0,null,394,[]],
+ez:[function(a,b){return H.VM(new P.t3(b,this),[H.ip(this,"qh",0),null])},"call$1","gIr",2,0,null,404,[]],
tg:[function(a,b){var z,y
z={}
y=P.Dt(J.kn)
@@ -12874,13 +12998,13 @@
y=P.Dt(null)
z.a=null
z.a=this.KR(new P.lz(z,this,b,y),!0,new P.M4(y),y.gbY())
-return y},"call$1","gjw",2,0,null,371,[]],
+return y},"call$1","gjw",2,0,null,378,[]],
Vr:[function(a,b){var z,y
z={}
y=P.Dt(J.kn)
z.a=null
z.a=this.KR(new P.Jp(z,this,b,y),!0,new P.eN(y),y.gbY())
-return y},"call$1","gG2",2,0,null,372,[]],
+return y},"call$1","gG2",2,0,null,379,[]],
gB:function(a){var z,y
z={}
y=P.Dt(J.im)
@@ -12936,8 +13060,8 @@
call$0:[function(){return J.de(this.f,this.e)},"call$0",null,0,0,null,"call"],
$isEH:true},
LB:{
-"^":"Tp:367;a,UI",
-call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,395,[],"call"],
+"^":"Tp:372;a,UI",
+call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,405,[],"call"],
$isEH:true},
zn:{
"^":"Tp:108;bK",
@@ -12953,8 +13077,8 @@
call$0:[function(){return this.e.call$1(this.f)},"call$0",null,0,0,null,"call"],
$isEH:true},
Jb:{
-"^":"Tp:223;",
-call$1:[function(a){},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
M4:{
"^":"Tp:108;UI",
@@ -12973,25 +13097,25 @@
call$0:[function(){return this.e.call$1(this.f)},"call$0",null,0,0,null,"call"],
$isEH:true},
pr:{
-"^":"Tp:367;a,UI",
-call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,395,[],"call"],
+"^":"Tp:372;a,UI",
+call$1:[function(a){if(a===!0)P.Bb(this.a.a,this.UI,!0)},"call$1",null,2,0,null,405,[],"call"],
$isEH:true},
eN:{
"^":"Tp:108;bK",
call$0:[function(){this.bK.rX(!1)},"call$0",null,0,0,null,"call"],
$isEH:true},
PI:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
-z.a=z.a+1},"call$1",null,2,0,null,235,[],"call"],
+z.a=z.a+1},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
uO:{
"^":"Tp:108;a,b",
call$0:[function(){this.b.rX(this.a.a)},"call$0",null,0,0,null,"call"],
$isEH:true},
j4:{
-"^":"Tp:223;a,b",
-call$1:[function(a){P.Bb(this.a.a,this.b,!1)},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){P.Bb(this.a.a,this.b,!1)},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
i9:{
"^":"Tp:108;c",
@@ -12999,7 +13123,7 @@
$isEH:true},
VV:{
"^":"Tp;a,b",
-call$1:[function(a){this.b.push(a)},"call$1",null,2,0,null,231,[],"call"],
+call$1:[function(a){this.b.push(a)},"call$1",null,2,0,null,233,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"Lf",args:[a]}},this.a,"qh")}},
Dy:{
@@ -13059,7 +13183,7 @@
z.SJ=w
w.Ae=z.Gv&1
if(z.iE===w)P.ot(z.nL)
-return w},"call$1","gvC",2,0,null,396,[]],
+return w},"call$1","gGE",2,0,null,406,[]],
giO:function(a){return(H.eQ(this.Y8)^892482866)>>>0},
n:[function(a,b){var z
if(b==null)return!1
@@ -13077,18 +13201,18 @@
"^":"a;"},
KA:{
"^":"a;dB,o7<,Bd,Lj<,Gv,lz,Ri",
-fe:[function(a){this.dB=this.Lj.cR(a)},"call$1","gqd",2,0,null,397,[]],
+fe:[function(a){this.dB=this.Lj.cR(a)},"call$1","gqd",2,0,null,407,[]],
fm:[function(a,b){if(b==null)b=P.AY()
this.o7=P.VH(b,this.Lj)},"call$1","geO",2,0,null,29,[]],
y5:[function(a){if(a==null)a=P.v3()
-this.Bd=this.Lj.Al(a)},"call$1","gNS",2,0,null,398,[]],
+this.Bd=this.Lj.Al(a)},"call$1","gNS",2,0,null,408,[]],
nB:[function(a,b){var z,y,x
z=this.Gv
if((z&8)!==0)return
y=(z+128|4)>>>0
this.Gv=y
if(z<128&&this.Ri!=null){x=this.Ri
-if(x.Gv===1)x.Gv=3}if((z&4)===0&&(y&32)===0)this.J7(this.gp4())},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,399,[]],
+if(x.Gv===1)x.Gv=3}if((z&4)===0&&(y&32)===0)this.J7(this.gp4())},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,409,[]],
QE:[function(){var z=this.Gv
if((z&8)!==0)return
if(z>=128){z-=128
@@ -13112,11 +13236,11 @@
Rg:[function(a,b){var z=this.Gv
if((z&8)!==0)return
if(z<32)this.Iv(b)
-else this.w6(H.VM(new P.LV(b,null),[null]))},"call$1","gHR",2,0,null,231,[]],
+else this.w6(H.VM(new P.LV(b,null),[null]))},"call$1","gHR",2,0,null,233,[]],
V8:[function(a,b){var z=this.Gv
if((z&8)!==0)return
if(z<32)this.pb(a,b)
-else this.w6(new P.DS(a,b,null))},"call$2","grd",4,0,null,152,[],153,[]],
+else this.w6(new P.DS(a,b,null))},"call$2","grd",4,0,null,155,[],156,[]],
Qj:[function(){var z=this.Gv
if((z&8)!==0)return
z=(z|2)>>>0
@@ -13133,19 +13257,19 @@
y=this.Gv
if((y&64)===0){y=(y|64)>>>0
this.Gv=y
-if(y<128)this.Ri.t2(this)}},"call$1","gnX",2,0,null,400,[]],
+if(y<128)this.Ri.t2(this)}},"call$1","gnX",2,0,null,410,[]],
Iv:[function(a){var z=this.Gv
this.Gv=(z|32)>>>0
this.Lj.m1(this.dB,a)
this.Gv=(this.Gv&4294967263)>>>0
-this.Kl((z&4)!==0)},"call$1","gm9",2,0,null,231,[]],
+this.Kl((z&4)!==0)},"call$1","gm9",2,0,null,233,[]],
pb:[function(a,b){var z,y
z=this.Gv
y=new P.Vo(this,a,b)
if((z&1)!==0){this.Gv=(z|16)>>>0
this.Ek()
y.call$0()}else{y.call$0()
-this.Kl((z&4)!==0)}},"call$2","gTb",4,0,null,152,[],153,[]],
+this.Kl((z&4)!==0)}},"call$2","gTb",4,0,null,155,[],156,[]],
SY:[function(){this.Ek()
this.Gv=(this.Gv|16)>>>0
new P.qB(this).call$0()},"call$0","gXm",0,0,null],
@@ -13153,7 +13277,7 @@
this.Gv=(z|32)>>>0
a.call$0()
this.Gv=(this.Gv&4294967263)>>>0
-this.Kl((z&4)!==0)},"call$1","gc2",2,0,null,148,[]],
+this.Kl((z&4)!==0)},"call$1","gc2",2,0,null,151,[]],
Kl:[function(a){var z,y,x
z=this.Gv
if((z&64)!==0&&this.Ri.N6==null){z=(z&4294967231)>>>0
@@ -13169,7 +13293,7 @@
if(x)this.uO()
else this.LP()
z=(this.Gv&4294967263)>>>0
-this.Gv=z}if((z&64)!==0&&z<128)this.Ri.t2(this)},"call$1","ghE",2,0,null,401,[]],
+this.Gv=z}if((z&64)!==0&&z<128)this.Ri.t2(this)},"call$1","ghE",2,0,null,411,[]],
$isMO:true,
static:{"^":"ry,bG,Q9,Ir,Il,X8,HX,GC,f9"}},
Vo:{
@@ -13204,34 +13328,34 @@
z.fe(a)
z.fm(0,d)
z.y5(c)
-return z},function(a){return this.KR(a,null,null,null)},"yI",function(a,b,c){return this.KR(a,null,b,c)},"zC","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]],
+return z},function(a){return this.KR(a,null,null,null)},"yI",function(a,b,c){return this.KR(a,null,b,c)},"zC","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]],
w4:[function(a){var z,y
z=$.X3
y=a?1:0
y=new P.KA(null,null,null,z,y,null,null)
y.$builtinTypeInfo=this.$builtinTypeInfo
-return y},"call$1","gvC",2,0,null,396,[]]},
-lx:{
+return y},"call$1","gGE",2,0,null,406,[]]},
+ti:{
"^":"a;aw@"},
LV:{
-"^":"lx;P>,aw",
+"^":"ti;P>,aw",
r6:function(a,b){return this.P.call$1(b)},
-dP:[function(a){a.Iv(this.P)},"call$1","gqp",2,0,null,404,[]]},
+dP:[function(a){a.Iv(this.P)},"call$1","gqp",2,0,null,414,[]]},
DS:{
-"^":"lx;kc>,I4<,aw",
-dP:[function(a){a.pb(this.kc,this.I4)},"call$1","gqp",2,0,null,404,[]]},
+"^":"ti;kc>,I4<,aw",
+dP:[function(a){a.pb(this.kc,this.I4)},"call$1","gqp",2,0,null,414,[]]},
JF:{
"^":"a;",
-dP:[function(a){a.SY()},"call$1","gqp",2,0,null,404,[]],
+dP:[function(a){a.SY()},"call$1","gqp",2,0,null,414,[]],
gaw:function(){return},
saw:function(a){throw H.b(new P.lj("No events after a done."))}},
-Je:{
+ht:{
"^":"a;",
t2:[function(a){var z=this.Gv
if(z===1)return
if(z>=1){this.Gv=1
return}P.rb(new P.CR(this,a))
-this.Gv=1},"call$1","gQu",2,0,null,404,[]]},
+this.Gv=1},"call$1","gQu",2,0,null,414,[]]},
CR:{
"^":"Tp:108;a,b",
call$0:[function(){var z,y
@@ -13242,18 +13366,18 @@
z.TO(this.b)},"call$0",null,0,0,null,"call"],
$isEH:true},
Qk:{
-"^":"Je;zR,N6,Gv",
+"^":"ht;zR,N6,Gv",
gl0:function(a){return this.N6==null},
h:[function(a,b){var z=this.N6
if(z==null){this.N6=b
this.zR=b}else{z.saw(b)
-this.N6=b}},"call$1","ght",2,0,null,400,[]],
+this.N6=b}},"call$1","ght",2,0,null,410,[]],
TO:[function(a){var z,y
z=this.zR
y=z.gaw()
this.zR=y
if(y==null)this.N6=null
-z.dP(a)},"call$1","gTn",2,0,null,404,[]],
+z.dP(a)},"call$1","gTn",2,0,null,414,[]],
V1:[function(a){if(this.Gv===1)this.Gv=3
this.N6=null
this.zR=null},"call$0","gyP",0,0,null]},
@@ -13262,8 +13386,8 @@
call$0:[function(){return this.a.K5(this.b,this.c)},"call$0",null,0,0,null,"call"],
$isEH:true},
uR:{
-"^":"Tp:405;a,b",
-call$2:[function(a,b){return P.NX(this.a,this.b,a,b)},"call$2",null,4,0,null,152,[],153,[],"call"],
+"^":"Tp:415;a,b",
+call$2:[function(a,b){return P.NX(this.a,this.b,a,b)},"call$2",null,4,0,null,155,[],156,[],"call"],
$isEH:true},
Q0:{
"^":"Tp:108;a,b",
@@ -13282,15 +13406,15 @@
v.fe(a)
v.fm(0,d)
v.y5(c)
-return v},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]],
-Ml:[function(a,b){b.Rg(0,a)},"call$2","gOa",4,0,null,231,[],406,[]],
+return v},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]],
+Ml:[function(a,b){b.Rg(0,a)},"call$2","gOa",4,0,null,233,[],416,[]],
$asqh:function(a,b){return[b]}},
fB:{
"^":"KA;UY,Ee,dB,o7,Bd,Lj,Gv,lz,Ri",
Rg:[function(a,b){if((this.Gv&2)!==0)return
-P.KA.prototype.Rg.call(this,this,b)},"call$1","gHR",2,0,null,231,[]],
+P.KA.prototype.Rg.call(this,this,b)},"call$1","gHR",2,0,null,233,[]],
V8:[function(a,b){if((this.Gv&2)!==0)return
-P.KA.prototype.V8.call(this,a,b)},"call$2","grd",4,0,null,152,[],153,[]],
+P.KA.prototype.V8.call(this,a,b)},"call$2","grd",4,0,null,155,[],156,[]],
uO:[function(){var z=this.Ee
if(z==null)return
z.yy(0)},"call$0","gp4",0,0,107],
@@ -13300,8 +13424,8 @@
tA:[function(){var z=this.Ee
if(z!=null){this.Ee=null
z.ed()}return},"call$0","gQC",0,0,null],
-vx:[function(a){this.UY.Ml(a,this)},"call$1","gOa",2,0,function(){return H.IG(function(a,b){return{func:"kA",void:true,args:[a]}},this.$receiver,"fB")},231,[]],
-xL:[function(a,b){this.V8(a,b)},"call$2","gRE",4,0,407,152,[],153,[]],
+vx:[function(a){this.UY.Ml(a,this)},"call$1","gOa",2,0,function(){return H.IG(function(a,b){return{func:"kA",void:true,args:[a]}},this.$receiver,"fB")},233,[]],
+xL:[function(a,b){this.V8(a,b)},"call$2","gRE",4,0,417,155,[],156,[]],
nn:[function(){this.Qj()},"call$0","gH1",0,0,107],
S8:function(a,b,c,d){var z,y
z=this.gOa()
@@ -13318,7 +13442,7 @@
y=v
x=new H.XO(w,null)
b.V8(y,x)
-return}if(z===!0)J.QM(b,a)},"call$2","gOa",4,0,null,408,[],406,[]],
+return}if(z===!0)J.QM(b,a)},"call$2","gOa",4,0,null,418,[],416,[]],
$asYR:function(a){return[a,a]},
$asqh:null},
t3:{
@@ -13330,12 +13454,12 @@
y=v
x=new H.XO(w,null)
b.V8(y,x)
-return}J.QM(b,z)},"call$2","gOa",4,0,null,408,[],406,[]]},
+return}J.QM(b,z)},"call$2","gOa",4,0,null,418,[],416,[]]},
dq:{
"^":"YR;Em,Sb",
Ml:[function(a,b){var z=this.Em
if(z>0){this.Em=z-1
-return}b.Rg(0,a)},"call$2","gOa",4,0,null,408,[],406,[]],
+return}b.Rg(0,a)},"call$2","gOa",4,0,null,418,[],416,[]],
U6:function(a,b,c){},
$asYR:function(a){return[a,a]},
$asqh:null},
@@ -13367,7 +13491,7 @@
c1:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gE2()==null;)z=z.geT(z)
-return y.gE2().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gE2",6,0,null,146,[],152,[],153,[]],
+return y.gE2().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gE2",6,0,null,146,[],155,[],156,[]],
Vn:[function(a,b){var z,y
z=this.oh
for(;y=z.gzU(),y.gcP()==null;)z=z.geT(z)
@@ -13375,7 +13499,7 @@
qG:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gJl()==null;)z=z.geT(z)
-return y.gJl().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gJl",6,0,null,146,[],110,[],165,[]],
+return y.gJl().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gJl",6,0,null,146,[],110,[],168,[]],
nA:[function(a,b,c,d){var z,y
z=this.oh
for(;y=z.gzU(),y.gpU()==null;)z=z.geT(z)
@@ -13400,19 +13524,19 @@
pX:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gZq()==null;)z=z.geT(z)
-return y.gZq().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gZq",6,0,null,146,[],159,[],110,[]],
+return y.gZq().call$5(z,new P.Id(z.geT(z)),a,b,c)},"call$3","gZq",6,0,null,146,[],162,[],110,[]],
RB:[function(a,b,c){var z,y
z=this.oh
for(;y=z.gzU(),y.gJS(y)==null;)z=z.geT(z)
-y.gJS(y).call$4(z,new P.Id(z.geT(z)),b,c)},"call$2","gJS",4,0,null,146,[],173,[]],
+y.gJS(y).call$4(z,new P.Id(z.geT(z)),b,c)},"call$2","gJS",4,0,null,146,[],176,[]],
ld:[function(a,b,c){var z,y,x
z=this.oh
for(;y=z.gzU(),y.giq()==null;)z=z.geT(z)
x=z.geT(z)
-return y.giq().call$5(z,new P.Id(x),a,b,c)},"call$3","giq",6,0,null,146,[],176,[],177,[]]},
+return y.giq().call$5(z,new P.Id(x),a,b,c)},"call$3","giq",6,0,null,146,[],179,[],180,[]]},
WH:{
"^":"a;",
-fC:[function(a){return this.gC5()===a.gC5()},"call$1","gRX",2,0,null,409,[]],
+fC:[function(a){return this.gC5()===a.gC5()},"call$1","gRX",2,0,null,419,[]],
bH:[function(a){var z,y,x,w
try{x=this.Gr(a)
return x}catch(w){x=H.Ru(w)
@@ -13424,7 +13548,7 @@
return x}catch(w){x=H.Ru(w)
z=x
y=new H.XO(w,null)
-return this.hk(z,y)}},"call$2","gNY",4,0,null,110,[],165,[]],
+return this.hk(z,y)}},"call$2","gNY",4,0,null,110,[],168,[]],
z8:[function(a,b,c){var z,y,x,w
try{x=this.mg(a,b,c)
return x}catch(w){x=H.Ru(w)
@@ -13433,13 +13557,13 @@
return this.hk(z,y)}},"call$3","gLG",6,0,null,110,[],54,[],55,[]],
xi:[function(a,b){var z=this.Al(a)
if(b)return new P.TF(this,z)
-else return new P.K5(this,z)},function(a){return this.xi(a,!0)},"ce","call$2$runGuarded",null,"gAX",2,3,null,331,110,[],410,[]],
+else return new P.K5(this,z)},function(a){return this.xi(a,!0)},"ce","call$2$runGuarded",null,"gAX",2,3,null,333,110,[],420,[]],
oj:[function(a,b){var z=this.cR(a)
if(b)return new P.Cg(this,z)
-else return new P.Hs(this,z)},"call$2$runGuarded","gVF",2,3,null,331,110,[],410,[]],
+else return new P.Hs(this,z)},"call$2$runGuarded","gVF",2,3,null,333,110,[],420,[]],
PT:[function(a,b){var z=this.O8(a)
if(b)return new P.dv(this,z)
-else return new P.pV(this,z)},"call$2$runGuarded","gzg",2,3,null,331,110,[],410,[]]},
+else return new P.pV(this,z)},"call$2$runGuarded","gzg",2,3,null,333,110,[],420,[]]},
TF:{
"^":"Tp:108;a,b",
call$0:[function(){return this.a.bH(this.b)},"call$0",null,0,0,null,"call"],
@@ -13449,19 +13573,19 @@
call$0:[function(){return this.c.Gr(this.d)},"call$0",null,0,0,null,"call"],
$isEH:true},
Cg:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return this.a.m1(this.b,a)},"call$1",null,2,0,null,165,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return this.a.m1(this.b,a)},"call$1",null,2,0,null,168,[],"call"],
$isEH:true},
Hs:{
-"^":"Tp:223;c,d",
-call$1:[function(a){return this.c.FI(this.d,a)},"call$1",null,2,0,null,165,[],"call"],
+"^":"Tp:225;c,d",
+call$1:[function(a){return this.c.FI(this.d,a)},"call$1",null,2,0,null,168,[],"call"],
$isEH:true},
dv:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){return this.a.z8(this.b,a,b)},"call$2",null,4,0,null,54,[],55,[],"call"],
$isEH:true},
pV:{
-"^":"Tp:341;c,d",
+"^":"Tp:343;c,d",
call$2:[function(a,b){return this.c.mg(this.d,a,b)},"call$2",null,4,0,null,54,[],55,[],"call"],
$isEH:true},
uo:{
@@ -13472,17 +13596,17 @@
y=z.t(0,b)
if(y!=null||z.x4(b))return y
return this.eT.t(0,b)},"call$1","gIA",2,0,null,42,[]],
-hk:[function(a,b){return new P.Id(this).c1(this,a,b)},"call$2","gE2",4,0,null,152,[],153,[]],
-c6:[function(a,b){return new P.Id(this).ld(this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,[],177,[]],
+hk:[function(a,b){return new P.Id(this).c1(this,a,b)},"call$2","gE2",4,0,null,155,[],156,[]],
+c6:[function(a,b){return new P.Id(this).ld(this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,179,[],180,[]],
Gr:[function(a){return new P.Id(this).Vn(this,a)},"call$1","gcP",2,0,null,110,[]],
-FI:[function(a,b){return new P.Id(this).qG(this,a,b)},"call$2","gJl",4,0,null,110,[],165,[]],
+FI:[function(a,b){return new P.Id(this).qG(this,a,b)},"call$2","gJl",4,0,null,110,[],168,[]],
mg:[function(a,b,c){return new P.Id(this).nA(this,a,b,c)},"call$3","gpU",6,0,null,110,[],54,[],55,[]],
Al:[function(a){return new P.Id(this).TE(this,a)},"call$1","gFh",2,0,null,110,[]],
cR:[function(a){return new P.Id(this).V6(this,a)},"call$1","gXp",2,0,null,110,[]],
O8:[function(a){return new P.Id(this).mz(this,a)},"call$1","gaj",2,0,null,110,[]],
wr:[function(a){new P.Id(this).RK(this,a)},"call$1","grb",2,0,null,110,[]],
-uN:[function(a,b){return new P.Id(this).pX(this,a,b)},"call$2","gZq",4,0,null,159,[],110,[]],
-Ch:[function(a,b){new P.Id(this).RB(0,this,b)},"call$1","gJS",2,0,null,173,[]]},
+uN:[function(a,b){return new P.Id(this).pX(this,a,b)},"call$2","gZq",4,0,null,162,[],110,[]],
+Ch:[function(a,b){new P.Id(this).RB(0,this,b)},"call$1","gJS",2,0,null,176,[]]},
pK:{
"^":"Tp:108;a,b",
call$0:[function(){P.IA(new P.eM(this.a,this.b))},"call$0",null,0,0,null,"call"],
@@ -13499,8 +13623,8 @@
if(y!=null)P.JS("Stack Trace: \n"+H.d(y)+"\n")
throw H.b(z)},"call$0",null,0,0,null,"call"],
$isEH:true},
-Uez:{
-"^":"Tp:378;a",
+Ha:{
+"^":"Tp:385;a",
call$2:[function(a,b){if(a==null)throw H.b(new P.AT("ZoneValue key must not be null"))
this.a.u(0,a,b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
@@ -13534,23 +13658,23 @@
geT:function(a){return},
gzU:function(){return C.v8},
gC5:function(){return this},
-fC:[function(a){return a.gC5()===this},"call$1","gRX",2,0,null,409,[]],
+fC:[function(a){return a.gC5()===this},"call$1","gRX",2,0,null,419,[]],
t:[function(a,b){return},"call$1","gIA",2,0,null,42,[]],
-hk:[function(a,b){return P.L2(this,null,this,a,b)},"call$2","gE2",4,0,null,152,[],153,[]],
-c6:[function(a,b){return P.UA(this,null,this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,176,[],177,[]],
+hk:[function(a,b){return P.L2(this,null,this,a,b)},"call$2","gE2",4,0,null,155,[],156,[]],
+c6:[function(a,b){return P.UA(this,null,this,a,b)},function(a){return this.c6(a,null)},"iT","call$2$specification$zoneValues",null,"giq",0,5,null,77,77,179,[],180,[]],
Gr:[function(a){return P.T8(this,null,this,a)},"call$1","gcP",2,0,null,110,[]],
-FI:[function(a,b){return P.V7(this,null,this,a,b)},"call$2","gJl",4,0,null,110,[],165,[]],
+FI:[function(a,b){return P.V7(this,null,this,a,b)},"call$2","gJl",4,0,null,110,[],168,[]],
mg:[function(a,b,c){return P.Qx(this,null,this,a,b,c)},"call$3","gpU",6,0,null,110,[],54,[],55,[]],
Al:[function(a){return a},"call$1","gFh",2,0,null,110,[]],
cR:[function(a){return a},"call$1","gXp",2,0,null,110,[]],
O8:[function(a){return a},"call$1","gaj",2,0,null,110,[]],
wr:[function(a){P.Tk(this,null,this,a)},"call$1","grb",2,0,null,110,[]],
-uN:[function(a,b){return P.h8(this,null,this,a,b)},"call$2","gZq",4,0,null,159,[],110,[]],
+uN:[function(a,b){return P.h8(this,null,this,a,b)},"call$2","gZq",4,0,null,162,[],110,[]],
Ch:[function(a,b){H.qw(b)
-return},"call$1","gJS",2,0,null,173,[]]}}],["dart.collection","dart:collection",,P,{
+return},"call$1","gJS",2,0,null,176,[]]}}],["dart.collection","dart:collection",,P,{
"^":"",
-Ou:[function(a,b){return J.de(a,b)},"call$2","iv",4,0,179,123,[],180,[]],
-T9:[function(a){return J.v1(a)},"call$1","py",2,0,181,123,[]],
+Ou:[function(a,b){return J.de(a,b)},"call$2","iv",4,0,182,123,[],183,[]],
+T9:[function(a){return J.v1(a)},"call$1","py",2,0,184,123,[]],
Py:function(a,b,c,d,e){var z
if(a==null){z=new P.k6(0,null,null,null,null)
z.$builtinTypeInfo=[d,e]
@@ -13598,7 +13722,7 @@
if(q==null){y+=5
q="..."}}if(q!=null)b.push(q)
b.push(u)
-b.push(v)},"call$2","zE",4,0,null,109,[],182,[]],
+b.push(v)},"call$2","zE",4,0,null,109,[],185,[]],
L5:function(a,b,c,d,e){if(b==null){if(a==null)return H.VM(new P.YB(0,null,null,null,null,null,0),[d,e])
b=P.py()}else{if(P.J2()===b&&P.N3()===a)return H.VM(new P.ey(0,null,null,null,null,null,0),[d,e])
if(a==null)a=P.iv()}return P.Ex(a,b,c,d,e)},
@@ -13613,7 +13737,7 @@
J.kH(a,new P.ZQ(z,y))
y.KF("}")}finally{z=$.tw()
if(0>=z.length)return H.e(z,0)
-z.pop()}return y.gvM()},"call$1","DH",2,0,null,183,[]],
+z.pop()}return y.gvM()},"call$1","DH",2,0,null,186,[]],
k6:{
"^":"a;X5,vv,OX,OB,wV",
gB:function(a){return this.X5},
@@ -13679,7 +13803,7 @@
z=this.Ig()
for(y=z.length,x=0;x<y;++x){w=z[x]
b.call$2(w,this.t(0,w))
-if(z!==this.wV)throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.wV)throw H.b(P.a4(this))}},"call$1","gjw",2,0,null,378,[]],
Ig:[function(){var z,y,x,w,v,u,t,s,r,q,p,o
z=this.wV
if(z!=null)return z
@@ -13700,33 +13824,33 @@
for(o=0;o<p;o+=2){y[u]=q[o];++u}}}this.wV=y
return y},"call$0","gtL",0,0,null],
dg:[function(a,b,c){if(a[b]==null){this.X5=this.X5+1
-this.wV=null}P.cW(a,b,c)},"call$3","gLa",6,0,null,178,[],42,[],23,[]],
+this.wV=null}P.cW(a,b,c)},"call$3","gLa",6,0,null,181,[],42,[],23,[]],
Nv:[function(a,b){var z
if(a!=null&&a[b]!=null){z=P.vL(a,b)
delete a[b]
this.X5=this.X5-1
this.wV=null
-return z}else return},"call$2","got",4,0,null,178,[],42,[]],
+return z}else return},"call$2","got",4,0,null,181,[],42,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,42,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;y+=2)if(J.de(a[y],b))return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
$isZ0:true,
static:{vL:[function(a,b){var z=a[b]
-return z===a?null:z},"call$2","ME",4,0,null,178,[],42,[]],cW:[function(a,b,c){if(c==null)a[b]=a
-else a[b]=c},"call$3","Nk",6,0,null,178,[],42,[],23,[]],a0:[function(){var z=Object.create(null)
+return z===a?null:z},"call$2","ME",4,0,null,181,[],42,[]],cW:[function(a,b,c){if(c==null)a[b]=a
+else a[b]=c},"call$3","Nk",6,0,null,181,[],42,[],23,[]],a0:[function(){var z=Object.create(null)
P.cW(z,"<non-identifier-key>",z)
delete z["<non-identifier-key>"]
return z},"call$0","Vd",0,0,null]}},
oi:{
-"^":"Tp:223;a",
-call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
ce:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
DJ:{
"^":"Tp;a",
@@ -13740,7 +13864,7 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;y+=2){x=a[y]
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,411,[],42,[]]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,421,[],42,[]]},
Fq:{
"^":"k6;m6,Q6,ac,X5,vv,OX,OB,wV",
C2:function(a,b){return this.m6.call$2(a,b)},
@@ -13757,14 +13881,14 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;y+=2)if(this.C2(a[y],b)===!0)return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
static:{MP:function(a,b,c,d,e){var z=new P.jG(d)
return H.VM(new P.Fq(a,b,z,0,null,null,null,null),[d,e])}}},
jG:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,272,[],"call"],
+return z},"call$1",null,2,0,null,274,[],"call"],
$isEH:true},
fG:{
"^":"mW;Fb",
@@ -13840,7 +13964,7 @@
if(this.x4(a))return this.t(0,a)
z=b.call$0()
this.u(0,a,z)
-return z},"call$2","gMs",4,0,null,42,[],413,[]],
+return z},"call$2","gMs",4,0,null,42,[],423,[]],
Rz:[function(a,b){var z,y,x,w
if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -13864,17 +13988,17 @@
y=this.zN
for(;z!=null;){b.call$2(z.gkh(),z.gS4())
if(y!==this.zN)throw H.b(P.a4(this))
-z=z.gDG()}},"call$1","gjw",2,0,null,371,[]],
+z=z.gDG()}},"call$1","gjw",2,0,null,378,[]],
dg:[function(a,b,c){var z=a[b]
if(z==null)a[b]=this.pE(b,c)
-else z.sS4(c)},"call$3","gLa",6,0,null,178,[],42,[],23,[]],
+else z.sS4(c)},"call$3","gLa",6,0,null,181,[],42,[],23,[]],
Nv:[function(a,b){var z
if(a==null)return
z=a[b]
if(z==null)return
this.Vb(z)
delete a[b]
-return z.gS4()},"call$2","got",4,0,null,178,[],42,[]],
+return z.gS4()},"call$2","got",4,0,null,181,[],42,[]],
pE:[function(a,b){var z,y
z=new P.db(a,b,null,null)
if(this.H9==null){this.lX=z
@@ -13892,13 +14016,13 @@
if(y==null)this.lX=z
else y.szQ(z)
this.X5=this.X5-1
-this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,414,[]],
+this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,424,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,42,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(J.de(a[y].gkh(),b))return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
bu:[function(a){return P.vW(this)},"call$0","gXo",0,0,null],
$isFo:true,
$isZ0:true,
@@ -13907,12 +14031,12 @@
delete z["<non-identifier-key>"]
return z},"call$0","Bs",0,0,null]}},
a1:{
-"^":"Tp:223;a",
-call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return this.a.t(0,a)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
ou:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,412,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return J.de(this.a.t(0,a),this.b)},"call$1",null,2,0,null,422,[],"call"],
$isEH:true},
S9:{
"^":"Tp;a",
@@ -13926,7 +14050,7 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;++y){x=a[y].gkh()
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,411,[],42,[]]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,421,[],42,[]]},
xd:{
"^":"YB;m6,Q6,ac,X5,vv,OX,OB,H9,lX,zN",
C2:function(a,b){return this.m6.call$2(a,b)},
@@ -13943,13 +14067,13 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(this.C2(a[y].gkh(),b)===!0)return y
-return-1},"call$2","gSP",4,0,null,411,[],42,[]],
+return-1},"call$2","gSP",4,0,null,421,[],42,[]],
static:{Ex:function(a,b,c,d,e){var z=new P.v6(d)
return H.VM(new P.xd(a,b,z,0,null,null,null,null,null,0),[d,e])}}},
v6:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,272,[],"call"],
+return z},"call$1",null,2,0,null,274,[],"call"],
$isEH:true},
db:{
"^":"a;kh<,S4@,DG@,zQ@"},
@@ -14030,7 +14154,7 @@
this.DM=null
return!0}},"call$1","ght",2,0,null,124,[]],
FV:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,415,[]],
+for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,425,[]],
Rz:[function(a,b){var z,y,x
if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -14071,17 +14195,17 @@
a[b]=0
this.X5=this.X5+1
this.DM=null
-return!0},"call$2","gLa",4,0,null,178,[],124,[]],
+return!0},"call$2","gLa",4,0,null,181,[],124,[]],
Nv:[function(a,b){if(a!=null&&a[b]!=null){delete a[b]
this.X5=this.X5-1
this.DM=null
-return!0}else return!1},"call$2","got",4,0,null,178,[],124,[]],
+return!0}else return!1},"call$2","got",4,0,null,181,[],124,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,124,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(J.de(a[y],b))return y
-return-1},"call$2","gSP",4,0,null,411,[],124,[]],
+return-1},"call$2","gSP",4,0,null,421,[],124,[]],
$isyN:true,
$iscX:true,
$ascX:null},
@@ -14092,7 +14216,7 @@
if(a==null)return-1
z=a.length
for(y=0;y<z;++y){x=a[y]
-if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,411,[],124,[]]},
+if(x==null?b==null:x===b)return y}return-1},"call$2","gSP",4,0,null,421,[],124,[]]},
oz:{
"^":"a;O2,DM,zi,fD",
gl:function(){return this.fD},
@@ -14136,7 +14260,7 @@
y=this.zN
for(;z!=null;){b.call$1(z.gGc())
if(y!==this.zN)throw H.b(P.a4(this))
-z=z.gDG()}},"call$1","gjw",2,0,null,371,[]],
+z=z.gDG()}},"call$1","gjw",2,0,null,378,[]],
grZ:function(a){var z=this.lX
if(z==null)throw H.b(new P.lj("No elements"))
return z.gGc()},
@@ -14162,7 +14286,7 @@
else{if(this.aH(u,b)>=0)return!1
u.push(this.xf(b))}return!0}},"call$1","ght",2,0,null,124,[]],
FV:[function(a,b){var z
-for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,415,[]],
+for(z=J.GP(b);z.G();)this.h(0,z.gl())},"call$1","gDY",2,0,null,425,[]],
Rz:[function(a,b){var z,y,x
if(typeof b==="string"&&b!=="__proto__")return this.Nv(this.vv,b)
else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Nv(this.OX,b)
@@ -14182,14 +14306,14 @@
this.zN=this.zN+1&67108863}},"call$0","gyP",0,0,null],
cA:[function(a,b){if(a[b]!=null)return!1
a[b]=this.xf(b)
-return!0},"call$2","gLa",4,0,null,178,[],124,[]],
+return!0},"call$2","gLa",4,0,null,181,[],124,[]],
Nv:[function(a,b){var z
if(a==null)return!1
z=a[b]
if(z==null)return!1
this.Vb(z)
delete a[b]
-return!0},"call$2","got",4,0,null,178,[],124,[]],
+return!0},"call$2","got",4,0,null,181,[],124,[]],
xf:[function(a){var z,y
z=new P.ef(a,null,null)
if(this.H9==null){this.lX=z
@@ -14207,13 +14331,13 @@
if(y==null)this.lX=z
else y.szQ(z)
this.X5=this.X5-1
-this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,414,[]],
+this.zN=this.zN+1&67108863},"call$1","glZ",2,0,null,424,[]],
nm:[function(a){return J.v1(a)&0x3ffffff},"call$1","gtU",2,0,null,124,[]],
aH:[function(a,b){var z,y
if(a==null)return-1
z=a.length
for(y=0;y<z;++y)if(J.de(a[y].gGc(),b))return y
-return-1},"call$2","gSP",4,0,null,411,[],124,[]],
+return-1},"call$2","gSP",4,0,null,421,[],124,[]],
$isyN:true,
$iscX:true,
$ascX:null},
@@ -14242,7 +14366,7 @@
z=H.VM(y,[H.Kp(this,0)])}for(y=this.gA(this),x=0;y.G();x=v){w=y.gl()
v=x+1
if(x>=z.length)return H.e(z,x)
-z[x]=w}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+z[x]=w}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
bu:[function(a){return H.mx(this,"{","}")},"call$0","gXo",0,0,null],
$isyN:true,
$iscX:true,
@@ -14265,18 +14389,18 @@
else{y.KF(H.d(z.gl()))
for(;z.G();){y.vM=y.vM+b
x=H.d(z.gl())
-y.vM=y.vM+x}}return y.vM},"call$1","gnr",0,2,null,328,329,[]],
+y.vM=y.vM+x}}return y.vM},"call$1","gnr",0,2,null,330,331,[]],
Vr:[function(a,b){var z
for(z=this.gA(this);z.G();)if(b.call$1(z.gl())===!0)return!0
return!1},"call$1","gG2",2,0,null,110,[]],
-tt:[function(a,b){return P.F(this,b,H.ip(this,"mW",0))},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+tt:[function(a,b){return P.F(this,b,H.ip(this,"mW",0))},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
gB:function(a){var z,y
z=this.gA(this)
for(y=0;z.G();)++y
return y},
gl0:function(a){return!this.gA(this).G()},
gor:function(a){return this.gl0(this)!==!0},
-eR:[function(a,b){return H.ke(this,b,H.ip(this,"mW",0))},"call$1","gZo",2,0,null,287,[]],
+eR:[function(a,b){return H.ke(this,b,H.ip(this,"mW",0))},"call$1","gZo",2,0,null,289,[]],
grZ:function(a){var z,y
z=this.gA(this)
if(!z.G())throw H.b(new P.lj("No elements"))
@@ -14285,7 +14409,7 @@
return y},
qA:[function(a,b,c){var z,y
for(z=this.gA(this);z.G();){y=z.gl()
-if(b.call$1(y)===!0)return y}throw H.b(new P.lj("No matching element"))},function(a,b){return this.qA(a,b,null)},"XG","call$2$orElse",null,"gyo",2,3,null,77,372,[],416,[]],
+if(b.call$1(y)===!0)return y}throw H.b(new P.lj("No matching element"))},function(a,b){return this.qA(a,b,null)},"XG","call$2$orElse",null,"gyo",2,3,null,77,379,[],426,[]],
Zv:[function(a,b){var z,y,x,w
if(typeof b!=="number"||Math.floor(b)!==b||b<0)throw H.b(P.N(b))
for(z=this.gA(this),y=b;z.G();){x=z.gl()
@@ -14311,7 +14435,7 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){b.call$1(this.t(a,y))
-if(z!==this.gB(a))throw H.b(P.a4(a))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.gB(a))throw H.b(P.a4(a))}},"call$1","gjw",2,0,null,378,[]],
gl0:function(a){return J.de(this.gB(a),0)},
gor:function(a){return!this.gl0(a)},
grZ:function(a){if(J.de(this.gB(a),0))throw H.b(new P.lj("No elements"))
@@ -14330,13 +14454,13 @@
if(typeof z!=="number")return H.s(z)
y=0
for(;y<z;++y){if(b.call$1(this.t(a,y))===!0)return!0
-if(z!==this.gB(a))throw H.b(P.a4(a))}return!1},"call$1","gG2",2,0,null,372,[]],
+if(z!==this.gB(a))throw H.b(P.a4(a))}return!1},"call$1","gG2",2,0,null,379,[]],
zV:[function(a,b){var z
if(J.de(this.gB(a),0))return""
z=P.p9("")
z.We(a,b)
-return z.vM},"call$1","gnr",0,2,null,328,329,[]],
-ev:[function(a,b){return H.VM(new H.U5(a,b),[H.ip(a,"lD",0)])},"call$1","gIR",2,0,null,372,[]],
+return z.vM},"call$1","gnr",0,2,null,330,331,[]],
+ev:[function(a,b){return H.VM(new H.U5(a,b),[H.ip(a,"lD",0)])},"call$1","gIR",2,0,null,379,[]],
ez:[function(a,b){return H.VM(new H.A8(a,b),[null,null])},"call$1","gIr",2,0,null,110,[]],
eR:[function(a,b){return H.j5(a,b,null,null)},"call$1","gZo",2,0,null,122,[]],
tt:[function(a,b){var z,y,x
@@ -14351,7 +14475,7 @@
if(!(x<y))break
y=this.t(a,x)
if(x>=z.length)return H.e(z,x)
-z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+z[x]=y;++x}return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
h:[function(a,b){var z=this.gB(a)
this.sB(a,J.WB(z,1))
this.u(a,z,b)},"call$1","ght",2,0,null,124,[]],
@@ -14403,7 +14527,7 @@
if(typeof x!=="number")return H.s(x)
if(e+y>x)throw H.b(new P.lj("Not enough elements"))
if(e<b)for(w=y-1;w>=0;--w)this.u(a,b+w,z.t(d,e+w))
-else for(w=0;w<y;++w)this.u(a,b+w,z.t(d,e+w))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+else for(w=0;w<y;++w)this.u(a,b+w,z.t(d,e+w))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
XU:[function(a,b,c){var z,y
z=this.gB(a)
if(typeof z!=="number")return H.s(z)
@@ -14412,7 +14536,7 @@
while(!0){z=this.gB(a)
if(typeof z!=="number")return H.s(z)
if(!(y<z))break
-if(J.de(this.t(a,y),b))return y;++y}return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,124,[],80,[]],
+if(J.de(this.t(a,y),b))return y;++y}return-1},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,124,[],80,[]],
Pk:[function(a,b,c){var z,y
c=J.xH(this.gB(a),1)
for(z=c;y=J.Wx(z),y.F(z,0);z=y.W(z,1))if(J.de(this.t(a,z),b))return z
@@ -14443,14 +14567,14 @@
$iscX:true,
$ascX:null},
ZQ:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z=this.a
if(!z.a)this.b.KF(", ")
z.a=!1
z=this.b
z.KF(a)
z.KF(": ")
-z.KF(b)},"call$2",null,4,0,null,417,[],272,[],"call"],
+z.KF(b)},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true},
Sw:{
"^":"mW;v5,av,eZ,qT",
@@ -14462,7 +14586,7 @@
for(y=this.av;y!==this.eZ;y=(y+1&this.v5.length-1)>>>0){x=this.v5
if(y<0||y>=x.length)return H.e(x,y)
b.call$1(x[y])
-if(z!==this.qT)H.vh(P.a4(this))}},"call$1","gjw",2,0,null,371,[]],
+if(z!==this.qT)H.vh(P.a4(this))}},"call$1","gjw",2,0,null,378,[]],
gl0:function(a){return this.av===this.eZ},
gB:function(a){return J.mQ(J.xH(this.eZ,this.av),this.v5.length-1)},
grZ:function(a){var z,y
@@ -14488,7 +14612,7 @@
C.Nm.sB(z,this.gB(this))}else{y=Array(this.gB(this))
y.fixed$length=init
z=H.VM(y,[H.Kp(this,0)])}this.e4(z)
-return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+return z},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
h:[function(a,b){this.NZ(0,b)},"call$1","ght",2,0,null,124,[]],
FV:[function(a,b){var z,y,x,w,v,u,t,s,r
z=J.x(b)
@@ -14515,7 +14639,7 @@
H.Og(w,z,z+s,b,0)
z=this.v5
H.Og(z,0,r,b,s)
-this.eZ=r}}this.qT=this.qT+1}else for(z=z.gA(b);z.G();)this.NZ(0,z.gl())},"call$1","gDY",2,0,null,418,[]],
+this.eZ=r}}this.qT=this.qT+1}else for(z=z.gA(b);z.G();)this.NZ(0,z.gl())},"call$1","gDY",2,0,null,428,[]],
Rz:[function(a,b){var z,y
for(z=this.av;z!==this.eZ;z=(z+1&this.v5.length-1)>>>0){y=this.v5
if(z<0||z>=y.length)return H.e(y,z)
@@ -14556,7 +14680,7 @@
if(v<0||v>=w)return H.e(x,v)
x[v]=t}if(y>=w)return H.e(x,y)
x[y]=null
-return a}},"call$1","gzv",2,0,null,419,[]],
+return a}},"call$1","gzv",2,0,null,429,[]],
VW:[function(){var z,y,x,w
z=Array(this.v5.length*2)
z.fixed$length=init
@@ -14601,7 +14725,7 @@
if(typeof a!=="number")return a.O()
a=(a<<2>>>0)-1
for(;!0;a=z){z=(a&a-1)>>>0
-if(z===0)return a}},"call$1","W5",2,0,null,184,[]]}},
+if(z===0)return a}},"call$1","W5",2,0,null,187,[]]}},
o0:{
"^":"a;Lz,pP,qT,Dc,fD",
gl:function(){return this.fD},
@@ -14662,7 +14786,7 @@
return v},"call$1","gST",2,0,null,42,[]],
Xu:[function(a){var z,y
for(z=a;y=z.T8,y!=null;z=y){z.T8=y.Bb
-y.Bb=z}return z},"call$1","gOv",2,0,null,259,[]],
+y.Bb=z}return z},"call$1","gOv",2,0,null,261,[]],
bB:[function(a){var z,y,x
if(this.aY==null)return
if(!J.de(this.vh(a),0))return
@@ -14685,12 +14809,12 @@
a.T8=y.T8
y.T8=null}else{a.T8=y
a.Bb=y.Bb
-y.Bb=null}this.aY=a},"call$2","gSx",4,0,null,259,[],420,[]]},
+y.Bb=null}this.aY=a},"call$2","gSx",4,0,null,261,[],430,[]]},
Ba:{
"^":"vX;Cw,ac,aY,iW,P6,qT,bb",
wS:function(a,b){return this.Cw.call$2(a,b)},
Ef:function(a){return this.ac.call$1(a)},
-yV:[function(a,b){return this.wS(a,b)},"call$2","gNA",4,0,null,421,[],422,[]],
+yV:[function(a,b){return this.wS(a,b)},"call$2","gNA",4,0,null,431,[],432,[]],
t:[function(a,b){if(b==null)throw H.b(new P.AT(b))
if(this.Ef(b)!==!0)return
if(this.aY!=null)if(J.de(this.vh(b),0))return this.aY.P
@@ -14735,9 +14859,9 @@
y=new P.An(c)
return H.VM(new P.Ba(z,y,null,H.VM(new P.qv(null,null,null),[c]),0,0,0),[c,d])}}},
An:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=H.Gq(a,this.a)
-return z},"call$1",null,2,0,null,272,[],"call"],
+return z},"call$1",null,2,0,null,274,[],"call"],
$isEH:true},
bF:{
"^":"Tp;a",
@@ -14745,13 +14869,13 @@
$isEH:true,
$signature:function(){return H.IG(function(a,b){return{func:"ri",args:[a,b]}},this.a,"Ba")}},
LD:{
-"^":"Tp:423;a,b,c",
+"^":"Tp:433;a,b,c",
call$1:[function(a){var z,y,x,w
for(z=this.c,y=this.a,x=this.b;a!=null;){if(J.de(a.P,x))return!0
if(z!==y.bb)throw H.b(P.a4(y))
w=a.T8
if(w!=null&&this.call$1(w)===!0)return!0
-a=a.Bb}return!1},"call$1",null,2,0,null,259,[],"call"],
+a=a.Bb}return!1},"call$1",null,2,0,null,261,[],"call"],
$isEH:true},
S6B:{
"^":"a;",
@@ -14760,7 +14884,7 @@
return this.Wb(z)},
WV:[function(a){var z
for(z=this.Ln;a!=null;){z.push(a)
-a=a.Bb}},"call$1","gBl",2,0,null,259,[]],
+a=a.Bb}},"call$1","gBl",2,0,null,261,[]],
G:[function(){var z,y,x
z=this.Dn
if(this.qT!==z.qT)throw H.b(P.a4(z))
@@ -14802,32 +14926,32 @@
$isyN:true},
DN:{
"^":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a.G3},"call$1","gBL",2,0,null,259,[]]},
+Wb:[function(a){return a.G3},"call$1","gBL",2,0,null,261,[]]},
ZM:{
"^":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a.P},"call$1","gBL",2,0,null,259,[]],
+Wb:[function(a){return a.P},"call$1","gBL",2,0,null,261,[]],
$asS6B:function(a,b){return[b]}},
HW:{
"^":"S6B;Dn,Ln,qT,bb,ya",
-Wb:[function(a){return a},"call$1","gBL",2,0,null,259,[]],
+Wb:[function(a){return a},"call$1","gBL",2,0,null,261,[]],
$asS6B:function(a){return[[P.qv,a]]}}}],["dart.convert","dart:convert",,P,{
"^":"",
VQ:[function(a,b){var z=new P.JC()
-return z.call$2(null,new P.f1(z).call$1(a))},"call$2","os",4,0,null,185,[],186,[]],
+return z.call$2(null,new P.f1(z).call$1(a))},"call$2","os",4,0,null,188,[],189,[]],
BS:[function(a,b){var z,y,x,w
x=a
if(typeof x!=="string")throw H.b(new P.AT(a))
z=null
try{z=JSON.parse(a)}catch(w){x=H.Ru(w)
y=x
-throw H.b(P.cD(String(y)))}return P.VQ(z,b)},"call$2","H44",4,0,null,27,[],186,[]],
-tp:[function(a){return a.Lt()},"call$1","BC",2,0,187,6,[]],
+throw H.b(P.cD(String(y)))}return P.VQ(z,b)},"call$2","H44",4,0,null,27,[],189,[]],
+tp:[function(a){return a.Lt()},"call$1","BC",2,0,190,6,[]],
JC:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){return b},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
f1:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y,x,w,v,u,t
if(a==null||typeof a!="object")return a
if(Object.getPrototypeOf(a)===Array.prototype){z=a
@@ -14857,12 +14981,12 @@
static:{TP:function(a){return new P.K8(a,null)}}},
by:{
"^":"Uk;N5,iY",
-pW:[function(a,b){return P.BS(a,this.gHe().N5)},function(a){return this.pW(a,null)},"kV","call$2$reviver",null,"gzL",2,3,null,77,27,[],186,[]],
-PN:[function(a,b){return P.Vg(a,this.gZE().Xi)},function(a){return this.PN(a,null)},"KP","call$2$toEncodable",null,"gV0",2,3,null,77,23,[],188,[]],
+pW:[function(a,b){return P.BS(a,this.gHe().N5)},function(a){return this.pW(a,null)},"kV","call$2$reviver",null,"gzL",2,3,null,77,27,[],189,[]],
+PN:[function(a,b){return P.Vg(a,this.gZE().Xi)},function(a){return this.PN(a,null)},"KP","call$2$toEncodable",null,"gV0",2,3,null,77,23,[],191,[]],
gZE:function(){return C.Ap},
gHe:function(){return C.A3},
$asUk:function(){return[P.a,J.O]}},
-dI:{
+pD:{
"^":"wI;Xi",
$aswI:function(){return[P.a,J.O]}},
Cf:{
@@ -14915,11 +15039,11 @@
w.KF("}")
this.JN.Rz(0,a)
return!0}else return!1}},"call$1","gjQ",2,0,null,6,[]],
-static:{"^":"P3,kD,IE,Yz,No,fg,SW,KQz,MU,ql,NXu,CE,QVv",Vg:[function(a,b){var z
+static:{"^":"P3,Ib,IE,Yz,No,fg,SW,KQz,MU,ql,NXu,CE,QVv",Vg:[function(a,b){var z
b=P.BC()
z=P.p9("")
new P.Sh(b,z,P.yv(null)).rl(a)
-return z.vM},"call$2","ab",4,0,null,6,[],188,[]],NY:[function(a,b){var z,y,x,w,v,u,t
+return z.vM},"call$2","ab",4,0,null,6,[],191,[]],NY:[function(a,b){var z,y,x,w,v,u,t
z=J.U6(b)
y=z.gB(b)
x=H.VM([],[J.im])
@@ -14949,9 +15073,9 @@
x.push(t<10?48+t:87+t)
break}w=!0}else if(u===34||u===92){x.push(92)
x.push(u)
-w=!0}else x.push(u)}a.KF(w?P.HM(x):b)},"call$2","qW",4,0,null,189,[],86,[]]}},
+w=!0}else x.push(u)}a.KF(w?P.HM(x):b)},"call$2","qW",4,0,null,192,[],86,[]]}},
tF:{
-"^":"Tp:424;a,b",
+"^":"Tp:434;a,b",
call$2:[function(a,b){var z,y,x
z=this.a
y=this.b
@@ -15011,7 +15135,7 @@
this.ZP=y+1
if(y>=v)return H.e(z,y)
z[y]=128|a&63
-return!1}},"call$2","gkL",4,0,null,425,[],426,[]],
+return!1}},"call$2","gkL",4,0,null,435,[],436,[]],
fJ:[function(a,b,c){var z,y,x,w,v,u,t,s
if(b!==c&&(J.lE(a,J.xH(c,1))&64512)===55296)c=J.xH(c,1)
if(typeof c!=="number")return H.s(c)
@@ -15044,11 +15168,11 @@
z[s]=128|v>>>6&63
this.ZP=u+1
if(u>=y)return H.e(z,u)
-z[u]=128|v&63}}return w},"call$3","gkH",6,0,null,334,[],115,[],116,[]],
-static:{"^":"n9"}}}],["dart.core","dart:core",,P,{
+z[u]=128|v&63}}return w},"call$3","gkH",6,0,null,336,[],115,[],116,[]],
+static:{"^":"Jf4"}}}],["dart.core","dart:core",,P,{
"^":"",
Te:[function(a){return},"call$1","PM",2,0,null,44,[]],
-Wc:[function(a,b){return J.oE(a,b)},"call$2","n4",4,0,190,123,[],180,[]],
+Wc:[function(a,b){return J.oE(a,b)},"call$2","n4",4,0,193,123,[],183,[]],
hl:[function(a){var z,y,x,w,v,u
if(typeof a==="number"||typeof a==="boolean"||null==a)return J.AG(a)
if(typeof a==="string"){z=new P.Rn("")
@@ -15074,9 +15198,9 @@
z.vM=y
return y}return"Instance of '"+H.lh(a)+"'"},"call$1","Zx",2,0,null,6,[]],
FM:function(a){return new P.HG(a)},
-ad:[function(a,b){return a==null?b==null:a===b},"call$2","N3",4,0,192,123,[],180,[]],
-xv:[function(a){return H.CU(a)},"call$1","J2",2,0,193,6,[]],
-QA:[function(a,b,c){return H.BU(a,c,b)},function(a){return P.QA(a,null,null)},null,function(a,b){return P.QA(a,b,null)},null,"call$3$onError$radix","call$1","call$2$onError","ya",2,5,194,77,77,27,[],156,[],28,[]],
+ad:[function(a,b){return a==null?b==null:a===b},"call$2","N3",4,0,195,123,[],183,[]],
+xv:[function(a){return H.CU(a)},"call$1","J2",2,0,196,6,[]],
+QA:[function(a,b,c){return H.BU(a,c,b)},function(a){return P.QA(a,null,null)},null,function(a,b){return P.QA(a,b,null)},null,"call$3$onError$radix","call$1","call$2$onError","ya",2,5,197,77,77,27,[],159,[],28,[]],
O8:function(a,b,c){var z,y,x
z=J.Qi(a,c)
if(a!==0&&b!=null)for(y=z.length,x=0;x<y;++x)z[x]=b
@@ -15101,11 +15225,11 @@
HM:function(a){return H.eT(a)},
fc:function(a){return P.HM(P.O8(1,a,J.im))},
HB:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){this.a.u(0,a.gfN(a),b)},"call$2",null,4,0,null,129,[],23,[],"call"],
$isEH:true},
CL:{
-"^":"Tp:378;a",
+"^":"Tp:385;a",
call$2:[function(a,b){var z=this.a
if(z.b>0)z.a.KF(", ")
z.a.KF(J.GL(a))
@@ -15120,7 +15244,7 @@
"^":"a;",
bu:[function(a){return this?"true":"false"},"call$0","gXo",0,0,null],
$isbool:true},
-fR:{
+Tx:{
"^":"a;"},
iP:{
"^":"a;y3<,aL",
@@ -15145,11 +15269,11 @@
q=new P.Zl().call$1(z)
if(y)return H.d(w)+"-"+H.d(v)+"-"+H.d(u)+" "+H.d(t)+":"+H.d(s)+":"+H.d(r)+"."+H.d(q)+"Z"
else return H.d(w)+"-"+H.d(v)+"-"+H.d(u)+" "+H.d(t)+":"+H.d(s)+":"+H.d(r)+"."+H.d(q)},"call$0","gXo",0,0,null],
-h:[function(a,b){return P.Wu(this.y3+b.gVs(),this.aL)},"call$1","ght",2,0,null,159,[]],
+h:[function(a,b){return P.Wu(this.y3+b.gVs(),this.aL)},"call$1","ght",2,0,null,162,[]],
EK:function(){H.o2(this)},
RM:function(a,b){if(Math.abs(a)>8640000000000000)throw H.b(new P.AT(a))},
$isiP:true,
-static:{"^":"aV,bI,Hq,Kw,h2,pa,EQe,NXt,tp1,Gi,k3,cR,E0,fH,Ne,Nr,bmS,FI,Kz,J7,dM,lme",Gl:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
+static:{"^":"aV,bI,Hq,Kw,h2,pa,EQe,NXt,tp1,Gi,k3,cR,E03,fH,Ne,r2,bmS,FI,Kz,EF,dM,lme",Gl:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
z=new H.VR(H.v4("^([+-]?\\d?\\d\\d\\d\\d)-?(\\d\\d)-?(\\d\\d)(?:[ T](\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(.\\d{1,6})?)?)?( ?[zZ]| ?\\+00(?::?00)?)?)?$",!1,!0,!1),null,null).ej(a)
if(z!=null){y=new P.MF()
x=z.QK
@@ -15172,48 +15296,48 @@
if(8>=x.length)return H.e(x,8)
o=x[8]!=null
n=H.zW(w,v,u,t,s,r,q,o)
-return P.Wu(p?n+1:n,o)}else throw H.b(P.cD(a))},"call$1","lel",2,0,null,191,[]],Wu:function(a,b){var z=new P.iP(a,b)
+return P.Wu(p?n+1:n,o)}else throw H.b(P.cD(a))},"call$1","lel",2,0,null,194,[]],Wu:function(a,b){var z=new P.iP(a,b)
z.RM(a,b)
return z}}},
MF:{
-"^":"Tp:428;",
+"^":"Tp:438;",
call$1:[function(a){if(a==null)return 0
-return H.BU(a,null,null)},"call$1",null,2,0,null,427,[],"call"],
+return H.BU(a,null,null)},"call$1",null,2,0,null,437,[],"call"],
$isEH:true},
Rq:{
-"^":"Tp:429;",
+"^":"Tp:439;",
call$1:[function(a){if(a==null)return 0
-return H.IH(a,null)},"call$1",null,2,0,null,427,[],"call"],
+return H.IH(a,null)},"call$1",null,2,0,null,437,[],"call"],
$isEH:true},
Hn:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){var z,y
z=Math.abs(a)
y=a<0?"-":""
if(z>=1000)return""+a
if(z>=100)return y+"0"+H.d(z)
if(z>=10)return y+"00"+H.d(z)
-return y+"000"+H.d(z)},"call$1",null,2,0,null,287,[],"call"],
+return y+"000"+H.d(z)},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
Zl:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=100)return""+a
if(a>=10)return"0"+a
-return"00"+a},"call$1",null,2,0,null,287,[],"call"],
+return"00"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
B5:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=10)return""+a
-return"0"+a},"call$1",null,2,0,null,287,[],"call"],
+return"0"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
a6:{
"^":"a;Fq<",
g:[function(a,b){return P.k5(0,0,this.Fq+b.gFq(),0,0,0)},"call$1","gF1n",2,0,null,104,[]],
W:[function(a,b){return P.k5(0,0,this.Fq-b.gFq(),0,0,0)},"call$1","gTG",2,0,null,104,[]],
U:[function(a,b){if(typeof b!=="number")return H.s(b)
-return P.k5(0,0,C.CD.yu(C.CD.UD(this.Fq*b)),0,0,0)},"call$1","gEH",2,0,null,430,[]],
+return P.k5(0,0,C.CD.yu(C.CD.UD(this.Fq*b)),0,0,0)},"call$1","gEH",2,0,null,440,[]],
Z:[function(a,b){if(b===0)throw H.b(P.zl())
-return P.k5(0,0,C.jn.Z(this.Fq,b),0,0,0)},"call$1","gdG",2,0,null,431,[]],
+return P.k5(0,0,C.jn.Z(this.Fq,b),0,0,0)},"call$1","gdG",2,0,null,441,[]],
C:[function(a,b){return this.Fq<b.gFq()},"call$1","gix",2,0,null,104,[]],
D:[function(a,b){return this.Fq>b.gFq()},"call$1","gh1",2,0,null,104,[]],
E:[function(a,b){return this.Fq<=b.gFq()},"call$1","gf5",2,0,null,104,[]],
@@ -15235,20 +15359,20 @@
v=new P.P7().call$1(C.jn.JV(y,1000000))
return""+C.jn.cU(y,3600000000)+":"+H.d(x)+":"+H.d(w)+"."+H.d(v)},"call$0","gXo",0,0,null],
$isa6:true,
-static:{"^":"Wt,S4d,dk,uU,RD,b2,q9,ll,Do,f4,kTB,IJZ,iI,Vk,Nw,yn",k5:function(a,b,c,d,e,f){return new P.a6(a*86400000000+b*3600000000+e*60000000+f*1000000+d*1000+c)}}},
+static:{"^":"Kl,S4d,dk,uU,RD,b2,q9,ll,Do,f4,kTB,IJZ,iI,Vk,Nw,yn",k5:function(a,b,c,d,e,f){return new P.a6(a*86400000000+b*3600000000+e*60000000+f*1000000+d*1000+c)}}},
P7:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=100000)return""+a
if(a>=10000)return"0"+a
if(a>=1000)return"00"+a
if(a>=100)return"000"+a
if(a>=10)return"0000"+a
-return"00000"+a},"call$1",null,2,0,null,287,[],"call"],
+return"00000"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
DW:{
-"^":"Tp:387;",
+"^":"Tp:394;",
call$1:[function(a){if(a>=10)return""+a
-return"0"+a},"call$1",null,2,0,null,287,[],"call"],
+return"0"+a},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
Ge:{
"^":"a;",
@@ -15343,7 +15467,7 @@
$.Ss=y+1
z="expando$key$"+y
H.aw(this,"expando$key",z)}return z},"call$0","gwT",0,0,null],
-static:{"^":"bZ,rly,Ss"}},
+static:{"^":"Xa,rly,Ss"}},
EH:{
"^":"a;",
$isEH:true},
@@ -15364,7 +15488,7 @@
n:[function(a,b){return this===b},"call$1","gUJ",2,0,null,104,[]],
giO:function(a){return H.eQ(this)},
bu:[function(a){return H.a5(this)},"call$0","gXo",0,0,null],
-T:[function(a,b){throw H.b(P.lr(this,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,326,[]],
+T:[function(a,b){throw H.b(P.lr(this,b.gWa(),b.gnd(),b.gVm(),null))},"call$1","gxK",2,0,null,328,[]],
gbx:function(a){return new H.cu(H.dJ(this),null)},
$isa:true},
Od:{
@@ -15409,7 +15533,7 @@
for(;z.G();){this.vM=this.vM+b
y=z.gl()
y=typeof y==="string"?y:H.d(y)
-this.vM=this.vM+y}}},"call$2","gS9",2,2,null,328,415,[],329,[]],
+this.vM=this.vM+y}}},"call$2","gS9",2,2,null,330,425,[],331,[]],
V1:[function(a){this.vM=""},"call$0","gyP",0,0,null],
bu:[function(a){return this.vM},"call$0","gXo",0,0,null],
PD:function(a){if(typeof a==="string")this.vM=a
@@ -15447,13 +15571,13 @@
if(!J.de(this.gJf(this),"")||J.de(this.Fi,"file")){z=J.U6(y)
z=z.gor(y)&&!z.nC(y,"/")}else z=!1
if(z)return"/"+H.d(y)
-return y},"call$2","gbQ",4,0,null,260,[],432,[]],
+return y},"call$2","gbQ",4,0,null,262,[],442,[]],
Ky:[function(a,b){var z=J.x(a)
if(z.n(a,""))return"/"+H.d(b)
-return z.Nj(a,0,J.WB(z.cn(a,"/"),1))+H.d(b)},"call$2","gAj",4,0,null,433,[],434,[]],
+return z.Nj(a,0,J.WB(z.cn(a,"/"),1))+H.d(b)},"call$2","gAj",4,0,null,443,[],444,[]],
uo:[function(a){var z=J.U6(a)
if(J.z8(z.gB(a),0)&&z.j(a,0)===58)return!0
-return z.u8(a,"/.")!==-1},"call$1","gaO",2,0,null,260,[]],
+return z.u8(a,"/.")!==-1},"call$1","gaO",2,0,null,262,[]],
SK:[function(a){var z,y,x,w,v
if(!this.uo(a))return a
z=[]
@@ -15466,13 +15590,13 @@
z.pop()}x=!0}else if("."===w)x=!0
else{z.push(w)
x=!1}}if(x)z.push("")
-return C.Nm.zV(z,"/")},"call$1","ghK",2,0,null,260,[]],
+return C.Nm.zV(z,"/")},"call$1","ghK",2,0,null,262,[]],
tb:[function(a){var z=this.ku
if(""!==z){a.KF(z)
a.KF("@")}z=this.NN
a.KF(z==null?"null":z)
if(!J.de(this.HC,0)){a.KF(":")
-a.KF(J.AG(this.HC))}},"call$1","gyL",2,0,null,435,[]],
+a.KF(J.AG(this.HC))}},"call$1","gyL",2,0,null,445,[]],
bu:[function(a){var z,y
z=P.p9("")
y=this.Fi
@@ -15497,7 +15621,7 @@
else this.HC=e
this.r0=this.x6(c,d)},
$isiD:true,
-static:{"^":"Um,KU,Bx,iR,ti,My,nR,jJY,d2,Qq,q7,ux,vI,SF,fd,IL,Q5,zk,om,fC,O5,eq,qf,ML,y3,Pk,R1,qs,lL,I9,t2,H5,wb,eK,ws,Sp,jH,Qd,Ai,ne",r6:function(a){var z,y,x,w,v,u,t,s
+static:{"^":"Um,B4,Bx,iR,OO,My,nR,jJY,d2,Qq,q7,ux,zk,SF,fd,IL,Q5,Pa,yt,fC,O5,eq,qf,ML,y3,Pk,R1,qs,lL,I9,t2,H5,wb,eK,ws,Sp,jH,Qd,Ai,ne",r6:function(a){var z,y,x,w,v,u,t,s
z=a.QK
if(1>=z.length)return H.e(z,1)
y=z[1]
@@ -15538,7 +15662,7 @@
if(typeof x!=="number")return H.s(x)
if(!(y<x))break
if(z.j(a,y)===58){P.eg(a)
-return"["+H.d(a)+"]"}++y}return a},"call$1","jC",2,0,null,195,[]],iy:[function(a){var z,y,x,w,v,u,t,s
+return"["+H.d(a)+"]"}++y}return a},"call$1","jC",2,0,null,198,[]],iy:[function(a){var z,y,x,w,v,u,t,s
z=new P.hb()
y=new P.XX()
if(a==null)return""
@@ -15553,7 +15677,7 @@
s=!s}else s=!1
if(s)throw H.b(new P.AT("Illegal scheme: "+H.d(a)))
if(z.call$1(t)!==!0){if(y.call$1(t)===!0);else throw H.b(new P.AT("Illegal scheme: "+H.d(a)))
-v=!1}}return v?a:x.hc(a)},"call$1","oL",2,0,null,196,[]],LE:[function(a,b){var z,y,x
+v=!1}}return v?a:x.hc(a)},"call$1","oL",2,0,null,199,[]],LE:[function(a,b){var z,y,x
z={}
y=a==null
if(y&&!0)return""
@@ -15562,8 +15686,8 @@
x=P.p9("")
z.a=!0
C.jN.aN(b,new P.yZ(z,x))
-return x.vM},"call$2","wF",4,0,null,197,[],198,[]],UJ:[function(a){if(a==null)return""
-return P.Xc(a)},"call$1","p7",2,0,null,199,[]],Xc:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l
+return x.vM},"call$2","wF",4,0,null,200,[],201,[]],UJ:[function(a){if(a==null)return""
+return P.Xc(a)},"call$1","p7",2,0,null,202,[]],Xc:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l
z={}
y=new P.Gs()
x=new P.Tw()
@@ -15610,14 +15734,14 @@
r=n}if(z.a!=null&&z.c!==r)s.call$0()
z=z.a
if(z==null)return a
-return J.AG(z)},"call$1","Sy",2,0,null,200,[]],n7:[function(a){if(a!=null&&!J.de(a,""))return H.BU(a,null,null)
-else return 0},"call$1","dl",2,0,null,201,[]],K6:[function(a,b){if(a!=null)return a
+return J.AG(z)},"call$1","Sy",2,0,null,203,[]],n7:[function(a){if(a!=null&&!J.de(a,""))return H.BU(a,null,null)
+else return 0},"call$1","dl",2,0,null,204,[]],K6:[function(a,b){if(a!=null)return a
if(b!=null)return b
-return""},"call$2","xX",4,0,null,202,[],203,[]],q5:[function(a){var z,y
+return""},"call$2","xX",4,0,null,205,[],206,[]],q5:[function(a){var z,y
z=new P.Mx()
y=a.split(".")
if(y.length!==4)z.call$1("IPv4 address should contain exactly 4 parts")
-return H.VM(new H.A8(y,new P.C9(z)),[null,null]).br(0)},"call$1","cf",2,0,null,195,[]],eg:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o
+return H.VM(new H.A8(y,new P.C9(z)),[null,null]).br(0)},"call$1","cf",2,0,null,198,[]],eg:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o
z=new P.kZ()
y=new P.JT(a,z)
if(J.u6(J.q8(a),2))z.call$1("address is too short")
@@ -15650,7 +15774,7 @@
z.call$1("invalid end of IPv6 address.")}}if(u){if(J.q8(x)>7)z.call$1("an address with a wildcard must have less than 7 parts")}else if(J.q8(x)!==8)z.call$1("an address without a wildcard must contain exactly 8 parts")
s=new H.kV(x,new P.d9(x))
s.$builtinTypeInfo=[null,null]
-return P.F(s,!0,H.ip(s,"mW",0))},"call$1","y9",2,0,null,195,[]],jW:[function(a,b,c,d){var z,y,x,w,v,u,t,s
+return P.F(s,!0,H.ip(s,"mW",0))},"call$1","y9",2,0,null,198,[]],jW:[function(a,b,c,d){var z,y,x,w,v,u,t,s
z=new P.rI()
y=P.p9("")
x=c.gZE().WJ(b)
@@ -15666,29 +15790,29 @@
y.vM=y.vM+u}else{s=P.O8(1,37,J.im)
u=H.eT(s)
y.vM=y.vM+u
-z.call$2(v,y)}}return y.vM},"call$4$encoding$spaceToPlus","jd",4,5,null,204,205,206,[],207,[],208,[],209,[]]}},
+z.call$2(v,y)}}return y.vM},"call$4$encoding$spaceToPlus","jd",4,5,null,207,147,208,[],209,[],210,[],211,[]]}},
hb:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(a<128){z=a>>>4
if(z>=8)return H.e(C.HE,z)
z=(C.HE[z]&C.jn.W4(1,a&15))!==0}else z=!1
-return z},"call$1",null,2,0,null,436,[],"call"],
+return z},"call$1",null,2,0,null,446,[],"call"],
$isEH:true},
XX:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(a<128){z=a>>>4
if(z>=8)return H.e(C.mK,z)
z=(C.mK[z]&C.jn.W4(1,a&15))!==0}else z=!1
-return z},"call$1",null,2,0,null,436,[],"call"],
+return z},"call$1",null,2,0,null,446,[],"call"],
$isEH:true},
Kd:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return P.jW(C.Wd,a,C.xM,!1)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
yZ:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z=this.a
if(!z.a)this.b.KF("&")
z.a=!1
@@ -15699,26 +15823,26 @@
z.KF(P.jW(C.kg,b,C.xM,!0))},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
Gs:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(!(48<=a&&a<=57))z=65<=a&&a<=70
else z=!0
-return z},"call$1",null,2,0,null,438,[],"call"],
+return z},"call$1",null,2,0,null,448,[],"call"],
$isEH:true},
pm:{
-"^":"Tp:437;",
-call$1:[function(a){return 97<=a&&a<=102},"call$1",null,2,0,null,438,[],"call"],
+"^":"Tp:447;",
+call$1:[function(a){return 97<=a&&a<=102},"call$1",null,2,0,null,448,[],"call"],
$isEH:true},
Tw:{
-"^":"Tp:437;",
+"^":"Tp:447;",
call$1:[function(a){var z
if(a<128){z=C.jn.GG(a,4)
if(z>=8)return H.e(C.kg,z)
z=(C.kg[z]&C.jn.W4(1,a&15))!==0}else z=!1
-return z},"call$1",null,2,0,null,436,[],"call"],
+return z},"call$1",null,2,0,null,446,[],"call"],
$isEH:true},
wm:{
-"^":"Tp:439;b,c,d",
+"^":"Tp:449;b,c,d",
call$1:[function(a){var z,y
z=this.b
y=J.lE(z,a)
@@ -15727,7 +15851,7 @@
else return y},"call$1",null,2,0,null,47,[],"call"],
$isEH:true},
FB:{
-"^":"Tp:439;e",
+"^":"Tp:449;e",
call$1:[function(a){var z,y,x,w,v
for(z=this.e,y=J.rY(z),x=0,w=0;w<2;++w){v=y.j(z,a+w)
if(48<=v&&v<=57)x=x*16+v-48
@@ -15747,29 +15871,29 @@
else y.KF(J.Nj(w,x,v))},"call$0",null,0,0,null,"call"],
$isEH:true},
XZ:{
-"^":"Tp:441;",
+"^":"Tp:451;",
call$2:[function(a,b){var z=J.v1(a)
if(typeof z!=="number")return H.s(z)
-return b*31+z&1073741823},"call$2",null,4,0,null,440,[],240,[],"call"],
+return b*31+z&1073741823},"call$2",null,4,0,null,450,[],242,[],"call"],
$isEH:true},
Mx:{
-"^":"Tp:174;",
+"^":"Tp:177;",
call$1:[function(a){throw H.b(P.cD("Illegal IPv4 address, "+a))},"call$1",null,2,0,null,19,[],"call"],
$isEH:true},
C9:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y
z=H.BU(a,null,null)
y=J.Wx(z)
if(y.C(z,0)||y.D(z,255))this.a.call$1("each part must be in the range of `0..255`")
-return z},"call$1",null,2,0,null,442,[],"call"],
+return z},"call$1",null,2,0,null,452,[],"call"],
$isEH:true},
kZ:{
-"^":"Tp:174;",
+"^":"Tp:177;",
call$1:[function(a){throw H.b(P.cD("Illegal IPv6 address, "+a))},"call$1",null,2,0,null,19,[],"call"],
$isEH:true},
JT:{
-"^":"Tp:443;a,b",
+"^":"Tp:453;a,b",
call$2:[function(a,b){var z,y
if(J.z8(J.xH(b,a),4))this.b.call$1("an IPv6 part can only contain a maximum of 4 hex digits")
z=H.BU(J.Nj(this.a,a,b),16,null)
@@ -15778,23 +15902,23 @@
return z},"call$2",null,4,0,null,115,[],116,[],"call"],
$isEH:true},
d9:{
-"^":"Tp:223;c",
+"^":"Tp:225;c",
call$1:[function(a){var z=J.x(a)
if(z.n(a,-1))return P.O8((9-this.c.length)*2,0,null)
else return[z.m(a,8)&255,z.i(a,255)]},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
rI:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){var z=J.Wx(a)
b.KF(P.fc(C.xB.j("0123456789ABCDEF",z.m(a,4))))
-b.KF(P.fc(C.xB.j("0123456789ABCDEF",z.i(a,15))))},"call$2",null,4,0,null,444,[],445,[],"call"],
+b.KF(P.fc(C.xB.j("0123456789ABCDEF",z.i(a,15))))},"call$2",null,4,0,null,454,[],455,[],"call"],
$isEH:true}}],["dart.dom.html","dart:html",,W,{
"^":"",
UE:[function(a){if(P.F7()===!0)return"webkitTransitionEnd"
else if(P.dg()===!0)return"oTransitionEnd"
-return"transitionend"},"call$1","pq",2,0,210,18,[]],
-r3:[function(a,b){return document.createElement(a)},"call$2","Oe",4,0,null,94,[],211,[]],
-It:[function(a,b,c){return W.lt(a,null,null,b,null,null,null,c).ml(new W.Kx())},"call$3$onProgress$withCredentials","xF",2,5,null,77,77,212,[],213,[],214,[]],
+return"transitionend"},"call$1","pq",2,0,212,18,[]],
+r3:[function(a,b){return document.createElement(a)},"call$2","Oe",4,0,null,94,[],213,[]],
+It:[function(a,b,c){return W.lt(a,null,null,b,null,null,null,c).ml(new W.Kx())},"call$3$onProgress$withCredentials","xF",2,5,null,77,77,214,[],215,[],216,[]],
lt:[function(a,b,c,d,e,f,g,h){var z,y,x
z=W.zU
y=H.VM(new P.Zf(P.Dt(z)),[z])
@@ -15805,7 +15929,7 @@
z=C.MD.aM(x)
H.VM(new W.Ov(0,z.uv,z.Ph,W.aF(y.gYJ()),z.Sg),[H.Kp(z,0)]).Zz()
x.send()
-return y.MM},"call$8$method$mimeType$onProgress$requestHeaders$responseType$sendData$withCredentials","Za",2,15,null,77,77,77,77,77,77,77,212,[],215,[],216,[],213,[],217,[],218,[],219,[],214,[]],
+return y.MM},"call$8$method$mimeType$onProgress$requestHeaders$responseType$sendData$withCredentials","Za",2,15,null,77,77,77,77,77,77,77,214,[],217,[],218,[],215,[],219,[],220,[],221,[],216,[]],
ED:function(a){var z,y
z=document.createElement("input",null)
if(a!=null)try{J.Lp(z,a)}catch(y){H.Ru(y)}return z},
@@ -15813,9 +15937,9 @@
try{z=a
y=J.x(z)
return typeof z==="object"&&z!==null&&!!y.$iscS}catch(x){H.Ru(x)
-return!1}},"call$1","iJ",2,0,null,220,[]],
+return!1}},"call$1","iJ",2,0,null,222,[]],
Pv:[function(a){if(a==null)return
-return W.P1(a)},"call$1","Ie",2,0,null,221,[]],
+return W.P1(a)},"call$1","Ie",2,0,null,223,[]],
qc:[function(a){var z,y
if(a==null)return
if("setInterval" in a){z=W.P1(a)
@@ -15823,10 +15947,10 @@
if(typeof z==="object"&&z!==null&&!!y.$isD0)return z
return}else return a},"call$1","Wq",2,0,null,18,[]],
qr:[function(a){return a},"call$1","Ku",2,0,null,18,[]],
-YT:[function(a,b){return new W.vZ(a,b)},"call$2","AD",4,0,null,222,[],7,[]],
-GO:[function(a){return J.TD(a)},"call$1","V5",2,0,223,41,[]],
-Yb:[function(a){return J.Vq(a)},"call$1","cn",2,0,223,41,[]],
-Qp:[function(a,b,c,d){return J.qd(a,b,c,d)},"call$4","A6",8,0,224,41,[],12,[],225,[],226,[]],
+YT:[function(a,b){return new W.vZ(a,b)},"call$2","AD",4,0,null,224,[],7,[]],
+GO:[function(a){return J.TD(a)},"call$1","V5",2,0,225,41,[]],
+Yb:[function(a){return J.Vq(a)},"call$1","cn",2,0,225,41,[]],
+Qp:[function(a,b,c,d){return J.qd(a,b,c,d)},"call$4","A6",8,0,226,41,[],12,[],227,[],228,[]],
wi:[function(a,b,c,d,e){var z,y,x,w,v,u,t,s,r,q
z=J.Xr(d)
if(z==null)throw H.b(new P.AT(d))
@@ -15865,16 +15989,16 @@
Object.defineProperty(s, init.dispatchPropertyName, {value: r, enumerable: false, writable: true, configurable: true})
q={prototype: s}
if(!v)q.extends=e
-b.registerElement(c,q)},"call$5","uz",10,0,null,89,[],227,[],94,[],11,[],228,[]],
+b.registerElement(c,q)},"call$5","uz",10,0,null,89,[],229,[],94,[],11,[],230,[]],
aF:[function(a){if(J.de($.X3,C.NU))return a
if(a==null)return
-return $.X3.oj(a,!0)},"call$1","Rj",2,0,null,148,[]],
+return $.X3.oj(a,!0)},"call$1","Rj",2,0,null,151,[]],
K2:[function(a){if(J.de($.X3,C.NU))return a
-return $.X3.PT(a,!0)},"call$1","dB",2,0,null,148,[]],
+return $.X3.PT(a,!0)},"call$1","ZJ",2,0,null,151,[]],
qE:{
"^":"cv;",
-"%":"HTMLAppletElement|HTMLBRElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLMarqueeElement|HTMLMenuElement|HTMLModElement|HTMLOptGroupElement|HTMLParagraphElement|HTMLPreElement|HTMLQuoteElement|HTMLShadowElement|HTMLSpanElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableHeaderCellElement|HTMLTitleElement|HTMLUListElement|HTMLUnknownElement;HTMLElement;jpR|GN|ir|LP|uL|Vf|G6|Ds|xI|Tg|pv|Ps|CN|Vfx|vc|Dsd|i6|tuj|Fv|Vct|E9|m8|D13|Gk|GG|WZq|yb|pva|NM|T5|pR|cda|hx|u7|waa|E7|V0|St|V4|vj|LU|V10|T2|PF|qT|V11|Xd|V12|F1|XP|JG|qe|knI|V13|fI|V14|nm|V15|Vu"},
-SV:{
+"%":"HTMLAppletElement|HTMLBRElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLMarqueeElement|HTMLMenuElement|HTMLModElement|HTMLOptGroupElement|HTMLParagraphElement|HTMLPreElement|HTMLQuoteElement|HTMLShadowElement|HTMLSpanElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableHeaderCellElement|HTMLTitleElement|HTMLUListElement|HTMLUnknownElement;HTMLElement;jpR|GN|ir|LP|uL|Vf|G6|Ds|xI|Tg|pv|Ps|CN|Vfx|vc|Dsd|E0|Nr|lw|tuj|Fv|Vct|E9|m8|D13|Gk|AX|WZq|yb|pva|NM|pR|cda|hx|u7|waa|E7|V0|St|V4|vj|LU|V10|T2|PF|F1|V11|aQ|V12|Qa|V13|vI|V14|tz|V15|fl|V16|Zt|V17|wM|V18|lI|XP|JG|T5|knI|V19|fI|V20|nm|V21|Vu"},
+ho:{
"^":"Gv;",
$isList:true,
$asWO:function(){return[W.M5]},
@@ -15911,11 +16035,11 @@
"^":"qE;MB:form=,oc:name%,t5:type%,P:value%",
r6:function(a,b){return a.value.call$1(b)},
"%":"HTMLButtonElement"},
-nx:{
+Zv:{
"^":"KV;Rn:data=,B:length=",
$isGv:true,
"%":"Comment;CharacterData"},
-QQ:{
+QQS:{
"^":"ea;tT:code=",
"%":"CloseEvent"},
di:{
@@ -15934,14 +16058,14 @@
QF:{
"^":"KV;",
JP:[function(a){return a.createDocumentFragment()},"call$0","gf8",0,0,null],
-Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,288,[]],
-ek:[function(a,b,c){return a.importNode(b,c)},"call$2","gPp",2,2,null,77,259,[],289,[]],
+Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,290,[]],
+ek:[function(a,b,c){return a.importNode(b,c)},"call$2","gPp",2,2,null,77,261,[],291,[]],
gi9:function(a){return C.mt.aM(a)},
gVl:function(a){return C.pi.aM(a)},
gLm:function(a){return C.i3.aM(a)},
-Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,290,[]],
-Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,291,[]],
-pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,291,[]],
+Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,292,[]],
+Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,293,[]],
+pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,293,[]],
$isQF:true,
"%":"Document|HTMLDocument|SVGDocument"},
Aj:{
@@ -15954,9 +16078,9 @@
x=J.w1(y)
x.V1(y)
x.FV(y,z)},
-Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,290,[]],
-Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,291,[]],
-pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,291,[]],
+Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,292,[]],
+Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,293,[]],
+pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,293,[]],
$isGv:true,
"%":";DocumentFragment"},
cm:{
@@ -15980,13 +16104,13 @@
y=this.gwd(a)
y.V1(0)
y.FV(0,z)},
-Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,290,[]],
-Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,291,[]],
-pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,291,[]],
+Md:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gnk",2,0,null,292,[]],
+Ja:[function(a,b){return a.querySelector(b)},"call$1","gtP",2,0,null,293,[]],
+pr:[function(a,b){return W.vD(a.querySelectorAll(b),null)},"call$1","gTU",2,0,null,293,[]],
gDD:function(a){return new W.I4(a)},
i4:[function(a){},"call$0","gQd",0,0,null],
xo:[function(a){},"call$0","gbt",0,0,null],
-aC:[function(a,b,c,d){},"call$3","gxR",6,0,null,12,[],225,[],226,[]],
+aC:[function(a,b,c,d){},"call$3","gxR",6,0,null,12,[],227,[],228,[]],
gqn:function(a){return a.localName},
bu:[function(a){return a.localName},"call$0","gXo",0,0,null],
WO:[function(a,b){if(!!a.matches)return a.matches(b)
@@ -15994,11 +16118,11 @@
else if(!!a.mozMatchesSelector)return a.mozMatchesSelector(b)
else if(!!a.msMatchesSelector)return a.msMatchesSelector(b)
else if(!!a.oMatchesSelector)return a.oMatchesSelector(b)
-else throw H.b(P.f("Not supported on this platform"))},"call$1","grM",2,0,null,290,[]],
+else throw H.b(P.f("Not supported on this platform"))},"call$1","grM",2,0,null,292,[]],
bA:[function(a,b){var z=a
do{if(J.RF(z,b))return!0
z=z.parentElement}while(z!=null)
-return!1},"call$1","gMn",2,0,null,290,[]],
+return!1},"call$1","gMn",2,0,null,292,[]],
er:[function(a){return(a.createShadowRoot||a.webkitCreateShadowRoot).call(a)},"call$0","gzd",0,0,null],
gKE:function(a){return a.shadowRoot||a.webkitShadowRoot},
gI:function(a){return new W.DM(a,a)},
@@ -16024,8 +16148,8 @@
D0:{
"^":"Gv;",
gI:function(a){return new W.Jn(a)},
-On:[function(a,b,c,d){return a.addEventListener(b,H.tR(c,1),d)},"call$3","gIV",4,2,null,77,11,[],292,[],293,[]],
-Y9:[function(a,b,c,d){return a.removeEventListener(b,H.tR(c,1),d)},"call$3","gcF",4,2,null,77,11,[],292,[],293,[]],
+On:[function(a,b,c,d){return a.addEventListener(b,H.tR(c,1),d)},"call$3","gIV",4,2,null,77,11,[],294,[],295,[]],
+Y9:[function(a,b,c,d){return a.removeEventListener(b,H.tR(c,1),d)},"call$3","gcF",4,2,null,77,11,[],294,[],295,[]],
$isD0:true,
"%":";EventTarget"},
as:{
@@ -16062,12 +16186,12 @@
$isXj:true,
"%":"HTMLCollection|HTMLFormControlsCollection|HTMLOptionsCollection"},
zU:{
-"^":"pk;iC:responseText=,ys:status=,po:statusText=",
-R3:[function(a,b,c,d,e,f){return a.open(b,c,d,f,e)},function(a,b,c,d){return a.open(b,c,d)},"eo","call$5$async$password$user",null,"gcY",4,7,null,77,77,77,215,[],212,[],294,[],295,[],296,[]],
-wR:[function(a,b){return a.send(b)},"call$1","gX8",0,2,null,77,231,[]],
+"^":"rk;iC:responseText=,ys:status=,po:statusText=",
+R3:[function(a,b,c,d,e,f){return a.open(b,c,d,f,e)},function(a,b,c,d){return a.open(b,c,d)},"eo","call$5$async$password$user",null,"gcY",4,7,null,77,77,77,217,[],214,[],296,[],297,[],298,[]],
+wR:[function(a,b){return a.send(b)},"call$1","gX8",0,2,null,77,233,[]],
$iszU:true,
"%":"XMLHttpRequest"},
-pk:{
+rk:{
"^":"D0;",
"%":";XMLHttpRequestEventTarget"},
tX:{
@@ -16151,7 +16275,7 @@
"%":"MIDIMessageEvent"},
bn:{
"^":"Imr;",
-LV:[function(a,b,c){return a.send(b,c)},function(a,b){return a.send(b)},"wR","call$2",null,"gX8",2,2,null,77,231,[],297,[]],
+LV:[function(a,b,c){return a.send(b,c)},function(a,b){return a.send(b)},"wR","call$2",null,"gX8",2,2,null,77,233,[],299,[]],
"%":"MIDIOutput"},
Imr:{
"^":"D0;jO:id=,oc:name=,t5:type=",
@@ -16159,7 +16283,7 @@
Oq:{
"^":"Mf;",
nH:[function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.initMouseEvent(b,c,d,e,f,g,h,i,j,k,l,m,n,o,W.qr(p))
-return},"call$15","gEx",30,0,null,11,[],298,[],299,[],300,[],301,[],302,[],303,[],304,[],305,[],306,[],307,[],308,[],309,[],310,[],311,[]],
+return},"call$15","gEx",30,0,null,11,[],300,[],301,[],302,[],303,[],304,[],305,[],306,[],307,[],308,[],309,[],310,[],311,[],312,[],313,[]],
$isOq:true,
"%":"DragEvent|MSPointerEvent|MouseEvent|MouseScrollEvent|MouseWheelEvent|PointerEvent|WheelEvent"},
H9:{
@@ -16173,7 +16297,7 @@
y.call$2("subtree",i)
y.call$2("attributeOldValue",d)
y.call$2("characterDataOldValue",g)
-a.observe(b,z)},function(a,b,c,d){return this.jh(a,b,null,null,null,null,null,c,d)},"yN","call$8$attributeFilter$attributeOldValue$attributes$characterData$characterDataOldValue$childList$subtree",null,"gTT",2,15,null,77,77,77,77,77,77,77,74,[],312,[],313,[],314,[],315,[],316,[],317,[],318,[]],
+a.observe(b,z)},function(a,b,c,d){return this.jh(a,b,null,null,null,null,null,c,d)},"yN","call$8$attributeFilter$attributeOldValue$attributes$characterData$characterDataOldValue$childList$subtree",null,"gTT",2,15,null,77,77,77,77,77,77,77,74,[],314,[],315,[],316,[],317,[],318,[],319,[],320,[]],
"%":"MutationObserver|WebKitMutationObserver"},
o4:{
"^":"Gv;jL:oldValue=,N:target=,t5:type=",
@@ -16192,13 +16316,13 @@
if(z!=null)z.removeChild(a)},"call$0","gRI",0,0,null],
Tk:[function(a,b){var z,y
try{z=a.parentNode
-J.ky(z,b,a)}catch(y){H.Ru(y)}return a},"call$1","gdA",2,0,null,319,[]],
+J.ky(z,b,a)}catch(y){H.Ru(y)}return a},"call$1","gdA",2,0,null,321,[]],
bu:[function(a){var z=a.nodeValue
return z==null?J.Gv.prototype.bu.call(this,a):z},"call$0","gXo",0,0,null],
-jx:[function(a,b){return a.appendChild(b)},"call$1","gp3",2,0,null,320,[]],
+jx:[function(a,b){return a.appendChild(b)},"call$1","gp3",2,0,null,322,[]],
tg:[function(a,b){return a.contains(b)},"call$1","gdj",2,0,null,104,[]],
-mK:[function(a,b,c){return a.insertBefore(b,c)},"call$2","gHc",4,0,null,320,[],321,[]],
-dR:[function(a,b,c){return a.replaceChild(b,c)},"call$2","ghn",4,0,null,320,[],322,[]],
+mK:[function(a,b,c){return a.insertBefore(b,c)},"call$2","gHc",4,0,null,322,[],323,[]],
+dR:[function(a,b,c){return a.replaceChild(b,c)},"call$2","ghn",4,0,null,322,[],324,[]],
$isKV:true,
"%":"Entity|Notation;Node"},
yk:{
@@ -16244,7 +16368,7 @@
"^":"Gv;tT:code=,G1:message=",
"%":"PositionError"},
nC:{
-"^":"nx;N:target=",
+"^":"Zv;N:target=",
"%":"ProcessingInstruction"},
KR:{
"^":"qE;P:value%",
@@ -16271,10 +16395,10 @@
"%":"HTMLSelectElement"},
I0:{
"^":"Aj;pQ:applyAuthorStyles=",
-Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,288,[]],
+Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,290,[]],
$isI0:true,
"%":"ShadowRoot"},
-QR:{
+CY:{
"^":"qE;LA:src=,t5:type%",
"%":"HTMLSourceElement"},
zD9:{
@@ -16286,7 +16410,7 @@
bk:{
"^":"ea;G3:key=,zZ:newValue=,jL:oldValue=,O3:url=",
"%":"StorageEvent"},
-fq:{
+Lx:{
"^":"qE;t5:type%",
"%":"HTMLStyleElement"},
Tb:{
@@ -16306,7 +16430,7 @@
$isyY:true,
"%":"HTMLTemplateElement"},
kJ:{
-"^":"nx;",
+"^":"Zv;",
$iskJ:true,
"%":"CDATASection|Text"},
AE:{
@@ -16333,7 +16457,7 @@
if(W.uC(z)===!0)return z
if(null==a._location_wrapper)a._location_wrapper=new W.Dk(z)
return a._location_wrapper},
-oB:[function(a,b){return a.requestAnimationFrame(H.tR(b,1))},"call$1","gfl",2,0,null,148,[]],
+oB:[function(a,b){return a.requestAnimationFrame(H.tR(b,1))},"call$1","gfl",2,0,null,151,[]],
hr:[function(a){if(!!(a.requestAnimationFrame&&a.cancelAnimationFrame))return
(function($this) {
var vendors = ['ms', 'moz', 'webkit', 'o'];
@@ -16354,7 +16478,7 @@
geT:function(a){return W.Pv(a.parent)},
cO:[function(a){return a.close()},"call$0","gJK",0,0,null],
xc:[function(a,b,c,d){a.postMessage(P.bL(b),c)
-return},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],323,[],324,[]],
+return},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],325,[],326,[]],
bu:[function(a){return a.toString()},"call$0","gXo",0,0,null],
gi9:function(a){return C.mt.aM(a)},
gVl:function(a){return C.pi.aM(a)},
@@ -16398,12 +16522,12 @@
"%":"MozNamedAttrMap|NamedNodeMap"},
QZ:{
"^":"a;",
-HH:[function(a){return typeof console!="undefined"?console.count(a):null},"call$1","gOu",2,0,446,165,[]],
-Wt:[function(a,b){return typeof console!="undefined"?console.error(b):null},"call$1","gkc",2,0,446,165,[]],
-To:[function(a){return typeof console!="undefined"?console.info(a):null},"call$1","gqa",2,0,null,165,[]],
-De:[function(a,b){return typeof console!="undefined"?console.profile(b):null},"call$1","gB1",2,0,174,447,[]],
-uj:[function(a){return typeof console!="undefined"?console.time(a):null},"call$1","gFl",2,0,174,447,[]],
-WL:[function(a,b){return typeof console!="undefined"?console.trace(b):null},"call$1","gtN",2,0,446,165,[]],
+HH:[function(a){return typeof console!="undefined"?console.count(a):null},"call$1","gOu",2,0,456,168,[]],
+Wt:[function(a,b){return typeof console!="undefined"?console.error(b):null},"call$1","gkc",2,0,456,168,[]],
+To:[function(a){return typeof console!="undefined"?console.info(a):null},"call$1","gqa",2,0,null,168,[]],
+De:[function(a,b){return typeof console!="undefined"?console.profile(b):null},"call$1","gB1",2,0,177,457,[]],
+uj:[function(a){return typeof console!="undefined"?console.time(a):null},"call$1","gFl",2,0,177,457,[]],
+WL:[function(a,b){return typeof console!="undefined"?console.trace(b):null},"call$1","gtN",2,0,456,168,[]],
static:{"^":"wk"}},
VG:{
"^":"ar;MW,vG",
@@ -16425,7 +16549,7 @@
z=J.x(b)
for(z=J.GP(typeof b==="object"&&b!==null&&!!z.$ise7?P.F(b,!0,null):b),y=this.MW;z.G();)y.appendChild(z.gl())},"call$1","gDY",2,0,null,109,[]],
GT:[function(a,b){throw H.b(P.f("Cannot sort element lists"))},"call$1","gH7",0,2,null,77,128,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.SY(null))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.SY(null))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
Rz:[function(a,b){var z=J.x(b)
if(typeof b==="object"&&b!==null&&!!z.$iscv){z=this.MW
if(b.parentNode===z){z.removeChild(b)
@@ -16476,7 +16600,7 @@
z.nJ(a,b)
return z}}},
B1:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
return typeof a==="object"&&a!==null&&!!z.$iscv},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
@@ -16508,15 +16632,15 @@
$iscX:true,
$ascX:function(){return[W.KV]}},
Kx:{
-"^":"Tp:223;",
-call$1:[function(a){return J.EC(a)},"call$1",null,2,0,null,448,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return J.EC(a)},"call$1",null,2,0,null,458,[],"call"],
$isEH:true},
iO:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.setRequestHeader(a,b)},"call$2",null,4,0,null,449,[],23,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.setRequestHeader(a,b)},"call$2",null,4,0,null,459,[],23,[],"call"],
$isEH:true},
bU:{
-"^":"Tp:223;b,c",
+"^":"Tp:225;b,c",
call$1:[function(a){var z,y,x
z=this.c
y=z.status
@@ -16528,7 +16652,7 @@
y.OH(z)}else x.pm(a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Yg:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){if(b!=null)this.a[a]=b},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
e7:{
@@ -16550,7 +16674,7 @@
x=y.length
if(b===x)z.appendChild(c)
else{if(b<0||b>=x)return H.e(y,b)
-z.insertBefore(c,y[b])}},"call$2","gQG",4,0,null,47,[],259,[]],
+z.insertBefore(c,y[b])}},"call$2","gQG",4,0,null,47,[],261,[]],
KI:[function(a,b){var z,y,x
z=this.NL
y=z.childNodes
@@ -16572,7 +16696,7 @@
z.replaceChild(c,y[b])},"call$2","gj3",4,0,null,47,[],23,[]],
gA:function(a){return C.t5.gA(this.NL.childNodes)},
GT:[function(a,b){throw H.b(P.f("Cannot sort Node list"))},"call$1","gH7",0,2,null,77,128,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on Node list"))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on Node list"))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
gB:function(a){return this.NL.childNodes.length},
sB:function(a,b){throw H.b(P.f("Cannot set length on immutable List."))},
t:[function(a,b){var z=this.NL.childNodes
@@ -16597,7 +16721,7 @@
$iscX:true,
$ascX:function(){return[W.KV]}},
kI:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
return typeof a==="object"&&a!==null&&!!z.$isQl},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
@@ -16642,8 +16766,8 @@
$isZ0:true,
$asZ0:function(){return[J.O,J.O]}},
Zc:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,417,[],272,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.u(0,a,b)},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true},
i7:{
"^":"tJ;MW",
@@ -16656,7 +16780,7 @@
z.removeAttribute(b)
return y},"call$1","gRI",2,0,null,42,[]],
gB:function(a){return this.gvc(this).length},
-FJ:[function(a){return a.namespaceURI==null},"call$1","giG",2,0,null,259,[]]},
+FJ:[function(a){return a.namespaceURI==null},"call$1","giG",2,0,null,261,[]]},
nF:{
"^":"As;QX,Kd",
lF:[function(){var z=P.Ls(null,null,null,J.O)
@@ -16666,7 +16790,7 @@
z=C.Nm.zV(P.F(a,!0,null)," ")
for(y=this.QX,y=H.VM(new H.a7(y,y.length,0,null),[H.Kp(y,0)]);y.G();)J.Pw(y.lo,z)},"call$1","gVH",2,0,null,86,[]],
OS:[function(a){this.Kd.aN(0,new W.vf(a))},"call$1","gFd",2,0,null,110,[]],
-O4:[function(a,b){return this.xz(new W.Iw(a,b))},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],450,[]],
+O4:[function(a,b){return this.xz(new W.Iw(a,b))},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],460,[]],
Rz:[function(a,b){return this.xz(new W.Fc(b))},"call$1","gRI",2,0,null,23,[]],
xz:[function(a){return this.Kd.es(0,!1,new W.hD(a))},"call$1","gVz",2,0,null,110,[]],
yJ:function(a){this.Kd=H.VM(new H.A8(P.F(this.QX,!0,null),new W.FK()),[null,null])},
@@ -16674,28 +16798,28 @@
z.yJ(a)
return z}}},
FK:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new W.I4(a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Si:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return this.a.FV(0,a.lF())},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
vf:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return a.OS(this.a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Iw:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){return a.O4(this.a,this.b)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Fc:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return J.V1(a,this.a)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
hD:{
-"^":"Tp:341;a",
-call$2:[function(a,b){return this.a.call$1(b)===!0||a===!0},"call$2",null,4,0,null,451,[],124,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){return this.a.call$1(b)===!0||a===!0},"call$2",null,4,0,null,461,[],124,[],"call"],
$isEH:true},
I4:{
"^":"As;MW",
@@ -16707,33 +16831,33 @@
J.Pw(this.MW,a.zV(0," "))},"call$1","gVH",2,0,null,86,[]]},
e0:{
"^":"a;Ph",
-zc:[function(a,b){return H.VM(new W.RO(a,this.Ph,b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,205,18,[],293,[]],
-Qm:[function(a,b){return H.VM(new W.eu(a,this.Ph,b),[null])},function(a){return this.Qm(a,!1)},"f0","call$2$useCapture",null,"gAW",2,3,null,205,18,[],293,[]],
-jl:[function(a,b){return H.VM(new W.pu(a,b,this.Ph),[null])},function(a){return this.jl(a,!1)},"vo","call$2$useCapture",null,"gcJ",2,3,null,205,18,[],293,[]]},
+zc:[function(a,b){return H.VM(new W.RO(a,this.Ph,b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,147,18,[],295,[]],
+Qm:[function(a,b){return H.VM(new W.eu(a,this.Ph,b),[null])},function(a){return this.Qm(a,!1)},"f0","call$2$useCapture",null,"gAW",2,3,null,147,18,[],295,[]],
+jl:[function(a,b){return H.VM(new W.pu(a,b,this.Ph),[null])},function(a){return this.jl(a,!1)},"vo","call$2$useCapture",null,"gcJ",2,3,null,147,18,[],295,[]]},
RO:{
"^":"qh;uv,Ph,Sg",
KR:[function(a,b,c,d){var z=new W.Ov(0,this.uv,this.Ph,W.aF(a),this.Sg)
z.$builtinTypeInfo=this.$builtinTypeInfo
z.Zz()
-return z},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]]},
+return z},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]]},
eu:{
"^":"RO;uv,Ph,Sg",
WO:[function(a,b){var z=H.VM(new P.nO(new W.ie(b),this),[H.ip(this,"qh",0)])
-return H.VM(new P.t3(new W.Ea(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,452,[]],
+return H.VM(new P.t3(new W.Ea(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,462,[]],
$isqh:true},
ie:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,400,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
Ea:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){J.og(a,this.b)
return a},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
pu:{
"^":"qh;DI,Sg,Ph",
WO:[function(a,b){var z=H.VM(new P.nO(new W.i2(b),this),[H.ip(this,"qh",0)])
-return H.VM(new P.t3(new W.b0(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,452,[]],
+return H.VM(new P.t3(new W.b0(b),z),[H.ip(z,"qh",0),null])},"call$1","grM",2,0,null,462,[]],
KR:[function(a,b,c,d){var z,y,x,w,v
z=H.VM(new W.qO(null,P.L5(null,null,null,[P.qh,null],[P.MO,null])),[null])
z.KS(null)
@@ -16741,14 +16865,14 @@
v.$builtinTypeInfo=[null]
z.h(0,v)}y=z.aV
y.toString
-return H.VM(new P.Ik(y),[H.Kp(y,0)]).KR(a,b,c,d)},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,402,[],396,[],403,[],156,[]],
+return H.VM(new P.Ik(y),[H.Kp(y,0)]).KR(a,b,c,d)},function(a,b,c){return this.KR(a,null,b,c)},"zC",function(a){return this.KR(a,null,null,null)},"yI","call$4$cancelOnError$onDone$onError",null,null,"gp8",2,7,null,77,77,77,412,[],406,[],413,[],159,[]],
$isqh:true},
i2:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,400,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.NQ(J.l2(a),this.a)},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
b0:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){J.og(a,this.b)
return a},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
@@ -16761,7 +16885,7 @@
return},"call$0","gZS",0,0,null],
nB:[function(a,b){if(this.uv==null)return
this.VP=this.VP+1
-this.Ns()},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,399,[]],
+this.Ns()},function(a){return this.nB(a,null)},"yy","call$1",null,"gAK",0,2,null,77,409,[]],
gRW:function(){return this.VP>0},
QE:[function(){if(this.uv==null||this.VP<=0)return
this.VP=this.VP-1
@@ -16776,9 +16900,9 @@
z=this.eM
if(z.x4(b))return
y=this.aV
-z.u(0,b,b.zC(y.ght(y),new W.RX(this,b),this.aV.gXB()))},"call$1","ght",2,0,null,453,[]],
+z.u(0,b,b.zC(y.ght(y),new W.RX(this,b),this.aV.gXB()))},"call$1","ght",2,0,null,463,[]],
Rz:[function(a,b){var z=this.eM.Rz(0,b)
-if(z!=null)z.ed()},"call$1","gRI",2,0,null,453,[]],
+if(z!=null)z.ed()},"call$1","gRI",2,0,null,463,[]],
cO:[function(a){var z,y
for(z=this.eM,y=z.gUQ(z),y=H.VM(new H.MH(null,J.GP(y.l6),y.T6),[H.Kp(y,0),H.Kp(y,1)]);y.G();)y.lo.ed()
z.V1(0)
@@ -16789,9 +16913,9 @@
call$0:[function(){return this.a.Rz(0,this.b)},"call$0",null,0,0,null,"call"],
$isEH:true},
bO:{
-"^":"a;xY",
-cN:function(a){return this.xY.call$1(a)},
-zc:[function(a,b){return H.VM(new W.RO(a,this.cN(a),b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,205,18,[],293,[]]},
+"^":"a;Vy",
+cN:function(a){return this.Vy.call$1(a)},
+zc:[function(a,b){return H.VM(new W.RO(a,this.cN(a),b),[null])},function(a){return this.zc(a,!1)},"aM","call$2$useCapture",null,"gII",2,3,null,147,18,[],295,[]]},
Gm:{
"^":"a;",
gA:function(a){return H.VM(new W.W9(a,this.gB(a),-1,null),[H.ip(a,"Gm",0)])},
@@ -16799,9 +16923,9 @@
FV:[function(a,b){throw H.b(P.f("Cannot add to immutable List."))},"call$1","gDY",2,0,null,109,[]],
GT:[function(a,b){throw H.b(P.f("Cannot sort immutable List."))},"call$1","gH7",0,2,null,77,128,[]],
xe:[function(a,b,c){throw H.b(P.f("Cannot add to immutable List."))},"call$2","gQG",4,0,null,47,[],124,[]],
-KI:[function(a,b){throw H.b(P.f("Cannot remove from immutable List."))},"call$1","gNM",2,0,null,454,[]],
+KI:[function(a,b){throw H.b(P.f("Cannot remove from immutable List."))},"call$1","gNM",2,0,null,464,[]],
Rz:[function(a,b){throw H.b(P.f("Cannot remove from immutable List."))},"call$1","gRI",2,0,null,6,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on immutable List."))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on immutable List."))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isList:true,
$asWO:null,
$isyN:true,
@@ -16822,11 +16946,11 @@
z[b]=c},"call$2","gj3",4,0,null,47,[],23,[]],
sB:function(a,b){J.wg(this.xa,b)},
GT:[function(a,b){J.LH(this.xa,b)},"call$1","gH7",0,2,null,77,128,[]],
-XU:[function(a,b,c){return J.hf(this.xa,b,c)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,330,124,[],115,[]],
-Pk:[function(a,b,c){return J.ff(this.xa,b,c)},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,124,[],115,[]],
+XU:[function(a,b,c){return J.hf(this.xa,b,c)},function(a,b){return this.XU(a,b,0)},"u8","call$2",null,"gIz",2,2,null,332,124,[],115,[]],
+Pk:[function(a,b,c){return J.pB(this.xa,b,c)},function(a,b){return this.Pk(a,b,null)},"cn","call$2",null,"gph",2,2,null,77,124,[],115,[]],
xe:[function(a,b,c){return J.Nv(this.xa,b,c)},"call$2","gQG",4,0,null,47,[],124,[]],
KI:[function(a,b){return J.tH(this.xa,b)},"call$1","gNM",2,0,null,47,[]],
-YW:[function(a,b,c,d,e){J.VZ(this.xa,b,c,d,e)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]]},
+YW:[function(a,b,c,d,e){J.QQ(this.xa,b,c,d,e)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]]},
Qg:{
"^":"a;je",
G:[function(){return this.je.G()},"call$0","gqy",0,0,null],
@@ -16843,7 +16967,7 @@
return!1},"call$0","gqy",0,0,null],
gl:function(){return this.QZ}},
vZ:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){var z=H.Va(this.b)
Object.defineProperty(a, init.dispatchPropertyName, {value: z, enumerable: false, writable: true, configurable: true})
a.constructor=a.__proto__.constructor
@@ -16853,14 +16977,14 @@
"^":"a;Ui",
geT:function(a){return W.P1(this.Ui.parent)},
cO:[function(a){return this.Ui.close()},"call$0","gJK",0,0,null],
-xc:[function(a,b,c,d){this.Ui.postMessage(b,c)},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],323,[],324,[]],
+xc:[function(a,b,c,d){this.Ui.postMessage(b,c)},function(a,b,c){return this.xc(a,b,c,null)},"X6","call$3",null,"gmF",4,2,null,77,20,[],325,[],326,[]],
gI:function(a){return H.vh(P.SY(null))},
-On:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gIV",4,2,null,77,11,[],292,[],293,[]],
-Y9:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gcF",4,2,null,77,11,[],292,[],293,[]],
+On:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gIV",4,2,null,77,11,[],294,[],295,[]],
+Y9:[function(a,b,c,d){return H.vh(P.SY(null))},"call$3","gcF",4,2,null,77,11,[],294,[],295,[]],
$isD0:true,
$isGv:true,
static:{P1:[function(a){if(a===window)return a
-else return new W.dW(a)},"call$1","lG",2,0,null,229,[]]}},
+else return new W.dW(a)},"call$1","lG",2,0,null,231,[]]}},
Dk:{
"^":"a;WK",
gcC:function(a){return this.WK.hash},
@@ -16879,7 +17003,7 @@
"^":"zp;N:target=,mH:href=",
$isGv:true,
"%":"SVGAElement"},
-ZJ:{
+Ue:{
"^":"Eo;mH:href=",
$isGv:true,
"%":"SVGAltGlyphElement"},
@@ -16907,7 +17031,7 @@
"^":"d5;",
$isGv:true,
"%":"SVGFEBlendElement"},
-lv:{
+bd:{
"^":"d5;t5:type=,UQ:values=",
$isGv:true,
"%":"SVGFEColorMatrixElement"},
@@ -16994,7 +17118,7 @@
"^":"d0;",
$isGv:true,
"%":"SVGLineElement"},
-Jq:{
+uzr:{
"^":"d5;",
$isGv:true,
"%":"SVGMarkerElement"},
@@ -17022,11 +17146,11 @@
"^":"d0;",
$isGv:true,
"%":"SVGRectElement"},
-Ue:{
+nd:{
"^":"d5;t5:type%,mH:href=",
$isGv:true,
"%":"SVGScriptElement"},
-Lx:{
+Lu:{
"^":"d5;t5:type%",
"%":"SVGStyleElement"},
d5:{
@@ -17045,7 +17169,7 @@
"%":"SVGAltGlyphDefElement|SVGAltGlyphItemElement|SVGComponentTransferFunctionElement|SVGDescElement|SVGFEDistantLightElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEMergeNodeElement|SVGFEPointLightElement|SVGFESpotLightElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGGlyphElement|SVGHKernElement|SVGMetadataElement|SVGMissingGlyphElement|SVGStopElement|SVGTitleElement|SVGVKernElement;SVGElement"},
hy:{
"^":"zp;",
-Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,288,[]],
+Kb:[function(a,b){return a.getElementById(b)},"call$1","giu",2,0,null,290,[]],
$ishy:true,
$isGv:true,
"%":"SVGSVGElement"},
@@ -17115,11 +17239,11 @@
$isIU:true,
static:{Jz:function(){return new H.ku((Math.random()*0x100000000>>>0)+(Math.random()*0x100000000>>>0)*4294967296)}}}}],["dart.js","dart:js",,P,{
"^":"",
-xZ:[function(a,b){return function(_call, f, captureThis) {return function() {return _call(f, captureThis, this, Array.prototype.slice.apply(arguments));}}(P.R4, a, b)},"call$2$captureThis","Kc",2,3,null,205,110,[],230,[]],
+xZ:[function(a,b){return function(_call, f, captureThis) {return function() {return _call(f, captureThis, this, Array.prototype.slice.apply(arguments));}}(P.R4, a, b)},"call$2$captureThis","Kc",2,3,null,147,110,[],232,[]],
R4:[function(a,b,c,d){var z
if(b===!0){z=[c]
C.Nm.FV(z,d)
-d=z}return P.wY(H.Ek(a,P.F(J.C0(d,P.Xl()),!0,null),P.Te(null)))},"call$4","qH",8,0,null,148,[],230,[],161,[],82,[]],
+d=z}return P.wY(H.Ek(a,P.F(J.C0(d,P.Xl()),!0,null),P.Te(null)))},"call$4","qH",8,0,null,151,[],232,[],164,[],82,[]],
Dm:[function(a,b,c){var z
if(Object.isExtensible(a))try{Object.defineProperty(a, b, { value: c})
return!0}catch(z){H.Ru(z)}return!1},"call$3","bE",6,0,null,91,[],12,[],23,[]],
@@ -17136,10 +17260,10 @@
if(typeof a==="object"&&a!==null&&!!z.$isiP)return H.o2(a)
else if(typeof a==="object"&&a!==null&&!!z.$isE4)return a.eh
else if(typeof a==="object"&&a!==null&&!!z.$isEH)return P.hE(a,"$dart_jsFunction",new P.DV())
-else return P.hE(a,"_$dart_jsObject",new P.Hp())}}},"call$1","En",2,0,223,91,[]],
+else return P.hE(a,"_$dart_jsObject",new P.Hp())}}},"call$1","En",2,0,225,91,[]],
hE:[function(a,b,c){var z=P.Om(a,b)
if(z==null){z=c.call$1(a)
-P.Dm(a,b,z)}return z},"call$3","nB",6,0,null,91,[],63,[],232,[]],
+P.Dm(a,b,z)}return z},"call$3","nB",6,0,null,91,[],63,[],234,[]],
dU:[function(a){var z
if(a==null||typeof a=="string"||typeof a=="number"||typeof a=="boolean")return a
else{if(a instanceof Object){z=J.x(a)
@@ -17147,13 +17271,13 @@
if(z)return a
else if(a instanceof Date)return P.Wu(a.getMilliseconds(),!1)
else if(a.constructor===DartObject)return a.o
-else return P.ND(a)}},"call$1","Xl",2,0,187,91,[]],
+else return P.ND(a)}},"call$1","Xl",2,0,190,91,[]],
ND:[function(a){if(typeof a=="function")return P.iQ(a,$.Dp(),new P.Nz())
else if(a instanceof Array)return P.iQ(a,$.Iq(),new P.Jd())
else return P.iQ(a,$.Iq(),new P.QS())},"call$1","ln",2,0,null,91,[]],
iQ:[function(a,b,c){var z=P.Om(a,b)
if(z==null||!(a instanceof Object)){z=c.call$1(a)
-P.Dm(a,b,z)}return z},"call$3","yF",6,0,null,91,[],63,[],232,[]],
+P.Dm(a,b,z)}return z},"call$3","yF",6,0,null,91,[],63,[],234,[]],
E4:{
"^":"a;eh",
t:[function(a,b){if(typeof b!=="string"&&typeof b!=="number")throw H.b(new P.AT("property is not a String or num"))
@@ -17173,7 +17297,7 @@
V7:[function(a,b){var z,y
z=this.eh
y=b==null?null:P.F(J.C0(b,P.En()),!0,null)
-return P.dU(z[a].apply(z,y))},function(a){return this.V7(a,null)},"nQ","call$2",null,"gah",2,2,null,77,215,[],263,[]],
+return P.dU(z[a].apply(z,y))},function(a){return this.V7(a,null)},"nQ","call$2",null,"gah",2,2,null,77,217,[],265,[]],
$isE4:true,
static:{uw:function(a,b){var z,y,x
z=P.wY(a)
@@ -17183,9 +17307,9 @@
C.Nm.FV(y,H.VM(new H.A8(b,P.En()),[null,null]))
x=z.bind.apply(z,y)
String(x)
-return P.ND(new x())},jT:function(a){return P.ND(P.M0(a))},M0:[function(a){return new P.Gn(P.UD(null,null)).call$1(a)},"call$1","Ij",2,0,null,231,[]]}},
+return P.ND(new x())},jT:function(a){return P.ND(P.M0(a))},M0:[function(a){return new P.Gn(P.UD(null,null)).call$1(a)},"call$1","Ij",2,0,null,233,[]]}},
Gn:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y,x,w,v
z=this.a
if(z.x4(a))return z.t(0,a)
@@ -17247,7 +17371,7 @@
z.$builtinTypeInfo=[null]
if(e<0)H.vh(P.N(e))
C.Nm.FV(x,z.qZ(0,y))
-this.V7("splice",x)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+this.V7("splice",x)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
GT:[function(a,b){this.V7("sort",[b])},"call$1","gH7",0,2,null,77,128,[]]},
Wk:{
"^":"E4+lD;",
@@ -17257,25 +17381,25 @@
$iscX:true,
$ascX:null},
DV:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=P.xZ(a,!1)
P.Dm(z,$.Dp(),a)
return z},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
Hp:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new DartObject(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
Nz:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new P.r7(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
Jd:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return H.VM(new P.Tz(a),[null])},"call$1",null,2,0,null,91,[],"call"],
$isEH:true},
QS:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return new P.E4(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true}}],["dart.math","dart:math",,P,{
"^":"",
@@ -17288,7 +17412,7 @@
if(a===0)z=b===0?1/b<0:b<0
else z=!1
if(z||isNaN(b))return b
-return a}return a},"call$2","yT",4,0,null,123,[],180,[]],
+return a}return a},"call$2","yT",4,0,null,123,[],183,[]],
y:[function(a,b){if(typeof a!=="number")throw H.b(new P.AT(a))
if(typeof b!=="number")throw H.b(new P.AT(b))
if(a>b)return a
@@ -17296,7 +17420,7 @@
if(typeof b==="number"){if(typeof a==="number")if(a===0)return a+b
if(C.ON.gG0(b))return b
return a}if(b===0&&C.CD.gzP(a))return b
-return a},"call$2","Yr",4,0,null,123,[],180,[]]}],["dart.mirrors","dart:mirrors",,P,{
+return a},"call$2","Yr",4,0,null,123,[],183,[]]}],["dart.mirrors","dart:mirrors",,P,{
"^":"",
re:[function(a){var z,y
z=J.x(a)
@@ -17403,15 +17527,15 @@
"^":"Gv;",
J2:[function(a,b,c){var z=J.Wx(b)
if(z.C(b,0)||z.F(b,c))throw H.b(P.TE(b,0,c))
-else throw H.b(new P.AT("Invalid list index "+H.d(b)))},"call$2","gYE",4,0,null,47,[],325,[]],
-XL:[function(a,b,c){if(b>>>0!=b||J.J5(b,c))this.J2(a,b,c)},"call$2","gDR",4,0,null,47,[],325,[]],
+else throw H.b(new P.AT("Invalid list index "+H.d(b)))},"call$2","gYE",4,0,null,47,[],327,[]],
+XL:[function(a,b,c){if(b>>>0!=b||J.J5(b,c))this.J2(a,b,c)},"call$2","gDR",4,0,null,47,[],327,[]],
PZ:[function(a,b,c,d){var z=d+1
this.XL(a,b,z)
if(c==null)return d
this.XL(a,c,z)
if(typeof c!=="number")return H.s(c)
if(b>c)throw H.b(P.TE(b,0,c))
-return c},"call$3","gyD",6,0,null,115,[],116,[],325,[]],
+return c},"call$3","gyD",6,0,null,115,[],116,[],327,[]],
$isrn:true,
$isHY:true,
"%":";ArrayBufferView;LZ|Ob|Ip|Dg|Nb|nA|Pg"},
@@ -17454,7 +17578,7 @@
$ascX:function(){return[J.GW]},
$isHY:true,
"%":"Float64Array"},
-xj:{
+zz:{
"^":"Pg;",
gbx:function(a){return C.jV},
t:[function(a,b){var z=a.length
@@ -17595,7 +17719,7 @@
"^":"Ip;",
YW:[function(a,b,c,d,e){var z=J.x(d)
if(!!z.$isDg){this.oZ(a,b,c,d,e)
-return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isDg:true,
$isList:true,
$asWO:function(){return[J.GW]},
@@ -17615,7 +17739,7 @@
"^":"nA;",
YW:[function(a,b,c,d,e){var z=J.x(d)
if(!!z.$isPg){this.oZ(a,b,c,d,e)
-return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+return}P.lD.prototype.YW.call(this,a,b,c,d,e)},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
$isPg:true,
$isList:true,
$asWO:function(){return[J.im]},
@@ -17639,9 +17763,9 @@
return}throw "Unable to print message: " + String(a)},"call$1","XU",2,0,null,26,[]]}],["disassembly_entry_element","package:observatory/src/observatory_elements/disassembly_entry.dart",,E,{
"^":"",
Fv:{
-"^":["tuj;F8%-455,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gNI:[function(a){return a.F8},null,null,1,0,456,"instruction",351,352],
-sNI:[function(a,b){a.F8=this.ct(a,C.eJ,a.F8,b)},null,null,3,0,457,23,[],"instruction",351],
+"^":["tuj;F8%-465,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gNI:[function(a){return a.F8},null,null,1,0,466,"instruction",353,354],
+sNI:[function(a,b){a.F8=this.ct(a,C.i6,a.F8,b)},null,null,3,0,467,23,[],"instruction",353],
"@":function(){return[C.Vy]},
static:{AH:[function(a){var z,y,x,w
z=$.Nd()
@@ -17655,15 +17779,15 @@
C.er.ZL(a)
C.er.G6(a)
return a},null,null,0,0,108,"new DisassemblyEntryElement$created"]}},
-"+DisassemblyEntryElement":[458],
+"+DisassemblyEntryElement":[468],
tuj:{
"^":"uL+Pi;",
$isd3:true}}],["error_view_element","package:observatory/src/observatory_elements/error_view.dart",,F,{
"^":"",
E9:{
-"^":["Vct;Py%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gkc:[function(a){return a.Py},null,null,1,0,350,"error",351,352],
-skc:[function(a,b){a.Py=this.ct(a,C.YU,a.Py,b)},null,null,3,0,353,23,[],"error",351],
+"^":["Vct;Py%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gkc:[function(a){return a.Py},null,null,1,0,352,"error",353,354],
+skc:[function(a,b){a.Py=this.ct(a,C.YU,a.Py,b)},null,null,3,0,355,23,[],"error",353],
"@":function(){return[C.uW]},
static:{TW:[function(a){var z,y,x,w
z=$.Nd()
@@ -17677,13 +17801,13 @@
C.OD.ZL(a)
C.OD.G6(a)
return a},null,null,0,0,108,"new ErrorViewElement$created"]}},
-"+ErrorViewElement":[459],
+"+ErrorViewElement":[469],
Vct:{
"^":"uL+Pi;",
$isd3:true}}],["field_ref_element","package:observatory/src/observatory_elements/field_ref.dart",,D,{
"^":"",
m8:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.E6]},
static:{Tt:[function(a){var z,y,x,w
z=$.Nd()
@@ -17699,12 +17823,14 @@
C.MC.ZL(a)
C.MC.G6(a)
return a},null,null,0,0,108,"new FieldRefElement$created"]}},
-"+FieldRefElement":[357]}],["field_view_element","package:observatory/src/observatory_elements/field_view.dart",,A,{
+"+FieldRefElement":[362]}],["field_view_element","package:observatory/src/observatory_elements/field_view.dart",,A,{
"^":"",
Gk:{
-"^":["D13;vt%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gt0:[function(a){return a.vt},null,null,1,0,350,"field",351,352],
-st0:[function(a,b){a.vt=this.ct(a,C.WQ,a.vt,b)},null,null,3,0,353,23,[],"field",351],
+"^":["D13;vt%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gt0:[function(a){return a.vt},null,null,1,0,352,"field",353,354],
+st0:[function(a,b){a.vt=this.ct(a,C.WQ,a.vt,b)},null,null,3,0,355,23,[],"field",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.vt,"id"))
+a.hm.gDF().fB(z).ml(new A.e5(a)).OA(new A.Ni()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.Tq]},
static:{cY:[function(a){var z,y,x,w
z=$.Nd()
@@ -17718,13 +17844,26 @@
C.LT.ZL(a)
C.LT.G6(a)
return a},null,null,0,0,108,"new FieldViewElement$created"]}},
-"+FieldViewElement":[460],
+"+FieldViewElement":[470],
D13:{
"^":"uL+Pi;",
-$isd3:true}}],["function_ref_element","package:observatory/src/observatory_elements/function_ref.dart",,U,{
+$isd3:true},
+e5:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.svt(z,y.ct(z,C.WQ,y.gvt(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+FieldViewElement_refresh_closure":[358],
+Ni:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing field-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+FieldViewElement_refresh_closure":[358]}],["function_ref_element","package:observatory/src/observatory_elements/function_ref.dart",,U,{
"^":"",
-GG:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+AX:{
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.YQ]},
static:{v9:[function(a){var z,y,x,w
z=$.Nd()
@@ -17740,12 +17879,14 @@
C.Xo.ZL(a)
C.Xo.G6(a)
return a},null,null,0,0,108,"new FunctionRefElement$created"]}},
-"+FunctionRefElement":[357]}],["function_view_element","package:observatory/src/observatory_elements/function_view.dart",,N,{
+"+FunctionRefElement":[362]}],["function_view_element","package:observatory/src/observatory_elements/function_view.dart",,N,{
"^":"",
yb:{
-"^":["WZq;Z8%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gMj:[function(a){return a.Z8},null,null,1,0,350,"function",351,352],
-sMj:[function(a,b){a.Z8=this.ct(a,C.nf,a.Z8,b)},null,null,3,0,353,23,[],"function",351],
+"^":["WZq;Z8%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gMj:[function(a){return a.Z8},null,null,1,0,352,"function",353,354],
+sMj:[function(a,b){a.Z8=this.ct(a,C.nf,a.Z8,b)},null,null,3,0,355,23,[],"function",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.Z8,"id"))
+a.hm.gDF().fB(z).ml(new N.QR(a)).OA(new N.Yx()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.nu]},
static:{N0:[function(a){var z,y,x,w
z=$.Nd()
@@ -17759,24 +17900,37 @@
C.Yu.ZL(a)
C.Yu.G6(a)
return a},null,null,0,0,108,"new FunctionViewElement$created"]}},
-"+FunctionViewElement":[461],
+"+FunctionViewElement":[471],
WZq:{
"^":"uL+Pi;",
-$isd3:true}}],["heap_profile_element","package:observatory/src/observatory_elements/heap_profile.dart",,K,{
+$isd3:true},
+QR:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sZ8(z,y.ct(z,C.nf,y.gZ8(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+FunctionViewElement_refresh_closure":[358],
+Yx:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing field-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+FunctionViewElement_refresh_closure":[358]}],["heap_profile_element","package:observatory/src/observatory_elements/heap_profile.dart",,K,{
"^":"",
NM:{
-"^":["pva;GQ%-77,J0%-77,Oc%-77,CO%-77,e6%-77,an%-77,Ol%-347,X3%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gB1:[function(a){return a.Ol},null,null,1,0,350,"profile",351,352],
-sB1:[function(a,b){a.Ol=this.ct(a,C.vb,a.Ol,b)},null,null,3,0,353,23,[],"profile",351],
+"^":["pva;GQ%-77,J0%-77,Oc%-77,CO%-77,bV%-77,vR%-77,LY%-77,q3%-77,Ol%-349,X3%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gB1:[function(a){return a.Ol},null,null,1,0,352,"profile",353,354],
+sB1:[function(a,b){a.Ol=this.ct(a,C.vb,a.Ol,b)},null,null,3,0,355,23,[],"profile",353],
i4:[function(a){var z,y
Z.uL.prototype.i4.call(this,a)
z=(a.shadowRoot||a.webkitShadowRoot).querySelector("#table")
y=new L.qu(null,P.L5(null,null,null,null,null))
y.YZ=P.uw(J.UQ($.NR,"Table"),[z])
-a.an=y
+a.q3=y
y.bG.u(0,"allowHtml",!0)
-J.kW(J.wc(a.an),"sortColumn",1)
-J.kW(J.wc(a.an),"sortAscending",!1)
+J.kW(J.wc(a.q3),"sortColumn",1)
+J.kW(J.wc(a.q3),"sortAscending",!1)
y=(a.shadowRoot||a.webkitShadowRoot).querySelector("#newPieChart")
z=new L.qu(null,P.L5(null,null,null,null,null))
z.YZ=P.uw(J.UQ($.NR,"PieChart"),[y])
@@ -17787,33 +17941,54 @@
y.YZ=P.uw(J.UQ($.NR,"PieChart"),[z])
a.CO=y
y.bG.u(0,"title","Old Space")
+y=(a.shadowRoot||a.webkitShadowRoot).querySelector("#simpleTable")
+z=new L.qu(null,P.L5(null,null,null,null,null))
+z.YZ=P.uw(J.UQ($.NR,"Table"),[y])
+a.vR=z
+z.bG.u(0,"allowHtml",!0)
+J.kW(J.wc(a.vR),"sortColumn",1)
+J.kW(J.wc(a.vR),"sortAscending",!1)
this.uB(a)},"call$0","gQd",0,0,107,"enteredView"],
-hZ:[function(a){var z,y,x,w,v
+hZ:[function(a){var z,y,x,w,v,u
z=a.Ol
if(z!=null){z=J.UQ(z,"members")
y=J.x(z)
z=typeof z!=="object"||z===null||z.constructor!==Array&&!y.$isList||J.de(J.q8(J.UQ(a.Ol,"members")),0)}else z=!0
if(z)return
-a.e6.lb()
+a.LY.lb()
+a.bV.lb()
for(z=J.GP(J.UQ(a.Ol,"members"));z.G();){x=z.gl()
-w=a.hm.gZ6().kP(J.UQ(J.UQ(x,"class"),"id"))
-J.N5(a.e6,["<a href=\""+w+"\">"+H.d(this.cp(a,x,0))+"</a>",this.cp(a,x,1),this.cp(a,x,2),this.cp(a,x,3),this.cp(a,x,4),this.cp(a,x,5),this.cp(a,x,6),this.cp(a,x,7),this.cp(a,x,8)])}a.GQ.lb()
-v=J.UQ(J.UQ(a.Ol,"heaps"),"new")
-z=J.U6(v)
-J.N5(a.GQ,["Used",z.t(v,"used")])
-J.N5(a.GQ,["Free",J.xH(z.t(v,"capacity"),z.t(v,"used"))])
+if(this.K1(a,x))continue
+y=J.U6(x)
+w=J.UQ(y.t(x,"class"),"name")
+v=a.hm.gZ6().kP(J.UQ(y.t(x,"class"),"id"))
+J.N5(a.LY,["<a title=\""+H.d(w)+"\" href=\""+v+"\">"+H.d(this.iF(a,x,0))+"</a>",this.iF(a,x,1),this.iF(a,x,2),this.iF(a,x,3),this.iF(a,x,4),this.iF(a,x,5),this.iF(a,x,6),this.iF(a,x,7),this.iF(a,x,8)])
+J.N5(a.bV,["<a title=\""+H.d(w)+"\" href=\""+v+"\">"+H.d(this.VI(a,x,0))+"</a>",this.VI(a,x,1),this.VI(a,x,2),this.VI(a,x,3),this.VI(a,x,4),this.VI(a,x,5),this.VI(a,x,6)])}a.GQ.lb()
+u=J.UQ(J.UQ(a.Ol,"heaps"),"new")
+z=J.U6(u)
+J.N5(a.GQ,["Used",z.t(u,"used")])
+J.N5(a.GQ,["Free",J.xH(z.t(u,"capacity"),z.t(u,"used"))])
a.Oc.lb()
-v=J.UQ(J.UQ(a.Ol,"heaps"),"old")
-z=J.U6(v)
-J.N5(a.Oc,["Used",z.t(v,"used")])
-J.N5(a.Oc,["Free",J.xH(z.t(v,"capacity"),z.t(v,"used"))])
+u=J.UQ(J.UQ(a.Ol,"heaps"),"old")
+z=J.U6(u)
+J.N5(a.Oc,["Used",z.t(u,"used")])
+J.N5(a.Oc,["Free",J.xH(z.t(u,"capacity"),z.t(u,"used"))])
this.uB(a)},"call$0","gYs",0,0,107,"_updateChartData"],
-uB:[function(a){var z=a.an
-if(z==null)return
-z.W2(a.e6)
+uB:[function(a){if(a.q3==null||a.vR==null)return
+a.vR.u5()
+a.vR.W2(a.bV)
+a.q3.u5()
+a.q3.W2(a.LY)
a.J0.W2(a.GQ)
a.CO.W2(a.Oc)},"call$0","goI",0,0,107,"_draw"],
-cp:[function(a,b,c){var z
+K1:[function(a,b){var z,y,x
+z=J.U6(b)
+y=z.t(b,"new")
+x=z.t(b,"old")
+for(z=J.GP(y);z.G();)if(!J.de(z.gl(),0))return!1
+for(z=J.GP(x);z.G();)if(!J.de(z.gl(),0))return!1
+return!0},"call$1","gbU",2,0,472,274,[],"_classHasNoAllocations"],
+iF:[function(a,b,c){var z
switch(c){case 0:return J.UQ(J.UQ(b,"class"),"user_name")
case 1:z=J.U6(b)
return J.WB(J.UQ(z.t(b,"new"),3),J.UQ(z.t(b,"new"),5))
@@ -17825,44 +18000,64 @@
case 6:return J.UQ(J.UQ(b,"old"),5)
case 7:return J.UQ(J.UQ(b,"old"),1)
case 8:return J.UQ(J.UQ(b,"old"),3)
-default:}return},"call$2","gGm",4,0,462,272,[],47,[],"_columnValue"],
-Ub:[function(a,b,c,d){var z,y
+default:}throw H.b(P.hS())},"call$2","grz",4,0,473,274,[],47,[],"_fullTableColumnValue"],
+VI:[function(a,b,c){var z
+switch(c){case 0:return J.UQ(J.UQ(b,"class"),"user_name")
+case 1:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),7),J.UQ(z.t(b,"old"),7))
+case 2:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),6),J.UQ(z.t(b,"old"),6))
+case 3:z=J.U6(b)
+return J.WB(J.WB(J.WB(J.UQ(z.t(b,"new"),3),J.UQ(z.t(b,"new"),5)),J.UQ(z.t(b,"old"),3)),J.UQ(z.t(b,"old"),5))
+case 4:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),5),J.UQ(z.t(b,"old"),5))
+case 5:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),1),J.UQ(z.t(b,"old"),1))
+case 6:z=J.U6(b)
+return J.WB(J.UQ(z.t(b,"new"),3),J.UQ(z.t(b,"old"),3))
+default:}throw H.b(P.hS())},"call$2","gaq",4,0,473,274,[],47,[],"_combinedTableColumnValue"],
+RF:[function(a,b){var z,y
z=a.hm.gZ6().R6()
if(a.hm.gnI().AQ(z)==null){N.Jx("").To("No isolate found.")
return}y="/"+z+"/allocationprofile"
-a.hm.gDF().fB(y).ml(new K.bd(a)).OA(new K.LS())},"call$3","gFz",6,0,369,18,[],301,[],74,[],"refreshData"],
+a.hm.gDF().fB(y).ml(new K.nx(a)).OA(new K.jm()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
+ii:[function(a,b,c,d){var z,y
+z=a.hm.gZ6().R6()
+if(a.hm.gnI().AQ(z)==null){N.Jx("").To("No isolate found.")
+return}y="/"+z+"/allocationprofile/reset"
+a.hm.gDF().fB(y).ml(new K.xj(a)).OA(new K.VB())},"call$3","gNb",6,0,374,18,[],303,[],74,[],"resetAccumulator"],
pM:[function(a,b){this.hZ(a)
this.ct(a,C.Aq,[],this.gOd(a))
this.ct(a,C.ST,[],this.goN(a))
-this.ct(a,C.WG,[],this.gBo(a))},"call$1","gaz",2,0,150,225,[],"profileChanged"],
+this.ct(a,C.WG,[],this.gBo(a))},"call$1","gaz",2,0,153,227,[],"profileChanged"],
ps:[function(a,b){var z,y,x
z=a.Ol
if(z==null)return""
y=b===!0?"new":"old"
x=J.UQ(J.UQ(z,"heaps"),y)
z=J.U6(x)
-return C.CD.yM(J.FW(J.p0(z.t(x,"time"),1000),z.t(x,"collections")),2)+" ms"},"call$1","gOd",2,0,463,464,[],"formattedAverage",365],
+return C.CD.yM(J.FW(J.p0(z.t(x,"time"),1000),z.t(x,"collections")),2)+" ms"},"call$1","gOd",2,0,474,475,[],"formattedAverage",370],
NC:[function(a,b){var z,y
z=a.Ol
if(z==null)return""
y=b===!0?"new":"old"
-return H.d(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"collections"))},"call$1","gBo",2,0,463,464,[],"formattedCollections",365],
+return H.d(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"collections"))},"call$1","gBo",2,0,474,475,[],"formattedCollections",370],
Q0:[function(a,b){var z,y
z=a.Ol
if(z==null)return""
y=b===!0?"new":"old"
-return J.Ez(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"time"),2)+" secs"},"call$1","goN",2,0,463,464,[],"formattedTotalCollectionTime",365],
+return J.Ez(J.UQ(J.UQ(J.UQ(z,"heaps"),y),"time"),2)+" secs"},"call$1","goN",2,0,474,475,[],"formattedTotalCollectionTime",370],
Dd:[function(a){var z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
-a.e6=z
+a.LY=z
z.Gl("string","Class")
-a.e6.Gl("number","Current (new)")
-a.e6.Gl("number","Allocated Since GC (new)")
-a.e6.Gl("number","Total before GC (new)")
-a.e6.Gl("number","Survivors (new)")
-a.e6.Gl("number","Current (old)")
-a.e6.Gl("number","Allocated Since GC (old)")
-a.e6.Gl("number","Total before GC (old)")
-a.e6.Gl("number","Survivors (old)")
+a.LY.Gl("number","Current (new)")
+a.LY.Gl("number","Allocated Since GC (new)")
+a.LY.Gl("number","Total before GC (new)")
+a.LY.Gl("number","Survivors (new)")
+a.LY.Gl("number","Current (old)")
+a.LY.Gl("number","Allocated Since GC (old)")
+a.LY.Gl("number","Total before GC (old)")
+a.LY.Gl("number","Survivors (old)")
z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
a.GQ=z
z.Gl("string","Type")
@@ -17870,9 +18065,18 @@
z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
a.Oc=z
z.Gl("string","Type")
-a.Oc.Gl("number","Size")},null,null,0,0,108,"created"],
+a.Oc.Gl("number","Size")
+z=new L.Kf(P.uw(J.UQ($.NR,"DataTable"),null))
+a.bV=z
+z.Gl("string","Class")
+a.bV.Gl("number","Accumulator")
+a.bV.Gl("number","Accumulator Instances")
+a.bV.Gl("number","Current")
+a.bV.Gl("number","Allocated Since GC")
+a.bV.Gl("number","Total before GC")
+a.bV.Gl("number","Survivors after GC")},null,null,0,0,108,"created"],
"@":function(){return[C.dA]},
-static:{"^":"BO<-77,Xa<-77,xK<-77,V1g<-77,r1K<-77,d6<-77",op:[function(a){var z,y,x,w
+static:{"^":"BO<-77,bQj<-77,xK<-77,V1g<-77,r1K<-77,d6<-77,pC<-77,DY2<-77",op:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
x=J.O
@@ -17886,23 +18090,36 @@
C.Vc.G6(a)
C.Vc.Dd(a)
return a},null,null,0,0,108,"new HeapProfileElement$created"]}},
-"+HeapProfileElement":[465],
+"+HeapProfileElement":[476],
pva:{
"^":"uL+Pi;",
$isd3:true},
-bd:{
-"^":"Tp:353;a-77",
+nx:{
+"^":"Tp:355;a-77",
call$1:[function(a){var z,y
z=this.a
y=J.RE(z)
-y.sOl(z,y.ct(z,C.vb,y.gOl(z),a))},"call$1",null,2,0,353,466,[],"call"],
+y.sOl(z,y.ct(z,C.vb,y.gOl(z),a))},"call$1",null,2,0,355,477,[],"call"],
$isEH:true},
-"+HeapProfileElement_refreshData_closure":[467],
-LS:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").To(H.d(a)+" "+H.d(b))},"call$2",null,4,0,341,18,[],468,[],"call"],
+"+HeapProfileElement_refresh_closure":[358],
+jm:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").To(H.d(a)+" "+H.d(b))},"call$2",null,4,0,343,18,[],478,[],"call"],
$isEH:true},
-"+HeapProfileElement_refreshData_closure":[467]}],["html_common","dart:html_common",,P,{
+"+HeapProfileElement_refresh_closure":[358],
+xj:{
+"^":"Tp:355;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sOl(z,y.ct(z,C.vb,y.gOl(z),a))},"call$1",null,2,0,355,477,[],"call"],
+$isEH:true},
+"+HeapProfileElement_resetAccumulator_closure":[358],
+VB:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").To(H.d(a)+" "+H.d(b))},"call$2",null,4,0,343,18,[],478,[],"call"],
+$isEH:true},
+"+HeapProfileElement_resetAccumulator_closure":[358]}],["html_common","dart:html_common",,P,{
"^":"",
bL:[function(a){var z,y
z=[]
@@ -17910,7 +18127,7 @@
new P.wO().call$0()
return y},"call$1","Lq",2,0,null,23,[]],
o7:[function(a,b){var z=[]
-return new P.xL(b,new P.CA([],z),new P.YL(z),new P.KC(z)).call$1(a)},"call$2$mustCopy","A1",2,3,null,205,6,[],233,[]],
+return new P.xL(b,new P.CA([],z),new P.YL(z),new P.KC(z)).call$1(a)},"call$2$mustCopy","A1",2,3,null,147,6,[],235,[]],
dg:function(){var z=$.L4
if(z==null){z=J.Vw(window.navigator.userAgent,"Opera",0)
$.L4=z}return z},
@@ -17918,7 +18135,7 @@
if(z==null){z=P.dg()!==!0&&J.Vw(window.navigator.userAgent,"WebKit",0)
$.PN=z}return z},
aI:{
-"^":"Tp:181;b,c",
+"^":"Tp:184;b,c",
call$1:[function(a){var z,y,x
z=this.b
y=z.length
@@ -17928,23 +18145,23 @@
return y},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
rG:{
-"^":"Tp:385;d",
+"^":"Tp:392;d",
call$1:[function(a){var z=this.d
if(a>=z.length)return H.e(z,a)
-return z[a]},"call$1",null,2,0,null,383,[],"call"],
+return z[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
yh:{
-"^":"Tp:469;e",
+"^":"Tp:479;e",
call$2:[function(a,b){var z=this.e
if(a>=z.length)return H.e(z,a)
-z[a]=b},"call$2",null,4,0,null,383,[],21,[],"call"],
+z[a]=b},"call$2",null,4,0,null,390,[],21,[],"call"],
$isEH:true},
wO:{
"^":"Tp:108;",
call$0:[function(){},"call$0",null,0,0,null,"call"],
$isEH:true},
Tm:{
-"^":"Tp:223;f,UI,bK",
+"^":"Tp:225;f,UI,bK",
call$1:[function(a){var z,y,x,w,v,u
z={}
if(a==null)return a
@@ -17980,11 +18197,11 @@
w[u]=z}return w}throw H.b(P.SY("structured clone of other type"))},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
q1:{
-"^":"Tp:341;a,Gq",
+"^":"Tp:343;a,Gq",
call$2:[function(a,b){this.a.a[a]=this.Gq.call$1(b)},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true},
CA:{
-"^":"Tp:181;a,b",
+"^":"Tp:184;a,b",
call$1:[function(a){var z,y,x,w
z=this.a
y=z.length
@@ -17994,19 +18211,19 @@
return y},"call$1",null,2,0,null,23,[],"call"],
$isEH:true},
YL:{
-"^":"Tp:385;c",
+"^":"Tp:392;c",
call$1:[function(a){var z=this.c
if(a>=z.length)return H.e(z,a)
-return z[a]},"call$1",null,2,0,null,383,[],"call"],
+return z[a]},"call$1",null,2,0,null,390,[],"call"],
$isEH:true},
KC:{
-"^":"Tp:469;d",
+"^":"Tp:479;d",
call$2:[function(a,b){var z=this.d
if(a>=z.length)return H.e(z,a)
-z[a]=b},"call$2",null,4,0,null,383,[],21,[],"call"],
+z[a]=b},"call$2",null,4,0,null,390,[],21,[],"call"],
$isEH:true},
xL:{
-"^":"Tp:223;e,f,UI,bK",
+"^":"Tp:225;e,f,UI,bK",
call$1:[function(a){var z,y,x,w,v,u,t
if(a==null)return a
if(typeof a==="boolean")return a
@@ -18041,13 +18258,13 @@
if(!z.tg(0,a)===!0){z.h(0,a)
y=!0}else{z.Rz(0,a)
y=!1}this.p5(z)
-return y},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],450,[]],
+return y},function(a){return this.O4(a,null)},"qU","call$2",null,"gMk",2,2,null,77,23,[],460,[]],
gA:function(a){var z=this.lF()
z=H.VM(new P.zQ(z,z.zN,null,null),[null])
z.zq=z.O2.H9
return z},
aN:[function(a,b){this.lF().aN(0,b)},"call$1","gjw",2,0,null,110,[]],
-zV:[function(a,b){return this.lF().zV(0,b)},"call$1","gnr",0,2,null,328,329,[]],
+zV:[function(a,b){return this.lF().zV(0,b)},"call$1","gnr",0,2,null,330,331,[]],
ez:[function(a,b){var z=this.lF()
return H.K1(z,b,H.ip(z,"mW",0),null)},"call$1","gIr",2,0,null,110,[]],
ev:[function(a,b){var z=this.lF()
@@ -18069,9 +18286,9 @@
grZ:function(a){var z=this.lF().lX
if(z==null)H.vh(new P.lj("No elements"))
return z.gGc()},
-tt:[function(a,b){return this.lF().tt(0,b)},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,331,332,[]],
+tt:[function(a,b){return this.lF().tt(0,b)},function(a){return this.tt(a,!0)},"br","call$1$growable",null,"gRV",0,3,null,333,334,[]],
eR:[function(a,b){var z=this.lF()
-return H.ke(z,b,H.ip(z,"mW",0))},"call$1","gZo",2,0,null,287,[]],
+return H.ke(z,b,H.ip(z,"mW",0))},"call$1","gZo",2,0,null,289,[]],
Zv:[function(a,b){return this.lF().Zv(0,b)},"call$1","goY",2,0,null,47,[]],
V1:[function(a){this.OS(new P.uQ())},"call$0","gyP",0,0,null],
OS:[function(a){var z,y
@@ -18083,15 +18300,15 @@
$iscX:true,
$ascX:function(){return[J.O]}},
GE:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return a.h(0,this.a)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
rl:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return a.FV(0,this.a)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
uQ:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a.V1(0)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
D7:{
@@ -18115,7 +18332,7 @@
if(typeof b!=="object"||b===null||!z.$iscv)return!1
return b.parentNode===this.F1},"call$1","gdj",2,0,null,102,[]],
GT:[function(a,b){throw H.b(P.f("Cannot sort filtered list"))},"call$1","gH7",0,2,null,77,128,[]],
-YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on filtered list"))},"call$4","gam",6,2,null,330,115,[],116,[],109,[],117,[]],
+YW:[function(a,b,c,d,e){throw H.b(P.f("Cannot setRange on filtered list"))},"call$4","gam",6,2,null,332,115,[],116,[],109,[],117,[]],
UZ:[function(a,b,c){H.bQ(C.Nm.D6(this.gzT(),b,c),new P.GS())},"call$2","gYH",4,0,null,115,[],116,[]],
V1:[function(a){this.h2.NL.textContent=""},"call$0","gyP",0,0,null],
xe:[function(a,b,c){this.h2.xe(0,b,c)},"call$2","gQG",4,0,null,47,[],23,[]],
@@ -18140,25 +18357,26 @@
gA:function(a){var z=this.gzT()
return H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)])}},
hT:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$iscv},"call$1",null,2,0,null,287,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$iscv},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
GS:{
-"^":"Tp:223;",
-call$1:[function(a){return J.QC(a)},"call$1",null,2,0,null,283,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return J.QC(a)},"call$1",null,2,0,null,285,[],"call"],
$isEH:true}}],["instance_ref_element","package:observatory/src/observatory_elements/instance_ref.dart",,B,{
"^":"",
pR:{
-"^":["T5;qX%-355,AP,fn,tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-goE:[function(a){return a.qX},null,null,1,0,366,"expanded",351,352],
-soE:[function(a,b){a.qX=this.ct(a,C.mr,a.qX,b)},null,null,3,0,367,23,[],"expanded",351],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
goc:[function(a){var z=a.tY
if(z==null)return Q.xI.prototype.goc.call(this,a)
-return J.UQ(z,"preview")},null,null,1,0,362,"name"],
-AZ:[function(a,b,c,d){if(a.qX===!0){J.kW(a.tY,"fields",null)
+return J.UQ(z,"preview")},null,null,1,0,367,"name"],
+Qx:[function(a){return this.gus(a)},"call$0","gyX",0,0,108,"expander"],
+SF:[function(a,b,c){P.JS("Calling expandEvent")
+if(b===!0)a.hm.gDF().fB(this.gO3(a)).ml(new B.Js(a)).OA(new B.fM()).YM(c)
+else{J.kW(a.tY,"fields",null)
J.kW(a.tY,"elements",null)
-a.qX=this.ct(a,C.mr,a.qX,!1)}else a.hm.gDF().fB(this.gO3(a)).ml(new B.YE(a)).OA(new B.we())},"call$3","ghM",6,0,470,123,[],180,[],278,[],"toggleExpand"],
+c.call$0()}},"call$2","gus",4,0,480,481,[],356,[],"expandEvent"],
"@":function(){return[C.VW]},
static:{b4:[function(a){var z,y,x,w
z=$.Nd()
@@ -18166,7 +18384,6 @@
x=J.O
w=W.cv
w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
-a.qX=!1
a.Pe=!1
a.m0=null
a.SO=z
@@ -18175,32 +18392,30 @@
C.cp.ZL(a)
C.cp.G6(a)
return a},null,null,0,0,108,"new InstanceRefElement$created"]}},
-"+InstanceRefElement":[471],
-T5:{
-"^":"xI+Pi;",
-$isd3:true},
-YE:{
-"^":"Tp:223;a-77",
+"+InstanceRefElement":[362],
+Js:{
+"^":"Tp:225;a-77",
call$1:[function(a){var z,y,x
+P.JS("Result is : "+H.d(a))
z=this.a
y=J.RE(z)
x=J.U6(a)
J.kW(y.gtY(z),"fields",x.t(a,"fields"))
J.kW(y.gtY(z),"elements",x.t(a,"elements"))
J.kW(y.gtY(z),"length",x.t(a,"length"))
-y.sqX(z,y.ct(z,C.mr,y.gqX(z),!0))},"call$1",null,2,0,223,144,[],"call"],
+P.JS("ref is "+H.d(y.gtY(z)))},"call$1",null,2,0,225,144,[],"call"],
$isEH:true},
-"+InstanceRefElement_toggleExpand_closure":[467],
-we:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").hh("Error while expanding instance-ref: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,341,18,[],472,[],"call"],
+"+InstanceRefElement_expandEvent_closure":[358],
+fM:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while expanding instance-ref: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
$isEH:true},
-"+InstanceRefElement_toggleExpand_closure":[467]}],["instance_view_element","package:observatory/src/observatory_elements/instance_view.dart",,Z,{
+"+InstanceRefElement_expandEvent_closure":[358]}],["instance_view_element","package:observatory/src/observatory_elements/instance_view.dart",,Z,{
"^":"",
hx:{
-"^":["cda;Xh%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gQr:[function(a){return a.Xh},null,null,1,0,350,"instance",351,352],
-sQr:[function(a,b){a.Xh=this.ct(a,C.fn,a.Xh,b)},null,null,3,0,353,23,[],"instance",351],
+"^":["cda;Xh%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gQr:[function(a){return a.Xh},null,null,1,0,352,"instance",353,354],
+sQr:[function(a,b){a.Xh=this.ct(a,C.fn,a.Xh,b)},null,null,3,0,355,23,[],"instance",353],
"@":function(){return[C.be]},
static:{HC:[function(a){var z,y,x,w
z=$.Nd()
@@ -18214,14 +18429,16 @@
C.yK.ZL(a)
C.yK.G6(a)
return a},null,null,0,0,108,"new InstanceViewElement$created"]}},
-"+InstanceViewElement":[473],
+"+InstanceViewElement":[482],
cda:{
"^":"uL+Pi;",
$isd3:true}}],["isolate_list_element","package:observatory/src/observatory_elements/isolate_list.dart",,L,{
"^":"",
u7:{
-"^":["uL;hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-Ak:[function(a,b,c,d){J.kH(a.hm.gnI().gi2(),new L.fW())},"call$3","gBq",6,0,369,18,[],301,[],74,[],"refresh"],
+"^":["uL;hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+RF:[function(a,b){var z=[]
+J.kH(a.hm.gnI().gi2(),new L.fW(z))
+P.pH(z,!1).ml(new L.Ey(b))},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.jFV]},
static:{Cu:[function(a){var z,y,x,w
z=$.Nd()
@@ -18235,15 +18452,20 @@
C.b9.ZL(a)
C.b9.G6(a)
return a},null,null,0,0,108,"new IsolateListElement$created"]}},
-"+IsolateListElement":[474],
+"+IsolateListElement":[483],
fW:{
-"^":"Tp:341;",
-call$2:[function(a,b){J.KM(b)},"call$2",null,4,0,341,236,[],14,[],"call"],
+"^":"Tp:343;a-77",
+call$2:[function(a,b){J.bi(this.a,J.KM(b))},"call$2",null,4,0,343,238,[],14,[],"call"],
$isEH:true},
-"+IsolateListElement_refresh_closure":[467]}],["isolate_profile_element","package:observatory/src/observatory_elements/isolate_profile.dart",,X,{
+"+IsolateListElement_refresh_closure":[358],
+Ey:{
+"^":"Tp:225;b-77",
+call$1:[function(a){return this.b.call$0()},"call$1",null,2,0,225,237,[],"call"],
+$isEH:true},
+"+IsolateListElement_refresh_closure":[358]}],["isolate_profile_element","package:observatory/src/observatory_elements/isolate_profile.dart",,X,{
"^":"",
qm:{
-"^":["Y2;Aq>,tT>-359,eT,yt-475,wd-476,oH-477,np,AP,fn",null,function(){return[C.mI]},null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null],
+"^":["Y2;Aq>,tT>-364,eT,yt-484,wd-485,oH-486,np,AP,fn",null,function(){return[C.mI]},null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null],
C4:[function(a){if(J.z8(J.q8(this.wd),0))return
H.bQ(this.tT.gVS(),new X.vO(this))},"call$0","gz7",0,0,null],
o8:[function(){return},"call$0","gDT",0,0,null],
@@ -18257,23 +18479,23 @@
if(c==null)v.h(z,"")
else{u=c.tT
v.h(z,X.eI(u.dJ(y),u.QQ()))}v.h(z,X.eI(y.gfF(),w.gB1(x).ghV()))},
-static:{eI:[function(a,b){return C.CD.yM(100*J.FW(a,b),2)+"%"},"call$2","rC",4,0,null,123,[],234,[]],Tl:function(a,b,c){var z,y
+static:{eI:[function(a,b){return C.CD.yM(100*J.FW(a,b),2)+"%"},"call$2","rC",4,0,null,123,[],236,[]],Tl:function(a,b,c){var z,y
z=H.VM([],[L.Y2])
y=c!=null?J.WB(c.yt,1):0
z=new X.qm(a,b,c,y,z,[],!1,null,null)
z.Af(a,b,c)
return z}}},
vO:{
-"^":"Tp:479;a",
+"^":"Tp:488;a",
call$1:[function(a){var z=this.a
-J.bi(z.wd,X.Tl(z.Aq,J.on(a),z))},"call$1",null,2,0,null,478,[],"call"],
+J.bi(z.wd,X.Tl(z.Aq,J.on(a),z))},"call$1",null,2,0,null,487,[],"call"],
$isEH:true},
E7:{
-"^":["waa;BA%-475,fb=-480,qY%-480,qO=-77,Hm%-481,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gXc:[function(a){return a.BA},null,null,1,0,482,"methodCountSelected",351,365],
-sXc:[function(a,b){a.BA=this.ct(a,C.fQ,a.BA,b)},null,null,3,0,385,23,[],"methodCountSelected",351],
-gHu:[function(a){return a.qY},null,null,1,0,483,"topExclusiveCodes",351,365],
-sHu:[function(a,b){a.qY=this.ct(a,C.jI,a.qY,b)},null,null,3,0,484,23,[],"topExclusiveCodes",351],
+"^":["waa;BA%-484,fb=-489,qY%-489,qO=-77,Hm%-490,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gXc:[function(a){return a.BA},null,null,1,0,491,"methodCountSelected",353,370],
+sXc:[function(a,b){a.BA=this.ct(a,C.fQ,a.BA,b)},null,null,3,0,392,23,[],"methodCountSelected",353],
+gDt:[function(a){return a.qY},null,null,1,0,492,"topExclusiveCodes",353,370],
+sDt:[function(a,b){a.qY=this.ct(a,C.jI,a.qY,b)},null,null,3,0,493,23,[],"topExclusiveCodes",353],
i4:[function(a){var z,y,x,w
z=a.hm.gZ6().R6()
y=a.hm.gnI().AQ(z)
@@ -18291,40 +18513,40 @@
y=a.hm.gnI().AQ(z)
if(y==null)return
this.oC(a,y)
-this.f9(a,y)},"call$1","ghj",2,0,223,225,[],"methodCountSelectedChanged"],
-Ub:[function(a,b,c,d){var z,y,x
+this.f9(a,y)},"call$1","ghj",2,0,225,227,[],"methodCountSelectedChanged"],
+RF:[function(a,b){var z,y,x
z=a.hm.gZ6().R6()
y=a.hm.gnI().AQ(z)
if(y==null){N.Jx("").To("No isolate found.")
return}x="/"+z+"/profile"
-a.hm.gDF().fB(x).ml(new X.RR(a,y)).OA(new X.EL(a))},"call$3","gFz",6,0,369,18,[],301,[],74,[],"refreshData"],
+a.hm.gDF().fB(x).ml(new X.SV(a,y)).OA(new X.vH(a)).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
IW:[function(a,b,c,d){J.CJ(b,L.hh(b,d))
this.oC(a,b)
-this.f9(a,b)},"call$3","gja",6,0,485,14,[],486,[],466,[],"_loadProfileData"],
+this.f9(a,b)},"call$3","gja",6,0,494,14,[],495,[],477,[],"_loadProfileData"],
yF:[function(a,b){this.oC(a,b)
-this.f9(a,b)},"call$1","gAL",2,0,487,14,[],"_refresh"],
+this.f9(a,b)},"call$1","gAL",2,0,496,14,[],"_refresh"],
f9:[function(a,b){var z,y
z=[]
for(y=J.GP(a.qY);y.G();)z.push(X.Tl(b,y.gl(),null))
a.Hm.rT(z)
-this.ct(a,C.ep,null,a.Hm)},"call$1","gCK",2,0,487,14,[],"_refreshTree"],
+this.ct(a,C.ep,null,a.Hm)},"call$1","gCK",2,0,496,14,[],"_refreshTree"],
oC:[function(a,b){var z,y
J.U2(a.qY)
if(b==null||J.Tv(b)==null)return
z=J.UQ(a.fb,a.BA)
y=J.Tv(b).T0(z)
-J.bj(a.qY,y)},"call$1","guE",2,0,487,14,[],"_refreshTopMethods"],
-ka:[function(a,b){return"padding-left: "+H.d(J.p0(b.gyt(),16))+"px;"},"call$1","gGX",2,0,488,489,[],"padding",365],
+J.bj(a.qY,y)},"call$1","guE",2,0,496,14,[],"_refreshTopMethods"],
+ka:[function(a,b){return"padding-left: "+H.d(J.p0(b.gyt(),16))+"px;"},"call$1","gGX",2,0,497,498,[],"padding",370],
LZ:[function(a,b){var z=J.bY(b.gyt(),5)
if(z>>>0!==z||z>=5)return H.e(C.PQ,z)
-return C.PQ[z]},"call$1","gth",2,0,488,489,[],"coloring",365],
+return C.PQ[z]},"call$1","gth",2,0,497,498,[],"coloring",370],
YF:[function(a,b,c,d){var z,y,x
z=J.u3(d)
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$istV){y=a.Hm
x=z.rowIndex
if(typeof x!=="number")return x.W()
-y.qU(x-1)}},"call$3","gpR",6,0,490,18,[],301,[],74,[],"toggleExpanded",365],
+y.qU(x-1)}},"call$3","gpR",6,0,499,18,[],303,[],74,[],"toggleExpanded",370],
"@":function(){return[C.jR]},
static:{jD:[function(a){var z,y,x,w,v
z=R.Jk([])
@@ -18343,12 +18565,12 @@
C.XH.ZL(a)
C.XH.G6(a)
return a},null,null,0,0,108,"new IsolateProfileElement$created"]}},
-"+IsolateProfileElement":[491],
+"+IsolateProfileElement":[500],
waa:{
"^":"uL+Pi;",
$isd3:true},
-RR:{
-"^":"Tp:353;a-77,b-77",
+SV:{
+"^":"Tp:355;a-77,b-77",
call$1:[function(a){var z,y,x,w
z=J.UQ(a,"samples")
N.Jx("").To("Profile contains "+H.d(z)+" samples.")
@@ -18357,19 +18579,19 @@
J.CJ(x,L.hh(x,a))
w=J.RE(y)
w.oC(y,x)
-w.f9(y,x)},"call$1",null,2,0,353,492,[],"call"],
+w.f9(y,x)},"call$1",null,2,0,355,501,[],"call"],
$isEH:true},
-"+IsolateProfileElement_refreshData_closure":[467],
-EL:{
-"^":"Tp:223;c-77",
-call$1:[function(a){},"call$1",null,2,0,223,18,[],"call"],
+"+IsolateProfileElement_refresh_closure":[358],
+vH:{
+"^":"Tp:225;c-77",
+call$1:[function(a){},"call$1",null,2,0,225,18,[],"call"],
$isEH:true},
-"+IsolateProfileElement_refreshData_closure":[467]}],["isolate_summary_element","package:observatory/src/observatory_elements/isolate_summary.dart",,D,{
+"+IsolateProfileElement_refresh_closure":[358]}],["isolate_summary_element","package:observatory/src/observatory_elements/isolate_summary.dart",,D,{
"^":"",
St:{
-"^":["V0;Pw%-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gAq:[function(a){return a.Pw},null,null,1,0,493,"isolate",351,352],
-sAq:[function(a,b){a.Pw=this.ct(a,C.Z8,a.Pw,b)},null,null,3,0,494,23,[],"isolate",351],
+"^":["V0;Pw%-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gAq:[function(a){return a.Pw},null,null,1,0,502,"isolate",353,354],
+sAq:[function(a,b){a.Pw=this.ct(a,C.Z8,a.Pw,b)},null,null,3,0,503,23,[],"isolate",353],
"@":function(){return[C.aM]},
static:{JR:[function(a){var z,y,x,w
z=$.Nd()
@@ -18383,38 +18605,38 @@
C.Qt.ZL(a)
C.Qt.G6(a)
return a},null,null,0,0,108,"new IsolateSummaryElement$created"]}},
-"+IsolateSummaryElement":[495],
+"+IsolateSummaryElement":[504],
V0:{
"^":"uL+Pi;",
$isd3:true}}],["json_view_element","package:observatory/src/observatory_elements/json_view.dart",,Z,{
"^":"",
vj:{
-"^":["V4;eb%-77,kf%-77,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gvL:[function(a){return a.eb},null,null,1,0,108,"json",351,352],
-svL:[function(a,b){a.eb=this.ct(a,C.Gd,a.eb,b)},null,null,3,0,223,23,[],"json",351],
+"^":["V4;eb%-77,kf%-77,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gvL:[function(a){return a.eb},null,null,1,0,108,"json",353,354],
+svL:[function(a,b){a.eb=this.ct(a,C.Gd,a.eb,b)},null,null,3,0,225,23,[],"json",353],
i4:[function(a){Z.uL.prototype.i4.call(this,a)
a.kf=0},"call$0","gQd",0,0,107,"enteredView"],
-yC:[function(a,b){this.ct(a,C.eR,"a","b")},"call$1","gHl",2,0,150,225,[],"jsonChanged"],
-gW0:[function(a){return J.AG(a.eb)},null,null,1,0,362,"primitiveString"],
+yC:[function(a,b){this.ct(a,C.eR,"a","b")},"call$1","gHl",2,0,153,227,[],"jsonChanged"],
+gW0:[function(a){return J.AG(a.eb)},null,null,1,0,367,"primitiveString"],
gmm:[function(a){var z,y
z=a.eb
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isZ0)return"Map"
else if(typeof z==="object"&&z!==null&&(z.constructor===Array||!!y.$isList))return"List"
-return"Primitive"},null,null,1,0,362,"valueType"],
+return"Primitive"},null,null,1,0,367,"valueType"],
gkG:[function(a){var z=a.kf
a.kf=J.WB(z,1)
-return z},null,null,1,0,482,"counter"],
+return z},null,null,1,0,491,"counter"],
gaK:[function(a){var z,y
z=a.eb
y=J.x(z)
if(typeof z==="object"&&z!==null&&(z.constructor===Array||!!y.$isList))return z
-return[]},null,null,1,0,483,"list"],
+return[]},null,null,1,0,492,"list"],
gvc:[function(a){var z,y
z=a.eb
y=J.RE(z)
if(typeof z==="object"&&z!==null&&!!y.$isZ0)return J.qA(y.gvc(z))
-return[]},null,null,1,0,483,"keys"],
+return[]},null,null,1,0,492,"keys"],
r6:[function(a,b){return J.UQ(a.eb,b)},"call$1","gP",2,0,25,42,[],"value"],
"@":function(){return[C.KH]},
static:{mA:[function(a){var z,y,x,w
@@ -18431,13 +18653,13 @@
C.GB.ZL(a)
C.GB.G6(a)
return a},null,null,0,0,108,"new JsonViewElement$created"]}},
-"+JsonViewElement":[496],
+"+JsonViewElement":[505],
V4:{
"^":"uL+Pi;",
$isd3:true}}],["library_ref_element","package:observatory/src/observatory_elements/library_ref.dart",,R,{
"^":"",
LU:{
-"^":["xI;tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["xI;tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.QU]},
static:{rA:[function(a){var z,y,x,w
z=$.Nd()
@@ -18453,12 +18675,14 @@
C.Z3.ZL(a)
C.Z3.G6(a)
return a},null,null,0,0,108,"new LibraryRefElement$created"]}},
-"+LibraryRefElement":[357]}],["library_view_element","package:observatory/src/observatory_elements/library_view.dart",,M,{
+"+LibraryRefElement":[362]}],["library_view_element","package:observatory/src/observatory_elements/library_view.dart",,M,{
"^":"",
T2:{
-"^":["V10;N7%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gtD:[function(a){return a.N7},null,null,1,0,350,"library",351,352],
-stD:[function(a,b){a.N7=this.ct(a,C.EV,a.N7,b)},null,null,3,0,353,23,[],"library",351],
+"^":["V10;N7%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtD:[function(a){return a.N7},null,null,1,0,352,"library",353,354],
+stD:[function(a,b){a.N7=this.ct(a,C.EV,a.N7,b)},null,null,3,0,355,23,[],"library",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP(J.UQ(a.N7,"id"))
+a.hm.gDF().fB(z).ml(new M.Jq(a)).OA(new M.RJ()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.Gg]},
static:{SP:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
@@ -18475,10 +18699,23 @@
C.MG.ZL(a)
C.MG.G6(a)
return a},null,null,0,0,108,"new LibraryViewElement$created"]}},
-"+LibraryViewElement":[497],
+"+LibraryViewElement":[506],
V10:{
"^":"uL+Pi;",
-$isd3:true}}],["logging","package:logging/logging.dart",,N,{
+$isd3:true},
+Jq:{
+"^":"Tp:225;a-77",
+call$1:[function(a){var z,y
+z=this.a
+y=J.RE(z)
+y.sN7(z,y.ct(z,C.EV,y.gN7(z),a))},"call$1",null,2,0,225,144,[],"call"],
+$isEH:true},
+"+LibraryViewElement_refresh_closure":[358],
+RJ:{
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while refreshing library-view: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
+$isEH:true},
+"+LibraryViewElement_refresh_closure":[358]}],["logging","package:logging/logging.dart",,N,{
"^":"",
TJ:{
"^":"a;oc>,eT>,n2,Cj>,wd>,Gs",
@@ -18505,19 +18742,19 @@
w=new N.HV(a,b,z,y,x,c,d)
if($.RL)for(v=this;v!=null;){z=J.RE(v)
z.od(v,w)
-v=z.geT(v)}else J.EY(N.Jx(""),w)}},"call$4","gA9",4,4,null,77,77,498,[],20,[],152,[],153,[]],
-X2:[function(a,b,c){return this.Y6(C.Ab,a,b,c)},function(a){return this.X2(a,null,null)},"x9","call$3",null,"git",2,4,null,77,77,20,[],152,[],153,[]],
-yl:[function(a,b,c){return this.Y6(C.R5,a,b,c)},function(a){return this.yl(a,null,null)},"J4","call$3",null,"gjW",2,4,null,77,77,20,[],152,[],153,[]],
-ZG:[function(a,b,c){return this.Y6(C.IF,a,b,c)},function(a){return this.ZG(a,null,null)},"To","call$3",null,"gqa",2,4,null,77,77,20,[],152,[],153,[]],
-xH:[function(a,b,c){return this.Y6(C.UP,a,b,c)},function(a){return this.xH(a,null,null)},"j2","call$3",null,"goa",2,4,null,77,77,20,[],152,[],153,[]],
-WB:[function(a,b,c){return this.Y6(C.cV,a,b,c)},function(a){return this.WB(a,null,null)},"hh","call$3",null,"gxx",2,4,null,77,77,20,[],152,[],153,[]],
+v=z.geT(v)}else J.EY(N.Jx(""),w)}},"call$4","gA9",4,4,null,77,77,507,[],20,[],155,[],156,[]],
+X2:[function(a,b,c){return this.Y6(C.VZ,a,b,c)},function(a){return this.X2(a,null,null)},"x9","call$3",null,"git",2,4,null,77,77,20,[],155,[],156,[]],
+yl:[function(a,b,c){return this.Y6(C.R5,a,b,c)},function(a){return this.yl(a,null,null)},"J4","call$3",null,"gjW",2,4,null,77,77,20,[],155,[],156,[]],
+ZG:[function(a,b,c){return this.Y6(C.IF,a,b,c)},function(a){return this.ZG(a,null,null)},"To","call$3",null,"gqa",2,4,null,77,77,20,[],155,[],156,[]],
+xH:[function(a,b,c){return this.Y6(C.UP,a,b,c)},function(a){return this.xH(a,null,null)},"j2","call$3",null,"goa",2,4,null,77,77,20,[],155,[],156,[]],
+WB:[function(a,b,c){return this.Y6(C.cV,a,b,c)},function(a){return this.WB(a,null,null)},"hh","call$3",null,"gxx",2,4,null,77,77,20,[],155,[],156,[]],
IE:[function(){if($.RL||this.eT==null){var z=this.Gs
if(z==null){z=P.bK(null,null,!0,N.HV)
this.Gs=z}z.toString
return H.VM(new P.Ik(z),[H.Kp(z,0)])}else return N.Jx("").IE()},"call$0","gnc",0,0,null],
od:[function(a,b){var z=this.Gs
if(z!=null){if(z.Gv>=4)H.vh(z.q7())
-z.Iv(b)}},"call$1","gHh",2,0,null,22,[]],
+z.Iv(b)}},"call$1","gBq",2,0,null,22,[]],
QL:function(a,b,c){var z=this.eT
if(z!=null)J.Tr(z).u(0,this.oc,this)},
$isTJ:true,
@@ -18575,28 +18812,28 @@
J.UQ($.cM(),"google").V7("load",["visualization","1",P.jT(H.B7(["packages",["corechart","table"],"callback",new P.r7(P.xZ(z.gv6(z),!0))],P.L5(null,null,null,null,null)))])
z.MM.ml(L.vN()).ml(new F.Lb())},"call$0","qg",0,0,null],
em:{
-"^":"Tp:500;",
-call$1:[function(a){P.JS(a.gOR().oc+": "+H.d(a.gFl())+": "+H.d(J.yj(a)))},"call$1",null,2,0,null,499,[],"call"],
+"^":"Tp:509;",
+call$1:[function(a){P.JS(a.gOR().oc+": "+H.d(a.gFl())+": "+H.d(J.yj(a)))},"call$1",null,2,0,null,508,[],"call"],
$isEH:true},
Lb:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){N.Jx("").To("Initializing Polymer")
-A.Ok()},"call$1",null,2,0,null,235,[],"call"],
+A.Ok()},"call$1",null,2,0,null,237,[],"call"],
$isEH:true}}],["message_viewer_element","package:observatory/src/observatory_elements/message_viewer.dart",,L,{
"^":"",
PF:{
-"^":["uL;Gj%-347,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gG1:[function(a){return a.Gj},null,null,1,0,350,"message",352],
+"^":["uL;Gj%-349,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gG1:[function(a){return a.Gj},null,null,1,0,352,"message",354],
sG1:[function(a,b){a.Gj=b
this.ct(a,C.US,"",this.gQW(a))
this.ct(a,C.zu,[],this.glc(a))
-N.Jx("").To("Viewing message of type '"+H.d(J.UQ(a.Gj,"type"))+"'")},null,null,3,0,353,183,[],"message",352],
+N.Jx("").To("Viewing message of type '"+H.d(J.UQ(a.Gj,"type"))+"'")},null,null,3,0,355,186,[],"message",354],
gQW:[function(a){var z=a.Gj
if(z==null||J.UQ(z,"type")==null)return"Error"
-return J.UQ(a.Gj,"type")},null,null,1,0,362,"messageType"],
+return J.UQ(a.Gj,"type")},null,null,1,0,367,"messageType"],
glc:[function(a){var z=a.Gj
if(z==null||J.UQ(z,"members")==null)return[]
-return J.UQ(a.Gj,"members")},null,null,1,0,501,"members"],
+return J.UQ(a.Gj,"members")},null,null,1,0,510,"members"],
"@":function(){return[C.rc]},
static:{A5:[function(a){var z,y,x,w
z=$.Nd()
@@ -18610,24 +18847,24 @@
C.Wp.ZL(a)
C.Wp.G6(a)
return a},null,null,0,0,108,"new MessageViewerElement$created"]}},
-"+MessageViewerElement":[474]}],["metadata","../../../../../../../../../dart/dart-sdk/lib/html/html_common/metadata.dart",,B,{
+"+MessageViewerElement":[483]}],["metadata","../../../../../../../../../dart/dart-sdk/lib/html/html_common/metadata.dart",,B,{
"^":"",
-fA:{
+T4:{
"^":"a;T9,Jt",
-static:{"^":"n4I,en,pjg,PZ,xa"}},
-tz:{
+static:{"^":"Xd,en,pjg,PZ,xa"}},
+Qz:{
"^":"a;"},
jA:{
"^":"a;oc>"},
PO:{
"^":"a;"},
c5:{
-"^":"a;"}}],["navigation_bar_element","package:observatory/src/observatory_elements/navigation_bar.dart",,Q,{
+"^":"a;"}}],["nav_bar_element","package:observatory/src/observatory_elements/nav_bar.dart",,A,{
"^":"",
-qT:{
-"^":["uL;hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-"@":function(){return[C.KG]},
-static:{BW:[function(a){var z,y,x,w
+F1:{
+"^":["uL;hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"@":function(){return[C.nW]},
+static:{z5:[function(a){var z,y,x,w
z=$.Nd()
y=P.Py(null,null,null,J.O,W.I0)
x=J.O
@@ -18636,54 +18873,194 @@
a.SO=z
a.B7=y
a.X0=w
-C.Xg.ZL(a)
-C.Xg.G6(a)
-return a},null,null,0,0,108,"new NavigationBarElement$created"]}},
-"+NavigationBarElement":[474]}],["navigation_bar_isolate_element","package:observatory/src/observatory_elements/navigation_bar_isolate.dart",,F,{
-"^":"",
-Xd:{
-"^":["V11;rK%-477,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gNa:[function(a){return a.rK},null,null,1,0,502,"links",351,365],
-sNa:[function(a,b){a.rK=this.ct(a,C.AX,a.rK,b)},null,null,3,0,503,23,[],"links",351],
-Pz:[function(a,b){Z.uL.prototype.Pz.call(this,a,b)
-this.ct(a,C.T7,"",this.gMm(a))},"call$1","gpx",2,0,150,225,[],"appChanged"],
-Zc:[function(a){var z,y
-z=a.hm
-if(z==null)return""
-y=z.gZ6().Pr()
-if(y==null)return""
-return J.O6(y)},"call$0","gMm",0,0,362,"currentIsolateName"],
-Ta:[function(a,b){var z=a.hm
-if(z==null)return""
-switch(b){case"Stacktrace":return z.gZ6().kP("stacktrace")
-case"Library":return z.gZ6().kP("library")
-case"CPU Profile":return z.gZ6().kP("profile")
-default:return z.gZ6().kP("")}},"call$1","gcD",2,0,504,505,[],"currentIsolateLink"],
-"@":function(){return[C.AR]},
-static:{L1:[function(a){var z,y,x,w,v
-z=R.Jk(["Stacktrace","Library","CPU Profile"])
-y=$.Nd()
-x=P.Py(null,null,null,J.O,W.I0)
-w=J.O
-v=W.cv
-v=H.VM(new V.qC(P.Py(null,null,null,w,v),null,null),[w,v])
-a.rK=z
-a.SO=y
-a.B7=x
-a.X0=v
-C.Vn.ZL(a)
-C.Vn.G6(a)
-return a},null,null,0,0,108,"new NavigationBarIsolateElement$created"]}},
-"+NavigationBarIsolateElement":[506],
+C.kD.ZL(a)
+C.kD.G6(a)
+return a},null,null,0,0,108,"new NavBarElement$created"]}},
+"+NavBarElement":[483],
+aQ:{
+"^":["V11;KU%-369,ZC%-369,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gPj:[function(a){return a.KU},null,null,1,0,367,"link",353,354],
+sPj:[function(a,b){a.KU=this.ct(a,C.dB,a.KU,b)},null,null,3,0,25,23,[],"link",353],
+gdU:[function(a){return a.ZC},null,null,1,0,367,"anchor",353,354],
+sdU:[function(a,b){a.ZC=this.ct(a,C.Es,a.ZC,b)},null,null,3,0,25,23,[],"anchor",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.pc]},
+static:{AJ:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.KU="#"
+a.ZC="---"
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.SU.ZL(a)
+C.SU.G6(a)
+return a},null,null,0,0,108,"new NavMenuElement$created"]}},
+"+NavMenuElement":[511],
V11:{
"^":"uL+Pi;",
+$isd3:true},
+Qa:{
+"^":["V12;KU%-369,ZC%-369,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gPj:[function(a){return a.KU},null,null,1,0,367,"link",353,354],
+sPj:[function(a,b){a.KU=this.ct(a,C.dB,a.KU,b)},null,null,3,0,25,23,[],"link",353],
+gdU:[function(a){return a.ZC},null,null,1,0,367,"anchor",353,354],
+sdU:[function(a,b){a.ZC=this.ct(a,C.Es,a.ZC,b)},null,null,3,0,25,23,[],"anchor",353],
+"@":function(){return[C.qT]},
+static:{EL:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.KU="#"
+a.ZC="---"
+a.SO=z
+a.B7=y
+a.X0=w
+C.nn.ZL(a)
+C.nn.G6(a)
+return a},null,null,0,0,108,"new NavMenuItemElement$created"]}},
+"+NavMenuItemElement":[512],
+V12:{
+"^":"uL+Pi;",
+$isd3:true},
+vI:{
+"^":["V13;rU%-77,SB%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gFR:[function(a){return a.rU},null,null,1,0,108,"callback",353,354],
+Ki:function(a){return this.gFR(a).call$0()},
+VN:function(a,b){return this.gFR(a).call$1(b)},
+sFR:[function(a,b){a.rU=this.ct(a,C.AV,a.rU,b)},null,null,3,0,225,23,[],"callback",353],
+gxw:[function(a){return a.SB},null,null,1,0,371,"active",353,354],
+sxw:[function(a,b){a.SB=this.ct(a,C.aP,a.SB,b)},null,null,3,0,372,23,[],"active",353],
+Ty:[function(a,b,c,d){var z=a.SB
+if(z===!0)return
+a.SB=this.ct(a,C.aP,z,!0)
+if(a.rU!=null)this.VN(a,this.gCB(a))},"call$3","gzY",6,0,374,18,[],303,[],74,[],"buttonClick"],
+wY:[function(a){a.SB=this.ct(a,C.aP,a.SB,!1)},"call$0","gCB",0,0,107,"refreshDone"],
+"@":function(){return[C.XG]},
+static:{ZC:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.SB=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.J7.ZL(a)
+C.J7.G6(a)
+return a},null,null,0,0,108,"new NavRefreshElement$created"]}},
+"+NavRefreshElement":[513],
+V13:{
+"^":"uL+Pi;",
+$isd3:true},
+tz:{
+"^":["V14;Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.NT]},
+static:{J8:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.lx.ZL(a)
+C.lx.G6(a)
+return a},null,null,0,0,108,"new TopNavMenuElement$created"]}},
+"+TopNavMenuElement":[514],
+V14:{
+"^":"uL+Pi;",
+$isd3:true},
+fl:{
+"^":["V15;iy%-361,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gAq:[function(a){return a.iy},null,null,1,0,502,"isolate",353,354],
+sAq:[function(a,b){a.iy=this.ct(a,C.Z8,a.iy,b)},null,null,3,0,503,23,[],"isolate",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.zaS]},
+static:{Yt:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.RR.ZL(a)
+C.RR.G6(a)
+return a},null,null,0,0,108,"new IsolateNavMenuElement$created"]}},
+"+IsolateNavMenuElement":[515],
+V15:{
+"^":"uL+Pi;",
+$isd3:true},
+Zt:{
+"^":["V16;Ap%-349,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtD:[function(a){return a.Ap},null,null,1,0,352,"library",353,354],
+stD:[function(a,b){a.Ap=this.ct(a,C.EV,a.Ap,b)},null,null,3,0,355,23,[],"library",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.KI]},
+static:{IV:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.S3.ZL(a)
+C.S3.G6(a)
+return a},null,null,0,0,108,"new LibraryNavMenuElement$created"]}},
+"+LibraryNavMenuElement":[516],
+V16:{
+"^":"uL+Pi;",
+$isd3:true},
+wM:{
+"^":["V17;Au%-349,Jo%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gRu:[function(a){return a.Au},null,null,1,0,352,"cls",353,354],
+sRu:[function(a,b){a.Au=this.ct(a,C.XA,a.Au,b)},null,null,3,0,355,23,[],"cls",353],
+grZ:[function(a){return a.Jo},null,null,1,0,371,"last",353,354],
+srZ:[function(a,b){a.Jo=this.ct(a,C.QL,a.Jo,b)},null,null,3,0,372,23,[],"last",353],
+"@":function(){return[C.t9]},
+static:{lT:[function(a){var z,y,x,w
+z=$.Nd()
+y=P.Py(null,null,null,J.O,W.I0)
+x=J.O
+w=W.cv
+w=H.VM(new V.qC(P.Py(null,null,null,x,w),null,null),[x,w])
+a.Jo=!1
+a.SO=z
+a.B7=y
+a.X0=w
+C.xE.ZL(a)
+C.xE.G6(a)
+return a},null,null,0,0,108,"new ClassNavMenuElement$created"]}},
+"+ClassNavMenuElement":[517],
+V17:{
+"^":"uL+Pi;",
$isd3:true}}],["observatory","package:observatory/observatory.dart",,L,{
"^":"",
m7:[function(a){var z
N.Jx("").To("Google Charts API loaded")
z=J.UQ(J.UQ($.cM(),"google"),"visualization")
$.NR=z
-return z},"call$1","vN",2,0,223,235,[]],
+return z},"call$1","vN",2,0,225,237,[]],
CX:[function(a){var z,y,x,w,v,u
z=$.mE().R4(0,a)
if(z==null)return 0
@@ -18696,7 +19073,7 @@
if(typeof w!=="number")return H.s(w)
y=H.BU(C.xB.yn(x,v+w),16,null)
return y}catch(u){H.Ru(u)
-return 0}},"call$1","Cz",2,0,null,212,[]],
+return 0}},"call$1","Cz",2,0,null,214,[]],
r5:[function(a){var z,y,x,w,v
z=$.kj().R4(0,a)
if(z==null)return
@@ -18707,10 +19084,10 @@
if(0>=y.length)return H.e(y,0)
y=J.q8(y[0])
if(typeof y!=="number")return H.s(y)
-return C.xB.Nj(x,w,v+y)},"call$1","cK",2,0,null,212,[]],
+return C.xB.Nj(x,w,v+y)},"call$1","cK",2,0,null,214,[]],
Lw:[function(a){var z=L.r5(a)
if(z==null)return
-return J.ZZ(z,1)},"call$1","J4",2,0,null,212,[]],
+return J.ZZ(z,1)},"call$1","J4",2,0,null,214,[]],
CB:[function(a){var z,y,x,w
z=$.XJ().R4(0,a)
if(z==null)return
@@ -18720,9 +19097,9 @@
if(0>=y.length)return H.e(y,0)
y=J.q8(y[0])
if(typeof y!=="number")return H.s(y)
-return C.xB.yn(x,w+y)},"call$1","jU",2,0,null,212,[]],
+return C.xB.yn(x,w+y)},"call$1","jU",2,0,null,214,[]],
mL:{
-"^":["Pi;Z6<-507,DF<-508,nI<-509,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null],
+"^":["Pi;Z6<-518,DF<-519,nI<-520,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null],
pO:[function(){var z,y,x
z=this.Z6
z.sXT(this)
@@ -18733,7 +19110,7 @@
$.tE=this
y.se0(x.gPI())
z.kI()},"call$0","gGo",0,0,null],
-AQ:[function(a){return J.UQ(this.nI.gi2(),a)},"call$1","grE",2,0,null,236,[]],
+AQ:[function(a){return J.UQ(this.nI.gi2(),a)},"call$1","grE",2,0,null,238,[]],
US:function(){this.pO()},
hq:function(){this.pO()},
static:{"^":"li,pQ"}},
@@ -18741,49 +19118,61 @@
"^":"a;oV<",
goH:function(){return this.oV.nQ("getNumberOfColumns")},
gWT:function(a){return this.oV.nQ("getNumberOfRows")},
-Gl:[function(a,b){this.oV.V7("addColumn",[a,b])},"call$2","gGU",4,0,null,11,[],510,[]],
+Gl:[function(a,b){this.oV.V7("addColumn",[a,b])},"call$2","gGU",4,0,null,11,[],521,[]],
lb:[function(){var z=this.oV
z.V7("removeRows",[0,z.nQ("getNumberOfRows")])},"call$0","gGL",0,0,null],
RP:[function(a,b){var z=[]
C.Nm.FV(z,H.VM(new H.A8(b,P.En()),[null,null]))
-this.oV.V7("addRow",[H.VM(new P.Tz(z),[null])])},"call$1","gJW",2,0,null,489,[]]},
+this.oV.V7("addRow",[H.VM(new P.Tz(z),[null])])},"call$1","gJW",2,0,null,498,[]]},
qu:{
"^":"a;YZ,bG>",
+u5:[function(){var z,y,x
+z=this.YZ.nQ("getSortInfo")
+if(z!=null&&!J.de(J.UQ(z,"column"),-1)){y=this.bG
+x=J.U6(z)
+y.u(0,"sortColumn",x.t(z,"column"))
+y.u(0,"sortAscending",x.t(z,"ascending"))}},"call$0","gIK",0,0,null],
W2:[function(a){var z=P.jT(this.bG)
-this.YZ.V7("draw",[a.goV(),z])},"call$1","gW8",2,0,null,178,[]]},
+this.YZ.V7("draw",[a.goV(),z])},"call$1","gW8",2,0,null,181,[]]},
bv:{
-"^":["Pi;WP,XR<-511,Z0<-512,md,mY,F3,rU,LE<-513,iP,mU,mM,Td,AP,fn",null,function(){return[C.mI]},function(){return[C.mI]},null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
-gB1:[function(a){return this.WP},null,null,1,0,514,"profile",351,365],
-sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,515,23,[],"profile",351],
-gjO:[function(a){return this.md},null,null,1,0,362,"id",351,365],
-sjO:[function(a,b){this.md=F.Wi(this,C.EN,this.md,b)},null,null,3,0,25,23,[],"id",351],
-goc:[function(a){return this.mY},null,null,1,0,362,"name",351,365],
-soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",351],
-gw2:[function(){return this.F3},null,null,1,0,350,"entry",351,365],
-sw2:[function(a){this.F3=F.Wi(this,C.tP,this.F3,a)},null,null,3,0,353,23,[],"entry",351],
-gVc:[function(){return this.rU},null,null,1,0,362,"rootLib",351,365],
-sVc:[function(a){this.rU=F.Wi(this,C.iF,this.rU,a)},null,null,3,0,25,23,[],"rootLib",351],
-gCi:[function(){return this.iP},null,null,1,0,482,"newHeapUsed",351,365],
-sCi:[function(a){this.iP=F.Wi(this,C.IO,this.iP,a)},null,null,3,0,385,23,[],"newHeapUsed",351],
-guq:[function(){return this.mU},null,null,1,0,482,"oldHeapUsed",351,365],
-suq:[function(a){this.mU=F.Wi(this,C.ap,this.mU,a)},null,null,3,0,385,23,[],"oldHeapUsed",351],
-gKu:[function(){return this.mM},null,null,1,0,350,"topFrame",351,365],
-sKu:[function(a){this.mM=F.Wi(this,C.ch,this.mM,a)},null,null,3,0,353,23,[],"topFrame",351],
-gNh:[function(a){return this.Td},null,null,1,0,362,"fileAndLine",351,365],
+"^":["Pi;WP,XR<-522,Z0<-523,md,mY,e8,F3,Gg,LE<-524,iP,mU,mM,Td,AP,fn",null,function(){return[C.mI]},function(){return[C.mI]},null,null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
+gB1:[function(a){return this.WP},null,null,1,0,525,"profile",353,370],
+sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,526,23,[],"profile",353],
+gjO:[function(a){return this.md},null,null,1,0,367,"id",353,370],
+sjO:[function(a,b){this.md=F.Wi(this,C.EN,this.md,b)},null,null,3,0,25,23,[],"id",353],
+goc:[function(a){return this.mY},null,null,1,0,367,"name",353,370],
+soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",353],
+gzz:[function(){return this.e8},null,null,1,0,367,"vmName",353,370],
+szz:[function(a){this.e8=F.Wi(this,C.KS,this.e8,a)},null,null,3,0,25,23,[],"vmName",353],
+gw2:[function(){return this.F3},null,null,1,0,352,"entry",353,370],
+sw2:[function(a){this.F3=F.Wi(this,C.tP,this.F3,a)},null,null,3,0,355,23,[],"entry",353],
+gVc:[function(){return this.Gg},null,null,1,0,367,"rootLib",353,370],
+sVc:[function(a){this.Gg=F.Wi(this,C.iF,this.Gg,a)},null,null,3,0,25,23,[],"rootLib",353],
+gCi:[function(){return this.iP},null,null,1,0,491,"newHeapUsed",353,370],
+sCi:[function(a){this.iP=F.Wi(this,C.IO,this.iP,a)},null,null,3,0,392,23,[],"newHeapUsed",353],
+guq:[function(){return this.mU},null,null,1,0,491,"oldHeapUsed",353,370],
+suq:[function(a){this.mU=F.Wi(this,C.ap,this.mU,a)},null,null,3,0,392,23,[],"oldHeapUsed",353],
+gKu:[function(){return this.mM},null,null,1,0,352,"topFrame",353,370],
+sKu:[function(a){this.mM=F.Wi(this,C.ch,this.mM,a)},null,null,3,0,355,23,[],"topFrame",353],
+gNh:[function(a){return this.Td},null,null,1,0,367,"fileAndLine",353,370],
bj:function(a,b){return this.gNh(this).call$1(b)},
-sNh:[function(a,b){this.Td=F.Wi(this,C.SK,this.Td,b)},null,null,3,0,25,23,[],"fileAndLine",351],
+sNh:[function(a,b){this.Td=F.Wi(this,C.SK,this.Td,b)},null,null,3,0,25,23,[],"fileAndLine",353],
zr:[function(a){var z="/"+H.d(this.md)+"/"
-$.tE.DF.fB(z).ml(new L.eS(this)).OA(new L.IQ())},"call$0","gBq",0,0,null],
+return $.tE.DF.fB(z).ml(new L.eS(this)).OA(new L.IQ())},"call$0","gvC",0,0,null],
eC:[function(a){var z,y,x,w
z=J.U6(a)
if(!J.de(z.t(a,"type"),"Isolate")){N.Jx("").hh("Unexpected message type in Isolate.update: "+H.d(z.t(a,"type")))
-return}if(z.t(a,"name")==null||z.t(a,"rootLib")==null||z.t(a,"timers")==null||z.t(a,"heap")==null){N.Jx("").hh("Malformed 'Isolate' response: "+H.d(a))
-return}y=z.t(a,"name")
-this.mY=F.Wi(this,C.YS,this.mY,y)
-y=J.UQ(z.t(a,"rootLib"),"id")
-this.rU=F.Wi(this,C.iF,this.rU,y)
+return}if(z.t(a,"rootLib")==null||z.t(a,"timers")==null||z.t(a,"heap")==null){N.Jx("").hh("Malformed 'Isolate' response: "+H.d(a))
+return}y=J.UQ(z.t(a,"rootLib"),"id")
+this.Gg=F.Wi(this,C.iF,this.Gg,y)
+y=z.t(a,"name")
+this.e8=F.Wi(this,C.KS,this.e8,y)
if(z.t(a,"entry")!=null){y=z.t(a,"entry")
-this.F3=F.Wi(this,C.tP,this.F3,y)}if(z.t(a,"topFrame")!=null){y=z.t(a,"topFrame")
+y=F.Wi(this,C.tP,this.F3,y)
+this.F3=y
+y=J.UQ(y,"name")
+this.mY=F.Wi(this,C.YS,this.mY,y)}else this.mY=F.Wi(this,C.YS,this.mY,"root isolate")
+if(z.t(a,"topFrame")!=null){y=z.t(a,"topFrame")
this.mM=F.Wi(this,C.ch,this.mM,y)}x=H.B7([],P.L5(null,null,null,null,null))
J.kH(z.t(a,"timers"),new L.TI(x))
y=this.LE
@@ -18805,7 +19194,7 @@
while(!0){w=y.gB(z)
if(typeof w!=="number")return H.s(w)
if(!(x<w))break
-if(J.kE(y.t(z,x),a)===!0)return y.t(z,x);++x}return},"call$1","gSB",2,0,null,516,[]],
+if(J.kE(y.t(z,x),a)===!0)return y.t(z,x);++x}return},"call$1","gt7",2,0,null,527,[]],
R7:[function(){var z,y,x,w
N.Jx("").To("Reset all code ticks.")
z=this.Z0
@@ -18821,24 +19210,24 @@
u=J.UQ(v.t(w,"script"),"id")
t=x.t(y,u)
if(t==null){t=L.Ak(v.t(w,"script"))
-x.u(y,u,t)}t.o6(v.t(w,"hits"))}},"call$1","gHY",2,0,null,517,[]],
+x.u(y,u,t)}t.o6(v.t(w,"hits"))}},"call$1","gHY",2,0,null,528,[]],
$isbv:true,
static:{"^":"tE?"}},
eS:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.eC(a)},"call$1",null,2,0,null,144,[],"call"],
$isEH:true},
IQ:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").hh("Error while updating isolate summary: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,null,18,[],472,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while updating isolate summary: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,null,18,[],359,[],"call"],
$isEH:true},
TI:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.U6(a)
-this.a.u(0,z.t(a,"name"),z.t(a,"time"))},"call$1",null,2,0,null,518,[],"call"],
+this.a.u(0,z.t(a,"name"),z.t(a,"time"))},"call$1",null,2,0,null,529,[],"call"],
$isEH:true},
yU:{
-"^":["Pi;XT?,i2<-519,AP,fn",null,function(){return[C.mI]},null,null],
+"^":["Pi;XT?,i2<-530,AP,fn",null,function(){return[C.mI]},null,null],
Ql:[function(){J.kH(this.XT.DF.gjR(),new L.dY(this))},"call$0","gPI",0,0,107],
AQ:[function(a){var z,y,x,w,v,u
z=this.i2
@@ -18849,33 +19238,33 @@
v=H.VM([],[L.kx])
u=P.L5(null,null,null,J.O,J.GW)
u=R.Jk(u)
-x=new L.bv(null,w,v,a,"",null,null,u,0,0,null,null,null,null)
-y.u(z,a,x)
-return x}return x},"call$1","grE",2,0,null,236,[]],
+x=new L.bv(null,w,v,a,"isolate",null,null,null,u,0,0,null,null,null,null)
+y.u(z,a,x)}if(x.gzz()==null)J.KM(x)
+return x},"call$1","grE",2,0,null,238,[]],
N8:[function(a){var z=[]
J.kH(this.i2,new L.vY(a,z))
H.bQ(z,new L.zZ(this))
-J.kH(a,new L.dS(this))},"call$1","gajF",2,0,null,237,[]],
-static:{AC:[function(a,b){return J.pb(b,new L.Ub(a))},"call$2","mc",4,0,null,236,[],237,[]]}},
+J.kH(a,new L.dS(this))},"call$1","gajF",2,0,null,239,[]],
+static:{AC:[function(a,b){return J.pb(b,new L.Ub(a))},"call$2","mc",4,0,null,238,[],239,[]]}},
Ub:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.de(J.UQ(a,"id"),this.a)},"call$1",null,2,0,null,520,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.de(J.UQ(a,"id"),this.a)},"call$1",null,2,0,null,531,[],"call"],
$isEH:true},
dY:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.U6(a)
-if(J.de(z.t(a,"type"),"IsolateList"))this.a.N8(z.t(a,"members"))},"call$1",null,2,0,null,466,[],"call"],
+if(J.de(z.t(a,"type"),"IsolateList"))this.a.N8(z.t(a,"members"))},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
vY:{
-"^":"Tp:341;a,b",
-call$2:[function(a,b){if(L.AC(a,this.a)!==!0)this.b.push(a)},"call$2",null,4,0,null,417,[],272,[],"call"],
+"^":"Tp:343;a,b",
+call$2:[function(a,b){if(L.AC(a,this.a)!==!0)this.b.push(a)},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true},
zZ:{
-"^":"Tp:223;c",
-call$1:[function(a){J.V1(this.c.i2,a)},"call$1",null,2,0,null,236,[],"call"],
+"^":"Tp:225;c",
+call$1:[function(a){J.V1(this.c.i2,a)},"call$1",null,2,0,null,238,[],"call"],
$isEH:true},
dS:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z,y,x,w,v,u,t,s
z=J.U6(a)
y=z.t(a,"id")
@@ -18887,17 +19276,17 @@
t=H.VM([],[L.kx])
s=P.L5(null,null,null,J.O,J.GW)
s=R.Jk(s)
-v=new L.bv(null,u,t,z.t(a,"id"),z.t(a,"name"),null,null,s,0,0,null,null,null,null)
+v=new L.bv(null,u,t,z.t(a,"id"),z.t(a,"name"),null,null,null,s,0,0,null,null,null,null)
w.u(x,y,v)}J.KM(v)},"call$1",null,2,0,null,144,[],"call"],
$isEH:true},
dZ:{
"^":"Pi;XT?,WP,kg,UL,AP,fn",
-gB1:[function(a){return this.WP},null,null,1,0,366,"profile",351,365],
-sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,367,23,[],"profile",351],
-gb8:[function(){return this.kg},null,null,1,0,362,"currentHash",351,365],
-sb8:[function(a){this.kg=F.Wi(this,C.h1,this.kg,a)},null,null,3,0,25,23,[],"currentHash",351],
-gXX:[function(){return this.UL},null,null,1,0,521,"currentHashUri",351,365],
-sXX:[function(a){this.UL=F.Wi(this,C.tv,this.UL,a)},null,null,3,0,522,23,[],"currentHashUri",351],
+gB1:[function(a){return this.WP},null,null,1,0,371,"profile",353,370],
+sB1:[function(a,b){this.WP=F.Wi(this,C.vb,this.WP,b)},null,null,3,0,372,23,[],"profile",353],
+gb8:[function(){return this.kg},null,null,1,0,367,"currentHash",353,370],
+sb8:[function(a){this.kg=F.Wi(this,C.h1,this.kg,a)},null,null,3,0,25,23,[],"currentHash",353],
+gXX:[function(){return this.UL},null,null,1,0,532,"currentHashUri",353,370],
+sXX:[function(a){this.UL=F.Wi(this,C.tv,this.UL,a)},null,null,3,0,533,23,[],"currentHashUri",353],
kI:[function(){var z=C.PP.aM(window)
H.VM(new W.Ov(0,z.uv,z.Ph,W.aF(new L.Qe(this)),z.Sg),[H.Kp(z,0)]).Zz()
if(!this.S7())this.df()},"call$0","gMz",0,0,null],
@@ -18912,13 +19301,13 @@
y=J.q8(y[0])
if(typeof y!=="number")return H.s(y)
return C.xB.Nj(x,w,v+y)},"call$0","gzJ",0,0,null],
-gwB:[function(){return this.vI()!=null},null,null,1,0,366,"hasCurrentIsolate",365],
+gwB:[function(){return this.vI()!=null},null,null,1,0,371,"hasCurrentIsolate",370],
R6:[function(){var z=this.vI()
if(z==null)return""
return J.ZZ(z,2)},"call$0","gKo",0,0,null],
Pr:[function(){var z=this.R6()
if(z==="")return
-return this.XT.nI.AQ(z)},"call$0","gjf",0,0,null],
+return this.XT.nI.AQ(z)},"call$0","gjf",0,0,502,"currentIsolate",370],
S7:[function(){var z=J.Co(C.ol.gmW(window))
z=F.Wi(this,C.h1,this.kg,z)
this.kg=z
@@ -18939,28 +19328,28 @@
else{this.XT.DF.ox(y)
this.WP=F.Wi(this,C.vb,this.WP,!1)}},"call$0","glq",0,0,null],
kP:[function(a){var z=this.R6()
-return"#/"+z+"/"+H.d(a)},"call$1","gVM",2,0,504,274,[],"currentIsolateRelativeLink",365],
-XY:[function(a){return this.kP("scripts/"+P.jW(C.yD,a,C.xM,!1))},"call$1","gOs",2,0,504,523,[],"currentIsolateScriptLink",365],
-r4:[function(a,b,c){return"#/"+H.d(b)+"/"+H.d(c)},"call$2","gLc",4,0,524,525,[],274,[],"relativeLink",365],
-da:[function(a){return"#/"+H.d(a)},"call$1","geP",2,0,504,274,[],"absoluteLink",365],
-static:{"^":"x4,YF,qY,HT"}},
+return"#/"+z+"/"+H.d(a)},"call$1","gVM",2,0,534,276,[],"currentIsolateRelativeLink",370],
+XY:[function(a){return this.kP("scripts/"+P.jW(C.yD,a,C.xM,!1))},"call$1","gOs",2,0,534,535,[],"currentIsolateScriptLink",370],
+r4:[function(a,b,c){return"#/"+H.d(b)+"/"+H.d(c)},"call$2","gLc",4,0,536,537,[],276,[],"relativeLink",370],
+da:[function(a){return"#/"+H.d(a)},"call$1","geP",2,0,534,276,[],"absoluteLink",370],
+static:{"^":"x4,K3D,qY,HT"}},
Qe:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
if(z.S7())return
F.Wi(z,C.D2,z.vI()==null,z.vI()!=null)
-z.df()},"call$1",null,2,0,null,400,[],"call"],
+z.df()},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
DP:{
-"^":["Pi;Yu<-475,m7<-364,L4<-364,Fv,ZZ,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null,null],
-ga0:[function(){return this.Fv},null,null,1,0,482,"ticks",351,365],
-sa0:[function(a){this.Fv=F.Wi(this,C.p1,this.Fv,a)},null,null,3,0,385,23,[],"ticks",351],
-gGK:[function(){return this.ZZ},null,null,1,0,526,"percent",351,365],
-sGK:[function(a){this.ZZ=F.Wi(this,C.tI,this.ZZ,a)},null,null,3,0,527,23,[],"percent",351],
+"^":["Pi;Yu<-484,m7<-369,L4<-369,Fv,ZZ,AP,fn",function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]},null,null,null,null],
+ga0:[function(){return this.Fv},null,null,1,0,491,"ticks",353,370],
+sa0:[function(a){this.Fv=F.Wi(this,C.p1,this.Fv,a)},null,null,3,0,392,23,[],"ticks",353],
+gGK:[function(){return this.ZZ},null,null,1,0,538,"percent",353,370],
+sGK:[function(a){this.ZZ=F.Wi(this,C.tI,this.ZZ,a)},null,null,3,0,539,23,[],"percent",353],
oS:[function(){var z=this.ZZ
if(z==null||J.Hb(z,0))return""
-return J.Ez(this.ZZ,2)+"% ("+H.d(this.Fv)+")"},"call$0","gu3",0,0,362,"formattedTicks",365],
-xt:[function(){return"0x"+J.u1(this.Yu,16)},"call$0","gZd",0,0,362,"formattedAddress",365]},
+return J.Ez(this.ZZ,2)+"% ("+H.d(this.Fv)+")"},"call$0","gu3",0,0,367,"formattedTicks",370],
+xt:[function(){return"0x"+J.u1(this.Yu,16)},"call$0","gZd",0,0,367,"formattedAddress",370]},
WAE:{
"^":"a;eg",
bu:[function(a){return"CodeKind."+this.eg},"call$0","gXo",0,0,null],
@@ -18968,21 +19357,21 @@
if(z.n(a,"Native"))return C.nj
else if(z.n(a,"Dart"))return C.l8
else if(z.n(a,"Collected"))return C.WA
-throw H.b(P.hS())},"call$1","Tx",2,0,null,86,[]]}},
+throw H.b(P.hS())},"call$1","J6",2,0,null,86,[]]}},
N8:{
"^":"a;Yu<,z4,Iw"},
Vi:{
"^":"a;tT>,Ou<"},
kx:{
-"^":["Pi;fY>,vg,Mb,a0<,VS<,hw,fF<,Du<,va<-528,Qo,uP,mY,B0,AP,fn",null,null,null,null,null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
-gkx:[function(){return this.Qo},null,null,1,0,350,"functionRef",351,365],
-skx:[function(a){this.Qo=F.Wi(this,C.yg,this.Qo,a)},null,null,3,0,353,23,[],"functionRef",351],
-gZN:[function(){return this.uP},null,null,1,0,350,"codeRef",351,365],
-sZN:[function(a){this.uP=F.Wi(this,C.EX,this.uP,a)},null,null,3,0,353,23,[],"codeRef",351],
-goc:[function(a){return this.mY},null,null,1,0,362,"name",351,365],
-soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",351],
-giK:[function(){return this.B0},null,null,1,0,362,"userName",351,365],
-siK:[function(a){this.B0=F.Wi(this,C.ct,this.B0,a)},null,null,3,0,25,23,[],"userName",351],
+"^":["Pi;fY>,vg,Mb,a0<,VS<,hw,fF<,Du<,va<-540,Qo,uP,mY,B0,AP,fn",null,null,null,null,null,null,null,null,function(){return[C.mI]},null,null,null,null,null,null],
+gkx:[function(){return this.Qo},null,null,1,0,352,"functionRef",353,370],
+skx:[function(a){this.Qo=F.Wi(this,C.yg,this.Qo,a)},null,null,3,0,355,23,[],"functionRef",353],
+gZN:[function(){return this.uP},null,null,1,0,352,"codeRef",353,370],
+sZN:[function(a){this.uP=F.Wi(this,C.EX,this.uP,a)},null,null,3,0,355,23,[],"codeRef",353],
+goc:[function(a){return this.mY},null,null,1,0,367,"name",353,370],
+soc:[function(a,b){this.mY=F.Wi(this,C.YS,this.mY,b)},null,null,3,0,25,23,[],"name",353],
+giK:[function(){return this.B0},null,null,1,0,367,"userName",353,370],
+siK:[function(a){this.B0=F.Wi(this,C.ct,this.B0,a)},null,null,3,0,25,23,[],"userName",353],
Ne:[function(a,b){var z,y,x,w,v,u,t
z=J.U6(b)
this.fF=H.BU(z.t(b,"inclusive_ticks"),null,null)
@@ -19003,14 +19392,14 @@
fs:[function(a){var z,y,x
for(z=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]),y=0;z.G();){x=z.lo.gOu()
if(typeof x!=="number")return H.s(x)
-y+=x}return y},"call$1","gJ6",2,0,null,529,[]],
+y+=x}return y},"call$1","gJ6",2,0,null,541,[]],
U8:[function(a,b){var z,y
for(z=H.VM(new H.a7(a,a.length,0,null),[H.Kp(a,0)]);z.G();){y=z.lo
-if(J.de(J.on(y),b))return y.gOu()}return 0},"call$2","gGp",4,0,null,529,[],136,[]],
+if(J.de(J.on(y),b))return y.gOu()}return 0},"call$2","gPz",4,0,null,541,[],136,[]],
hI:[function(a,b){var z=J.U6(a)
-this.GV(this.VS,z.t(a,"callers"),b)
-this.GV(this.hw,z.t(a,"callees"),b)},"call$2","gL0",4,0,null,136,[],530,[]],
-GV:[function(a,b,c){var z,y,x,w,v
+this.OV(this.VS,z.t(a,"callers"),b)
+this.OV(this.hw,z.t(a,"callees"),b)},"call$2","gL0",4,0,null,136,[],542,[]],
+OV:[function(a,b,c){var z,y,x,w,v
C.Nm.sB(a,0)
z=J.U6(b)
y=0
@@ -19021,7 +19410,7 @@
v=H.BU(z.t(b,y+1),null,null)
if(w>>>0!==w||w>=c.length)return H.e(c,w)
a.push(new L.Vi(c[w],v))
-y+=2}H.ZE(a,0,a.length-1,new L.fx())},"call$3","gI1",6,0,null,529,[],231,[],530,[]],
+y+=2}H.ZE(a,0,a.length-1,new L.fx())},"call$3","gI1",6,0,null,541,[],233,[],542,[]],
FB:[function(){this.fF=0
this.Du=0
C.Nm.sB(this.a0,0)
@@ -19036,16 +19425,15 @@
if(typeof v!=="number")return H.s(v)
if(!(w<v))break
c$0:{if(J.de(x.t(a,w),""))break c$0
-y.h(z,new L.DP(H.BU(x.t(a,w),null,null),x.t(a,w+1),x.t(a,w+2),0,null,null,null))}w+=3}},"call$1","gwj",2,0,null,531,[]],
+y.h(z,new L.DP(H.BU(x.t(a,w),null,null),x.t(a,w+1),x.t(a,w+2),0,null,null,null))}w+=3}},"call$1","gwj",2,0,null,543,[]],
tg:[function(a,b){var z=J.Wx(b)
-return z.F(b,this.vg)&&z.C(b,this.Mb)},"call$1","gdj",2,0,null,516,[]],
+return z.F(b,this.vg)&&z.C(b,this.Mb)},"call$1","gdj",2,0,null,527,[]],
NV:function(a){var z,y
z=J.U6(a)
y=z.t(a,"function")
y=R.Jk(y)
this.Qo=F.Wi(this,C.yg,this.Qo,y)
-y=H.B7(["type","@Code","id",z.t(a,"id"),"name",z.t(a,"name"),"user_name",z.t(a,"user_name")],P.L5(null,null,null,null,null))
-y=R.Jk(y)
+y=R.Jk(a)
this.uP=F.Wi(this,C.EX,this.uP,y)
y=z.t(a,"name")
this.mY=F.Wi(this,C.YS,this.mY,y)
@@ -19054,54 +19442,37 @@
if(z.t(a,"disassembly")!=null)this.fo(z.t(a,"disassembly"))},
$iskx:true},
fx:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.xH(b.gOu(),a.gOu())},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.xH(b.gOu(),a.gOu())},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
CM:{
"^":"a;Aq>,jV,hV<",
-vD:[function(a){var z=J.U6(a)
-if(L.CQ(z.t(a,"kind"))===C.l8&&z.t(a,"code")!=null)return H.BU(J.UQ(z.t(a,"code"),"start"),16,null)
-return H.BU(z.t(a,"start"),16,null)},"call$1","gRU",2,0,null,136,[]],
-U5:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
+U5:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o
z=J.U6(a)
if(!J.de(z.t(a,"type"),"ProfileCode"))return
y=this.Aq
-x=y.hv(this.vD(a))
+x=y.hv(H.BU(J.UQ(z.t(a,"code"),"start"),16,null))
if(x==null){w=L.CQ(z.t(a,"kind"))
-if(w===C.l8){x=z.t(a,"code")
-if(x!=null){v=J.U6(x)
-u=H.BU(v.t(x,"start"),16,null)
-t=H.BU(v.t(x,"end"),16,null)
-s=v.t(x,"name")
-r=v.t(x,"user_name")
-q=H.B7(["type","@Code","id",v.t(x,"id"),"name",s,"user_name",r],P.L5(null,null,null,null,null))
-p=R.Jk(q)
-v=v.t(x,"function")
-o=R.Jk(v)}else{u=null
-t=null
-s=null
-r=null
-p=null
-o=null}}else{u=null
-t=null
-s=null
-r=null
-p=null
-o=null}if(u==null){u=H.BU(z.t(a,"start"),16,null)
-t=H.BU(z.t(a,"end"),16,null)
-s=z.t(a,"name")
-r=s}v=R.Jk([])
-q=H.B7([],P.L5(null,null,null,null,null))
-q=R.Jk(q)
-n=H.B7([],P.L5(null,null,null,null,null))
-n=R.Jk(n)
-x=new L.kx(w,u,t,[],[],[],0,0,v,q,n,s,null,null,null)
-x.uP=F.Wi(x,C.EX,n,p)
-x.Qo=F.Wi(x,C.yg,x.Qo,o)
+v=z.t(a,"code")
+z=J.U6(v)
+u=H.BU(z.t(v,"start"),16,null)
+t=H.BU(z.t(v,"end"),16,null)
+s=z.t(v,"name")
+r=z.t(v,"user_name")
+q=R.Jk([])
+p=H.B7([],P.L5(null,null,null,null,null))
+p=R.Jk(p)
+o=H.B7([],P.L5(null,null,null,null,null))
+o=R.Jk(o)
+x=new L.kx(w,u,t,[],[],[],0,0,q,p,o,s,null,null,null)
+x.uP=F.Wi(x,C.EX,o,v)
+o=z.t(v,"function")
+q=R.Jk(o)
+x.Qo=F.Wi(x,C.yg,x.Qo,q)
x.B0=F.Wi(x,C.ct,x.B0,r)
-if(z.t(a,"disassembly")!=null)x.fo(z.t(a,"disassembly"))
-J.bi(y.gZ0(),x)}J.eh(x,a)
-this.jV.push(x)},"call$1","gu5",2,0,null,532,[]],
+if(z.t(v,"disassembly")!=null){x.fo(z.t(v,"disassembly"))
+z.u(v,"disassembly",null)}J.bi(y.gZ0(),x)}J.eh(x,a)
+this.jV.push(x)},"call$1","gXx",2,0,null,544,[]],
T0:[function(a){var z,y
z=this.Aq.gZ0()
y=J.w1(z)
@@ -19128,7 +19499,7 @@
z.uH(a,b)
return z}}},
xn:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y,x,w
try{this.a.U5(a)}catch(x){w=H.Ru(x)
z=w
@@ -19136,28 +19507,30 @@
N.Jx("").xH("Error processing code object. "+H.d(z)+" "+H.d(y),z,y)}},"call$1",null,2,0,null,136,[],"call"],
$isEH:true},
vu:{
-"^":"Tp:533;",
-call$2:[function(a,b){return J.xH(b.gDu(),a.gDu())},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:545;",
+call$2:[function(a,b){return J.xH(b.gDu(),a.gDu())},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
c2:{
-"^":["Pi;Rd>-475,eB,P2,AP,fn",function(){return[C.mI]},null,null,null,null],
-gu9:[function(){return this.eB},null,null,1,0,482,"hits",351,365],
-su9:[function(a){this.eB=F.Wi(this,C.K7,this.eB,a)},null,null,3,0,385,23,[],"hits",351],
-ga4:[function(a){return this.P2},null,null,1,0,362,"text",351,365],
-sa4:[function(a,b){this.P2=F.Wi(this,C.MB,this.P2,b)},null,null,3,0,25,23,[],"text",351],
+"^":["Pi;Rd>-484,eB,P2,AP,fn",function(){return[C.mI]},null,null,null,null],
+gu9:[function(){return this.eB},null,null,1,0,491,"hits",353,370],
+su9:[function(a){this.eB=F.Wi(this,C.K7,this.eB,a)},null,null,3,0,392,23,[],"hits",353],
+ga4:[function(a){return this.P2},null,null,1,0,367,"text",353,370],
+sa4:[function(a,b){this.P2=F.Wi(this,C.MB,this.P2,b)},null,null,3,0,25,23,[],"text",353],
goG:function(){return J.J5(this.eB,0)},
gVt:function(){return J.z8(this.eB,0)},
$isc2:true},
rj:{
-"^":["Pi;W6,xN,Hz,Sw<-534,UK,AP,fn",null,null,null,function(){return[C.mI]},null,null,null],
-gfY:[function(a){return this.W6},null,null,1,0,362,"kind",351,365],
-sfY:[function(a,b){this.W6=F.Wi(this,C.fy,this.W6,b)},null,null,3,0,25,23,[],"kind",351],
-gKC:[function(){return this.xN},null,null,1,0,350,"scriptRef",351,365],
-sKC:[function(a){this.xN=F.Wi(this,C.Be,this.xN,a)},null,null,3,0,353,23,[],"scriptRef",351],
-gBi:[function(){return this.Hz},null,null,1,0,350,"libraryRef",351,365],
-sBi:[function(a){this.Hz=F.Wi(this,C.cg,this.Hz,a)},null,null,3,0,353,23,[],"libraryRef",351],
+"^":["Pi;W6,xN,ei,Hz,Sw<-546,UK,AP,fn",null,null,null,null,function(){return[C.mI]},null,null,null],
+gfY:[function(a){return this.W6},null,null,1,0,367,"kind",353,370],
+sfY:[function(a,b){this.W6=F.Wi(this,C.fy,this.W6,b)},null,null,3,0,25,23,[],"kind",353],
+gKC:[function(){return this.xN},null,null,1,0,352,"scriptRef",353,370],
+sKC:[function(a){this.xN=F.Wi(this,C.Be,this.xN,a)},null,null,3,0,355,23,[],"scriptRef",353],
+gQT:[function(){return this.ei},null,null,1,0,367,"shortName",353,354],
+sQT:[function(a){this.ei=F.Wi(this,C.Kt,this.ei,a)},null,null,3,0,25,23,[],"shortName",353],
+gBi:[function(){return this.Hz},null,null,1,0,352,"libraryRef",353,370],
+sBi:[function(a){this.Hz=F.Wi(this,C.cg,this.Hz,a)},null,null,3,0,355,23,[],"libraryRef",353],
giI:function(){return this.UK},
-gX4:[function(){return J.Pr(this.Sw,1)},null,null,1,0,535,"linesForDisplay",365],
+gHh:[function(){return J.Pr(this.Sw,1)},null,null,1,0,547,"linesForDisplay",370],
Av:[function(a){var z,y,x,w
z=this.Sw
y=J.U6(z)
@@ -19165,7 +19538,7 @@
if(x.F(a,y.gB(z)))y.sB(z,x.g(a,1))
w=y.t(z,a)
if(w==null){w=new L.c2(a,-1,"",null,null)
-y.u(z,a,w)}return w},"call$1","gKN",2,0,null,536,[]],
+y.u(z,a,w)}return w},"call$1","gKN",2,0,null,548,[]],
lu:[function(a){var z,y,x,w
if(a==null)return
N.Jx("").To("Loading source for "+H.d(J.UQ(this.xN,"name")))
@@ -19182,19 +19555,21 @@
if(typeof x!=="number")return H.s(x)
if(!(y<x))break
this.Av(z.t(a,y)).su9(z.t(a,y+1))
-y+=2}F.Wi(this,C.C2,"","("+C.CD.yM(this.Nk(),1)+"% covered)")},"call$1","gpc",2,0,null,537,[]],
+y+=2}F.Wi(this,C.C2,"","("+C.CD.yM(this.Nk(),1)+"% covered)")},"call$1","gpc",2,0,null,549,[]],
Nk:[function(){var z,y,x,w
for(z=J.GP(this.Sw),y=0,x=0;z.G();){w=z.gl()
if(w==null)continue
if(!w.goG())continue;++x
if(!w.gVt())continue;++y}if(x===0)return 0
-return y/x*100},"call$0","gCx",0,0,526,"coveredPercentage",365],
-nZ:[function(){return"("+C.CD.yM(this.Nk(),1)+"% covered)"},"call$0","gic",0,0,362,"coveredPercentageFormatted",365],
+return y/x*100},"call$0","gCx",0,0,538,"coveredPercentage",370],
+nZ:[function(){return"("+C.CD.yM(this.Nk(),1)+"% covered)"},"call$0","gic",0,0,367,"coveredPercentageFormatted",370],
Ea:function(a){var z,y
z=J.U6(a)
y=H.B7(["id",z.t(a,"id"),"name",z.t(a,"name"),"user_name",z.t(a,"user_name")],P.L5(null,null,null,null,null))
y=R.Jk(y)
this.xN=F.Wi(this,C.Be,this.xN,y)
+y=J.ZZ(z.t(a,"name"),J.WB(J.eJ(z.t(a,"name"),"/"),1))
+this.ei=F.Wi(this,C.Kt,this.ei,y)
y=z.t(a,"library")
y=R.Jk(y)
this.Hz=F.Wi(this,C.cg,this.Hz,y)
@@ -19209,31 +19584,31 @@
y=R.Jk(y)
x=H.VM([],[L.c2])
x=R.Jk(x)
-x=new L.rj(null,z,y,x,!0,null,null)
+x=new L.rj(null,z,null,y,x,!0,null,null)
x.Ea(a)
return x}}},
Nu:{
"^":"Pi;XT?,e0?",
pG:function(){return this.e0.call$0()},
-geG:[function(){return this.SI},null,null,1,0,362,"prefix",351,365],
-seG:[function(a){this.SI=F.Wi(this,C.qb3,this.SI,a)},null,null,3,0,25,23,[],"prefix",351],
-gjR:[function(){return this.Tj},null,null,1,0,501,"responses",351,365],
-sjR:[function(a){this.Tj=F.Wi(this,C.wH,this.Tj,a)},null,null,3,0,538,23,[],"responses",351],
+geG:[function(){return this.SI},null,null,1,0,367,"prefix",353,370],
+seG:[function(a){this.SI=F.Wi(this,C.qb3,this.SI,a)},null,null,3,0,25,23,[],"prefix",353],
+gjR:[function(){return this.Tj},null,null,1,0,510,"responses",353,370],
+sjR:[function(a){this.Tj=F.Wi(this,C.wH,this.Tj,a)},null,null,3,0,550,23,[],"responses",353],
FH:[function(a){var z,y,x,w,v
z=null
try{z=C.xr.kV(a)}catch(w){v=H.Ru(w)
y=v
x=new H.XO(w,null)
-this.AI(H.d(y)+" "+H.d(x))}return z},"call$1","gkJ",2,0,null,466,[]],
+this.AI(H.d(y)+" "+H.d(x))}return z},"call$1","gkJ",2,0,null,477,[]],
f3:[function(a){var z,y
z=this.FH(a)
if(z==null)return
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isZ0)this.dq([z])
-else this.dq(z)},"call$1","gt7",2,0,null,539,[]],
+else this.dq(z)},"call$1","gI5",2,0,null,551,[]],
dq:[function(a){var z=R.Jk(a)
this.Tj=F.Wi(this,C.wH,this.Tj,z)
-if(this.e0!=null)this.pG()},"call$1","gvw",2,0,null,368,[]],
+if(this.e0!=null)this.pG()},"call$1","gvw",2,0,null,373,[]],
AI:[function(a){this.dq([H.B7(["type","Error","errorType","ResponseError","text",a],P.L5(null,null,null,null,null))])
N.Jx("").hh(a)},"call$1","gug",2,0,null,20,[]],
Uu:[function(a){var z,y,x,w,v
@@ -19247,7 +19622,7 @@
return}v=y.hv(x)
if(v!=null){N.Jx("").To("Found code with 0x"+w.WZ(x,16)+" in isolate.")
this.dq([H.B7(["type","Code","code",v],P.L5(null,null,null,null,null))])
-return}this.ym(0,a).ml(new L.Q4(this,y,x)).OA(this.gSC())},"call$1","gVB",2,0,null,540,[]],
+return}this.ym(0,a).ml(new L.Q4(this,y,x)).OA(this.gSC())},"call$1","gVB",2,0,null,552,[]],
GY:[function(a){var z,y,x,w,v
z=L.Lw(a)
if(z==null){this.AI(z+" is not an isolate id.")
@@ -19260,22 +19635,22 @@
if(v&&!w.giI()){N.Jx("").To("Found script "+H.d(J.UQ(w.gKC(),"name"))+" in isolate")
this.dq([H.B7(["type","Script","script",w],P.L5(null,null,null,null,null))])
return}if(v){this.fB(a).ml(new L.aJ(this,w))
-return}this.fB(a).ml(new L.u4(this,y,x))},"call$1","gPc",2,0,null,540,[]],
+return}this.fB(a).ml(new L.u4(this,y,x))},"call$1","gPc",2,0,null,552,[]],
xl:[function(a,b){var z,y,x
z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isew){z=W.qc(a.target)
y=J.RE(z)
x=H.d(y.gys(z))+" "+y.gpo(z)
if(y.gys(z)===0)x="No service found. Did you run with --enable-vm-service ?"
-this.dq([H.B7(["type","Error","errorType","RequestError","text",x],P.L5(null,null,null,null,null))])}else this.AI(H.d(a)+" "+H.d(b))},"call$2","gSC",4,0,541,18,[],468,[]],
+this.dq([H.B7(["type","Error","errorType","RequestError","text",x],P.L5(null,null,null,null,null))])}else this.AI(H.d(a)+" "+H.d(b))},"call$2","gSC",4,0,553,18,[],478,[]],
ox:[function(a){var z=$.mE().Ej
if(z.test(a)){this.Uu(a)
return}z=$.Ww().Ej
if(z.test(a)){this.GY(a)
-return}this.ym(0,a).ml(new L.pF(this)).OA(this.gSC())},"call$1","gRD",2,0,null,540,[]],
-fB:[function(a){return this.ym(0,C.xB.nC(a,"#")?C.xB.yn(a,1):a).ml(new L.Q2())},"call$1","gHi",2,0,null,540,[]]},
+return}this.ym(0,a).ml(new L.pF(this)).OA(this.gSC())},"call$1","gRD",2,0,null,552,[]],
+fB:[function(a){return this.ym(0,C.xB.nC(a,"#")?C.xB.yn(a,1):a).ml(new L.Q2())},"call$1","gHi",2,0,null,552,[]]},
Q4:{
-"^":"Tp:223;a,b,c",
+"^":"Tp:225;a,b,c",
call$1:[function(a){var z,y,x,w,v,u,t
z=this.a
y=z.FH(a)
@@ -19290,36 +19665,37 @@
t.NV(y)
N.Jx("").To("Added code with 0x"+J.u1(this.c,16)+" to isolate.")
J.bi(this.b.gZ0(),t)
-z.dq([H.B7(["type","Code","code",t],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,539,[],"call"],
+z.dq([H.B7(["type","Code","code",t],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,551,[],"call"],
$isEH:true},
aJ:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){var z=this.b
z.lu(J.UQ(a,"source"))
N.Jx("").To("Grabbed script "+H.d(J.UQ(z.gKC(),"name"))+" source.")
-this.a.dq([H.B7(["type","Script","script",z],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,466,[],"call"],
+this.a.dq([H.B7(["type","Script","script",z],P.L5(null,null,null,null,null))])},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
u4:{
-"^":"Tp:223;c,d,e",
+"^":"Tp:225;c,d,e",
call$1:[function(a){var z=L.Ak(a)
N.Jx("").To("Added script "+H.d(J.UQ(z.xN,"name"))+" to isolate.")
this.c.dq([H.B7(["type","Script","script",z],P.L5(null,null,null,null,null))])
-J.kW(this.d.gXR(),this.e,z)},"call$1",null,2,0,null,466,[],"call"],
+J.kW(this.d.gXR(),this.e,z)},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
pF:{
-"^":"Tp:223;a",
-call$1:[function(a){this.a.f3(a)},"call$1",null,2,0,null,539,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){this.a.f3(a)},"call$1",null,2,0,null,551,[],"call"],
$isEH:true},
Q2:{
-"^":"Tp:223;",
-call$1:[function(a){var z,y
+"^":"Tp:225;",
+call$1:[function(a){var z,y,x
try{z=C.xr.kV(a)
-return z}catch(y){H.Ru(y)}return},"call$1",null,2,0,null,466,[],"call"],
+y=R.Jk(z)
+return y}catch(x){H.Ru(x)}return},"call$1",null,2,0,null,477,[],"call"],
$isEH:true},
r1:{
"^":"Nu;XT,e0,SI,Tj,AP,fn",
ym:[function(a,b){N.Jx("").To("Requesting "+b)
-return W.It(J.WB(this.SI,b),null,null)},"call$1","gkq",2,0,null,540,[]]},
+return W.It(J.WB(this.SI,b),null,null)},"call$1","gkq",2,0,null,552,[]]},
Rb:{
"^":"Nu;eA,Wj,XT,e0,SI,Tj,AP,fn",
AJ:[function(a){var z,y,x,w,v
@@ -19332,7 +19708,7 @@
v=z.t(0,y)
if(v!=null){z.Rz(0,y)
P.JS("Completing "+H.d(y))
-J.Xf(v,w)}else P.JS("Could not find completer for "+H.d(y))},"call$1","gpJ",2,0,150,19,[]],
+J.Xf(v,w)}else P.JS("Could not find completer for "+H.d(y))},"call$1","gpJ",2,0,153,19,[]],
ym:[function(a,b){var z,y,x
z=""+this.Wj
y=H.B7([],P.L5(null,null,null,null,null))
@@ -19343,9 +19719,9 @@
x=H.VM(new P.Zf(P.Dt(null)),[null])
this.eA.u(0,z,x)
J.Ih(W.Pv(window.parent),C.xr.KP(y),"*")
-return x.MM},"call$1","gkq",2,0,null,540,[]]},
+return x.MM},"call$1","gkq",2,0,null,552,[]]},
Y2:{
-"^":["Pi;eT>,yt<-475,wd>-476,oH<-477",null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]}],
+"^":["Pi;eT>,yt<-484,wd>-485,oH<-486",null,function(){return[C.mI]},function(){return[C.mI]},function(){return[C.mI]}],
goE:function(a){return this.np},
soE:function(a,b){var z=this.np
this.np=b
@@ -19355,21 +19731,15 @@
return this.np},"call$0","gMk",0,0,null],
$isY2:true},
XN:{
-"^":["Pi;JL,WT>-476,AP,fn",null,function(){return[C.mI]},null,null],
+"^":["Pi;JL,WT>-485,AP,fn",null,function(){return[C.mI]},null,null],
rT:[function(a){var z,y
z=this.WT
y=J.w1(z)
y.V1(z)
-y.FV(z,a)},"call$1","gE3",2,0,null,542,[]],
-qU:[function(a){var z,y,x
-P.JS(a)
-z=this.WT
-y=J.U6(z)
-P.JS(y.gB(z))
-x=y.t(z,a)
-if(x.r8())this.ad(x)
-else this.cB(x)
-P.JS("e")},"call$1","gMk",2,0,null,543,[]],
+y.FV(z,a)},"call$1","gE3",2,0,null,554,[]],
+qU:[function(a){var z=J.UQ(this.WT,a)
+if(z.r8())this.ad(z)
+else this.cB(z)},"call$1","gMk",2,0,null,555,[]],
ad:[function(a){var z,y,x,w,v,u,t
z=this.WT
y=J.U6(z)
@@ -19382,7 +19752,7 @@
u=x+v+1
t=J.UQ(w.gwd(a),v)
if(u===-1)y.h(z,t)
-else y.xe(z,u,t);++v}},"call$1","ghF",2,0,null,489,[]],
+else y.xe(z,u,t);++v}},"call$1","ghF",2,0,null,498,[]],
cB:[function(a){var z,y,x,w,v
z=J.RE(a)
y=J.q8(z.gwd(a))
@@ -19393,12 +19763,12 @@
z.soE(a,!1)
z=this.WT
w=J.U6(z)
-for(v=w.u8(z,a)+1,x=0;x<y;++x)w.KI(z,v)},"call$1","gjc",2,0,null,489,[]]}}],["observatory_application_element","package:observatory/src/observatory_elements/observatory_application.dart",,V,{
+for(v=w.u8(z,a)+1,x=0;x<y;++x)w.KI(z,v)},"call$1","gjc",2,0,null,498,[]]}}],["observatory_application_element","package:observatory/src/observatory_elements/observatory_application.dart",,V,{
"^":"",
-F1:{
-"^":["V12;k5%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gzj:[function(a){return a.k5},null,null,1,0,366,"devtools",351,352],
-szj:[function(a,b){a.k5=this.ct(a,C.Na,a.k5,b)},null,null,3,0,367,23,[],"devtools",351],
+lI:{
+"^":["V18;k5%-360,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gzj:[function(a){return a.k5},null,null,1,0,371,"devtools",353,354],
+szj:[function(a,b){a.k5=this.ct(a,C.Na,a.k5,b)},null,null,3,0,372,23,[],"devtools",353],
ZB:[function(a){var z,y
if(a.k5===!0){z=P.L5(null,null,null,null,null)
y=R.Jk([])
@@ -19430,20 +19800,20 @@
C.k0.G6(a)
C.k0.ZB(a)
return a},null,null,0,0,108,"new ObservatoryApplicationElement$created"]}},
-"+ObservatoryApplicationElement":[544],
-V12:{
+"+ObservatoryApplicationElement":[556],
+V18:{
"^":"uL+Pi;",
$isd3:true}}],["observatory_element","package:observatory/src/observatory_elements/observatory_element.dart",,Z,{
"^":"",
uL:{
-"^":["LP;hm%-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["LP;hm%-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
i4:[function(a){A.zs.prototype.i4.call(this,a)},"call$0","gQd",0,0,107,"enteredView"],
xo:[function(a){A.zs.prototype.xo.call(this,a)},"call$0","gbt",0,0,107,"leftView"],
-aC:[function(a,b,c,d){A.zs.prototype.aC.call(this,a,b,c,d)},"call$3","gxR",6,0,545,12,[],225,[],226,[],"attributeChanged"],
-guw:[function(a){return a.hm},null,null,1,0,546,"app",351,352],
-suw:[function(a,b){a.hm=this.ct(a,C.wh,a.hm,b)},null,null,3,0,547,23,[],"app",351],
-Pz:[function(a,b){},"call$1","gpx",2,0,150,225,[],"appChanged"],
-gpQ:[function(a){return!0},null,null,1,0,366,"applyAuthorStyles"],
+aC:[function(a,b,c,d){A.zs.prototype.aC.call(this,a,b,c,d)},"call$3","gxR",6,0,557,12,[],227,[],228,[],"attributeChanged"],
+guw:[function(a){return a.hm},null,null,1,0,558,"app",353,354],
+suw:[function(a,b){a.hm=this.ct(a,C.wh,a.hm,b)},null,null,3,0,559,23,[],"app",353],
+Dy:[function(a,b){},"call$1","gpx",2,0,153,227,[],"appChanged"],
+gpQ:[function(a){return!0},null,null,1,0,371,"applyAuthorStyles"],
Om:[function(a,b){var z,y,x,w
if(b==null)return"-"
z=J.LL(J.p0(b,1000))
@@ -19453,28 +19823,28 @@
z=C.jn.Y(z,60000)
w=C.jn.cU(z,1000)
z=C.jn.Y(z,1000)
-return Z.Ce(y,2)+":"+Z.Ce(x,2)+":"+Z.Ce(w,2)+"."+Z.Ce(z,3)},"call$1","gSs",2,0,548,549,[],"formatTime"],
+return Z.Ce(y,2)+":"+Z.Ce(x,2)+":"+Z.Ce(w,2)+"."+Z.Ce(z,3)},"call$1","gSs",2,0,560,561,[],"formatTime"],
Ze:[function(a,b){var z=J.Wx(b)
if(z.C(b,1024))return H.d(b)+"B"
else if(z.C(b,1048576))return""+C.CD.yu(C.CD.UD(z.V(b,1024)))+"KB"
else if(z.C(b,1073741824))return""+C.CD.yu(C.CD.UD(z.V(b,1048576)))+"MB"
else if(z.C(b,1099511627776))return""+C.CD.yu(C.CD.UD(z.V(b,1073741824)))+"GB"
-else return""+C.CD.yu(C.CD.UD(z.V(b,1099511627776)))+"TB"},"call$1","gbJ",2,0,387,550,[],"formatSize"],
+else return""+C.CD.yu(C.CD.UD(z.V(b,1099511627776)))+"TB"},"call$1","gbJ",2,0,394,562,[],"formatSize"],
bj:[function(a,b){var z,y,x
z=J.U6(b)
y=J.UQ(z.t(b,"script"),"user_name")
x=J.U6(y)
-return x.yn(y,J.WB(x.cn(y,"/"),1))+":"+H.d(z.t(b,"line"))},"call$1","gNh",2,0,551,552,[],"fileAndLine"],
-nt:[function(a,b){return J.de(b,"@Null")},"call$1","gYx",2,0,553,11,[],"isNullRef"],
+return x.yn(y,J.WB(x.cn(y,"/"),1))+":"+H.d(z.t(b,"line"))},"call$1","gNh",2,0,563,564,[],"fileAndLine"],
+nt:[function(a,b){return J.de(b,"@Null")},"call$1","gYx",2,0,565,11,[],"isNullRef"],
Qq:[function(a,b){var z=J.x(b)
-return z.n(b,"@Smi")||z.n(b,"@Mint")||z.n(b,"@Bigint")},"call$1","gBI",2,0,553,11,[],"isIntRef"],
-TJ:[function(a,b){return J.de(b,"@Bool")},"call$1","gUA",2,0,553,11,[],"isBoolRef"],
-qH:[function(a,b){return J.de(b,"@String")},"call$1","gwm",2,0,553,11,[],"isStringRef"],
-JG:[function(a,b){return J.de(b,"@Instance")},"call$1","gUq",2,0,553,11,[],"isInstanceRef"],
-CL:[function(a,b){return J.de(b,"@Closure")},"call$1","gj7",2,0,553,11,[],"isClosureRef"],
+return z.n(b,"@Smi")||z.n(b,"@Mint")||z.n(b,"@Bigint")},"call$1","gBI",2,0,565,11,[],"isIntRef"],
+TJ:[function(a,b){return J.de(b,"@Bool")},"call$1","gX4",2,0,565,11,[],"isBoolRef"],
+qH:[function(a,b){return J.de(b,"@String")},"call$1","gwm",2,0,565,11,[],"isStringRef"],
+JG:[function(a,b){return J.de(b,"@Instance")},"call$1","gUq",2,0,565,11,[],"isInstanceRef"],
+CL:[function(a,b){return J.de(b,"@Closure")},"call$1","gj7",2,0,565,11,[],"isClosureRef"],
Bk:[function(a,b){var z=J.x(b)
-return z.n(b,"@GrowableObjectArray")||z.n(b,"@Array")},"call$1","gmv",2,0,553,11,[],"isListRef"],
-VR:[function(a,b){return!C.Nm.tg(["@Null","@Smi","@Mint","@Biginit","@Bool","@String","@Closure","@Instance","@GrowableObjectArray","@Array"],b)},"call$1","gua",2,0,553,11,[],"isUnexpectedRef"],
+return z.n(b,"@GrowableObjectArray")||z.n(b,"@Array")},"call$1","gmv",2,0,565,11,[],"isListRef"],
+VR:[function(a,b){return!C.Nm.tg(["@Null","@Smi","@Mint","@Biginit","@Bool","@String","@Closure","@Instance","@GrowableObjectArray","@Array"],b)},"call$1","gua",2,0,565,11,[],"isUnexpectedRef"],
"@":function(){return[C.Br]},
static:{Hx:[function(a){var z,y,x,w
z=$.Nd()
@@ -19491,8 +19861,8 @@
for(z=J.Wx(a),y="";x=J.Wx(b),x.D(b,1);){w=x.W(b,1)
if(typeof w!=="number")H.vh(new P.AT(w))
if(z.C(a,Math.pow(10,w)))y+="0"
-b=x.W(b,1)}return y+H.d(a)},"call$2","Rz",4,0,238,23,[],239,[],"_zeroPad"]}},
-"+ObservatoryElement":[554],
+b=x.W(b,1)}return y+H.d(a)},"call$2","Rz",4,0,240,23,[],241,[],"_zeroPad"]}},
+"+ObservatoryElement":[566],
LP:{
"^":"ir+Pi;",
$isd3:true}}],["observe.src.change_notifier","package:observe/src/change_notifier.dart",,O,{
@@ -19515,13 +19885,13 @@
if(x&&z!=null){x=H.VM(new P.Yp(z),[T.z2])
if(y.Gv>=4)H.vh(y.q7())
y.Iv(x)
-return!0}return!1},"call$0","gDx",0,0,366],
+return!0}return!1},"call$0","gDx",0,0,371],
gUV:function(a){var z,y
z=a.AP
if(z!=null){y=z.iE
z=y==null?z!=null:y!==z}else z=!1
return z},
-ct:[function(a,b,c,d){return F.Wi(a,b,c,d)},"call$3","gAn",6,0,null,252,[],225,[],226,[]],
+ct:[function(a,b,c,d){return F.Wi(a,b,c,d)},"call$3","gAn",6,0,null,254,[],227,[],228,[]],
nq:[function(a,b){var z,y
z=a.AP
if(z!=null){y=z.iE
@@ -19543,7 +19913,7 @@
"^":"Pi;b9,kK,Sv,rk,YX,B6,AP,fn",
kb:function(a){return this.rk.call$1(a)},
gB:function(a){return this.b9.length},
-gP:[function(a){return this.Sv},null,null,1,0,108,"value",351],
+gP:[function(a){return this.Sv},null,null,1,0,108,"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
wE:[function(a){var z,y,x,w,v
if(this.YX)return
@@ -19557,7 +19927,7 @@
x.push(w)}this.Ow()},"call$0","gM",0,0,null],
TF:[function(a){if(this.B6)return
this.B6=!0
-P.rb(this.gMc())},"call$1","geu",2,0,150,235,[]],
+P.rb(this.gMc())},"call$1","geu",2,0,153,237,[]],
Ow:[function(){var z,y
this.B6=!1
z=this.b9
@@ -19576,7 +19946,7 @@
ni:[function(a){return this.cO(0)},"call$0","gl1",0,0,108],
$isJ3:true},
E5:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return J.Vm(a)},"call$1",null,2,0,null,91,[],"call"],
$isEH:true}}],["observe.src.dirty_check","package:observe/src/dirty_check.dart",,O,{
"^":"",
@@ -19608,11 +19978,11 @@
z=new O.o5(z)
return new P.zG(null,null,null,null,new O.zI(z),new O.id(z),null,null,null,null,null,null)},"call$0","Zq",0,0,null],
o5:{
-"^":"Tp:555;a",
+"^":"Tp:567;a",
call$2:[function(a,b){var z=this.a
if(z.a)return
z.a=!0
-a.RK(b,new O.b5(z))},"call$2",null,4,0,null,162,[],146,[],"call"],
+a.RK(b,new O.b5(z))},"call$2",null,4,0,null,165,[],146,[],"call"],
$isEH:true},
b5:{
"^":"Tp:108;a",
@@ -19620,9 +19990,9 @@
O.Y3()},"call$0",null,0,0,null,"call"],
$isEH:true},
zI:{
-"^":"Tp:163;b",
+"^":"Tp:166;b",
call$4:[function(a,b,c,d){if(d==null)return d
-return new O.Zb(this.b,b,c,d)},"call$4",null,8,0,null,161,[],162,[],146,[],110,[],"call"],
+return new O.Zb(this.b,b,c,d)},"call$4",null,8,0,null,164,[],165,[],146,[],110,[],"call"],
$isEH:true},
Zb:{
"^":"Tp:108;c,d,e,f",
@@ -19630,12 +20000,12 @@
return this.f.call$0()},"call$0",null,0,0,null,"call"],
$isEH:true},
id:{
-"^":"Tp:556;UI",
+"^":"Tp:568;UI",
call$4:[function(a,b,c,d){if(d==null)return d
-return new O.iV(this.UI,b,c,d)},"call$4",null,8,0,null,161,[],162,[],146,[],110,[],"call"],
+return new O.iV(this.UI,b,c,d)},"call$4",null,8,0,null,164,[],165,[],146,[],110,[],"call"],
$isEH:true},
iV:{
-"^":"Tp:223;bK,Gq,Rm,w3",
+"^":"Tp:225;bK,Gq,Rm,w3",
call$1:[function(a){this.bK.call$2(this.Gq,this.Rm)
return this.w3.call$1(a)},"call$1",null,2,0,null,21,[],"call"],
$isEH:true}}],["observe.src.list_diff","package:observe/src/list_diff.dart",,G,{
@@ -19675,7 +20045,7 @@
if(typeof n!=="number")return n.g()
n=P.J(o+1,n+1)
if(t>=l)return H.e(m,t)
-m[t]=n}}return x},"call$6","cL",12,0,null,240,[],241,[],242,[],243,[],244,[],245,[]],
+m[t]=n}}return x},"call$6","cL",12,0,null,242,[],243,[],244,[],245,[],246,[],247,[]],
Mw:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n
z=a.length
y=z-1
@@ -19710,10 +20080,10 @@
v=p
y=w}else{u.push(2)
v=o
-x=s}}}return H.VM(new H.iK(u),[null]).br(0)},"call$1","fZ",2,0,null,246,[]],
+x=s}}}return H.VM(new H.iK(u),[null]).br(0)},"call$1","fZ",2,0,null,248,[]],
rB:[function(a,b,c){var z,y,x
for(z=J.U6(a),y=J.U6(b),x=0;x<c;++x)if(!J.de(z.t(a,x),y.t(b,x)))return x
-return c},"call$3","UF",6,0,null,247,[],248,[],249,[]],
+return c},"call$3","UF",6,0,null,249,[],250,[],251,[]],
xU:[function(a,b,c){var z,y,x,w,v,u
z=J.U6(a)
y=z.gB(a)
@@ -19724,7 +20094,7 @@
u=z.t(a,y)
w=J.xH(w,1)
u=J.de(u,x.t(b,w))}else u=!1
-if(!u)break;++v}return v},"call$3","M9",6,0,null,247,[],248,[],249,[]],
+if(!u)break;++v}return v},"call$3","M9",6,0,null,249,[],250,[],251,[]],
jj:[function(a,b,c,d,e,f){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
z=J.Wx(c)
y=J.Wx(f)
@@ -19774,7 +20144,7 @@
s=new G.DA(a,y,t,n,0)}J.bi(s.Il,z.t(d,o));++o
break
default:}if(s!=null)p.push(s)
-return p},"call$6","Lr",12,0,null,240,[],241,[],242,[],243,[],244,[],245,[]],
+return p},"call$6","Lr",12,0,null,242,[],243,[],244,[],245,[],246,[],247,[]],
m1:[function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
z=b.gWA()
y=J.zj(b)
@@ -19813,11 +20183,11 @@
q.jr=J.WB(q.jr,m)
if(typeof m!=="number")return H.s(m)
s+=m
-t=!0}else t=!1}if(!t)a.push(u)},"call$2","c7",4,0,null,250,[],22,[]],
+t=!0}else t=!1}if(!t)a.push(u)},"call$2","c7",4,0,null,252,[],22,[]],
xl:[function(a,b){var z,y
z=H.VM([],[G.DA])
for(y=H.VM(new H.a7(b,b.length,0,null),[H.Kp(b,0)]);y.G();)G.m1(z,y.lo)
-return z},"call$2","bN",4,0,null,68,[],251,[]],
+return z},"call$2","bN",4,0,null,68,[],253,[]],
u2:[function(a,b){var z,y,x,w,v,u
if(b.length===1)return b
z=[]
@@ -19827,7 +20197,7 @@
if(u>>>0!==u||u>=x.length)return H.e(x,u)
if(!J.de(v,x[u]))z.push(w)
continue}v=J.RE(w)
-C.Nm.FV(z,G.jj(a,v.gvH(w),J.WB(v.gvH(w),w.gNg()),w.gIl(),0,J.q8(w.gRt().G4)))}return z},"call$2","SI",4,0,null,68,[],251,[]],
+C.Nm.FV(z,G.jj(a,v.gvH(w),J.WB(v.gvH(w),w.gNg()),w.gIl(),0,J.q8(w.gRt().G4)))}return z},"call$2","SI",4,0,null,68,[],253,[]],
DA:{
"^":"a;WA<,ok,Il<,jr,dM",
gvH:function(a){return this.jr},
@@ -19850,19 +20220,19 @@
z.$builtinTypeInfo=[null]
return new G.DA(a,z,d,b,c)}}}}],["observe.src.metadata","package:observe/src/metadata.dart",,K,{
"^":"",
-nd:{
+ndx:{
"^":"a;"},
vly:{
"^":"a;"}}],["observe.src.observable","package:observe/src/observable.dart",,F,{
"^":"",
Wi:[function(a,b,c,d){var z=J.RE(a)
if(z.gUV(a)&&!J.de(c,d))z.nq(a,H.VM(new T.qI(a,b,c,d),[null]))
-return d},"call$4","Ha",8,0,null,93,[],252,[],225,[],226,[]],
+return d},"call$4","T7",8,0,null,93,[],254,[],227,[],228,[]],
d3:{
"^":"a;",
$isd3:true},
lS:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z,y,x,w,v
z=this.b
y=z.wv.rN(a).gAx()
@@ -19872,14 +20242,14 @@
x.a=v
x=v}else x=w
x.push(H.VM(new T.qI(z,a,b,y),[null]))
-z.V2.u(0,a,y)}},"call$2",null,4,0,null,12,[],225,[],"call"],
+z.V2.u(0,a,y)}},"call$2",null,4,0,null,12,[],227,[],"call"],
$isEH:true}}],["observe.src.observable_box","package:observe/src/observable_box.dart",,A,{
"^":"",
xh:{
"^":"Pi;L1,AP,fn",
-gP:[function(a){return this.L1},null,null,1,0,function(){return H.IG(function(a){return{func:"Oy",ret:a}},this.$receiver,"xh")},"value",351],
+gP:[function(a){return this.L1},null,null,1,0,function(){return H.IG(function(a){return{func:"Oy",ret:a}},this.$receiver,"xh")},"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
-sP:[function(a,b){this.L1=F.Wi(this,C.ls,this.L1,b)},null,null,3,0,function(){return H.IG(function(a){return{func:"lU6",void:true,args:[a]}},this.$receiver,"xh")},226,[],"value",351],
+sP:[function(a,b){this.L1=F.Wi(this,C.ls,this.L1,b)},null,null,3,0,function(){return H.IG(function(a){return{func:"lU6",void:true,args:[a]}},this.$receiver,"xh")},228,[],"value",353],
bu:[function(a){return"#<"+H.d(new H.cu(H.dJ(this),null))+" value: "+H.d(this.L1)+">"},"call$0","gXo",0,0,null]}}],["observe.src.observable_list","package:observe/src/observable_list.dart",,Q,{
"^":"",
wn:{
@@ -19888,7 +20258,7 @@
if(z==null){z=P.bK(new Q.Bj(this),null,!0,null)
this.xg=z}z.toString
return H.VM(new P.Ik(z),[H.Kp(z,0)])},
-gB:[function(a){return this.h3.length},null,null,1,0,482,"length",351],
+gB:[function(a){return this.h3.length},null,null,1,0,491,"length",353],
sB:[function(a,b){var z,y,x,w,v,u
z=this.h3
y=z.length
@@ -19916,10 +20286,10 @@
u=[]
w=new P.Yp(u)
w.$builtinTypeInfo=[null]
-this.iH(new G.DA(this,w,u,y,x))}C.Nm.sB(z,b)},null,null,3,0,385,23,[],"length",351],
+this.iH(new G.DA(this,w,u,y,x))}C.Nm.sB(z,b)},null,null,3,0,392,23,[],"length",353],
t:[function(a,b){var z=this.h3
if(b>>>0!==b||b>=z.length)return H.e(z,b)
-return z[b]},"call$1","gIA",2,0,function(){return H.IG(function(a){return{func:"Zg",ret:a,args:[J.im]}},this.$receiver,"wn")},47,[],"[]",351],
+return z[b]},"call$1","gIA",2,0,function(){return H.IG(function(a){return{func:"Zg",ret:a,args:[J.im]}},this.$receiver,"wn")},47,[],"[]",353],
u:[function(a,b,c){var z,y,x,w
z=this.h3
if(b>>>0!==b||b>=z.length)return H.e(z,b)
@@ -19931,9 +20301,9 @@
w=new P.Yp(x)
w.$builtinTypeInfo=[null]
this.iH(new G.DA(this,w,x,b,1))}if(b>=z.length)return H.e(z,b)
-z[b]=c},"call$2","gj3",4,0,function(){return H.IG(function(a){return{func:"UR",void:true,args:[J.im,a]}},this.$receiver,"wn")},47,[],23,[],"[]=",351],
-gl0:[function(a){return P.lD.prototype.gl0.call(this,this)},null,null,1,0,366,"isEmpty",351],
-gor:[function(a){return P.lD.prototype.gor.call(this,this)},null,null,1,0,366,"isNotEmpty",351],
+z[b]=c},"call$2","gj3",4,0,function(){return H.IG(function(a){return{func:"UR",void:true,args:[J.im,a]}},this.$receiver,"wn")},47,[],23,[],"[]=",353],
+gl0:[function(a){return P.lD.prototype.gl0.call(this,this)},null,null,1,0,371,"isEmpty",353],
+gor:[function(a){return P.lD.prototype.gor.call(this,this)},null,null,1,0,371,"isNotEmpty",353],
h:[function(a,b){var z,y,x,w
z=this.h3
y=z.length
@@ -20018,7 +20388,7 @@
z=a===0
y=J.x(b)
this.ct(this,C.ai,z,y.n(b,0))
-this.ct(this,C.nZ,!z,!y.n(b,0))},"call$2","gdX",4,0,null,225,[],226,[]],
+this.ct(this,C.nZ,!z,!y.n(b,0))},"call$2","gdX",4,0,null,227,[],228,[]],
cv:[function(){var z,y,x
z=this.b3
if(z==null)return!1
@@ -20030,7 +20400,7 @@
if(x){x=H.VM(new P.Yp(y),[G.DA])
if(z.Gv>=4)H.vh(z.q7())
z.Iv(x)
-return!0}return!1},"call$0","gL6",0,0,366],
+return!0}return!1},"call$0","gL6",0,0,371],
$iswn:true,
static:{uX:function(a,b){var z=H.VM([],[b])
return H.VM(new Q.wn(null,null,z,null,null),[b])}}},
@@ -20052,18 +20422,18 @@
qC:{
"^":"Pi;Zp,AP,fn",
gvc:[function(a){var z=this.Zp
-return z.gvc(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"pD",ret:[P.cX,a]}},this.$receiver,"qC")},"keys",351],
+return z.gvc(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"pD",ret:[P.cX,a]}},this.$receiver,"qC")},"keys",353],
gUQ:[function(a){var z=this.Zp
-return z.gUQ(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"NE",ret:[P.cX,b]}},this.$receiver,"qC")},"values",351],
+return z.gUQ(z)},null,null,1,0,function(){return H.IG(function(a,b){return{func:"NE",ret:[P.cX,b]}},this.$receiver,"qC")},"values",353],
gB:[function(a){var z=this.Zp
-return z.gB(z)},null,null,1,0,482,"length",351],
+return z.gB(z)},null,null,1,0,491,"length",353],
gl0:[function(a){var z=this.Zp
-return z.gB(z)===0},null,null,1,0,366,"isEmpty",351],
+return z.gB(z)===0},null,null,1,0,371,"isEmpty",353],
gor:[function(a){var z=this.Zp
-return z.gB(z)!==0},null,null,1,0,366,"isNotEmpty",351],
-di:[function(a){return this.Zp.di(a)},"call$1","gmc",2,0,557,23,[],"containsValue",351],
-x4:[function(a){return this.Zp.x4(a)},"call$1","gV9",2,0,557,42,[],"containsKey",351],
-t:[function(a,b){return this.Zp.t(0,b)},"call$1","gIA",2,0,function(){return H.IG(function(a,b){return{func:"JB",ret:b,args:[P.a]}},this.$receiver,"qC")},42,[],"[]",351],
+return z.gB(z)!==0},null,null,1,0,371,"isNotEmpty",353],
+di:[function(a){return this.Zp.di(a)},"call$1","gmc",2,0,569,23,[],"containsValue",353],
+x4:[function(a){return this.Zp.x4(a)},"call$1","gV9",2,0,569,42,[],"containsKey",353],
+t:[function(a,b){return this.Zp.t(0,b)},"call$1","gIA",2,0,function(){return H.IG(function(a,b){return{func:"JB",ret:b,args:[P.a]}},this.$receiver,"qC")},42,[],"[]",353],
u:[function(a,b,c){var z,y,x,w,v
z=this.Zp
y=z.gB(z)
@@ -20074,7 +20444,7 @@
w=v==null?w!=null:v!==w}else w=!1
if(w){z=z.gB(z)
if(y!==z){F.Wi(this,C.Wn,y,z)
-this.nq(this,H.VM(new V.HA(b,null,c,!0,!1),[null,null]))}else if(!J.de(x,c))this.nq(this,H.VM(new V.HA(b,x,c,!1,!1),[null,null]))}},"call$2","gj3",4,0,function(){return H.IG(function(a,b){return{func:"fK",void:true,args:[a,b]}},this.$receiver,"qC")},42,[],23,[],"[]=",351],
+this.nq(this,H.VM(new V.HA(b,null,c,!0,!1),[null,null]))}else if(!J.de(x,c))this.nq(this,H.VM(new V.HA(b,x,c,!1,!1),[null,null]))}},"call$2","gj3",4,0,function(){return H.IG(function(a,b){return{func:"fK",void:true,args:[a,b]}},this.$receiver,"qC")},42,[],23,[],"[]=",353],
FV:[function(a,b){J.kH(b,new V.zT(this))},"call$1","gDY",2,0,null,104,[]],
Rz:[function(a,b){var z,y,x,w,v
z=this.Zp
@@ -20109,7 +20479,7 @@
$isEH:true,
$signature:function(){return H.IG(function(a,b){return{func:"vPt",args:[a,b]}},this.a,"qC")}},
Lo:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z=this.a
z.nq(z,H.VM(new V.HA(a,b,null,!1,!0),[null,null]))},"call$2",null,4,0,null,42,[],23,[],"call"],
$isEH:true}}],["observe.src.path_observer","package:observe/src/path_observer.dart",,L,{
@@ -20133,7 +20503,7 @@
return x}}catch(v){x=H.Ru(v)
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$ismp){if(!L.M6(y,C.OV))throw v}else throw v}}}x=$.aT()
-if(x.Im(C.Ab))x.x9("can't get "+H.d(b)+" in "+H.d(a))
+if(x.Im(C.VZ))x.x9("can't get "+H.d(b)+" in "+H.d(a))
return},"call$2","MT",4,0,null,6,[],66,[]],
h6:[function(a,b,c){var z,y,x,w,v
if(a==null)return!1
@@ -20150,7 +20520,7 @@
return!0}}catch(v){x=H.Ru(v)
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$ismp){if(!L.M6(y,C.OV))throw v}else throw v}}}x=$.aT()
-if(x.Im(C.Ab))x.x9("can't set "+H.d(b)+" in "+H.d(a))
+if(x.Im(C.VZ))x.x9("can't set "+H.d(b)+" in "+H.d(a))
return!1},"call$3","nV",6,0,null,6,[],66,[],23,[]],
TH:[function(a,b){var z
for(;!J.de(a,$.aA());){z=a.gYK().nb
@@ -20165,12 +20535,12 @@
if(typeof x==="object"&&x!==null&&!!w.$isRY)return!0
if(y.x4(z))return!0
if(y.x4(C.OV))return!0
-a=L.pY(a)}return!1},"call$2","Jh",4,0,null,11,[],12,[]],
+a=L.pY(a)}return!1},"call$2","we",4,0,null,11,[],12,[]],
M6:[function(a,b){var z,y
for(;!J.de(a,$.aA());){z=a.gYK().nb.t(0,b)
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isRS&&z.guU())return!0
-a=L.pY(a)}return!1},"call$2","SU",4,0,null,11,[],12,[]],
+a=L.pY(a)}return!1},"call$2","Cp",4,0,null,11,[],12,[]],
pY:[function(a){var z,y
try{z=a.gAY()
return z}catch(y){H.Ru(y)
@@ -20192,7 +20562,7 @@
if(z!=null){y=z.iE
z=y==null?z!=null:y!==z}else z=!1
if(!z)this.ov()
-return C.Nm.grZ(this.kN)},null,null,1,0,108,"value",351],
+return C.Nm.grZ(this.kN)},null,null,1,0,108,"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
sP:[function(a,b){var z,y,x,w
z=this.BK
@@ -20209,7 +20579,7 @@
if(w>=z.length)return H.e(z,w)
if(L.h6(x,z[w],b)){z=this.kN
if(y>=z.length)return H.e(z,y)
-z[y]=b}},null,null,3,0,446,226,[],"value",351],
+z[y]=b}},null,null,3,0,456,228,[],"value",353],
k0:[function(a){O.Pi.prototype.k0.call(this,this)
this.ov()
this.XI()},"call$0","gqw",0,0,107],
@@ -20252,7 +20622,7 @@
t[s]=u}this.ij(a)
if(this.gUV(this)&&!J.de(v,u)){z=new T.qI(this,C.ls,v,u)
z.$builtinTypeInfo=[null]
-this.nq(this,z)}},"call$1$start","gWx",0,3,null,330,115,[]],
+this.nq(this,z)}},"call$1$start","gWx",0,3,null,332,115,[]],
Rl:[function(a,b){var z,y
if(b==null)b=this.BK.length
if(typeof b!=="number")return H.s(b)
@@ -20261,7 +20631,7 @@
if(z>=y.length)return H.e(y,z)
y=y[z]
if(y!=null)y.ed()
-this.Kh(z)}},function(){return this.Rl(0,null)},"XI",function(a){return this.Rl(a,null)},"ij","call$2",null,null,"gmi",0,4,null,330,77,115,[],116,[]],
+this.Kh(z)}},function(){return this.Rl(0,null)},"XI",function(a){return this.Rl(a,null)},"ij","call$2",null,null,"gmi",0,4,null,332,77,115,[],116,[]],
Kh:[function(a){var z,y,x,w,v
z=this.kN
if(a>=z.length)return H.e(z,a)
@@ -20285,7 +20655,7 @@
w.o7=P.VH(P.AY(),z)
w.Bd=z.Al(P.v3())
if(a>=v.length)return H.e(v,a)
-v[a]=w}}},"call$1","gCf",2,0,null,383,[]],
+v[a]=w}}},"call$1","gCf",2,0,null,390,[]],
d4:function(a,b,c){var z,y,x,w
if(this.YB)for(z=J.rr(b).split("."),z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]),y=this.BK;z.G();){x=z.lo
if(J.de(x,""))continue
@@ -20302,20 +20672,20 @@
z.d4(a,b,c)
return z}}},
qL:{
-"^":"Tp:223;",
-call$1:[function(a){return},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Px:{
-"^":"Tp:558;a,b,c",
+"^":"Tp:570;a,b,c",
call$1:[function(a){var z,y
for(z=J.GP(a),y=this.c;z.G();)if(z.gl().ck(y)){this.a.hd(this.b)
-return}},"call$1",null,2,0,null,251,[],"call"],
+return}},"call$1",null,2,0,null,253,[],"call"],
$isEH:true},
C4:{
-"^":"Tp:559;d,e,f",
+"^":"Tp:571;d,e,f",
call$1:[function(a){var z,y
for(z=J.GP(a),y=this.f;z.G();)if(L.Wa(z.gl(),y)){this.d.hd(this.e)
-return}},"call$1",null,2,0,null,251,[],"call"],
+return}},"call$1",null,2,0,null,253,[],"call"],
$isEH:true},
Md:{
"^":"Tp:108;",
@@ -20330,10 +20700,10 @@
return y}if(typeof a==="object"&&a!==null&&(a.constructor===Array||!!z.$iscX)){z=z.ez(a,R.np())
x=Q.uX(null,null)
x.FV(0,z)
-return x}return a},"call$1","np",2,0,223,23,[]],
+return x}return a},"call$1","np",2,0,225,23,[]],
km:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.u(0,R.Jk(a),R.Jk(b))},"call$2",null,4,0,null,417,[],272,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.u(0,R.Jk(a),R.Jk(b))},"call$2",null,4,0,null,427,[],274,[],"call"],
$isEH:true}}],["polymer","package:polymer/polymer.dart",,A,{
"^":"",
JX:[function(){var z,y
@@ -20360,18 +20730,18 @@
if(w)for(w=J.GP(y.gc9());w.G();){v=w.lo.gAx()
u=J.x(v)
if(typeof v==="object"&&v!==null&&!!u.$isyL){if(typeof y!=="object"||y===null||!x.$isRS||A.bc(a,y)){if(b==null)b=H.B7([],P.L5(null,null,null,null,null))
-b.u(0,y.gIf(),y)}break}}}return b},"call$2","Cd",4,0,null,253,[],254,[]],
+b.u(0,y.gIf(),y)}break}}}return b},"call$2","Cd",4,0,null,255,[],256,[]],
Oy:[function(a,b){var z,y
do{z=a.gYK().nb.t(0,b)
y=J.x(z)
if(typeof z==="object"&&z!==null&&!!y.$isRS&&z.glT()&&A.bc(a,z)||typeof z==="object"&&z!==null&&!!y.$isRY)return z
a=a.gAY()}while(!J.de(a,$.Tf()))
-return},"call$2","il",4,0,null,253,[],66,[]],
+return},"call$2","il",4,0,null,255,[],66,[]],
bc:[function(a,b){var z,y
z=H.le(H.d(b.gIf().fN)+"=")
y=a.gYK().nb.t(0,new H.GD(z))
z=J.x(y)
-return typeof y==="object"&&y!==null&&!!z.$isRS&&y.ghB()},"call$2","i8",4,0,null,253,[],255,[]],
+return typeof y==="object"&&y!==null&&!!z.$isRS&&y.ghB()},"call$2","i8",4,0,null,255,[],257,[]],
YG:[function(a,b,c){var z,y,x
z=$.cM()
if(z==null||a==null)return
@@ -20380,7 +20750,7 @@
if(y==null)return
x=J.UQ(y,"ShadowCSS")
if(x==null)return
-x.V7("shimStyling",[a,b,c])},"call$3","OA",6,0,null,256,[],12,[],257,[]],
+x.V7("shimStyling",[a,b,c])},"call$3","OA",6,0,null,258,[],12,[],259,[]],
Hl:[function(a){var z,y,x,w,v,u,t
if(a==null)return""
w=J.RE(a)
@@ -20400,28 +20770,28 @@
if(typeof w==="object"&&w!==null&&!!t.$isNh){y=w
x=new H.XO(u,null)
$.vM().J4("failed to get stylesheet text href=\""+H.d(z)+"\" error: "+H.d(y)+", trace: "+H.d(x))
-return""}else throw u}},"call$1","Js",2,0,null,258,[]],
+return""}else throw u}},"call$1","NI",2,0,null,260,[]],
Ad:[function(a,b){var z
if(b==null)b=C.hG
$.Ej().u(0,a,b)
z=$.p2().Rz(0,a)
if(z!=null)J.Or(z)},"call$2","ZK",2,2,null,77,12,[],11,[]],
-zM:[function(a){A.Vx(a,new A.Mq())},"call$1","mo",2,0,null,259,[]],
+zM:[function(a){A.Vx(a,new A.Mq())},"call$1","mo",2,0,null,261,[]],
Vx:[function(a,b){var z
if(a==null)return
b.call$1(a)
-for(z=a.firstChild;z!=null;z=z.nextSibling)A.Vx(z,b)},"call$2","Dv",4,0,null,259,[],148,[]],
+for(z=a.firstChild;z!=null;z=z.nextSibling)A.Vx(z,b)},"call$2","Dv",4,0,null,261,[],151,[]],
lJ:[function(a,b,c,d){if(!J.co(b,"on-"))return d.call$3(a,b,c)
-return new A.L6(a,b)},"call$4","y4",8,0,null,260,[],12,[],259,[],261,[]],
+return new A.L6(a,b)},"call$4","y4",8,0,null,262,[],12,[],261,[],263,[]],
Hr:[function(a){var z
for(;z=J.RE(a),z.gKV(a)!=null;)a=z.gKV(a)
-return $.od().t(0,a)},"call$1","Fd",2,0,null,259,[]],
+return $.od().t(0,a)},"call$1","Fd",2,0,null,261,[]],
HR:[function(a,b,c){var z,y,x
z=H.vn(a)
y=A.Rk(H.jO(J.bB(z.Ax).LU),b)
if(y!=null){x=y.gMP()
x=x.ev(x,new A.uJ())
-C.Nm.sB(c,x.gB(x))}return z.CI(b,c).Ax},"call$3","xi",6,0,null,41,[],262,[],263,[]],
+C.Nm.sB(c,x.gB(x))}return z.CI(b,c).Ax},"call$3","xi",6,0,null,41,[],264,[],265,[]],
Rk:[function(a,b){var z,y
do{z=a.gYK().nb.t(0,b)
y=J.x(z)
@@ -20433,7 +20803,7 @@
z.textContent=a.textContent
y=a.getAttribute("element")
if(y!=null)z.setAttribute("element",y)
-b.appendChild(z)},"call$2","tO",4,0,null,264,[],265,[]],
+b.appendChild(z)},"call$2","tO",4,0,null,266,[],267,[]],
pX:[function(){var z=window
C.ol.hr(z)
C.ol.oB(z,W.aF(new A.hm()))},"call$0","ji",0,0,null],
@@ -20472,7 +20842,7 @@
t=y
if(t==null)H.vh(new P.AT("Error must not be null"))
if(u.Gv!==0)H.vh(new P.lj("Future already completed"))
-u.CG(t,x)}}},"call$0","vH",0,0,null],
+u.CG(t,x)}}},"call$0","xm",0,0,null],
GA:[function(a,b,c,d){var z,y,x,w,v,u
if(c==null)c=P.Ls(null,null,null,W.QF)
if(d==null){d=[]
@@ -20490,7 +20860,7 @@
x=!0}else{z="warning: more than one Dart script tag in "+H.d(b)+". Dartium currently only allows a single Dart script tag per document."
v=$.oK
if(v==null)H.qw(z)
-else v.call$1(z)}}return d},"call$4","fE",4,4,null,77,77,266,[],267,[],268,[],269,[]],
+else v.call$1(z)}}return d},"call$4","fE",4,4,null,77,77,268,[],269,[],270,[],271,[]],
pw:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i
z=$.RQ()
z.toString
@@ -20548,7 +20918,7 @@
p=k.gYj()
$.Ej().u(0,q,p)
i=$.p2().Rz(0,q)
-if(i!=null)J.Or(i)}}}},"call$1","Xz",2,0,null,270,[]],
+if(i!=null)J.Or(i)}}}},"call$1","Xz",2,0,null,272,[]],
ZB:[function(a,b){var z,y,x
for(z=J.GP(b.gc9());y=!1,z.G();)if(z.lo.gAx()===C.za){y=!0
break}if(!y)return
@@ -20562,10 +20932,10 @@
z=$.oK
if(z==null)H.qw(x)
else z.call$1(x)
-return}a.CI(b.gIf(),C.xD)},"call$2","K0n",4,0,null,93,[],215,[]],
+return}a.CI(b.gIf(),C.xD)},"call$2","K0n",4,0,null,93,[],217,[]],
Zj:{
-"^":"Tp:223;",
-call$1:[function(a){A.pX()},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){A.pX()},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
XP:{
"^":"qE;zx,kw,aa,RT,Q7=,NF=,hf=,xX=,cI,lD,Gd=,Ei",
@@ -20613,7 +20983,7 @@
if(a.hasAttribute("noscript")===!0)A.Ad(b,null)
return!0},"call$1","gLD",2,0,null,12,[]],
PM:[function(a,b){if(b!=null&&J.UU(b,"-")>=0)if(!$.cd().x4(b)){J.bi($.xY().to(b,new A.q6()),a)
-return!0}return!1},"call$1","gmL",2,0,null,257,[]],
+return!0}return!1},"call$1","gmL",2,0,null,259,[]],
Ba:[function(a,b){var z,y,x,w
for(z=a,y=null;z!=null;){x=J.RE(z)
y=x.gQg(z).MW.getAttribute("extends")
@@ -20641,14 +21011,14 @@
if(typeof console!="undefined")console.warn(t)
continue}y=a.Q7
if(y==null){y=H.B7([],P.L5(null,null,null,null,null))
-a.Q7=y}y.u(0,v,u)}}},"call$2","gvQ",4,0,null,253,[],560,[]],
+a.Q7=y}y.u(0,v,u)}}},"call$2","gvQ",4,0,null,255,[],572,[]],
Vk:[function(a){var z,y
z=P.L5(null,null,null,J.O,P.a)
a.xX=z
y=a.aa
if(y!=null)z.FV(0,J.Ng(y))
new W.i7(a).aN(0,new A.CK(a))},"call$0","gYi",0,0,null],
-W3:[function(a,b){new W.i7(a).aN(0,new A.LJ(b))},"call$1","gSX",2,0,null,561,[]],
+W3:[function(a,b){new W.i7(a).aN(0,new A.LJ(b))},"call$1","gSX",2,0,null,573,[]],
Mi:[function(a){var z=this.Hs(a,"[rel=stylesheet]")
a.cI=z
for(z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]);z.G();)J.QC(z.lo)},"call$0","gax",0,0,null],
@@ -20674,7 +21044,7 @@
y=z.br(z)
x=this.gZf(a)
if(x!=null)C.Nm.FV(y,J.pe(x,b))
-return y},function(a,b){return this.oP(a,b,null)},"Hs","call$2",null,"gKQ",2,2,null,77,452,[],562,[]],
+return y},function(a,b){return this.oP(a,b,null)},"Hs","call$2",null,"gKQ",2,2,null,77,462,[],574,[]],
kO:[function(a,b){var z,y,x,w,v,u
z=P.p9("")
y=new A.Oc("[polymer-scope="+b+"]")
@@ -20685,14 +21055,14 @@
z.vM=u+"\n\n"}for(x=a.lD,x.toString,y=H.VM(new H.U5(x,y),[null]),y=H.VM(new H.SO(J.GP(y.l6),y.T6),[H.Kp(y,0)]),x=y.OI;y.G();){w=x.gl().ghg()
w=z.vM+w
z.vM=w
-z.vM=w+"\n\n"}return z.vM},"call$1","gvf",2,0,null,563,[]],
+z.vM=w+"\n\n"}return z.vM},"call$1","gvf",2,0,null,575,[]],
J3:[function(a,b,c){var z
if(b==="")return
z=document.createElement("style",null)
z.textContent=b
z.toString
z.setAttribute("element",a.RT+"-"+c)
-return z},"call$2","gNG",4,0,null,564,[],563,[]],
+return z},"call$2","gNG",4,0,null,576,[],575,[]],
q1:[function(a,b){var z,y,x,w
if(J.de(b,$.Tf()))return
this.q1(a,b.gAY())
@@ -20703,10 +21073,10 @@
x=J.rY(w)
if(x.Tc(w,"Changed")&&!x.n(w,"attributeChanged")){if(a.hf==null)a.hf=P.L5(null,null,null,null,null)
w=x.Nj(w,0,J.xH(x.gB(w),7))
-a.hf.u(0,new H.GD(H.le(w)),y.gIf())}}},"call$1","gCB",2,0,null,253,[]],
+a.hf.u(0,new H.GD(H.le(w)),y.gIf())}}},"call$1","gHv",2,0,null,255,[]],
qC:[function(a,b){var z=P.L5(null,null,null,J.O,null)
b.aN(0,new A.MX(z))
-return z},"call$1","gir",2,0,null,565,[]],
+return z},"call$1","gir",2,0,null,577,[]],
du:function(a){a.RT=a.getAttribute("name")
this.yx(a)},
$isXP:true,
@@ -20719,11 +21089,11 @@
call$0:[function(){return[]},"call$0",null,0,0,null,"call"],
$isEH:true},
CK:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){if(C.kr.x4(a)!==!0&&!J.co(a,"on-"))this.a.xX.u(0,a,b)},"call$2",null,4,0,null,12,[],23,[],"call"],
$isEH:true},
LJ:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z,y,x
z=J.rY(a)
if(z.nC(a,"on-")){y=J.U6(b).u8(b,"{{")
@@ -20731,15 +21101,15 @@
if(y>=0&&x>=0)this.a.u(0,z.yn(a,3),C.xB.bS(C.xB.Nj(b,y+2,x)))}},"call$2",null,4,0,null,12,[],23,[],"call"],
$isEH:true},
ZG:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return J.Vs(a).MW.hasAttribute("polymer-scope")!==!0},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
Oc:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){return J.RF(a,this.a)},"call$1",null,2,0,null,86,[],"call"],
$isEH:true},
MX:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){this.a.u(0,J.Mz(J.GL(a)),b)},"call$2",null,4,0,null,12,[],23,[],"call"],
$isEH:true},
w9:{
@@ -20749,14 +21119,14 @@
return z},"call$0",null,0,0,null,"call"],
$isEH:true},
r3y:{
-"^":"Tp:341;a",
-call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,566,[],567,[],"call"],
+"^":"Tp:343;a",
+call$2:[function(a,b){this.a.u(0,b,a)},"call$2",null,4,0,null,578,[],579,[],"call"],
$isEH:true},
yL:{
-"^":"nd;",
+"^":"ndx;",
$isyL:true},
zs:{
-"^":["a;KM:X0=-349",function(){return[C.nJ]}],
+"^":["a;KM:X0=-351",function(){return[C.nJ]}],
gpQ:function(a){return!1},
Pa:[function(a){if(W.Pv(this.gM0(a).defaultView)!=null||$.Bh>0)this.Ec(a)},"call$0","gu1",0,0,null],
Ec:[function(a){var z,y
@@ -20774,7 +21144,7 @@
this.BT(a,!0)},"call$0","gQd",0,0,null],
xo:[function(a){this.x3(a)},"call$0","gbt",0,0,null],
z2:[function(a,b){if(b!=null){this.z2(a,J.lB(b))
-this.d0(a,b)}},"call$1","gET",2,0,null,568,[]],
+this.d0(a,b)}},"call$1","gET",2,0,null,580,[]],
d0:[function(a,b){var z,y,x,w,v
z=J.RE(b)
y=z.Ja(b,"template")
@@ -20785,7 +21155,7 @@
if(typeof x!=="object"||x===null||!w.$isI0)return
v=z.gQg(b).MW.getAttribute("name")
if(v==null)return
-a.B7.u(0,v,x)},"call$1","gEB",2,0,null,569,[]],
+a.B7.u(0,v,x)},"call$1","gEB",2,0,null,581,[]],
Se:[function(a,b){var z,y
if(b==null)return
z=J.x(b)
@@ -20793,7 +21163,7 @@
y=z.ZK(a,a.SO)
this.jx(a,y)
this.lj(a,a)
-return y},"call$1","gAt",2,0,null,256,[]],
+return y},"call$1","gAt",2,0,null,258,[]],
Tp:[function(a,b){var z,y
if(b==null)return
this.gKE(a)
@@ -20805,12 +21175,12 @@
y=typeof b==="object"&&b!==null&&!!y.$ishs?b:M.Ky(b)
z.appendChild(y.ZK(a,a.SO))
this.lj(a,z)
-return z},"call$1","gPA",2,0,null,256,[]],
+return z},"call$1","gQb",2,0,null,258,[]],
lj:[function(a,b){var z,y,x,w
for(z=J.pe(b,"[id]"),z=z.gA(z),y=a.X0,x=J.w1(y);z.G();){w=z.lo
-x.u(y,J.F8(w),w)}},"call$1","gb7",2,0,null,570,[]],
+x.u(y,J.F8(w),w)}},"call$1","gb7",2,0,null,582,[]],
aC:[function(a,b,c,d){var z=J.x(b)
-if(!z.n(b,"class")&&!z.n(b,"style"))this.D3(a,b,d)},"call$3","gxR",6,0,null,12,[],225,[],226,[]],
+if(!z.n(b,"class")&&!z.n(b,"style"))this.D3(a,b,d)},"call$3","gxR",6,0,null,12,[],227,[],228,[]],
Z2:[function(a){J.Ng(a.dZ).aN(0,new A.WC(a))},"call$0","gGN",0,0,null],
fk:[function(a){if(J.ak(a.dZ)==null)return
this.gQg(a).aN(0,this.ghW(a))},"call$0","goQ",0,0,null],
@@ -20821,7 +21191,7 @@
y=H.vn(a)
x=y.rN(z.gIf()).gAx()
w=Z.Zh(c,x,A.al(x,z))
-if(w==null?x!=null:w!==x)y.PU(z.gIf(),w)},"call$2","ghW",4,0,571,12,[],23,[]],
+if(w==null?x!=null:w!==x)y.PU(z.gIf(),w)},"call$2","ghW",4,0,583,12,[],23,[]],
B2:[function(a,b){var z=J.ak(a.dZ)
if(z==null)return
return z.t(0,b)},"call$1","gHf",2,0,null,12,[]],
@@ -20852,7 +21222,7 @@
t.bw(a,y,c,d)
this.Id(a,z.gIf())
J.kW(J.QE(M.Ky(a)),b,t)
-return t}},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]],
+return t}},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]],
gCd:function(a){return J.QE(M.Ky(a))},
Ih:[function(a,b){return J.MV(M.Ky(a),b)},"call$1","gC8",2,0,null,12,[]],
x3:[function(a){var z,y
@@ -20880,7 +21250,7 @@
z=a.oq
if(z!=null){z.TP(0)
a.oq=null}if(b===!0)return
-A.Vx(this.gKE(a),new A.TV())},function(a){return this.BT(a,null)},"oW","call$1$preventCascade",null,"gF7",0,3,null,77,572,[]],
+A.Vx(this.gKE(a),new A.TV())},function(a){return this.BT(a,null)},"oW","call$1$preventCascade",null,"gF7",0,3,null,77,584,[]],
Xl:[function(a){var z,y,x,w,v,u
z=J.xR(a.dZ)
y=J.YP(a.dZ)
@@ -20894,7 +21264,7 @@
for(w=J.GP(b);w.G();){v=w.gl()
u=J.x(v)
if(typeof v!=="object"||v===null||!u.$isqI)continue
-J.iG(x.to(v.oc,new A.Oa(v)),v.zZ)}x.aN(0,new A.n1(a,b,z,y))},"call$1","gnu",2,0,573,574,[]],
+J.iG(x.to(v.oc,new A.Oa(v)),v.zZ)}x.aN(0,new A.n1(a,b,z,y))},"call$1","gnu",2,0,585,586,[]],
rJ:[function(a,b,c,d){var z,y,x,w,v
z=J.xR(a.dZ)
if(z==null)return
@@ -20914,7 +21284,7 @@
x=H.d(J.GL(b))+"__array"
v=a.Sa
if(v==null){v=P.L5(null,null,null,J.O,P.MO)
-a.Sa=v}v.u(0,x,w)}},"call$3","gDW",6,0,null,12,[],23,[],243,[]],
+a.Sa=v}v.u(0,x,w)}},"call$3","gDW",6,0,null,12,[],23,[],245,[]],
l5:[function(a,b){var z=a.Sa.Rz(0,b)
if(z==null)return!1
z.ed()
@@ -20938,7 +21308,7 @@
t=new W.Ov(0,w.uv,v,W.aF(d),u)
t.$builtinTypeInfo=[H.Kp(w,0)]
w=t.u7
-if(w!=null&&t.VP<=0)J.cZ(t.uv,v,w,u)}},"call$3","gPm",6,0,null,259,[],575,[],292,[]],
+if(w!=null&&t.VP<=0)J.cZ(t.uv,v,w,u)}},"call$3","gPm",6,0,null,261,[],587,[],294,[]],
iw:[function(a,b){var z,y,x,w,v,u,t
z=J.RE(b)
if(z.gXt(b)!==!0)return
@@ -20950,7 +21320,7 @@
u=J.UQ($.QX(),v)
t=w.t(0,u!=null?u:v)
if(t!=null){if(x)y.J4("["+this.gqn(a)+"] found host handler name ["+t+"]")
-this.ea(a,a,t,[b,typeof b==="object"&&b!==null&&!!z.$isHe?z.gey(b):null,a])}if(x)y.J4("<<< ["+this.gqn(a)+"]: hostEventListener("+H.d(z.gt5(b))+")")},"call$1","gD4",2,0,576,400,[]],
+this.ea(a,a,t,[b,typeof b==="object"&&b!==null&&!!z.$isHe?z.gey(b):null,a])}if(x)y.J4("<<< ["+this.gqn(a)+"]: hostEventListener("+H.d(z.gt5(b))+")")},"call$1","gD4",2,0,588,410,[]],
ea:[function(a,b,c,d){var z,y,x
z=$.SS()
y=z.Im(C.R5)
@@ -20959,7 +21329,7 @@
if(typeof c==="object"&&c!==null&&!!x.$isEH)H.Ek(c,d,P.Te(null))
else if(typeof c==="string")A.HR(b,new H.GD(H.le(c)),d)
else z.j2("invalid callback")
-if(y)z.To("<<< ["+this.gqn(a)+"]: dispatch "+H.d(c))},"call$3","gtW",6,0,null,6,[],577,[],263,[]],
+if(y)z.To("<<< ["+this.gqn(a)+"]: dispatch "+H.d(c))},"call$3","gtW",6,0,null,6,[],589,[],265,[]],
$iszs:true,
$ishs:true,
$isd3:true,
@@ -20968,7 +21338,7 @@
$isD0:true,
$isKV:true},
WC:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z=J.Vs(this.a)
if(z.x4(a)!==!0)z.u(0,a,new A.Xi(b).call$0())
z.t(0,a)},"call$2",null,4,0,null,12,[],23,[],"call"],
@@ -20978,21 +21348,21 @@
call$0:[function(){return this.b},"call$0",null,0,0,null,"call"],
$isEH:true},
TV:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.RE(a)
-if(typeof a==="object"&&a!==null&&!!z.$iszs)z.oW(a)},"call$1",null,2,0,null,287,[],"call"],
+if(typeof a==="object"&&a!==null&&!!z.$iszs)z.oW(a)},"call$1",null,2,0,null,289,[],"call"],
$isEH:true},
Mq:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return J.AA(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a))},"call$1",null,2,0,null,259,[],"call"],
+return J.AA(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a))},"call$1",null,2,0,null,261,[],"call"],
$isEH:true},
Oa:{
"^":"Tp:108;a",
call$0:[function(){return new A.bS(this.a.jL,null)},"call$0",null,0,0,null,"call"],
$isEH:true},
n1:{
-"^":"Tp:341;b,c,d,e",
+"^":"Tp:343;b,c,d,e",
call$2:[function(a,b){var z,y,x
z=this.e
if(z!=null&&z.x4(a))J.Jr(this.b,a)
@@ -21002,14 +21372,14 @@
if(y!=null){z=this.b
x=J.RE(b)
J.Ut(z,a,x.gzZ(b),x.gjL(b))
-A.HR(z,y,[x.gjL(b),x.gzZ(b),this.c])}},"call$2",null,4,0,null,12,[],578,[],"call"],
+A.HR(z,y,[x.gjL(b),x.gzZ(b),this.c])}},"call$2",null,4,0,null,12,[],590,[],"call"],
$isEH:true},
xf:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){A.HR(this.a,this.c,[this.b])},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){A.HR(this.a,this.c,[this.b])},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
L6:{
-"^":"Tp:341;a,b",
+"^":"Tp:343;a,b",
call$2:[function(a,b){var z,y,x
z=$.SS()
if(z.Im(C.R5))z.J4("event: ["+H.d(b)+"]."+H.d(this.b)+" => ["+H.d(a)+"]."+this.a+"())")
@@ -21018,10 +21388,10 @@
if(x!=null)y=x
z=J.f5(b).t(0,y)
H.VM(new W.Ov(0,z.uv,z.Ph,W.aF(new A.Rs(this.a,a,b)),z.Sg),[H.Kp(z,0)]).Zz()
-return H.VM(new A.xh(null,null,null),[null])},"call$2",null,4,0,null,280,[],259,[],"call"],
+return H.VM(new A.xh(null,null,null),[null])},"call$2",null,4,0,null,282,[],261,[],"call"],
$isEH:true},
Rs:{
-"^":"Tp:223;c,d,e",
+"^":"Tp:225;c,d,e",
call$1:[function(a){var z,y,x,w,v,u
z=this.e
y=A.Hr(z)
@@ -21033,25 +21403,25 @@
u=L.ao(v,C.xB.yn(w,1),null)
w=u.gP(u)}else v=y
u=J.RE(a)
-x.ea(y,v,w,[a,typeof a==="object"&&a!==null&&!!u.$isHe?u.gey(a):null,z])},"call$1",null,2,0,null,400,[],"call"],
+x.ea(y,v,w,[a,typeof a==="object"&&a!==null&&!!u.$isHe?u.gey(a):null,z])},"call$1",null,2,0,null,410,[],"call"],
$isEH:true},
uJ:{
-"^":"Tp:223;",
-call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,579,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,591,[],"call"],
$isEH:true},
hm:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z,y,x
z=W.vD(document.querySelectorAll(".polymer-veiled"),null)
for(y=z.gA(z);y.G();){x=J.pP(y.lo)
x.h(0,"polymer-unveil")
x.Rz(x,"polymer-veiled")}if(z.gor(z)){y=C.hi.aM(window)
-y.gtH(y).ml(new A.Ji(z))}},"call$1",null,2,0,null,235,[],"call"],
+y.gtH(y).ml(new A.Ji(z))}},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Ji:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z
-for(z=this.a,z=z.gA(z);z.G();)J.pP(z.lo).Rz(0,"polymer-unveil")},"call$1",null,2,0,null,235,[],"call"],
+for(z=this.a,z=z.gA(z);z.G();)J.pP(z.lo).Rz(0,"polymer-unveil")},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Bf:{
"^":"TR;I6,iU,Jq,dY,qP,ZY,xS,PB,eS,ay",
@@ -21059,17 +21429,17 @@
this.Jq.ed()
X.TR.prototype.cO.call(this,this)},"call$0","gJK",0,0,null],
EC:[function(a){this.dY=a
-this.I6.PU(this.iU,a)},"call$1","gH0",2,0,null,226,[]],
+this.I6.PU(this.iU,a)},"call$1","gH0",2,0,null,228,[]],
ho:[function(a){var z,y,x,w,v
for(z=J.GP(a),y=this.iU;z.G();){x=z.gl()
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$isqI&&J.de(x.oc,y)){v=this.I6.rN(y).gAx()
z=this.dY
if(z==null?v!=null:z!==v)J.ta(this.xS,v)
-return}}},"call$1","giz",2,0,580,251,[]],
+return}}},"call$1","giz",2,0,592,253,[]],
bw:function(a,b,c,d){this.Jq=J.xq(a).yI(this.giz())}},
ir:{
-"^":["GN;AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["GN;AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
G6:function(a){this.Pa(a)},
static:{oa:function(a){var z,y,x,w
z=$.Nd()
@@ -21084,7 +21454,7 @@
C.Iv.G6(a)
return a}}},
jpR:{
-"^":["qE+zs;KM:X0=-349",function(){return[C.nJ]}],
+"^":["qE+zs;KM:X0=-351",function(){return[C.nJ]}],
$iszs:true,
$ishs:true,
$isd3:true,
@@ -21112,25 +21482,25 @@
"^":"a;ns",
$isV3:true},
Bl:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=$.mC().MM
if(z.Gv!==0)H.vh(new P.lj("Future already completed"))
z.OH(null)
-return},"call$1",null,2,0,null,235,[],"call"],
+return},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
Fn:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isRS},"call$1",null,2,0,null,581,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isRS},"call$1",null,2,0,null,593,[],"call"],
$isEH:true},
e3:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isMs},"call$1",null,2,0,null,581,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isMs},"call$1",null,2,0,null,593,[],"call"],
$isEH:true},
pM:{
-"^":"Tp:223;",
-call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,579,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return!a.gQ2()},"call$1",null,2,0,null,591,[],"call"],
$isEH:true},
jh:{
"^":"a;"}}],["polymer.deserialize","package:polymer/deserialize.dart",,Z,{
@@ -21140,7 +21510,7 @@
if(z!=null)return z.call$2(a,b)
try{y=C.xr.kV(J.JA(a,"'","\""))
return y}catch(x){H.Ru(x)
-return a}},"call$3","nn",6,0,null,23,[],271,[],11,[]],
+return a}},"call$3","jo",6,0,null,23,[],273,[],11,[]],
W6:{
"^":"Tp:108;",
call$0:[function(){var z=P.L5(null,null,null,null,null)
@@ -21153,59 +21523,59 @@
return z},"call$0",null,0,0,null,"call"],
$isEH:true},
Lf:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],235,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],237,[],"call"],
$isEH:true},
fT:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],235,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a},"call$2",null,4,0,null,21,[],237,[],"call"],
$isEH:true},
pp:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){var z,y
try{z=P.Gl(a)
return z}catch(y){H.Ru(y)
-return b}},"call$2",null,4,0,null,21,[],582,[],"call"],
+return b}},"call$2",null,4,0,null,21,[],594,[],"call"],
$isEH:true},
nl:{
-"^":"Tp:341;",
-call$2:[function(a,b){return!J.de(a,"false")},"call$2",null,4,0,null,21,[],235,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return!J.de(a,"false")},"call$2",null,4,0,null,21,[],237,[],"call"],
$isEH:true},
ik:{
-"^":"Tp:341;",
-call$2:[function(a,b){return H.BU(a,null,new Z.mf(b))},"call$2",null,4,0,null,21,[],582,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return H.BU(a,null,new Z.mf(b))},"call$2",null,4,0,null,21,[],594,[],"call"],
$isEH:true},
mf:{
-"^":"Tp:223;a",
-call$1:[function(a){return this.a},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return this.a},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
LfS:{
-"^":"Tp:341;",
-call$2:[function(a,b){return H.IH(a,new Z.HK(b))},"call$2",null,4,0,null,21,[],582,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return H.IH(a,new Z.HK(b))},"call$2",null,4,0,null,21,[],594,[],"call"],
$isEH:true},
HK:{
-"^":"Tp:223;b",
-call$1:[function(a){return this.b},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;b",
+call$1:[function(a){return this.b},"call$1",null,2,0,null,237,[],"call"],
$isEH:true}}],["polymer_expressions","package:polymer_expressions/polymer_expressions.dart",,T,{
"^":"",
ul:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isZ0)z=J.vo(z.gvc(a),new T.o8(a)).zV(0," ")
else z=typeof a==="object"&&a!==null&&(a.constructor===Array||!!z.$iscX)?z.zV(a," "):a
-return z},"call$1","qP",2,0,187,272,[]],
+return z},"call$1","qP",2,0,190,274,[]],
PX:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isZ0)z=J.C0(z.gvc(a),new T.ex(a)).zV(0,";")
else z=typeof a==="object"&&a!==null&&(a.constructor===Array||!!z.$iscX)?z.zV(a,";"):a
-return z},"call$1","Fx",2,0,187,272,[]],
+return z},"call$1","Fx",2,0,190,274,[]],
o8:{
-"^":"Tp:223;a",
-call$1:[function(a){return J.de(this.a.t(0,a),!0)},"call$1",null,2,0,null,417,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return J.de(this.a.t(0,a),!0)},"call$1",null,2,0,null,427,[],"call"],
$isEH:true},
ex:{
-"^":"Tp:223;a",
-call$1:[function(a){return H.d(a)+": "+H.d(this.a.t(0,a))},"call$1",null,2,0,null,417,[],"call"],
+"^":"Tp:225;a",
+call$1:[function(a){return H.d(a)+": "+H.d(this.a.t(0,a))},"call$1",null,2,0,null,427,[],"call"],
$isEH:true},
e9:{
-"^":"T4;",
+"^":"ve;",
cl:[function(a,b,c){var z,y,x
if(a==null)return
z=new Y.hc(H.VM([],[Y.Pn]),P.p9(""),new P.WU(a,0,0,null),null)
@@ -21220,24 +21590,24 @@
if(z.n(b,"bind")||z.n(b,"repeat")){z=J.x(x)
z=typeof x==="object"&&x!==null&&!!z.$isEZ}else z=!1}else z=!1
if(z)return
-return new T.Xy(this,b,x)},"call$3","gca",6,0,583,260,[],12,[],259,[]],
-CE:[function(a){return new T.G0(this)},"call$1","gb4",2,0,null,256,[]]},
+return new T.Xy(this,b,x)},"call$3","gca",6,0,595,262,[],12,[],261,[]],
+CE:[function(a){return new T.G0(this)},"call$1","gb4",2,0,null,258,[]]},
Xy:{
-"^":"Tp:341;a,b,c",
+"^":"Tp:343;a,b,c",
call$2:[function(a,b){var z=J.x(a)
if(typeof a!=="object"||a===null||!z.$isz6){z=this.a.nF
a=new K.z6(null,a,V.WF(z==null?H.B7([],P.L5(null,null,null,null,null)):z,null,null),null)}z=J.x(b)
z=typeof b==="object"&&b!==null&&!!z.$iscv
if(z&&J.de(this.b,"class"))return T.FL(this.c,a,T.qP())
if(z&&J.de(this.b,"style"))return T.FL(this.c,a,T.Fx())
-return T.FL(this.c,a,null)},"call$2",null,4,0,null,280,[],259,[],"call"],
+return T.FL(this.c,a,null)},"call$2",null,4,0,null,282,[],261,[],"call"],
$isEH:true},
G0:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isz6)z=a
else{z=this.a.nF
-z=new K.z6(null,a,V.WF(z==null?H.B7([],P.L5(null,null,null,null,null)):z,null,null),null)}return z},"call$1",null,2,0,null,280,[],"call"],
+z=new K.z6(null,a,V.WF(z==null?H.B7([],P.L5(null,null,null,null,null)):z,null,null),null)}return z},"call$1",null,2,0,null,282,[],"call"],
$isEH:true},
mY:{
"^":"Pi;a9,Cu,uI,Y7,AP,fn",
@@ -21247,14 +21617,14 @@
y=J.x(a)
if(typeof a==="object"&&a!==null&&!!y.$isfk){y=J.C0(a.bm,new T.mB(this,a)).tt(0,!1)
this.Y7=y}else{y=this.uI==null?a:this.u0(a)
-this.Y7=y}F.Wi(this,C.ls,z,y)},"call$1","gUG",2,0,223,272,[]],
-gP:[function(a){return this.Y7},null,null,1,0,108,"value",351],
+this.Y7=y}F.Wi(this,C.ls,z,y)},"call$1","gUG",2,0,225,274,[]],
+gP:[function(a){return this.Y7},null,null,1,0,108,"value",353],
r6:function(a,b){return this.gP(this).call$1(b)},
sP:[function(a,b){var z,y,x,w
try{K.jX(this.Cu,b,this.a9)}catch(y){x=H.Ru(y)
w=J.x(x)
if(typeof x==="object"&&x!==null&&!!w.$isB0){z=x
-$.eH().j2("Error evaluating expression '"+H.d(this.Cu)+"': "+J.yj(z))}else throw y}},null,null,3,0,223,272,[],"value",351],
+$.eH().j2("Error evaluating expression '"+H.d(this.Cu)+"': "+J.yj(z))}else throw y}},null,null,3,0,225,274,[],"value",353],
yB:function(a,b,c){var z,y,x,w,v
y=this.Cu
y.gju().yI(this.gUG()).fm(0,new T.GX(this))
@@ -21268,14 +21638,14 @@
z.yB(a,b,c)
return z}}},
GX:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){$.eH().j2("Error evaluating expression '"+H.d(this.a.Cu)+"': "+H.d(J.yj(a)))},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
mB:{
-"^":"Tp:223;a,b",
+"^":"Tp:225;a,b",
call$1:[function(a){var z=P.L5(null,null,null,null,null)
z.u(0,this.b.kF,a)
-return new K.z6(this.a.a9,null,V.WF(z,null,null),null)},"call$1",null,2,0,null,383,[],"call"],
+return new K.z6(this.a.a9,null,V.WF(z,null,null),null)},"call$1",null,2,0,null,390,[],"call"],
$isEH:true}}],["polymer_expressions.async","package:polymer_expressions/async.dart",,B,{
"^":"",
XF:{
@@ -21288,13 +21658,13 @@
bX:{
"^":"Tp;a,b",
call$1:[function(a){var z=this.b
-z.L1=F.Wi(z,C.ls,z.L1,a)},"call$1",null,2,0,null,383,[],"call"],
+z.L1=F.Wi(z,C.ls,z.L1,a)},"call$1",null,2,0,null,390,[],"call"],
$isEH:true,
$signature:function(){return H.IG(function(a){return{func:"CJ",args:[a]}},this.b,"XF")}}}],["polymer_expressions.eval","package:polymer_expressions/eval.dart",,K,{
"^":"",
OH:[function(a,b){var z=J.UK(a,new K.G1(b,P.NZ(null,null)))
J.UK(z,new K.Ed(b))
-return z.gLv()},"call$2","ly",4,0,null,273,[],265,[]],
+return z.gLv()},"call$2","ly",4,0,null,275,[],267,[]],
jX:[function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p
z={}
z.a=a
@@ -21324,75 +21694,75 @@
throw H.b(K.kG("filter must implement Transformer: "+H.d(r)))}p=K.OH(t,c)
if(p==null)throw H.b(K.kG("Can't assign to null: "+H.d(t)))
if(s)J.kW(p,u,b)
-else H.vn(p).PU(new H.GD(H.le(u)),b)},"call$3","wA",6,0,null,273,[],23,[],265,[]],
+else H.vn(p).PU(new H.GD(H.le(u)),b)},"call$3","wA",6,0,null,275,[],23,[],267,[]],
ci:[function(a){var z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$isqh)return B.z4(a,null)
-return a},"call$1","Af",2,0,null,272,[]],
+return a},"call$1","Af",2,0,null,274,[]],
lP:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.WB(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.WB(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Uf:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.xH(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.xH(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Ra:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.p0(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.p0(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
wJY:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.FW(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.FW(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
zOQ:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.de(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.de(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
W6o:{
-"^":"Tp:341;",
-call$2:[function(a,b){return!J.de(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return!J.de(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
MdQ:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.z8(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.z8(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
YJG:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.J5(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.J5(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
DOe:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.u6(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.u6(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
lPa:{
-"^":"Tp:341;",
-call$2:[function(a,b){return J.Hb(a,b)},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return J.Hb(a,b)},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Ufa:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a===!0||b===!0},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a===!0||b===!0},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
Raa:{
-"^":"Tp:341;",
-call$2:[function(a,b){return a===!0&&b===!0},"call$2",null,4,0,null,123,[],180,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return a===!0&&b===!0},"call$2",null,4,0,null,123,[],183,[],"call"],
$isEH:true},
w0:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){var z=H.uK(P.a)
z=H.KT(z,[z]).BD(b)
if(z)return b.call$1(a)
throw H.b(K.kG("Filters must be a one-argument function."))},"call$2",null,4,0,null,123,[],110,[],"call"],
$isEH:true},
w4:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
w5:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return J.Z7(a)},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
w7:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a!==!0},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
c4:{
@@ -21425,7 +21795,7 @@
if(z.Zp.x4(a))return z
else{z=H.le(a)
if(Z.y1(H.jO(J.bB(this.gCH().Ax).LU),new H.GD(z))!=null)return this.k8}}z=this.eT
-if(z!=null)return z.tI(a)},"call$1","gVy",2,0,null,12,[]],
+if(z!=null)return z.tI(a)},"call$1","gXe",2,0,null,12,[]],
tg:[function(a,b){var z
if(this.bq.Zp.x4(b))return!0
else{z=H.le(b)
@@ -21433,16 +21803,16 @@
if(z!=null)return z.tg(0,b)
return!1},"call$1","gdj",2,0,null,12,[]],
$isz6:true},
-Mb:{
+Ay0:{
"^":"a;bO?,Lv<",
gju:function(){var z=this.k6
return H.VM(new P.Ik(z),[H.Kp(z,0)])},
gLl:function(){return this.Lv},
-Qh:[function(a){},"call$1","gVj",2,0,null,265,[]],
+Qh:[function(a){},"call$1","gVj",2,0,null,267,[]],
DX:[function(a){var z
this.yc(0,a)
z=this.bO
-if(z!=null)z.DX(a)},"call$1","gFO",2,0,null,265,[]],
+if(z!=null)z.DX(a)},"call$1","gFO",2,0,null,267,[]],
yc:[function(a,b){var z,y,x
z=this.tj
if(z!=null){z.ed()
@@ -21451,14 +21821,14 @@
z=this.Lv
if(z==null?y!=null:z!==y){x=this.k6
if(x.Gv>=4)H.vh(x.q7())
-x.Iv(z)}},"call$1","gcz",2,0,null,265,[]],
+x.Iv(z)}},"call$1","gcz",2,0,null,267,[]],
bu:[function(a){return this.KL.bu(0)},"call$0","gXo",0,0,null],
$ishw:true},
Ed:{
"^":"cfS;Jd",
xn:[function(a){a.yc(0,this.Jd)},"call$1","gBe",2,0,null,18,[]],
ky:[function(a){J.UK(a.gT8(),this)
-a.yc(0,this.Jd)},"call$1","gXf",2,0,null,278,[]]},
+a.yc(0,this.Jd)},"call$1","gXf",2,0,null,280,[]]},
G1:{
"^":"fr;Jd,Le",
W9:[function(a){return new K.Wh(a,null,null,null,P.bK(null,null,!1,null))},"call$1","glO",2,0,null,18,[]],
@@ -21467,14 +21837,14 @@
z=J.UK(a.ghP(),this)
y=new K.vl(z,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(y)
-return y},"call$1","gEW",2,0,null,346,[]],
+return y},"call$1","gEW",2,0,null,348,[]],
CU:[function(a){var z,y,x
z=J.UK(a.ghP(),this)
y=J.UK(a.gJn(),this)
x=new K.iT(z,y,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(x)
y.sbO(x)
-return x},"call$1","gA2",2,0,null,383,[]],
+return x},"call$1","gA2",2,0,null,390,[]],
ZR:[function(a){var z,y,x,w,v
z=J.UK(a.ghP(),this)
y=a.gre()
@@ -21484,21 +21854,21 @@
x=H.VM(new H.A8(y,w),[null,null]).tt(0,!1)}v=new K.fa(z,x,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(v)
if(x!=null){x.toString
-H.bQ(x,new K.Os(v))}return v},"call$1","gES",2,0,null,383,[]],
-ti:[function(a){return new K.x5(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gXj",2,0,null,274,[]],
+H.bQ(x,new K.Os(v))}return v},"call$1","gES",2,0,null,390,[]],
+ti:[function(a){return new K.x5(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gXj",2,0,null,276,[]],
o0:[function(a){var z,y
z=H.VM(new H.A8(a.gPu(a),this.gnG()),[null,null]).tt(0,!1)
y=new K.ev(z,a,null,null,null,P.bK(null,null,!1,null))
H.bQ(z,new K.B8(y))
-return y},"call$1","gX7",2,0,null,274,[]],
+return y},"call$1","gX7",2,0,null,276,[]],
YV:[function(a){var z,y,x
z=J.UK(a.gG3(a),this)
y=J.UK(a.gv4(),this)
x=new K.qR(z,y,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(x)
y.sbO(x)
-return x},"call$1","gbU",2,0,null,18,[]],
-qv:[function(a){return new K.ek(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gFs",2,0,null,383,[]],
+return x},"call$1","gvO",2,0,null,18,[]],
+qv:[function(a){return new K.ek(a,null,null,null,P.bK(null,null,!1,null))},"call$1","gFs",2,0,null,390,[]],
im:[function(a){var z,y,x
z=J.UK(a.gBb(),this)
y=J.UK(a.gT8(),this)
@@ -21510,64 +21880,64 @@
z=J.UK(a.gwz(),this)
y=new K.mv(z,a,null,null,null,P.bK(null,null,!1,null))
z.sbO(y)
-return y},"call$1","gKY",2,0,null,91,[]],
+return y},"call$1","ghe",2,0,null,91,[]],
ky:[function(a){var z,y,x
z=J.UK(a.gBb(),this)
y=J.UK(a.gT8(),this)
x=new K.VA(z,y,a,null,null,null,P.bK(null,null,!1,null))
y.sbO(x)
-return x},"call$1","gXf",2,0,null,383,[]]},
+return x},"call$1","gXf",2,0,null,390,[]]},
Os:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
a.sbO(z)
return z},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
B8:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
a.sbO(z)
return z},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
Wh:{
-"^":"Mb;KL,bO,tj,Lv,k6",
-Qh:[function(a){this.Lv=a.k8},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.EZ]},
+"^":"Ay0;KL,bO,tj,Lv,k6",
+Qh:[function(a){this.Lv=a.k8},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.EZ]},
$isEZ:true,
$ishw:true},
x5:{
-"^":"Mb;KL,bO,tj,Lv,k6",
+"^":"Ay0;KL,bO,tj,Lv,k6",
gP:function(a){var z=this.KL
return z.gP(z)},
r6:function(a,b){return this.gP(this).call$1(b)},
Qh:[function(a){var z=this.KL
-this.Lv=z.gP(z)},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.no]},
+this.Lv=z.gP(z)},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.no]},
$asno:function(){return[null]},
$isno:true,
$ishw:true},
ev:{
-"^":"Mb;Pu>,KL,bO,tj,Lv,k6",
-Qh:[function(a){this.Lv=H.n3(this.Pu,P.L5(null,null,null,null,null),new K.ID())},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.kB]},
+"^":"Ay0;Pu>,KL,bO,tj,Lv,k6",
+Qh:[function(a){this.Lv=H.n3(this.Pu,P.L5(null,null,null,null,null),new K.ID())},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.kB]},
$iskB:true,
$ishw:true},
ID:{
-"^":"Tp:341;",
+"^":"Tp:343;",
call$2:[function(a,b){J.kW(a,J.WI(b).gLv(),b.gv4().gLv())
-return a},"call$2",null,4,0,null,183,[],18,[],"call"],
+return a},"call$2",null,4,0,null,186,[],18,[],"call"],
$isEH:true},
qR:{
-"^":"Mb;G3>,v4<,KL,bO,tj,Lv,k6",
-RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.ae]},
+"^":"Ay0;G3>,v4<,KL,bO,tj,Lv,k6",
+RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.ae]},
$isae:true,
$ishw:true},
ek:{
-"^":"Mb;KL,bO,tj,Lv,k6",
+"^":"Ay0;KL,bO,tj,Lv,k6",
gP:function(a){var z=this.KL
return z.gP(z)},
r6:function(a,b){return this.gP(this).call$1(b)},
@@ -21577,22 +21947,22 @@
y=a.tI(z.gP(z))
x=J.RE(y)
if(typeof y==="object"&&y!==null&&!!x.$isd3){z=H.le(z.gP(z))
-this.tj=x.gUj(y).yI(new K.Qv(this,a,new H.GD(z)))}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.w6]},
+this.tj=x.gUj(y).yI(new K.Qv(this,a,new H.GD(z)))}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.w6]},
$isw6:true,
$ishw:true},
Qv:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.Xm(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.Xm(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
Xm:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
mv:{
-"^":"Mb;wz<,KL,bO,tj,Lv,k6",
+"^":"Ay0;wz<,KL,bO,tj,Lv,k6",
gkp:function(a){var z=this.KL
return z.gkp(z)},
Qh:[function(a){var z,y
@@ -21600,13 +21970,13 @@
y=$.ww().t(0,z.gkp(z))
if(J.de(z.gkp(z),"!")){z=this.wz.gLv()
this.Lv=y.call$1(z==null?!1:z)}else{z=this.wz
-this.Lv=z.gLv()==null?null:y.call$1(z.gLv())}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.jK]},
+this.Lv=z.gLv()==null?null:y.call$1(z.gLv())}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.jK]},
$isjK:true,
$ishw:true},
mG:{
-"^":"Mb;Bb<,T8<,KL,bO,tj,Lv,k6",
+"^":"Ay0;Bb<,T8<,KL,bO,tj,Lv,k6",
gkp:function(a){var z=this.KL
return z.gkp(z)},
Qh:[function(a){var z,y,x,w
@@ -21623,17 +21993,17 @@
w=typeof z==="object"&&z!==null&&!!w.$iswn
z=w}else z=!1
if(z)this.tj=H.Go(x.gLv(),"$iswn").gvp().yI(new K.uA(this,a))
-this.Lv=y.call$2(x.gLv(),this.T8.gLv())}}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.uk]},
+this.Lv=y.call$2(x.gLv(),this.T8.gLv())}}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.uk]},
$isuk:true,
$ishw:true},
uA:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
vl:{
-"^":"Mb;hP<,KL,bO,tj,Lv,k6",
+"^":"Ay0;hP<,KL,bO,tj,Lv,k6",
goc:function(a){var z=this.KL
return z.goc(z)},
Qh:[function(a){var z,y,x
@@ -21643,44 +22013,44 @@
x=new H.GD(H.le(y.goc(y)))
this.Lv=H.vn(z).rN(x).gAx()
y=J.RE(z)
-if(typeof z==="object"&&z!==null&&!!y.$isd3)this.tj=y.gUj(z).yI(new K.Li(this,a,x))},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.x9]},
+if(typeof z==="object"&&z!==null&&!!y.$isd3)this.tj=y.gUj(z).yI(new K.Li(this,a,x))},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.x9]},
$isx9:true,
$ishw:true},
Li:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.WK(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.WK(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
WK:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
iT:{
-"^":"Mb;hP<,Jn<,KL,bO,tj,Lv,k6",
+"^":"Ay0;hP<,Jn<,KL,bO,tj,Lv,k6",
Qh:[function(a){var z,y,x
z=this.hP.gLv()
if(z==null){this.Lv=null
return}y=this.Jn.gLv()
x=J.U6(z)
this.Lv=x.t(z,y)
-if(typeof z==="object"&&z!==null&&!!x.$isd3)this.tj=x.gUj(z).yI(new K.ja(this,a,y))},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.zX]},
+if(typeof z==="object"&&z!==null&&!!x.$isd3)this.tj=x.gUj(z).yI(new K.ja(this,a,y))},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.zX]},
$iszX:true,
$ishw:true},
ja:{
-"^":"Tp:223;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.zw(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:225;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.zw(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
zw:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isHA&&J.de(a.G3,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isHA&&J.de(a.G3,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
fa:{
-"^":"Mb;hP<,re<,KL,bO,tj,Lv,k6",
+"^":"Ay0;hP<,re<,KL,bO,tj,Lv,k6",
gbP:function(a){var z=this.KL
return z.gbP(z)},
Qh:[function(a){var z,y,x,w
@@ -21694,26 +22064,26 @@
this.Lv=K.ci(typeof x==="object"&&x!==null&&!!z.$iswL?x.lR.F2(x.ex,y,null).Ax:H.Ek(x,y,P.Te(null)))}else{w=new H.GD(H.le(z.gbP(z)))
this.Lv=H.vn(x).F2(w,y,null).Ax
z=J.RE(x)
-if(typeof x==="object"&&x!==null&&!!z.$isd3)this.tj=z.gUj(x).yI(new K.vQ(this,a,w))}},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.Jy]},
+if(typeof x==="object"&&x!==null&&!!z.$isd3)this.tj=z.gUj(x).yI(new K.vQ(this,a,w))}},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.Jy]},
$isJy:true,
$ishw:true},
WW:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return a.gLv()},"call$1",null,2,0,null,123,[],"call"],
$isEH:true},
vQ:{
-"^":"Tp:559;a,b,c",
-call$1:[function(a){if(J.pb(a,new K.a9(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,574,[],"call"],
+"^":"Tp:571;a,b,c",
+call$1:[function(a){if(J.pb(a,new K.a9(this.c))===!0)this.a.DX(this.b)},"call$1",null,2,0,null,586,[],"call"],
$isEH:true},
a9:{
-"^":"Tp:223;d",
+"^":"Tp:225;d",
call$1:[function(a){var z=J.x(a)
-return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,278,[],"call"],
+return typeof a==="object"&&a!==null&&!!z.$isqI&&J.de(a.oc,this.d)},"call$1",null,2,0,null,280,[],"call"],
$isEH:true},
VA:{
-"^":"Mb;Bb<,T8<,KL,bO,tj,Lv,k6",
+"^":"Ay0;Bb<,T8<,KL,bO,tj,Lv,k6",
Qh:[function(a){var z,y,x,w
z=this.Bb
y=this.T8.gLv()
@@ -21722,21 +22092,21 @@
if(typeof y==="object"&&y!==null&&!!x.$iswn)this.tj=y.gvp().yI(new K.J1(this,a))
x=J.Vm(z)
w=y!=null?y:C.xD
-this.Lv=new K.fk(x,w)},"call$1","gVj",2,0,null,265,[]],
-RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,272,[]],
-$asMb:function(){return[U.K9]},
+this.Lv=new K.fk(x,w)},"call$1","gVj",2,0,null,267,[]],
+RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,274,[]],
+$asAy0:function(){return[U.K9]},
$isK9:true,
$ishw:true},
J1:{
-"^":"Tp:223;a,b",
-call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;a,b",
+call$1:[function(a){return this.a.DX(this.b)},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
fk:{
"^":"a;kF,bm",
$isfk:true},
wL:{
-"^":"a:223;lR,ex",
-call$1:[function(a){return this.lR.F2(this.ex,[a],null).Ax},"call$1","gtm",2,0,null,584,[]],
+"^":"a:225;lR,ex",
+call$1:[function(a){return this.lR.F2(this.ex,[a],null).Ax},"call$1","gtm",2,0,null,596,[]],
$iswL:true,
$isEH:true},
B0:{
@@ -21756,33 +22126,33 @@
if(!(y<x))break
x=z.t(a,y)
if(y>=b.length)return H.e(b,y)
-if(!J.de(x,b[y]))return!1;++y}return!0},"call$2","OE",4,0,null,123,[],180,[]],
+if(!J.de(x,b[y]))return!1;++y}return!0},"call$2","OE",4,0,null,123,[],183,[]],
au:[function(a){a.toString
-return U.Up(H.n3(a,0,new U.xs()))},"call$1","bT",2,0,null,274,[]],
+return U.Up(H.n3(a,0,new U.xs()))},"call$1","bT",2,0,null,276,[]],
Zm:[function(a,b){var z=J.WB(a,b)
if(typeof z!=="number")return H.s(z)
a=536870911&z
a=536870911&a+((524287&a)<<10>>>0)
-return a^a>>>6},"call$2","uN",4,0,null,275,[],23,[]],
+return a^a>>>6},"call$2","uN",4,0,null,277,[],23,[]],
Up:[function(a){if(typeof a!=="number")return H.s(a)
a=536870911&a+((67108863&a)<<3>>>0)
a=(a^a>>>11)>>>0
-return 536870911&a+((16383&a)<<15>>>0)},"call$1","fM",2,0,null,275,[]],
+return 536870911&a+((16383&a)<<15>>>0)},"call$1","Hj",2,0,null,277,[]],
tc:{
"^":"a;",
-Bf:[function(a,b,c){return new U.zX(b,c)},"call$2","gvH",4,0,585,18,[],123,[]],
-F2:[function(a,b,c){return new U.Jy(a,b,c)},"call$3","gb2",6,0,null,18,[],183,[],123,[]]},
+Bf:[function(a,b,c){return new U.zX(b,c)},"call$2","gvH",4,0,597,18,[],123,[]],
+F2:[function(a,b,c){return new U.Jy(a,b,c)},"call$3","gb2",6,0,null,18,[],186,[],123,[]]},
hw:{
"^":"a;",
$ishw:true},
EZ:{
"^":"hw;",
-RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.W9(this)},"call$1","gBu",2,0,null,274,[]],
$isEZ:true},
no:{
"^":"hw;P>",
r6:function(a,b){return this.P.call$1(b)},
-RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.ti(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){var z=this.P
return typeof z==="string"?"\""+H.d(z)+"\"":H.d(z)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
@@ -21793,7 +22163,7 @@
$isno:true},
kB:{
"^":"hw;Pu>",
-RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.o0(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"{"+H.d(this.Pu)+"}"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21803,7 +22173,7 @@
$iskB:true},
ae:{
"^":"hw;G3>,v4<",
-RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.YV(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.G3)+": "+H.d(this.v4)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21816,7 +22186,7 @@
$isae:true},
XC:{
"^":"hw;wz",
-RR:[function(a,b){return b.LT(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.LT(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"("+H.d(this.wz)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21827,7 +22197,7 @@
w6:{
"^":"hw;P>",
r6:function(a,b){return this.P.call$1(b)},
-RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.qv(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return this.P},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21837,7 +22207,7 @@
$isw6:true},
jK:{
"^":"hw;kp>,wz<",
-RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.Hx(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.kp)+" "+H.d(this.wz)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21850,7 +22220,7 @@
$isjK:true},
uk:{
"^":"hw;kp>,Bb<,T8<",
-RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.im(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"("+H.d(this.Bb)+" "+H.d(this.kp)+" "+H.d(this.T8)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21864,7 +22234,7 @@
$isuk:true},
K9:{
"^":"hw;Bb<,T8<",
-RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.ky(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return"("+H.d(this.Bb)+" in "+H.d(this.T8)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21878,7 +22248,7 @@
$isK9:true},
zX:{
"^":"hw;hP<,Jn<",
-RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.CU(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.hP)+"["+H.d(this.Jn)+"]"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21891,7 +22261,7 @@
$iszX:true},
x9:{
"^":"hw;hP<,oc>",
-RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.co(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.hP)+"."+H.d(this.oc)},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21904,7 +22274,7 @@
$isx9:true},
Jy:{
"^":"hw;hP<,bP>,re<",
-RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,272,[]],
+RR:[function(a,b){return b.ZR(this)},"call$1","gBu",2,0,null,274,[]],
bu:[function(a){return H.d(this.hP)+"."+H.d(this.bP)+"("+H.d(this.re)+")"},"call$0","gXo",0,0,null],
n:[function(a,b){var z
if(b==null)return!1
@@ -21917,8 +22287,8 @@
return U.Up(U.Zm(U.Zm(U.Zm(0,z),y),x))},
$isJy:true},
xs:{
-"^":"Tp:341;",
-call$2:[function(a,b){return U.Zm(a,J.v1(b))},"call$2",null,4,0,null,586,[],587,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){return U.Zm(a,J.v1(b))},"call$2",null,4,0,null,598,[],599,[],"call"],
$isEH:true}}],["polymer_expressions.parser","package:polymer_expressions/parser.dart",,T,{
"^":"",
FX:{
@@ -21927,7 +22297,7 @@
if(!(a!=null&&!J.de(J.Iz(this.fL.lo),a)))z=b!=null&&!J.de(J.Vm(this.fL.lo),b)
else z=!0
if(z)throw H.b(Y.RV("Expected "+b+": "+H.d(this.fL.lo)))
-this.fL.G()},function(){return this.XJ(null,null)},"w5","call$2",null,"gXO",0,4,null,77,77,588,[],23,[]],
+this.fL.G()},function(){return this.XJ(null,null)},"w5","call$2",null,"gXO",0,4,null,77,77,600,[],23,[]],
o9:[function(){if(this.fL.lo==null){this.Sk.toString
return C.OL}var z=this.Dl()
return z==null?null:this.BH(z,0)},"call$0","gKx",0,0,null],
@@ -21945,7 +22315,7 @@
z.toString
a=new U.K9(a,v)}else if(J.de(J.Iz(this.fL.lo),8)&&J.J5(this.fL.lo.gG8(),b))a=this.Tw(a)
else break
-return a},"call$2","gHr",4,0,null,126,[],589,[]],
+return a},"call$2","gHr",4,0,null,126,[],601,[]],
qL:[function(a,b){var z,y
if(typeof b==="object"&&b!==null&&!!b.$isw6){z=b.gP(b)
this.Sk.toString
@@ -21988,7 +22358,7 @@
return new U.jK(z,w)}}}else if(y.n(z,"!")){this.w5()
w=this.BH(this.Ai(),11)
this.Sk.toString
-return new U.jK(z,w)}}return this.Ai()},"call$0","gNb",0,0,null],
+return new U.jK(z,w)}}return this.Ai()},"call$0","gna",0,0,null],
Ai:[function(){var z,y,x
switch(J.Iz(this.fL.lo)){case 10:z=J.Vm(this.fL.lo)
y=J.x(z)
@@ -22063,28 +22433,28 @@
this.Sk.toString
y=H.VM(new U.no(z),[null])
this.w5()
-return y},function(){return this.pT("")},"Ud","call$1",null,"gwo",0,2,null,328,590,[]],
+return y},function(){return this.pT("")},"Ud","call$1",null,"gwo",0,2,null,330,602,[]],
Fj:[function(a){var z,y
z=H.IH(H.d(a)+H.d(J.Vm(this.fL.lo)),null)
this.Sk.toString
y=H.VM(new U.no(z),[null])
this.w5()
-return y},function(){return this.Fj("")},"tw","call$1",null,"gSE",0,2,null,328,590,[]]}}],["polymer_expressions.src.globals","package:polymer_expressions/src/globals.dart",,K,{
+return y},function(){return this.Fj("")},"tw","call$1",null,"gSE",0,2,null,330,602,[]]}}],["polymer_expressions.src.globals","package:polymer_expressions/src/globals.dart",,K,{
"^":"",
-Dc:[function(a){return H.VM(new K.Bt(a),[null])},"call$1","UM",2,0,276,109,[]],
+Dc:[function(a){return H.VM(new K.Bt(a),[null])},"call$1","UM",2,0,278,109,[]],
Ae:{
-"^":"a;vH>-475,P>-591",
+"^":"a;vH>-484,P>-603",
r6:function(a,b){return this.P.call$1(b)},
n:[function(a,b){var z
if(b==null)return!1
z=J.x(b)
-return typeof b==="object"&&b!==null&&!!z.$isAe&&J.de(b.vH,this.vH)&&J.de(b.P,this.P)},"call$1","gUJ",2,0,223,91,[],"=="],
-giO:[function(a){return J.v1(this.P)},null,null,1,0,482,"hashCode"],
-bu:[function(a){return"("+H.d(this.vH)+", "+H.d(this.P)+")"},"call$0","gXo",0,0,362,"toString"],
+return typeof b==="object"&&b!==null&&!!z.$isAe&&J.de(b.vH,this.vH)&&J.de(b.P,this.P)},"call$1","gUJ",2,0,225,91,[],"=="],
+giO:[function(a){return J.v1(this.P)},null,null,1,0,491,"hashCode"],
+bu:[function(a){return"("+H.d(this.vH)+", "+H.d(this.P)+")"},"call$0","gXo",0,0,367,"toString"],
$isAe:true,
"@":function(){return[C.nJ]},
"<>":[3],
-static:{i0:[function(a,b,c){return H.VM(new K.Ae(a,b),[c])},null,null,4,0,function(){return H.IG(function(a){return{func:"GR",args:[J.im,a]}},this.$receiver,"Ae")},47,[],23,[],"new IndexedValue"]}},
+static:{iz:[function(a,b,c){return H.VM(new K.Ae(a,b),[c])},null,null,4,0,function(){return H.IG(function(a){return{func:"GR",args:[J.im,a]}},this.$receiver,"Ae")},47,[],23,[],"new IndexedValue"]}},
"+IndexedValue":[0],
Bt:{
"^":"mW;YR",
@@ -22121,14 +22491,14 @@
z=a.gAY()
if(z!=null&&!J.de(z.gUx(),C.PU)){y=Z.y1(a.gAY(),b)
if(y!=null)return y}for(x=J.GP(a.gkZ());x.G();){y=Z.y1(x.lo,b)
-if(y!=null)return y}return},"call$2","tm",4,0,null,277,[],12,[]]}],["polymer_expressions.tokenizer","package:polymer_expressions/tokenizer.dart",,Y,{
+if(y!=null)return y}return},"call$2","tm",4,0,null,279,[],12,[]]}],["polymer_expressions.tokenizer","package:polymer_expressions/tokenizer.dart",,Y,{
"^":"",
aK:[function(a){switch(a){case 102:return 12
case 110:return 10
case 114:return 13
case 116:return 9
case 118:return 11
-default:return a}},"call$1","aN",2,0,null,278,[]],
+default:return a}},"call$1","aN",2,0,null,280,[]],
Pn:{
"^":"a;fY>,P>,G8<",
r6:function(a,b){return this.P.call$1(b)},
@@ -22234,41 +22604,41 @@
"^":"",
fr:{
"^":"a;",
-DV:[function(a){return J.UK(a,this)},"call$1","gnG",2,0,592,86,[]]},
+DV:[function(a){return J.UK(a,this)},"call$1","gnG",2,0,604,86,[]]},
cfS:{
"^":"fr;",
W9:[function(a){return this.xn(a)},"call$1","glO",2,0,null,18,[]],
LT:[function(a){a.wz.RR(0,this)
this.xn(a)},"call$1","gff",2,0,null,18,[]],
co:[function(a){J.UK(a.ghP(),this)
-this.xn(a)},"call$1","gEW",2,0,null,383,[]],
+this.xn(a)},"call$1","gEW",2,0,null,390,[]],
CU:[function(a){J.UK(a.ghP(),this)
J.UK(a.gJn(),this)
-this.xn(a)},"call$1","gA2",2,0,null,383,[]],
+this.xn(a)},"call$1","gA2",2,0,null,390,[]],
ZR:[function(a){var z
J.UK(a.ghP(),this)
z=a.gre()
if(z!=null)for(z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]);z.G();)J.UK(z.lo,this)
-this.xn(a)},"call$1","gES",2,0,null,383,[]],
-ti:[function(a){return this.xn(a)},"call$1","gXj",2,0,null,274,[]],
+this.xn(a)},"call$1","gES",2,0,null,390,[]],
+ti:[function(a){return this.xn(a)},"call$1","gXj",2,0,null,276,[]],
o0:[function(a){var z
for(z=a.gPu(a),z=H.VM(new H.a7(z,z.length,0,null),[H.Kp(z,0)]);z.G();)J.UK(z.lo,this)
-this.xn(a)},"call$1","gX7",2,0,null,274,[]],
+this.xn(a)},"call$1","gX7",2,0,null,276,[]],
YV:[function(a){J.UK(a.gG3(a),this)
J.UK(a.gv4(),this)
-this.xn(a)},"call$1","gbU",2,0,null,18,[]],
-qv:[function(a){return this.xn(a)},"call$1","gFs",2,0,null,383,[]],
+this.xn(a)},"call$1","gvO",2,0,null,18,[]],
+qv:[function(a){return this.xn(a)},"call$1","gFs",2,0,null,390,[]],
im:[function(a){J.UK(a.gBb(),this)
J.UK(a.gT8(),this)
this.xn(a)},"call$1","glf",2,0,null,91,[]],
Hx:[function(a){J.UK(a.gwz(),this)
-this.xn(a)},"call$1","gKY",2,0,null,91,[]],
+this.xn(a)},"call$1","ghe",2,0,null,91,[]],
ky:[function(a){J.UK(a.gBb(),this)
J.UK(a.gT8(),this)
-this.xn(a)},"call$1","gXf",2,0,null,278,[]]}}],["response_viewer_element","package:observatory/src/observatory_elements/response_viewer.dart",,Q,{
+this.xn(a)},"call$1","gXf",2,0,null,280,[]]}}],["response_viewer_element","package:observatory/src/observatory_elements/response_viewer.dart",,Q,{
"^":"",
JG:{
-"^":["uL;hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+"^":["uL;hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
"@":function(){return[C.Is]},
static:{Zo:[function(a){var z,y,x,w
z=$.Nd()
@@ -22282,22 +22652,22 @@
C.Cc.ZL(a)
C.Cc.G6(a)
return a},null,null,0,0,108,"new ResponseViewerElement$created"]}},
-"+ResponseViewerElement":[474]}],["script_ref_element","package:observatory/src/observatory_elements/script_ref.dart",,A,{
+"+ResponseViewerElement":[483]}],["script_ref_element","package:observatory/src/observatory_elements/script_ref.dart",,A,{
"^":"",
knI:{
-"^":["qe;zw%-475,AP,fn,tY-347,Pe-355,m0-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gRd:[function(a){return a.zw},null,null,1,0,482,"line",351,352],
-sRd:[function(a,b){a.zw=this.ct(a,C.Cv,a.zw,b)},null,null,3,0,385,23,[],"line",351],
+"^":["T5;zw%-484,AP,fn,tY-349,Pe-360,m0-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gRd:[function(a){return a.zw},null,null,1,0,491,"line",353,354],
+sRd:[function(a,b){a.zw=this.ct(a,C.Cv,a.zw,b)},null,null,3,0,392,23,[],"line",353],
gO3:[function(a){var z
if(a.hm!=null&&a.tY!=null){z=this.Mq(a,J.UQ(a.tY,"id"))
if(J.u6(a.zw,0))return z
-else return z+"?line="+H.d(a.zw)}return""},null,null,1,0,362,"url"],
+else return z+"?line="+H.d(a.zw)}return""},null,null,1,0,367,"url"],
gJp:[function(a){var z,y
if(a.tY==null)return""
z=J.u6(a.zw,0)
y=a.tY
if(z)return J.UQ(y,"user_name")
-else return H.d(J.UQ(y,"user_name"))+":"+H.d(a.zw)},null,null,1,0,362,"hoverText"],
+else return H.d(J.UQ(y,"user_name"))+":"+H.d(a.zw)},null,null,1,0,367,"hoverText"],
goc:[function(a){var z,y,x
z=a.tY
if(z==null)return""
@@ -22305,7 +22675,7 @@
z=J.U6(y)
x=z.yn(y,J.WB(z.cn(y,"/"),1))
if(J.u6(a.zw,0))return x
-else return x+":"+H.d(a.zw)},null,null,1,0,362,"name"],
+else return x+":"+H.d(a.zw)},null,null,1,0,367,"name"],
"@":function(){return[C.Ur]},
static:{Th:[function(a){var z,y,x,w
z=$.Nd()
@@ -22322,24 +22692,24 @@
C.c0.ZL(a)
C.c0.G6(a)
return a},null,null,0,0,108,"new ScriptRefElement$created"]}},
-"+ScriptRefElement":[593],
-qe:{
+"+ScriptRefElement":[605],
+T5:{
"^":"xI+Pi;",
$isd3:true}}],["script_view_element","package:observatory/src/observatory_elements/script_view.dart",,U,{
"^":"",
fI:{
-"^":["V13;Uz%-594,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gNl:[function(a){return a.Uz},null,null,1,0,595,"script",351,352],
-sNl:[function(a,b){a.Uz=this.ct(a,C.fX,a.Uz,b)},null,null,3,0,596,23,[],"script",351],
+"^":["V19;Uz%-606,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gNl:[function(a){return a.Uz},null,null,1,0,607,"script",353,354],
+sNl:[function(a,b){a.Uz=this.ct(a,C.fX,a.Uz,b)},null,null,3,0,608,23,[],"script",353],
PQ:[function(a,b){if(J.de(b.gu9(),-1))return"min-width:32px;"
else if(J.de(b.gu9(),0))return"min-width:32px;background-color:red"
-return"min-width:32px;background-color:green"},"call$1","gXa",2,0,597,173,[],"hitsStyle"],
+return"min-width:32px;background-color:green"},"call$1","gXa",2,0,609,176,[],"hitsStyle"],
wH:[function(a,b,c,d){var z,y,x
z=a.hm.gZ6().R6()
y=a.hm.gnI().AQ(z)
if(y==null){N.Jx("").To("No isolate found.")
return}x="/"+z+"/coverage"
-a.hm.gDF().fB(x).ml(new U.qq(a,y)).OA(new U.FC())},"call$3","gWp",6,0,369,18,[],301,[],74,[],"refreshCoverage"],
+a.hm.gDF().fB(x).ml(new U.qq(a,y)).OA(new U.FC())},"call$3","gWp",6,0,374,18,[],303,[],74,[],"refreshCoverage"],
"@":function(){return[C.I3]},
static:{Ry:[function(a){var z,y,x,w
z=$.Nd()
@@ -22353,56 +22723,57 @@
C.cJ.ZL(a)
C.cJ.G6(a)
return a},null,null,0,0,108,"new ScriptViewElement$created"]}},
-"+ScriptViewElement":[598],
-V13:{
+"+ScriptViewElement":[610],
+V19:{
"^":"uL+Pi;",
$isd3:true},
qq:{
-"^":"Tp:353;a-77,b-77",
+"^":"Tp:355;a-77,b-77",
call$1:[function(a){var z,y
this.b.oe(J.UQ(a,"coverage"))
z=this.a
y=J.RE(z)
-y.ct(z,C.YH,"",y.gXa(z))},"call$1",null,2,0,353,599,[],"call"],
+y.ct(z,C.YH,"",y.gXa(z))},"call$1",null,2,0,355,611,[],"call"],
$isEH:true},
-"+ScriptViewElement_refreshCoverage_closure":[467],
+"+ScriptViewElement_refreshCoverage_closure":[358],
FC:{
-"^":"Tp:341;",
-call$2:[function(a,b){P.JS("refreshCoverage "+H.d(a)+" "+H.d(b))},"call$2",null,4,0,341,18,[],468,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){P.JS("refreshCoverage "+H.d(a)+" "+H.d(b))},"call$2",null,4,0,343,18,[],478,[],"call"],
$isEH:true},
-"+ScriptViewElement_refreshCoverage_closure":[467]}],["service_ref_element","package:observatory/src/observatory_elements/service_ref.dart",,Q,{
+"+ScriptViewElement_refreshCoverage_closure":[358]}],["service_ref_element","package:observatory/src/observatory_elements/service_ref.dart",,Q,{
"^":"",
xI:{
-"^":["Ds;tY%-347,Pe%-355,m0%-356,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gnv:[function(a){return a.tY},null,null,1,0,350,"ref",351,352],
-snv:[function(a,b){a.tY=this.ct(a,C.kY,a.tY,b)},null,null,3,0,353,23,[],"ref",351],
-gjT:[function(a){return a.Pe},null,null,1,0,366,"internal",351,352],
-sjT:[function(a,b){a.Pe=this.ct(a,C.zD,a.Pe,b)},null,null,3,0,367,23,[],"internal",351],
-gAq:[function(a){return a.m0},null,null,1,0,493,"isolate",351,352],
-sAq:[function(a,b){a.m0=this.ct(a,C.Z8,a.m0,b)},null,null,3,0,494,23,[],"isolate",351],
+"^":["Ds;tY%-349,Pe%-360,m0%-361,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gnv:[function(a){return a.tY},null,null,1,0,352,"ref",353,354],
+snv:[function(a,b){a.tY=this.ct(a,C.kY,a.tY,b)},null,null,3,0,355,23,[],"ref",353],
+gjT:[function(a){return a.Pe},null,null,1,0,371,"internal",353,354],
+sjT:[function(a,b){a.Pe=this.ct(a,C.zD,a.Pe,b)},null,null,3,0,372,23,[],"internal",353],
+gAq:[function(a){return a.m0},null,null,1,0,502,"isolate",353,354],
+sAq:[function(a,b){a.m0=this.ct(a,C.Z8,a.m0,b)},null,null,3,0,503,23,[],"isolate",353],
aZ:[function(a,b){this.ct(a,C.Fh,"",this.gO3(a))
this.ct(a,C.YS,[],this.goc(a))
-this.ct(a,C.bA,"",this.gJp(a))},"call$1","gma",2,0,150,225,[],"refChanged"],
+this.ct(a,C.bA,"",this.gJp(a))},"call$1","gma",2,0,153,227,[],"refChanged"],
gO3:[function(a){var z=a.tY
if(z!=null)return this.Mq(a,J.UQ(z,"id"))
-return""},null,null,1,0,362,"url"],
+return""},null,null,1,0,367,"url"],
gJp:[function(a){var z,y
z=a.tY
if(z==null)return""
y=J.UQ(z,"name")
-return y!=null?y:""},null,null,1,0,362,"hoverText"],
+return y!=null?y:""},null,null,1,0,367,"hoverText"],
goc:[function(a){var z,y
z=a.tY
-if(z==null)return""
+if(z==null)return"NULL REF"
y=a.Pe===!0?"name":"user_name"
if(J.UQ(z,y)!=null)return J.UQ(a.tY,y)
else if(J.UQ(a.tY,"name")!=null)return J.UQ(a.tY,"name")
-return""},null,null,1,0,362,"name"],
-tx:[function(a,b){this.ct(a,C.bD,0,1)},"call$1","gQ1",2,0,150,225,[],"isolateChanged"],
+else if(J.UQ(a.tY,"user_name")!=null)return J.UQ(a.tY,"user_name")
+return""},null,null,1,0,367,"name"],
+vD:[function(a,b){this.ct(a,C.bD,0,1)},"call$1","gQ1",2,0,153,227,[],"isolateChanged"],
Mq:[function(a,b){var z=a.hm
if(z==null)return""
else if(a.m0==null)return z.gZ6().kP(b)
-else return J.uY(z.gZ6(),J.F8(a.m0),b)},"call$1","gLc",2,0,504,505,[],"relativeLink",365],
+else return J.uY(z.gZ6(),J.F8(a.m0),b)},"call$1","gLc",2,0,534,612,[],"relativeLink",370],
"@":function(){return[C.JD]},
static:{lK:[function(a){var z,y,x,w
z=$.Nd()
@@ -22418,19 +22789,15 @@
C.wU.ZL(a)
C.wU.G6(a)
return a},null,null,0,0,108,"new ServiceRefElement$created"]}},
-"+ServiceRefElement":[600],
+"+ServiceRefElement":[613],
Ds:{
"^":"uL+Pi;",
$isd3:true}}],["stack_frame_element","package:observatory/src/observatory_elements/stack_frame.dart",,K,{
"^":"",
nm:{
-"^":["V14;Va%-347,Mt%-355,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gz1:[function(a){return a.Va},null,null,1,0,350,"frame",351,352],
-sz1:[function(a,b){a.Va=this.ct(a,C.rE,a.Va,b)},null,null,3,0,353,23,[],"frame",351],
-goE:[function(a){return a.Mt},null,null,1,0,366,"expanded",351,352],
-soE:[function(a,b){a.Mt=this.ct(a,C.mr,a.Mt,b)},null,null,3,0,367,23,[],"expanded",351],
-AZ:[function(a,b,c,d){var z=a.Mt
-a.Mt=this.ct(a,C.mr,z,z!==!0)},"call$3","ghM",6,0,470,123,[],180,[],278,[],"toggleExpand"],
+"^":["V20;Va%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gz1:[function(a){return a.Va},null,null,1,0,352,"frame",353,354],
+sz1:[function(a,b){a.Va=this.ct(a,C.rE,a.Va,b)},null,null,3,0,355,23,[],"frame",353],
"@":function(){return[C.pE]},
static:{an:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
@@ -22441,26 +22808,25 @@
v=W.cv
v=H.VM(new V.qC(P.Py(null,null,null,w,v),null,null),[w,v])
a.Va=z
-a.Mt=!1
a.SO=y
a.B7=x
a.X0=v
C.dX.ZL(a)
C.dX.G6(a)
return a},null,null,0,0,108,"new StackFrameElement$created"]}},
-"+StackFrameElement":[601],
-V14:{
+"+StackFrameElement":[614],
+V20:{
"^":"uL+Pi;",
$isd3:true}}],["stack_trace_element","package:observatory/src/observatory_elements/stack_trace.dart",,X,{
"^":"",
Vu:{
-"^":["V15;V4%-347,AP,fn,hm-348,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-349",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
-gtN:[function(a){return a.V4},null,null,1,0,350,"trace",351,352],
-stN:[function(a,b){a.V4=this.ct(a,C.kw,a.V4,b)},null,null,3,0,353,23,[],"trace",351],
-Ak:[function(a,b,c,d){var z=a.hm.gZ6().kP("stacktrace")
-a.hm.gDF().fB(z).ml(new X.At(a)).OA(new X.Sb())},"call$3","gBq",6,0,369,18,[],301,[],74,[],"refresh"],
+"^":["V21;V4%-349,AP,fn,hm-350,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0-351",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){return[C.nJ]}],
+gtN:[function(a){return a.V4},null,null,1,0,352,"trace",353,354],
+stN:[function(a,b){a.V4=this.ct(a,C.kw,a.V4,b)},null,null,3,0,355,23,[],"trace",353],
+RF:[function(a,b){var z=a.hm.gZ6().kP("stacktrace")
+a.hm.gDF().fB(z).ml(new X.At(a)).OA(new X.Sb()).YM(b)},"call$1","gvC",2,0,153,356,[],"refresh"],
"@":function(){return[C.js]},
-static:{B4:[function(a){var z,y,x,w,v
+static:{bV:[function(a){var z,y,x,w,v
z=H.B7([],P.L5(null,null,null,null,null))
z=R.Jk(z)
y=$.Nd()
@@ -22475,23 +22841,23 @@
C.bg.ZL(a)
C.bg.G6(a)
return a},null,null,0,0,108,"new StackTraceElement$created"]}},
-"+StackTraceElement":[602],
-V15:{
+"+StackTraceElement":[615],
+V21:{
"^":"uL+Pi;",
$isd3:true},
At:{
-"^":"Tp:223;a-77",
+"^":"Tp:225;a-77",
call$1:[function(a){var z,y
z=this.a
y=J.RE(z)
-y.sV4(z,y.ct(z,C.kw,y.gV4(z),a))},"call$1",null,2,0,223,144,[],"call"],
+y.sV4(z,y.ct(z,C.kw,y.gV4(z),a))},"call$1",null,2,0,225,144,[],"call"],
$isEH:true},
-"+StackTraceElement_refresh_closure":[467],
+"+StackTraceElement_refresh_closure":[358],
Sb:{
-"^":"Tp:341;",
-call$2:[function(a,b){N.Jx("").hh("Error while reloading stack trace: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,341,18,[],472,[],"call"],
+"^":"Tp:343;",
+call$2:[function(a,b){N.Jx("").hh("Error while reloading stack trace: "+H.d(a)+"\n"+H.d(b))},"call$2",null,4,0,343,18,[],359,[],"call"],
$isEH:true},
-"+StackTraceElement_refresh_closure":[467]}],["template_binding","package:template_binding/template_binding.dart",,M,{
+"+StackTraceElement_refresh_closure":[358]}],["template_binding","package:template_binding/template_binding.dart",,M,{
"^":"",
IP:[function(a){var z=J.RE(a)
if(typeof a==="object"&&a!==null&&!!z.$isQl)return C.i3.f0(a)
@@ -22509,7 +22875,7 @@
if(s==null)continue
if(u==null)u=P.Py(null,null,null,null,null)
u.u(0,t,s)}if(z==null&&u==null&&w==null)return
-return new M.XI(z,u,w,t)},"call$2","Nc",4,0,null,259,[],279,[]],
+return new M.XI(z,u,w,t)},"call$2","Nc",4,0,null,261,[],281,[]],
HP:[function(a,b,c,d,e){var z,y,x
if(b==null)return
if(b.gN2()!=null){z=b.gN2()
@@ -22519,16 +22885,16 @@
if(z.gwd(b)==null)return
y=b.gTe()-a.childNodes.length
for(x=a.firstChild;x!=null;x=x.nextSibling,++y){if(y<0)continue
-M.HP(x,J.UQ(z.gwd(b),y),c,d,e)}},"call$5","Yy",10,0,null,259,[],144,[],280,[],279,[],281,[]],
+M.HP(x,J.UQ(z.gwd(b),y),c,d,e)}},"call$5","Yy",10,0,null,261,[],144,[],282,[],281,[],283,[]],
bM:[function(a){var z
for(;z=J.RE(a),z.gKV(a)!=null;)a=z.gKV(a)
if(typeof a==="object"&&a!==null&&!!z.$isQF||typeof a==="object"&&a!==null&&!!z.$isI0||typeof a==="object"&&a!==null&&!!z.$ishy)return a
-return},"call$1","ay",2,0,null,259,[]],
+return},"call$1","ay",2,0,null,261,[]],
pN:[function(a,b){var z,y
z=J.x(a)
if(typeof a==="object"&&a!==null&&!!z.$iscv)return M.F5(a,b)
if(typeof a==="object"&&a!==null&&!!z.$iskJ){y=M.F4(a.textContent,"text",a,b)
-if(y!=null)return["text",y]}return},"call$2","SG",4,0,null,259,[],279,[]],
+if(y!=null)return["text",y]}return},"call$2","SG",4,0,null,261,[],281,[]],
F5:[function(a,b){var z,y,x
z={}
z.a=null
@@ -22539,7 +22905,7 @@
if(y==null){x=[]
z.a=x
y=x}y.push("bind")
-y.push(M.F4("{{}}","bind",a,b))}return z.a},"call$2","OT",4,0,null,124,[],279,[]],
+y.push(M.F4("{{}}","bind",a,b))}return z.a},"call$2","OT",4,0,null,124,[],281,[]],
Iu:[function(a,b,c,d){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i
for(z=J.U6(a),y=d!=null,x=J.x(b),x=typeof b==="object"&&b!==null&&!!x.$ishs,w=0;w<z.gB(a);w+=2){v=z.t(a,w)
u=z.t(a,w+1)
@@ -22569,7 +22935,7 @@
t.push(L.ao(j,l,null))}o.wE(0)
p=o
s="value"}i=J.Jj(x?b:M.Ky(b),v,p,s)
-if(y)d.push(i)}},"call$4","S5",6,2,null,77,286,[],259,[],280,[],281,[]],
+if(y)d.push(i)}},"call$4","S5",6,2,null,77,288,[],261,[],282,[],283,[]],
F4:[function(a,b,c,d){var z,y,x,w,v,u,t,s,r
z=a.length
if(z===0)return
@@ -22587,13 +22953,13 @@
v=t+2}if(v===z)w.push("")
z=new M.HS(w,null)
z.Yn(w)
-return z},"call$4","jF",8,0,null,86,[],12,[],259,[],279,[]],
+return z},"call$4","jF",8,0,null,86,[],12,[],261,[],281,[]],
SH:[function(a,b){var z,y
z=a.firstChild
if(z==null)return
y=new M.yp(z,a.lastChild,b)
for(;z!=null;){M.Ky(z).sCk(y)
-z=z.nextSibling}},"call$2","KQ",4,0,null,199,[],280,[]],
+z=z.nextSibling}},"call$2","KQ",4,0,null,202,[],282,[]],
Ky:[function(a){var z,y,x,w
z=$.rw()
z.toString
@@ -22608,12 +22974,12 @@
else w=!0
x=w?new M.DT(null,null,null,!1,null,null,null,null,null,a,null,null):new M.V2(a,null,null)}else x=typeof a==="object"&&a!==null&&!!w.$iskJ?new M.XT(a,null,null):new M.hs(a,null,null)
z.u(0,a,x)
-return x},"call$1","La",2,0,null,259,[]],
+return x},"call$1","La",2,0,null,261,[]],
wR:[function(a){var z=J.RE(a)
if(typeof a==="object"&&a!==null&&!!z.$iscv)if(z.gqn(a)!=="template")z=z.gQg(a).MW.hasAttribute("template")===!0&&C.uE.x4(z.gqn(a))===!0
else z=!0
else z=!1
-return z},"call$1","xS",2,0,null,287,[]],
+return z},"call$1","xS",2,0,null,289,[]],
V2:{
"^":"hs;N1,mD,Ck",
Z1:[function(a,b,c,d){var z,y,x,w,v
@@ -22636,7 +23002,7 @@
z=d!=null?d:""
x=new M.D8(w,y,c,null,null,v,z)
x.Og(y,v,c,d)}this.gCd(this).u(0,b,x)
-return x},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return x},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
D8:{
"^":"TR;Y0,qP,ZY,xS,PB,eS,ay",
EC:[function(a){var z,y
@@ -22658,7 +23024,7 @@
u=x}else{v=null
u=null}}else{v=null
u=null}M.NP.prototype.EC.call(this,a)
-if(u!=null&&u.gqP()!=null&&!J.de(y.gP(z),v))u.FC(null)},"call$1","gH0",2,0,null,226,[]]},
+if(u!=null&&u.gqP()!=null&&!J.de(y.gP(z),v))u.FC(null)},"call$1","gH0",2,0,null,228,[]]},
H2:{
"^":"TR;",
cO:[function(a){if(this.qP==null)return
@@ -22682,25 +23048,25 @@
return x.length===1?C.mt:C.Nm.gtH(x)},"call$0",null,0,0,null,"call"],
$isEH:true},
fTP:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){this.a.push(C.pi)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
ppY:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){this.b.push(C.mt)},"call$1",null,2,0,null,18,[],"call"],
$isEH:true},
NP:{
"^":"H2;Ca,qP,ZY,xS,PB,eS,ay",
gH:function(){return X.TR.prototype.gH.call(this)},
EC:[function(a){var z=this.gH()
-J.ta(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,226,[]],
+J.ta(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,228,[]],
FC:[function(a){var z=J.Vm(this.gH())
J.ta(this.xS,z)
-O.Y3()},"call$1","gqf",2,0,150,18,[]]},
+O.Y3()},"call$1","gqf",2,0,153,18,[]]},
jt:{
"^":"H2;Ca,qP,ZY,xS,PB,eS,ay",
EC:[function(a){var z=X.TR.prototype.gH.call(this)
-J.rP(z,null!=a&&!1!==a)},"call$1","gH0",2,0,null,226,[]],
+J.rP(z,null!=a&&!1!==a)},"call$1","gH0",2,0,null,228,[]],
FC:[function(a){var z,y,x,w
z=J.Hf(X.TR.prototype.gH.call(this))
J.ta(this.xS,z)
@@ -22709,7 +23075,7 @@
if(typeof z==="object"&&z!==null&&!!y.$isMi&&J.de(J.zH(X.TR.prototype.gH.call(this)),"radio"))for(z=J.GP(M.kv(X.TR.prototype.gH.call(this)));z.G();){x=z.gl()
y=J.x(x)
w=J.UQ(J.QE(typeof x==="object"&&x!==null&&!!y.$ishs?x:M.Ky(x)),"checked")
-if(w!=null)J.ta(w,!1)}O.Y3()},"call$1","gqf",2,0,150,18,[]],
+if(w!=null)J.ta(w,!1)}O.Y3()},"call$1","gqf",2,0,153,18,[]],
static:{kv:[function(a){var z,y,x
z=J.RE(a)
if(z.gMB(a)!=null){z=z.gMB(a)
@@ -22720,7 +23086,7 @@
x=J.MK(y,"input[type=\"radio\"][name=\""+H.d(z.goc(a))+"\"]")
return x.ev(x,new M.jz(a))}},"call$1","VE",2,0,null,124,[]]}},
r0:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z,y
z=this.a
y=J.x(a)
@@ -22729,12 +23095,12 @@
z=y==null?z==null:y===z}else z=!1
else z=!1
else z=!1
-return z},"call$1",null,2,0,null,283,[],"call"],
+return z},"call$1",null,2,0,null,285,[],"call"],
$isEH:true},
jz:{
-"^":"Tp:223;b",
+"^":"Tp:225;b",
call$1:[function(a){var z=J.x(a)
-return!z.n(a,this.b)&&z.gMB(a)==null},"call$1",null,2,0,null,283,[],"call"],
+return!z.n(a,this.b)&&z.gMB(a)==null},"call$1",null,2,0,null,285,[],"call"],
$isEH:true},
SA:{
"^":"H2;Dh,Ca,qP,ZY,xS,PB,eS,ay",
@@ -22743,7 +23109,7 @@
if(this.Gh(a)===!0)return
z=new (window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)(H.tR(W.K2(new M.hB(this)),2))
C.S2.yN(z,X.TR.prototype.gH.call(this),!0,!0)
-this.Dh=z},"call$1","gH0",2,0,null,226,[]],
+this.Dh=z},"call$1","gH0",2,0,null,228,[]],
Gh:[function(a){var z,y,x
z=this.eS
y=J.x(z)
@@ -22752,7 +23118,7 @@
z=J.m4(X.TR.prototype.gH.call(this))
return z==null?x==null:z===x}else if(y.n(z,"value")){z=X.TR.prototype.gH.call(this)
J.ta(z,a==null?"":H.d(a))
-return J.de(J.Vm(X.TR.prototype.gH.call(this)),a)}},"call$1","goz",2,0,null,226,[]],
+return J.de(J.Vm(X.TR.prototype.gH.call(this)),a)}},"call$1","goz",2,0,null,228,[]],
C7:[function(){var z=this.Dh
if(z!=null){z.disconnect()
this.Dh=null}},"call$0","gln",0,0,null],
@@ -22762,18 +23128,18 @@
y=J.x(z)
if(y.n(z,"selectedIndex")){z=J.m4(X.TR.prototype.gH.call(this))
J.ta(this.xS,z)}else if(y.n(z,"value")){z=J.Vm(X.TR.prototype.gH.call(this))
-J.ta(this.xS,z)}},"call$1","gqf",2,0,150,18,[]],
+J.ta(this.xS,z)}},"call$1","gqf",2,0,153,18,[]],
$isSA:true,
static:{qb:[function(a){if(typeof a==="string")return H.BU(a,null,new M.nv())
return typeof a==="number"&&Math.floor(a)===a?a:0},"call$1","v7",2,0,null,23,[]]}},
hB:{
-"^":"Tp:341;a",
+"^":"Tp:343;a",
call$2:[function(a,b){var z=this.a
-if(z.Gh(J.Vm(z.xS))===!0)z.C7()},"call$2",null,4,0,null,21,[],603,[],"call"],
+if(z.Gh(J.Vm(z.xS))===!0)z.C7()},"call$2",null,4,0,null,21,[],616,[],"call"],
$isEH:true},
nv:{
-"^":"Tp:223;",
-call$1:[function(a){return 0},"call$1",null,2,0,null,235,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return 0},"call$1",null,2,0,null,237,[],"call"],
$isEH:true},
ee:{
"^":"V2;N1,mD,Ck",
@@ -22797,7 +23163,7 @@
x.Og(z,"checked",c,d)
x.Ca=M.IP(z).yI(x.gqf())
z=x}y.u(0,b,z)
-return z},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return z},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
XI:{
"^":"a;Cd>,wd>,N2<,Te<"},
hs:{
@@ -22807,7 +23173,7 @@
z=$.pl()
y="Unhandled binding to Node: "+H.d(this)+" "+H.d(b)+" "+H.d(c)+" "+H.d(d)
z.toString
-if(typeof console!="undefined")console.error(y)},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]],
+if(typeof console!="undefined")console.error(y)},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]],
Ih:[function(a,b){var z
if(this.mD==null)return
z=this.gCd(this).Rz(0,b)
@@ -22844,7 +23210,7 @@
y.Og(x,b,c,d)
y.Ca=M.IP(x).yI(y.gqf())
z.u(0,b,y)
-return y},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return y},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
DT:{
"^":"V2;lr,xT?,kr<,Mf,QO?,jH?,mj?,IT,dv@,N1,mD,Ck",
gN1:function(){return this.N1},
@@ -22877,7 +23243,7 @@
z=new M.p8(this,c,b,d)
this.gCd(this).u(0,b,z)
return z
-default:return M.V2.prototype.Z1.call(this,this,b,c,d)}},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]],
+default:return M.V2.prototype.Z1.call(this,this,b,c,d)}},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]],
Ih:[function(a,b){var z
switch(b){case"bind":z=this.kr
if(z==null)return
@@ -22924,7 +23290,7 @@
y=u}t=M.Fz(x,y)
M.HP(t,w,a,b,c)
M.SH(t,a)
-return t},function(a,b){return this.a5(a,b,null)},"ZK","call$3",null,"gmJ",0,6,null,77,77,77,280,[],279,[],281,[]],
+return t},function(a,b){return this.a5(a,b,null)},"ZK","call$3",null,"gmJ",0,6,null,77,77,77,282,[],281,[],283,[]],
gzH:function(){return this.xT},
gnv:function(a){var z,y,x,w,v
this.Sy()
@@ -22963,7 +23329,7 @@
if(a!=null)v.sQO(a)
else if(w)M.KE(v,this.N1,u)
else M.GM(J.nX(v))
-return!0},function(){return this.wh(null)},"Sy","call$1",null,"ga6",0,2,null,77,604,[]],
+return!0},function(){return this.wh(null)},"Sy","call$1",null,"ga6",0,2,null,77,617,[]],
$isDT:true,
static:{"^":"mn,EW,Sf,To",Fz:[function(a,b){var z,y,x
z=J.Lh(b,a,!1)
@@ -22973,13 +23339,13 @@
else y=!1
if(y)return z
for(x=J.cO(a);x!=null;x=x.nextSibling)z.appendChild(M.Fz(x,b))
-return z},"call$2","Tkw",4,0,null,259,[],282,[]],TA:[function(a){var z,y,x,w
+return z},"call$2","Tkw",4,0,null,261,[],284,[]],TA:[function(a){var z,y,x,w
z=J.VN(a)
if(W.Pv(z.defaultView)==null)return z
y=$.LQ().t(0,z)
if(y==null){y=z.implementation.createHTMLDocument("")
for(;x=y.lastChild,x!=null;){w=x.parentNode
-if(w!=null)w.removeChild(x)}$.LQ().u(0,z,y)}return y},"call$1","nt",2,0,null,256,[]],pZ:[function(a){var z,y,x,w,v,u
+if(w!=null)w.removeChild(x)}$.LQ().u(0,z,y)}return y},"call$1","nt",2,0,null,258,[]],pZ:[function(a){var z,y,x,w,v,u
z=J.RE(a)
y=z.gM0(a).createElement("template",null)
z.gKV(a).insertBefore(y,a)
@@ -22994,27 +23360,27 @@
v.removeAttribute(w)
y.setAttribute(w,u)
break
-default:}}return y},"call$1","fo",2,0,null,283,[]],KE:[function(a,b,c){var z,y,x,w
+default:}}return y},"call$1","fo",2,0,null,285,[]],KE:[function(a,b,c){var z,y,x,w
z=J.nX(a)
if(c){J.Kv(z,b)
-return}for(y=J.RE(b),x=J.RE(z);w=y.gq6(b),w!=null;)x.jx(z,w)},"call$3","BZ",6,0,null,256,[],283,[],284,[]],GM:[function(a){var z,y
+return}for(y=J.RE(b),x=J.RE(z);w=y.gq6(b),w!=null;)x.jx(z,w)},"call$3","BZ",6,0,null,258,[],285,[],286,[]],GM:[function(a){var z,y
z=new M.OB()
y=J.MK(a,$.cz())
if(M.wR(a))z.call$1(a)
-y.aN(y,z)},"call$1","DR",2,0,null,285,[]],oR:[function(){if($.To===!0)return
+y.aN(y,z)},"call$1","DR",2,0,null,287,[]],oR:[function(){if($.To===!0)return
$.To=!0
var z=document.createElement("style",null)
z.textContent=$.cz()+" { display: none; }"
document.head.appendChild(z)},"call$0","Lv",0,0,null]}},
OB:{
-"^":"Tp:150;",
+"^":"Tp:153;",
call$1:[function(a){var z
if(!M.Ky(a).wh(null)){z=J.x(a)
-M.GM(J.nX(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a)))}},"call$1",null,2,0,null,256,[],"call"],
+M.GM(J.nX(typeof a==="object"&&a!==null&&!!z.$ishs?a:M.Ky(a)))}},"call$1",null,2,0,null,258,[],"call"],
$isEH:true},
DO:{
-"^":"Tp:223;",
-call$1:[function(a){return H.d(a)+"[template]"},"call$1",null,2,0,null,417,[],"call"],
+"^":"Tp:225;",
+call$1:[function(a){return H.d(a)+"[template]"},"call$1",null,2,0,null,427,[],"call"],
$isEH:true},
p8:{
"^":"a;ud,lr,eS,ay",
@@ -23033,7 +23399,7 @@
this.ud=null},"call$0","gJK",0,0,null],
$isTR:true},
NW:{
-"^":"Tp:341;a,b,c,d",
+"^":"Tp:343;a,b,c,d",
call$2:[function(a,b){var z,y,x,w
for(;z=J.U6(a),J.de(z.t(a,0),"_");)a=z.yn(a,1)
if(this.d)if(z.n(a,"if")){this.a.b=!0
@@ -23064,7 +23430,7 @@
if(0>=z.length)return H.e(z,0)
y=H.d(z[0])+H.d(a)
if(3>=z.length)return H.e(z,3)
-return y+H.d(z[3])},"call$1","gBg",2,0,605,23,[]],
+return y+H.d(z[3])},"call$1","gBg",2,0,618,23,[]],
DJ:[function(a){var z,y,x,w,v,u,t
z=this.EJ
if(0>=z.length)return H.e(z,0)
@@ -23075,7 +23441,7 @@
if(t>=z.length)return H.e(z,t)
u=z[t]
u=typeof u==="string"?u:H.d(u)
-y.vM=y.vM+u}return y.vM},"call$1","gqD",2,0,606,607,[]],
+y.vM=y.vM+u}return y.vM},"call$1","gqD",2,0,619,620,[]],
Yn:function(a){this.bX=this.EJ.length===4?this.gBg():this.gqD()}},
TG:{
"^":"a;e9,YC,xG,pq,t9,A7,js,Q3,JM,d6,rV,yO,XV,eD,FS,IY,U9,DO,Fy",
@@ -23109,7 +23475,7 @@
x=this.xG
x=x!=null?x:[]
w=G.jj(x,0,J.q8(x),y,0,J.q8(y))
-if(w.length!==0)this.El(w)},"call$1","ghC",2,0,null,226,[]],
+if(w.length!==0)this.El(w)},"call$1","ghC",2,0,null,228,[]],
wx:[function(a){var z,y,x,w
z=J.x(a)
if(z.n(a,-1))return this.e9.N1
@@ -23135,7 +23501,7 @@
v=J.TZ(this.e9.N1)
u=J.tx(y)
if(x)v.insertBefore(b,u)
-else if(c!=null)for(z=J.GP(c);z.G();)v.insertBefore(z.gl(),u)},"call$4","gaF",8,0,null,47,[],199,[],608,[],281,[]],
+else if(c!=null)for(z=J.GP(c);z.G();)v.insertBefore(z.gl(),u)},"call$4","gaF",8,0,null,47,[],202,[],621,[],283,[]],
MC:[function(a){var z,y,x,w,v,u,t,s
z=[]
z.$builtinTypeInfo=[W.KV]
@@ -23152,7 +23518,7 @@
if(s==null?w==null:s===w)w=x
v=s.parentNode
if(v!=null)v.removeChild(s)
-z.push(s)}return new M.Ya(z,t)},"call$1","gLu",2,0,null,47,[]],
+z.push(s)}return new M.Ya(z,t)},"call$1","gtx",2,0,null,47,[]],
El:[function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k
if(this.pq)return
z=this.e9
@@ -23178,9 +23544,9 @@
k=null}else{m=[]
if(this.DO!=null)o=this.Mv(o)
k=o!=null?z.a5(o,v,m):null
-l=null}this.lP(p,k,l,m)}}for(z=u.gUQ(u),z=H.VM(new H.MH(null,J.GP(z.l6),z.T6),[H.Kp(z,0),H.Kp(z,1)]);z.G();)this.uS(J.AB(z.lo))},"call$1","gZX",2,0,609,250,[]],
+l=null}this.lP(p,k,l,m)}}for(z=u.gUQ(u),z=H.VM(new H.MH(null,J.GP(z.l6),z.T6),[H.Kp(z,0),H.Kp(z,1)]);z.G();)this.uS(J.AB(z.lo))},"call$1","gZX",2,0,622,252,[]],
uS:[function(a){var z
-for(z=J.GP(a);z.G();)J.wC(z.gl())},"call$1","gZC",2,0,null,281,[]],
+for(z=J.GP(a);z.G();)J.wC(z.gl())},"call$1","gYl",2,0,null,283,[]],
Gb:[function(){var z=this.IY
if(z==null)return
z.ed()
@@ -23195,21 +23561,21 @@
this.FS=null}this.e9.kr=null
this.pq=!0},"call$0","gJK",0,0,null]},
ts:{
-"^":"Tp:223;",
+"^":"Tp:225;",
call$1:[function(a){return[a]},"call$1",null,2,0,null,21,[],"call"],
$isEH:true},
Kj:{
-"^":"Tp:484;a",
+"^":"Tp:493;a",
call$1:[function(a){var z,y,x
z=J.U6(a)
y=z.t(a,0)
x=z.t(a,1)
if(!(null!=x&&!1!==x))return
-return this.a?y:[y]},"call$1",null,2,0,null,607,[],"call"],
+return this.a?y:[y]},"call$1",null,2,0,null,620,[],"call"],
$isEH:true},
VU:{
-"^":"Tp:223;b",
-call$1:[function(a){return this.b.Az(J.iZ(J.MQ(a)))},"call$1",null,2,0,null,368,[],"call"],
+"^":"Tp:225;b",
+call$1:[function(a){return this.b.Az(J.iZ(J.MQ(a)))},"call$1",null,2,0,null,373,[],"call"],
$isEH:true},
Ya:{
"^":"a;yT>,kU>",
@@ -23225,11 +23591,11 @@
x=new M.ic(y,c,null,null,"text",x)
x.Og(y,"text",c,d)
z.u(0,b,x)
-return x},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]},
+return x},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]},
ic:{
"^":"TR;qP,ZY,xS,PB,eS,ay",
EC:[function(a){var z=this.qP
-J.c9(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,226,[]]},
+J.c9(z,a==null?"":H.d(a))},"call$1","gH0",2,0,null,228,[]]},
wl:{
"^":"V2;N1,mD,Ck",
gN1:function(){return this.N1},
@@ -23246,9 +23612,9 @@
y.Og(x,"value",c,d)
y.Ca=M.IP(x).yI(y.gqf())
z.u(0,b,y)
-return y},"call$3","gxfG",4,2,null,77,12,[],280,[],260,[]]}}],["template_binding.src.binding_delegate","package:template_binding/src/binding_delegate.dart",,O,{
+return y},"call$3","gxfG",4,2,null,77,12,[],282,[],262,[]]}}],["template_binding.src.binding_delegate","package:template_binding/src/binding_delegate.dart",,O,{
"^":"",
-T4:{
+ve:{
"^":"a;"}}],["template_binding.src.node_binding","package:template_binding/src/node_binding.dart",,X,{
"^":"",
TR:{
@@ -23276,43 +23642,43 @@
this.EC(J.Vm(this.xS))},
$isTR:true},
VD:{
-"^":"Tp:223;a",
+"^":"Tp:225;a",
call$1:[function(a){var z=this.a
-return z.EC(J.Vm(z.xS))},"call$1",null,2,0,null,368,[],"call"],
+return z.EC(J.Vm(z.xS))},"call$1",null,2,0,null,373,[],"call"],
$isEH:true}}],])
I.$finishClasses($$,$,null)
$$=null
J.O.$isString=true
-J.O.$isfR=true
-J.O.$asfR=[J.O]
+J.O.$isTx=true
+J.O.$asTx=[J.O]
J.O.$isa=true
-J.P.$isfR=true
-J.P.$asfR=[J.P]
+J.P.$isTx=true
+J.P.$asTx=[J.P]
J.P.$isa=true
J.im.$isint=true
-J.im.$isfR=true
-J.im.$asfR=[J.P]
-J.im.$isfR=true
-J.im.$asfR=[J.P]
-J.im.$isfR=true
-J.im.$asfR=[J.P]
+J.im.$isTx=true
+J.im.$asTx=[J.P]
+J.im.$isTx=true
+J.im.$asTx=[J.P]
+J.im.$isTx=true
+J.im.$asTx=[J.P]
J.im.$isa=true
J.GW.$isdouble=true
-J.GW.$isfR=true
-J.GW.$asfR=[J.P]
-J.GW.$isfR=true
-J.GW.$asfR=[J.P]
+J.GW.$isTx=true
+J.GW.$asTx=[J.P]
+J.GW.$isTx=true
+J.GW.$asTx=[J.P]
J.GW.$isa=true
W.KV.$isKV=true
W.KV.$isD0=true
W.KV.$isa=true
W.M5.$isa=true
-N.qV.$isfR=true
-N.qV.$asfR=[N.qV]
+N.qV.$isTx=true
+N.qV.$asTx=[N.qV]
N.qV.$isa=true
P.a6.$isa6=true
-P.a6.$isfR=true
-P.a6.$asfR=[P.a6]
+P.a6.$isTx=true
+P.a6.$asTx=[P.a6]
P.a6.$isa=true
P.Od.$isa=true
J.Q.$isList=true
@@ -23483,8 +23849,8 @@
P.jp.$isa=true
W.D0.$isD0=true
W.D0.$isa=true
-P.fR.$isfR=true
-P.fR.$isa=true
+P.Tx.$isTx=true
+P.Tx.$isa=true
P.aY.$isaY=true
P.aY.$isa=true
P.lO.$islO=true
@@ -23494,11 +23860,11 @@
P.nP.$isnP=true
P.nP.$isa=true
P.iP.$isiP=true
-P.iP.$isfR=true
-P.iP.$asfR=[null]
+P.iP.$isTx=true
+P.iP.$asTx=[null]
P.iP.$isa=true
-P.lx.$islx=true
-P.lx.$isa=true
+P.ti.$isti=true
+P.ti.$isa=true
P.b8.$isb8=true
P.b8.$isa=true
P.EH.$isEH=true
@@ -23536,7 +23902,7 @@
return J.ks(a)}
J.x=function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.im.prototype
return J.GW.prototype}if(typeof a=="string")return J.O.prototype
-if(a==null)return J.ht.prototype
+if(a==null)return J.Jh.prototype
if(typeof a=="boolean")return J.kn.prototype
if(a.constructor==Array)return J.Q.prototype
if(typeof a!="object")return a
@@ -23599,6 +23965,7 @@
J.QC=function(a){return J.w1(a).wg(a)}
J.QE=function(a){return J.RE(a).gCd(a)}
J.QM=function(a,b){return J.RE(a).Rg(a,b)}
+J.QQ=function(a,b,c,d,e){return J.w1(a).YW(a,b,c,d,e)}
J.RF=function(a,b){return J.RE(a).WO(a,b)}
J.TD=function(a){return J.RE(a).i4(a)}
J.TZ=function(a){return J.RE(a).gKV(a)}
@@ -23614,7 +23981,6 @@
J.Ut=function(a,b,c,d){return J.RE(a).rJ(a,b,c,d)}
J.V1=function(a,b){return J.w1(a).Rz(a,b)}
J.VN=function(a){return J.RE(a).gM0(a)}
-J.VZ=function(a,b,c,d,e){return J.w1(a).YW(a,b,c,d,e)}
J.Vm=function(a){return J.RE(a).gP(a)}
J.Vq=function(a){return J.RE(a).xo(a)}
J.Vs=function(a){return J.RE(a).gQg(a)}
@@ -23640,6 +24006,7 @@
J.bs=function(a){return J.RE(a).JP(a)}
J.c1=function(a,b){return J.Wx(a).O(a,b)}
J.c9=function(a,b){return J.RE(a).sa4(a,b)}
+J.cG=function(a){return J.RE(a).Ki(a)}
J.cO=function(a){return J.RE(a).gq6(a)}
J.cZ=function(a,b,c,d){return J.RE(a).On(a,b,c,d)}
J.co=function(a,b){return J.rY(a).nC(a,b)}
@@ -23647,9 +24014,9 @@
if(typeof a!="object")return b!=null&&a===b
return J.x(a).n(a,b)}
J.e2=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){return J.RE(a).nH(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)}
+J.eJ=function(a,b){return J.U6(a).cn(a,b)}
J.eh=function(a,b){return J.RE(a).Ne(a,b)}
J.f5=function(a){return J.RE(a).gI(a)}
-J.ff=function(a,b,c){return J.U6(a).Pk(a,b,c)}
J.hf=function(a,b,c){return J.U6(a).XU(a,b,c)}
J.i4=function(a,b){return J.w1(a).Zv(a,b)}
J.iG=function(a,b){return J.RE(a).szZ(a,b)}
@@ -23672,6 +24039,7 @@
J.on=function(a){return J.RE(a).gtT(a)}
J.p0=function(a,b){if(typeof a=="number"&&typeof b=="number")return a*b
return J.Wx(a).U(a,b)}
+J.pB=function(a,b,c){return J.U6(a).Pk(a,b,c)}
J.pO=function(a){return J.U6(a).gor(a)}
J.pP=function(a){return J.RE(a).gDD(a)}
J.pb=function(a,b){return J.w1(a).Vr(a,b)}
@@ -23718,16 +24086,17 @@
C.Fm=new J.kn()
C.yX=new J.GW()
C.wq=new J.im()
-C.x0=new J.ht()
+C.x0=new J.Jh()
C.oD=new J.P()
C.Kn=new J.O()
-C.mI=new K.nd()
+C.mI=new K.ndx()
C.Us=new A.yL()
C.nJ=new K.vly()
C.Wj=new P.JF()
C.za=new A.jh()
C.NU=new P.R8()
C.v8=new P.nU()
+C.xE=A.wM.prototype
C.YZ=Q.Tg.prototype
C.kk=Z.Ps.prototype
C.WA=new L.WAE("Collected")
@@ -23735,38 +24104,46 @@
C.nj=new L.WAE("Native")
C.IK=O.CN.prototype
C.YD=F.vc.prototype
-C.j8=R.i6.prototype
-C.AR=new A.V3("navigation-bar-isolate")
+C.j8=R.E0.prototype
+C.O0=R.lw.prototype
C.Vy=new A.V3("disassembly-entry")
C.Br=new A.V3("observatory-element")
C.dA=new A.V3("heap-profile")
C.I3=new A.V3("script-view")
+C.XG=new A.V3("nav-refresh")
C.E6=new A.V3("field-ref")
C.aM=new A.V3("isolate-summary")
C.Is=new A.V3("response-viewer")
+C.qT=new A.V3("nav-menu-item")
+C.KI=new A.V3("library-nav-menu")
C.nu=new A.V3("function-view")
C.jR=new A.V3("isolate-profile")
C.xW=new A.V3("code-view")
-C.aQ=new A.V3("class-view")
+C.aQx=new A.V3("class-view")
C.Gg=new A.V3("library-view")
C.U8=new A.V3("code-ref")
C.rc=new A.V3("message-viewer")
+C.NT=new A.V3("top-nav-menu")
C.js=new A.V3("stack-trace")
C.Ur=new A.V3("script-ref")
C.OS=new A.V3("class-ref")
C.jFV=new A.V3("isolate-list")
-C.lT=new A.V3("breakpoint-list")
-C.KG=new A.V3("navigation-bar")
+C.jy=new A.V3("breakpoint-list")
C.VW=new A.V3("instance-ref")
C.Gu=new A.V3("collapsible-content")
C.pE=new A.V3("stack-frame")
C.y2=new A.V3("observatory-application")
+C.zaS=new A.V3("isolate-nav-menu")
+C.t9=new A.V3("class-nav-menu")
C.uW=new A.V3("error-view")
+C.pc=new A.V3("nav-menu")
C.KH=new A.V3("json-view")
C.YQ=new A.V3("function-ref")
C.QU=new A.V3("library-ref")
C.Tq=new A.V3("field-view")
C.JD=new A.V3("service-ref")
+C.nW=new A.V3("nav-bar")
+C.DKS=new A.V3("curly-block")
C.be=new A.V3("instance-view")
C.er=E.Fv.prototype
C.ny=new P.a6(0)
@@ -23780,19 +24157,20 @@
C.ph=H.VM(new W.e0("message"),[W.DD])
C.MC=D.m8.prototype
C.LT=A.Gk.prototype
-C.Xo=U.GG.prototype
+C.Xo=U.AX.prototype
C.Yu=N.yb.prototype
C.Vc=K.NM.prototype
C.W3=W.zU.prototype
C.cp=B.pR.prototype
C.yK=Z.hx.prototype
C.b9=L.u7.prototype
+C.RR=A.fl.prototype
C.XH=X.E7.prototype
C.Qt=D.St.prototype
C.Nm=J.Q.prototype
C.ON=J.GW.prototype
C.jn=J.im.prototype
-C.jN=J.ht.prototype
+C.jN=J.Jh.prototype
C.CD=J.P.prototype
C.xB=J.O.prototype
C.Mc=function(hooks) {
@@ -23927,13 +24305,14 @@
}
C.xr=new P.by(null,null)
C.A3=new P.Cf(null)
-C.Ap=new P.dI(null)
+C.Ap=new P.pD(null)
C.GB=Z.vj.prototype
-C.Ab=new N.qV("FINER",400)
+C.VZ=new N.qV("FINER",400)
C.R5=new N.qV("FINE",500)
C.IF=new N.qV("INFO",800)
C.cV=new N.qV("SEVERE",1000)
C.UP=new N.qV("WARNING",900)
+C.S3=A.Zt.prototype
C.Z3=R.LU.prototype
C.MG=M.T2.prototype
I.makeConstantList = function(list) {
@@ -23968,10 +24347,12 @@
C.va=new H.LPe(1,{enumerate:K.UM()},C.MEG)
C.Wp=L.PF.prototype
C.S2=W.H9.prototype
-C.Xg=Q.qT.prototype
-C.Vn=F.Xd.prototype
+C.kD=A.F1.prototype
+C.SU=A.aQ.prototype
+C.nn=A.Qa.prototype
+C.J7=A.vI.prototype
C.t5=W.yk.prototype
-C.k0=V.F1.prototype
+C.k0=V.lI.prototype
C.Pf=Z.uL.prototype
C.xk=A.XP.prototype
C.Iv=A.ir.prototype
@@ -23985,15 +24366,18 @@
C.N4=new H.GD("dart.core.DateTime")
C.Ts=new H.GD("dart.core.bool")
C.fz=new H.GD("[]")
+C.aP=new H.GD("active")
+C.Es=new H.GD("anchor")
C.wh=new H.GD("app")
+C.S4=new H.GD("busy")
C.Ka=new H.GD("call")
+C.AV=new H.GD("callback")
C.XA=new H.GD("cls")
C.b1=new H.GD("code")
C.EX=new H.GD("codeRef")
C.C2=new H.GD("coveredPercentageFormatted")
C.h1=new H.GD("currentHash")
C.tv=new H.GD("currentHashUri")
-C.T7=new H.GD("currentIsolateName")
C.Na=new H.GD("devtools")
C.Jw=new H.GD("displayValue")
C.nN=new H.GD("dynamic")
@@ -24016,18 +24400,19 @@
C.Di=new H.GD("iconClass")
C.EN=new H.GD("id")
C.fn=new H.GD("instance")
-C.eJ=new H.GD("instruction")
+C.i6=new H.GD("instruction")
C.zD=new H.GD("internal")
C.ai=new H.GD("isEmpty")
C.nZ=new H.GD("isNotEmpty")
C.Z8=new H.GD("isolate")
C.Gd=new H.GD("json")
C.fy=new H.GD("kind")
+C.QL=new H.GD("last")
C.Wn=new H.GD("length")
C.EV=new H.GD("library")
C.cg=new H.GD("libraryRef")
C.Cv=new H.GD("line")
-C.AX=new H.GD("links")
+C.dB=new H.GD("link")
C.PC=new H.GD("dart.core.int")
C.zu=new H.GD("members")
C.US=new H.GD("messageType")
@@ -24050,6 +24435,7 @@
C.fX=new H.GD("script")
C.Be=new H.GD("scriptRef")
C.eC=new H.GD("[]=")
+C.Kt=new H.GD("shortName")
C.MB=new H.GD("text")
C.p1=new H.GD("ticks")
C.jI=new H.GD("topExclusiveCodes")
@@ -24060,7 +24446,9 @@
C.ct=new H.GD("userName")
C.ls=new H.GD("value")
C.eR=new H.GD("valueType")
+C.KS=new H.GD("vmName")
C.z9=new H.GD("void")
+C.lx=A.tz.prototype
C.SX=H.mm('qC')
C.WP=new H.Lm(C.SX,"K",0)
C.SL=H.mm('Ae')
@@ -24070,19 +24458,22 @@
C.Gsc=H.mm('wn')
C.io=new H.Lm(C.Gsc,"E",0)
C.nz=new H.Lm(C.SX,"V",0)
-C.Ye=H.mm('hx')
-C.q0=H.mm('Dg')
+C.RP=H.mm('hx')
+C.Ln=H.mm('Dg')
C.z6Y=H.mm('Tg')
-C.Dl=H.mm('F1')
C.eY=H.mm('n6')
C.Vh=H.mm('Pz')
-C.RJ=H.mm('JG')
+C.zq=H.mm('Qa')
+C.tf=H.mm('Zt')
+C.I5=H.mm('JG')
C.z7=H.mm('G6')
+C.GTO=H.mm('F1')
C.nY=H.mm('a')
C.Yc=H.mm('iP')
-C.Qa=H.mm('u7')
+C.kA=H.mm('u7')
C.PT=H.mm('I2')
C.Wup=H.mm('LZ')
+C.P0k=H.mm('lI')
C.T1=H.mm('Wy')
C.hG=H.mm('ir')
C.aj=H.mm('fI')
@@ -24091,37 +24482,41 @@
C.G4=H.mm('CN')
C.O4=H.mm('double')
C.yw=H.mm('int')
-C.nW=H.mm('knI')
+C.RcY=H.mm('aQ')
+C.ld=H.mm('AX')
+C.yiu=H.mm('knI')
C.iN=H.mm('yc')
C.HI=H.mm('Pg')
C.ila=H.mm('xI')
C.lk=H.mm('mJ')
-C.KI=H.mm('LU')
+C.lpG=H.mm('LU')
+C.mR=H.mm('fl')
C.jV=H.mm('rF')
C.JZ=H.mm('E7')
C.wd=H.mm('vj')
-C.Oi=H.mm('Xd')
-C.Pa=H.mm('St')
+C.CTH=H.mm('St')
C.Rg=H.mm('yb')
C.cx5=H.mm('m8')
C.l49=H.mm('uL')
C.yQ=H.mm('EH')
C.Im=H.mm('X6')
-C.vW6=H.mm('PF')
+C.GG=H.mm('PF')
+C.FU=H.mm('lw')
+C.rd6=H.mm('E0')
C.nG=H.mm('zt')
C.Xb=H.mm('vc')
C.yG=H.mm('nm')
+C.px=H.mm('tz')
C.ow=H.mm('E9')
+C.PV=H.mm('wM')
C.Db=H.mm('String')
C.EP=H.mm('NM')
-C.bh=H.mm('i6')
+C.FsU=H.mm('vI')
C.Bm=H.mm('XP')
C.Tn=H.mm('T2')
C.hg=H.mm('hd')
C.dd=H.mm('pR')
C.Ud8=H.mm('Ps')
-C.zy=H.mm('GG')
-C.pn=H.mm('qT')
C.HL=H.mm('bool')
C.Qf=H.mm('Null')
C.HH=H.mm('dynamic')
@@ -24167,8 +24562,8 @@
$.Bh=0
$.uP=!0
$.To=null
-$.Dq=["AZ","Ak","B2","BN","BT","BX","Ba","Bf","Bk","C","C0","C4","CL","Ch","D","D3","D6","Dd","De","E","Ec","F","FL","FV","Fr","G6","GB","GG","GT","HG","Hn","Hs","IW","Id","Ih","Is","J","J2","J3","JG","JP","JV","Ja","Jk","KI","Kb","LV","LZ","M8","Md","Mi","Mq","Mu","NC","NZ","Ne","Nj","O","Om","On","PM","PQ","PZ","Pa","Pk","Pv","Pz","Q0","Qi","Qq","R3","R4","RB","RP","RR","Rg","Rz","SS","Se","T","TJ","TP","TW","Ta","Tc","Tk","Tp","U","UD","UH","UZ","Ub","Uc","V","V1","VR","Vk","Vr","W","W3","W4","WL","WO","WZ","Wt","X6","XG","XL","XU","Xl","Y","Y9","YF","YU","YW","Z","Z1","Z2","ZB","ZL","Zc","Ze","Zv","aC","aN","aZ","bA","bS","bj","br","bu","cO","cU","cn","cp","ct","d0","dR","dd","du","eR","ea","ek","eo","er","es","ev","ez","f6","f9","fk","fm","fz","g","gA","gAq","gAy","gB","gB1","gBA","gBW","gCO","gCY","gCd","gCj","gDD","gEh","gF0","gF8","gG0","gG1","gG3","gGQ","gGd","gGj","gHX","gHm","gHu","gI","gIF","gIt","gJ0","gJS","gJf","gJp","gKE","gKM","gKV","gLA","gLm","gLx","gM0","gMB","gMj","gMt","gN","gN7","gNF","gNI","gNa","gNh","gNl","gO3","gOc","gOl","gP","gP1","gPe","gPu","gPw","gPy","gQ7","gQW","gQg","gQr","gRA","gRd","gRn","gRu","gTq","gUQ","gUV","gUj","gUy","gUz","gV4","gVa","gVl","gW0","gWT","gX3","gXc","gXh","gXt","gZ8","gZf","ga4","gaK","gai","gan","gbG","gbP","gbx","gcC","ge6","geJ","geT","geb","gey","gfN","gfY","gfb","gfc","ghU","ghf","ghm","gi9","giC","giO","gig","gjL","gjO","gjT","gjb","gk5","gkG","gkU","gkc","gkf","gkp","gl0","gl7","glc","gm0","gm2","gmH","gmW","gmm","gng","gnv","goE","goc","gor","gpQ","gpo","gq6","gqO","gqX","gqY","gqn","grK","grZ","grj","grs","gt0","gt5","gtD","gtH","gtN","gtT","gtY","gtp","guD","guw","gvH","gvL","gvc","gvt","gwd","gx8","gxX","gxj","gxr","gyH","gyT","gys","gz1","gzP","gzZ","gzh","gzj","gzw","h","h8","hZ","hc","hr","i","i4","iM","iw","j","jh","jp","jx","k0","kO","ka","l5","lj","m","mK","n","nB","nC","nH","ni","nq","nt","oB","oC","oP","oW","oZ","od","oo","pM","pZ","pr","ps","q1","qA","qC","qH","qZ","r4","r6","rJ","sAq","sAy","sB","sB1","sBA","sBW","sCO","sCY","sCd","sCj","sEh","sF0","sF8","sG1","sG3","sGQ","sGd","sGj","sHX","sHm","sHu","sIF","sIt","sJ0","sJS","sKM","sKV","sLA","sLx","sM0","sMB","sMj","sMt","sN","sN7","sNF","sNI","sNa","sNh","sNl","sO3","sOc","sOl","sP","sPe","sPu","sPw","sPy","sQ7","sQr","sRA","sRd","sRn","sRu","sTq","sUQ","sUy","sUz","sV4","sVa","sWT","sX3","sXc","sXh","sXt","sZ8","sa4","saK","sai","san","sbG","sbP","scC","se6","seJ","seT","seb","sfN","sfY","sfb","sfc","shU","shf","shm","siC","sig","sjL","sjO","sjT","sjb","sk5","skG","skU","skc","skf","skp","sl7","sm0","sm2","smH","sng","snv","soE","soc","spQ","spo","sq6","sqO","sqX","sqY","srK","srs","st0","st5","stD","stN","stT","stY","suD","suw","svH","svL","svt","swd","sxX","sxj","sxr","syH","syT","sys","sz1","szZ","szh","szj","szw","t","tZ","tg","tt","tx","u","u8","uB","w","wE","wH","wL","wR","wW","wg","x3","xc","xe","xo","y0","yC","yF","yG","yM","yN","yc","ym","yn","yq","yu","yx","yy","z2","zV","zr"]
-$.Au=[C.Ye,Z.hx,{created:Z.HC},C.q0,H.Dg,{"":H.bu},C.z6Y,Q.Tg,{created:Q.rt},C.Dl,V.F1,{created:V.fv},C.RJ,Q.JG,{created:Q.Zo},C.z7,B.G6,{created:B.Dw},C.Qa,L.u7,{created:L.Cu},C.Wup,H.LZ,{"":H.UI},C.hG,A.ir,{created:A.oa},C.aj,U.fI,{created:U.Ry},C.Qw,E.Fv,{created:E.AH},C.G4,O.CN,{created:O.On},C.nW,A.knI,{created:A.Th},C.HI,H.Pg,{"":H.aR},C.ila,Q.xI,{created:Q.lK},C.KI,R.LU,{created:R.rA},C.JZ,X.E7,{created:X.jD},C.wd,Z.vj,{created:Z.mA},C.Oi,F.Xd,{created:F.L1},C.Pa,D.St,{created:D.JR},C.Rg,N.yb,{created:N.N0},C.cx5,D.m8,{created:D.Tt},C.l49,Z.uL,{created:Z.Hx},C.vW6,L.PF,{created:L.A5},C.Xb,F.vc,{created:F.Fe},C.yG,K.nm,{created:K.an},C.ow,F.E9,{created:F.TW},C.EP,K.NM,{created:K.op},C.bh,R.i6,{created:R.Hv},C.Bm,A.XP,{created:A.XL},C.Tn,M.T2,{created:M.SP},C.hg,W.hd,{},C.dd,B.pR,{created:B.b4},C.Ud8,Z.Ps,{created:Z.zg},C.zy,U.GG,{created:U.v9},C.pn,Q.qT,{created:Q.BW},C.ri,W.yy,{},C.Hk,A.Gk,{created:A.cY},C.IWi,X.Vu,{created:X.B4}]
+$.Dq=["AZ","B2","BN","BT","BX","Ba","Bf","Bk","C","C0","C4","CL","Ch","D","D3","D6","Dd","De","Dy","E","Ec","F","FL","FV","Fr","G6","GB","GG","GT","HG","Hn","Hs","IW","Id","Ih","Is","J","J2","J3","JG","JP","JV","Ja","Jk","K1","KI","Kb","LV","LZ","M8","Md","Mi","Mq","Mu","NC","NZ","Ne","Nj","O","Om","On","PA","PM","PQ","PZ","Pa","Pk","Pv","Q0","Qi","Qq","Qx","R3","R4","RB","RF","RP","RR","Rg","Rz","SF","SS","Se","T","TJ","TP","TW","Tc","Tk","Tp","Ty","U","UD","UH","UZ","Uc","V","V1","VI","VR","Vk","Vr","W","W3","W4","WL","WO","WZ","Wt","X6","XG","XL","XU","Xl","Y","Y9","YF","YU","YW","Z","Z1","Z2","ZB","ZL","Ze","Zv","aC","aN","aZ","bA","bS","bj","br","bu","cO","cU","cn","ct","d0","dR","dd","du","eR","ea","ek","eo","er","es","ev","ez","f6","f9","fk","fm","fz","g","gA","gAp","gAq","gAu","gAy","gB","gB1","gBA","gBW","gCO","gCY","gCd","gCj","gDD","gDt","gEh","gF0","gF8","gFR","gFw","gG0","gG1","gG3","gGQ","gGV","gGd","gGj","gHX","gHm","gHu","gI","gIF","gIt","gJ0","gJS","gJf","gJo","gJp","gKE","gKM","gKU","gKV","gLA","gLY","gLm","gLx","gM0","gMB","gMj","gN","gN7","gNF","gNI","gNh","gNl","gO3","gO9","gOc","gOl","gP","gP1","gPe","gPj","gPu","gPw","gPy","gQ7","gQW","gQg","gQr","gRA","gRd","gRn","gRu","gSB","gTq","gUQ","gUV","gUj","gUy","gUz","gV4","gVa","gVl","gW0","gWT","gX3","gXc","gXh","gXt","gZ8","gZC","gZf","ga4","gaK","gai","gbG","gbP","gbV","gbx","gcC","gcL","gdU","geJ","geT","geb","gey","gfN","gfY","gfb","gfc","ghU","ghf","ghm","gi9","giC","giO","gig","giy","gjL","gjO","gjT","gjb","gk5","gkG","gkU","gkc","gkf","gkp","gl0","gl7","glc","gm0","gm2","gmH","gmW","gmm","gng","gnv","gnx","goE","goc","gor","gpQ","gpo","gq3","gq6","gqO","gqY","gqn","grK","grU","grZ","grs","gt0","gt5","gtD","gtH","gtN","gtT","gtY","gtp","guD","guw","gvH","gvL","gvR","gvc","gvt","gwd","gx8","gxX","gxj","gxr","gxw","gyH","gyT","gys","gz1","gzP","gzZ","gzh","gzj","gzw","h","h8","hZ","hc","hr","i","i4","iF","iM","ii","iw","j","jh","jp","jx","k0","kO","ka","l5","lj","m","mK","n","nB","nC","nH","ni","nq","nt","oB","oC","oP","oW","oZ","od","oo","pM","pZ","pr","ps","q1","qA","qC","qH","qZ","r4","r6","rJ","sAp","sAq","sAu","sAy","sB","sB1","sBA","sBW","sCO","sCY","sCd","sCj","sDt","sEh","sF0","sF8","sFR","sFw","sG1","sG3","sGQ","sGV","sGd","sGj","sHX","sHm","sHu","sIF","sIt","sJ0","sJS","sJo","sKM","sKU","sKV","sLA","sLY","sLx","sM0","sMB","sMj","sN","sN7","sNF","sNI","sNh","sNl","sO3","sO9","sOc","sOl","sP","sPe","sPj","sPu","sPw","sPy","sQ7","sQr","sRA","sRd","sRn","sRu","sSB","sTq","sUQ","sUy","sUz","sV4","sVa","sWT","sX3","sXc","sXh","sXt","sZ8","sZC","sa4","saK","sai","sbG","sbP","sbV","scC","scL","sdU","seJ","seT","seb","sfN","sfY","sfb","sfc","shU","shf","shm","siC","sig","siy","sjL","sjO","sjT","sjb","sk5","skG","skU","skc","skf","skp","sl7","sm0","sm2","smH","sng","snv","snx","soE","soc","spQ","spo","sq3","sq6","sqO","sqY","srU","srZ","srs","st0","st5","stD","stN","stT","stY","suD","suw","svH","svL","svR","svt","swd","sxX","sxj","sxr","sxw","syH","syT","sys","sz1","szZ","szh","szj","szw","t","tZ","tg","tt","u","u8","uB","vD","w","wE","wH","wL","wR","wW","wY","wg","x3","xc","xe","xo","y0","yC","yF","yG","yM","yN","yc","ym","yn","yq","yu","yx","yy","z2","zV","zr"]
+$.Au=[C.RP,Z.hx,{created:Z.HC},C.Ln,H.Dg,{"":H.bu},C.z6Y,Q.Tg,{created:Q.rt},C.zq,A.Qa,{created:A.EL},C.tf,A.Zt,{created:A.IV},C.I5,Q.JG,{created:Q.Zo},C.z7,B.G6,{created:B.Dw},C.GTO,A.F1,{created:A.z5},C.kA,L.u7,{created:L.Cu},C.Wup,H.LZ,{"":H.UI},C.P0k,V.lI,{created:V.fv},C.hG,A.ir,{created:A.oa},C.aj,U.fI,{created:U.Ry},C.Qw,E.Fv,{created:E.AH},C.G4,O.CN,{created:O.On},C.RcY,A.aQ,{created:A.AJ},C.ld,U.AX,{created:U.v9},C.yiu,A.knI,{created:A.Th},C.HI,H.Pg,{"":H.aR},C.ila,Q.xI,{created:Q.lK},C.lpG,R.LU,{created:R.rA},C.mR,A.fl,{created:A.Yt},C.JZ,X.E7,{created:X.jD},C.wd,Z.vj,{created:Z.mA},C.CTH,D.St,{created:D.JR},C.Rg,N.yb,{created:N.N0},C.cx5,D.m8,{created:D.Tt},C.l49,Z.uL,{created:Z.Hx},C.GG,L.PF,{created:L.A5},C.FU,R.lw,{created:R.fR},C.rd6,R.E0,{created:R.Hv},C.Xb,F.vc,{created:F.Fe},C.yG,K.nm,{created:K.an},C.px,A.tz,{created:A.J8},C.ow,F.E9,{created:F.TW},C.PV,A.wM,{created:A.lT},C.EP,K.NM,{created:K.op},C.FsU,A.vI,{created:A.ZC},C.Bm,A.XP,{created:A.XL},C.Tn,M.T2,{created:M.SP},C.hg,W.hd,{},C.dd,B.pR,{created:B.b4},C.Ud8,Z.Ps,{created:Z.zg},C.ri,W.yy,{},C.Hk,A.Gk,{created:A.cY},C.IWi,X.Vu,{created:X.bV}]
I.$lazy($,"globalThis","DX","jk",function(){return function() { return this; }()})
I.$lazy($,"globalWindow","pG","Qm",function(){return $.jk().window})
I.$lazy($,"globalWorker","zA","Nl",function(){return $.jk().Worker})
@@ -24274,7 +24669,7 @@
I.$lazy($,"_expando","fF","rw",function(){return H.VM(new P.kM("template_binding"),[null])})
init.functionAliases={}
-init.metadata=[P.a,C.WP,C.nz,C.xC,C.io,C.wW,"object","interceptor","proto","extension","indexability","type","name","codeUnit","isolate","function","entry","sender","e","msg","message","x","record","value","memberName",{func:"pL",args:[J.O]},"string","source","radix","handleError","array","codePoints","charCodes","years","month","day","hours","minutes","seconds","milliseconds","isUtc","receiver","key","positionalArguments","namedArguments","className","argument","index","ex","expression","keyValuePairs","result","closure","numberOfArguments","arg1","arg2","arg3","arg4","arity","functions","reflectionInfo","isStatic","jsArguments","propertyName","isIntercepted","fieldName","property","staticName","list","returnType","parameterTypes","optionalParameterTypes","rti","typeArguments","target","typeInfo","substitutionName",,"onTypeVariable","types","startIndex","substitution","arguments","isField","checks","asField","s","t","signature","context","contextName","o","allowShorter","obj","tag","interceptorClass","transformer","hooks","pattern","multiLine","caseSensitive","global","needle","haystack","other","from","to",{func:"kl",void:true},{func:"NT"},"iterable","f","initialValue","combine","leftDelimiter","rightDelimiter","start","end","skipCount","src","srcStart","dst","dstStart","count","a","element","endIndex","left","right","compare","symbol",{func:"pB",ret:P.vr,args:[P.a]},"reflectee","mangledName","methods","variables","mixinNames","code","typeVariables","owner","simpleName","victim","fieldSpecification","jsMangledNames","isGlobal","map","errorHandler","zone","listeners","callback","notificationHandler",{func:"G5",void:true,args:[null]},{func:"Vx",void:true,args:[null],opt:[P.MN]},"error","stackTrace","userCode","onSuccess","onError","subscription","future","duration",{func:"cX",void:true,args:[P.JB,P.e4,P.JB,null,P.MN]},"self","parent",{func:"aD",args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"wD",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]},null]},"arg",{func:"ta",args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]},null,null]},{func:"HQ",ret:{func:"NT"},args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"v7",ret:{func:"Dv",args:[null]},args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"IU",ret:{func:"bh",args:[null,null]},args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]}]},{func:"iV",void:true,args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"zo",ret:P.lO,args:[P.JB,P.e4,P.JB,P.a6,{func:"kl",void:true}]},{func:"Zb",void:true,args:[P.JB,P.e4,P.JB,J.O]},"line",{func:"xM",void:true,args:[J.O]},{func:"Nf",ret:P.JB,args:[P.JB,P.e4,P.JB,P.aY,[P.Z0,P.wv,null]]},"specification","zoneValues","table",{func:"Ib",ret:J.kn,args:[null,null]},"b",{func:"Re",ret:J.im,args:[null]},"parts","m","number","json","reviver",{func:"uJ",ret:P.a,args:[null]},"toEncodable","sb",{func:"xh",ret:J.im,args:[P.fR,P.fR]},"formattedString",{func:"E0",ret:J.kn,args:[P.a,P.a]},{func:"DZ",ret:J.im,args:[P.a]},{func:"K4",ret:J.im,args:[J.O],named:{onError:{func:"Tl",ret:J.im,args:[J.O]},radix:J.im}},"host","scheme","query","queryParameters","fragment","component","val","val1","val2",C.xM,!1,"canonicalTable","text","encoding","spaceToPlus",{func:"Tf",ret:J.O,args:[W.D0]},"typeExtension","url","onProgress","withCredentials","method","mimeType","requestHeaders","responseType","sendData","thing","win","constructor",{func:"Dv",args:[null]},{func:"jn",args:[null,null,null,null]},"oldValue","newValue","document","extendsTagName","w","captureThis","data","createProxy","mustCopy","total","_","id","members",{func:"qE",ret:J.O,args:[J.im,J.im]},"pad","current","currentStart","currentEnd","old","oldStart","oldEnd","distances","arr1","arr2","searchLength","splices","records","field","cls","props","getter","template","extendee","sheet","node","path","originalPrepareBinding","methodName","args","style","scope","doc","baseUri","seen","scripts","uriString","currentValue","v","expr","l","hash",{func:"qq",ret:[P.cX,K.Ae],args:[P.cX]},"classMirror","c","delegate","model","bound","stagingDocument","el","useRoot","content","bindings","n","elementId","deep","selectors","relativeSelectors","listener","useCapture","async","password","user","timestamp","canBubble","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","attributeFilter","attributeOldValue","attributes","characterData","characterDataOldValue","childList","subtree","otherNode","newChild","refChild","oldChild","targetOrigin","messagePorts","length","invocation","collection","","separator",0,!0,"growable","fractionDigits","str","authentification","resume","portId","port","dataEvent","info",{func:"bh",args:[null,null]},"parameter","jsConstructor",{func:"Za",args:[J.O,null]},{func:"TS",args:[null,J.O]},"g",P.Z0,L.mL,[P.Z0,J.O,W.cv],{func:"qo",ret:P.Z0},C.nJ,C.Us,{func:"Hw",args:[P.Z0]},B.Vf,J.kn,L.bv,Q.xI,Z.pv,L.kx,{func:"bR",ret:L.kx},{func:"VI",args:[L.kx]},{func:"I0",ret:J.O},F.Vfx,J.O,C.mI,{func:"Uf",ret:J.kn},{func:"zk",args:[J.kn]},"r",{func:"Np",void:true,args:[W.ea,null,W.KV]},R.Dsd,"action","test","library",{func:"h0",args:[H.Uz]},{func:"rm",args:[P.wv,P.ej]},"reflectiveName","useEval",{func:"lv",args:[P.wv,null]},"typeArgument","tv","methodOwner","fieldOwner","i",{func:"qe",ret:P.Ms,args:[J.im]},{func:"Z5",args:[J.im]},{func:"K6",ret:P.X9,args:[J.im]},{func:"Pt",ret:J.O,args:[J.im]},{func:"ag",args:[J.O,J.O]},"eventId",{func:"uu",void:true,args:[P.a],opt:[P.MN]},{func:"YP",void:true,opt:[null]},{func:"BG",args:[null],opt:[null]},"ignored","convert","isMatch","cancelOnError","handleData","handleDone","resumeSignal","event","wasInputPaused","onData","onDone","dispatch",{func:"ha",args:[null,P.MN]},"sink",{func:"aR",void:true,args:[null,P.MN]},"inputEvent","otherZone","runGuarded","bucket","each","ifAbsent","cell","objects","orElse","k","elements","offset","comp","key1","key2",{func:"Q5",ret:J.kn,args:[P.jp]},{func:"dc",args:[J.O,P.a]},"leadingSurrogate","nextCodeUnit","matched",{func:"Tl",ret:J.im,args:[J.O]},{func:"Zh",ret:J.GW,args:[J.O]},"factor","quotient","pathSegments","base","reference","ss","ch",{func:"cd",ret:J.kn,args:[J.im]},"digit",{func:"Dt",ret:J.im,args:[J.im]},"part",{func:"wJ",ret:J.im,args:[null,null]},"byteString",{func:"BC",ret:J.im,args:[J.im,J.im]},"byte","buffer",{func:"YI",void:true,args:[P.a]},"title","xhr","header","shouldAdd","prevValue","selector","stream","pos",L.DP,{func:"JA",ret:L.DP},{func:"Qs",args:[L.DP]},E.tuj,F.Vct,A.D13,N.WZq,{func:"Xb",args:[P.Z0,J.im]},{func:"hN",ret:J.O,args:[J.kn]},"newSpace",K.pva,"response",H.Tp,"st",{func:"iR",args:[J.im,null]},{func:"ZT",void:true,args:[null,null,null]},B.T5,"trace",Z.cda,Z.uL,J.im,[J.Q,L.Y2],[J.Q,J.O],"codeCaller",{func:"UO",args:[L.Vi]},J.Q,L.XN,{func:"cH",ret:J.im},{func:"r5",ret:J.Q},{func:"mR",args:[J.Q]},{func:"ub",void:true,args:[L.bv,J.im,P.Z0]},"totalSamples",{func:"F9",void:true,args:[L.bv]},{func:"bN",ret:J.O,args:[L.Y2]},"row",{func:"Sz",void:true,args:[W.ea,null,W.cv]},X.waa,"profile",{func:"Wy",ret:L.bv},{func:"Gt",args:[L.bv]},D.V0,Z.V4,M.V10,"logLevel","rec",{func:"IM",args:[N.HV]},{func:"cr",ret:[J.Q,P.Z0]},{func:"he",ret:[J.Q,J.O]},{func:"ZD",args:[[J.Q,J.O]]},{func:"zs",ret:J.O,args:[J.O]},"link",F.V11,L.dZ,L.Nu,L.yU,"label",[P.Z0,J.O,L.rj],[J.Q,L.kx],[P.Z0,J.O,J.GW],{func:"Ik",ret:L.CM},{func:"Ve",args:[L.CM]},"address","coverages","timer",[P.Z0,J.O,L.bv],"E",{func:"EU",ret:P.iD},{func:"Y4",args:[P.iD]},"scriptURL",{func:"jN",ret:J.O,args:[J.O,J.O]},"isolateId",{func:"fP",ret:J.GW},{func:"mV",args:[J.GW]},[J.Q,L.DP],"calls","codes","instructionList","profileCode",{func:"VL",args:[L.kx,L.kx]},[J.Q,L.c2],{func:"dt",ret:P.cX},"lineNumber","hits",{func:"D8",args:[[J.Q,P.Z0]]},"responseString","requestString",{func:"Tz",void:true,args:[null,null]},"children","rowIndex",V.V12,{func:"AG",void:true,args:[J.O,J.O,J.O]},{func:"ru",ret:L.mL},{func:"pu",args:[L.mL]},{func:"nx",ret:J.O,args:[J.GW]},"time","bytes",{func:"kX",ret:J.O,args:[P.Z0]},"frame",{func:"h6",ret:J.kn,args:[J.O]},Z.LP,{func:"Aa",args:[P.e4,P.JB]},{func:"TB",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"S5",ret:J.kn,args:[P.a]},{func:"na",args:[[J.Q,G.DA]]},{func:"mRV",args:[[J.Q,T.z2]]},"superDecl","delegates","matcher","scopeDescriptor","cssText","properties","onName","eventType","declaration","elementElement","root",{func:"qk",void:true,args:[J.O,J.O]},"preventCascade",{func:"KT",void:true,args:[[P.cX,T.z2]]},"changes","events",{func:"WW",void:true,args:[W.ea]},"callbackOrMethod","pair","p",{func:"YT",void:true,args:[[J.Q,T.z2]]},"d","def",{func:"Zu",args:[J.O,null,null]},"arg0",{func:"pp",ret:U.zX,args:[U.hw,U.hw]},"h","item","kind","precedence","prefix",3,{func:"Nt",args:[U.hw]},A.qe,L.rj,{func:"LW",ret:L.rj},{func:"PF",args:[L.rj]},{func:"Yg",ret:J.O,args:[L.c2]},U.V13,"coverage",Q.Ds,K.V14,X.V15,"y","instanceRef",{func:"en",ret:J.O,args:[P.a]},{func:"IK",ret:J.O,args:[[J.Q,P.a]]},"values","instanceNodes",{func:"K7",void:true,args:[[J.Q,G.DA]]},];$=null
+init.metadata=[P.a,C.WP,C.nz,C.xC,C.io,C.wW,"object","interceptor","proto","extension","indexability","type","name","codeUnit","isolate","function","entry","sender","e","msg","message","x","record","value","memberName",{func:"pL",args:[J.O]},"string","source","radix","handleError","array","codePoints","charCodes","years","month","day","hours","minutes","seconds","milliseconds","isUtc","receiver","key","positionalArguments","namedArguments","className","argument","index","ex","expression","keyValuePairs","result","closure","numberOfArguments","arg1","arg2","arg3","arg4","arity","functions","reflectionInfo","isStatic","jsArguments","propertyName","isIntercepted","fieldName","property","staticName","list","returnType","parameterTypes","optionalParameterTypes","rti","typeArguments","target","typeInfo","substitutionName",,"onTypeVariable","types","startIndex","substitution","arguments","isField","checks","asField","s","t","signature","context","contextName","o","allowShorter","obj","tag","interceptorClass","transformer","hooks","pattern","multiLine","caseSensitive","global","needle","haystack","other","from","to",{func:"kl",void:true},{func:"NT"},"iterable","f","initialValue","combine","leftDelimiter","rightDelimiter","start","end","skipCount","src","srcStart","dst","dstStart","count","a","element","endIndex","left","right","compare","symbol",{func:"pB",ret:P.vr,args:[P.a]},"reflectee","mangledName","methods","variables","mixinNames","code","typeVariables","owner","simpleName","victim","fieldSpecification","jsMangledNames","isGlobal","map","errorHandler","zone",!1,"futures","eagerError","listeners","callback","notificationHandler",{func:"G5",void:true,args:[null]},{func:"Vx",void:true,args:[null],opt:[P.MN]},"error","stackTrace","userCode","onSuccess","onError","subscription","future","duration",{func:"cX",void:true,args:[P.JB,P.e4,P.JB,null,P.MN]},"self","parent",{func:"aD",args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"wD",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]},null]},"arg",{func:"ta",args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]},null,null]},{func:"HQ",ret:{func:"NT"},args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"v7",ret:{func:"Dv",args:[null]},args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"IU",ret:{func:"bh",args:[null,null]},args:[P.JB,P.e4,P.JB,{func:"bh",args:[null,null]}]},{func:"iV",void:true,args:[P.JB,P.e4,P.JB,{func:"NT"}]},{func:"zo",ret:P.lO,args:[P.JB,P.e4,P.JB,P.a6,{func:"kl",void:true}]},{func:"Zb",void:true,args:[P.JB,P.e4,P.JB,J.O]},"line",{func:"xM",void:true,args:[J.O]},{func:"Nf",ret:P.JB,args:[P.JB,P.e4,P.JB,P.aY,[P.Z0,P.wv,null]]},"specification","zoneValues","table",{func:"Ib",ret:J.kn,args:[null,null]},"b",{func:"Re",ret:J.im,args:[null]},"parts","m","number","json","reviver",{func:"uJ",ret:P.a,args:[null]},"toEncodable","sb",{func:"xh",ret:J.im,args:[P.Tx,P.Tx]},"formattedString",{func:"E0",ret:J.kn,args:[P.a,P.a]},{func:"DZ",ret:J.im,args:[P.a]},{func:"K4",ret:J.im,args:[J.O],named:{onError:{func:"Tl",ret:J.im,args:[J.O]},radix:J.im}},"host","scheme","query","queryParameters","fragment","component","val","val1","val2",C.xM,"canonicalTable","text","encoding","spaceToPlus",{func:"Tf",ret:J.O,args:[W.D0]},"typeExtension","url","onProgress","withCredentials","method","mimeType","requestHeaders","responseType","sendData","thing","win","constructor",{func:"Dv",args:[null]},{func:"jn",args:[null,null,null,null]},"oldValue","newValue","document","extendsTagName","w","captureThis","data","createProxy","mustCopy","total","_","id","members",{func:"qE",ret:J.O,args:[J.im,J.im]},"pad","current","currentStart","currentEnd","old","oldStart","oldEnd","distances","arr1","arr2","searchLength","splices","records","field","cls","props","getter","template","extendee","sheet","node","path","originalPrepareBinding","methodName","args","style","scope","doc","baseUri","seen","scripts","uriString","currentValue","v","expr","l","hash",{func:"qq",ret:[P.cX,K.Ae],args:[P.cX]},"classMirror","c","delegate","model","bound","stagingDocument","el","useRoot","content","bindings","n","elementId","deep","selectors","relativeSelectors","listener","useCapture","async","password","user","timestamp","canBubble","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","attributeFilter","attributeOldValue","attributes","characterData","characterDataOldValue","childList","subtree","otherNode","newChild","refChild","oldChild","targetOrigin","messagePorts","length","invocation","collection","","separator",0,!0,"growable","fractionDigits","str","authentification","resume","portId","port","dataEvent","info",{func:"bh",args:[null,null]},"parameter","jsConstructor",{func:"Za",args:[J.O,null]},{func:"TS",args:[null,J.O]},"g",P.Z0,L.mL,[P.Z0,J.O,W.cv],{func:"qo",ret:P.Z0},C.nJ,C.Us,{func:"Hw",args:[P.Z0]},"done",B.Vf,H.Tp,"trace",J.kn,L.bv,Q.xI,Z.pv,L.kx,{func:"bR",ret:L.kx},{func:"oX",args:[L.kx]},{func:"I0",ret:J.O},F.Vfx,J.O,C.mI,{func:"Uf",ret:J.kn},{func:"zk",args:[J.kn]},"r",{func:"Np",void:true,args:[W.ea,null,W.KV]},R.Dsd,{func:"ZT",void:true,args:[null,null,null]},R.Nr,"action","test","library",{func:"h0",args:[H.Uz]},{func:"rm",args:[P.wv,P.ej]},"reflectiveName","useEval",{func:"lv",args:[P.wv,null]},"typeArgument","tv","methodOwner","fieldOwner","i",{func:"qe",ret:P.Ms,args:[J.im]},{func:"Z5",args:[J.im]},{func:"K6",ret:P.X9,args:[J.im]},{func:"Pt",ret:J.O,args:[J.im]},{func:"ag",args:[J.O,J.O]},"eventId",{func:"uu",void:true,args:[P.a],opt:[P.MN]},"theError","theStackTrace",{func:"rf",args:[P.a]},{func:"YP",void:true,opt:[null]},{func:"BG",args:[null],opt:[null]},"ignored","convert","isMatch","cancelOnError","handleData","handleDone","resumeSignal","event","wasInputPaused","onData","onDone","dispatch",{func:"ha",args:[null,P.MN]},"sink",{func:"aR",void:true,args:[null,P.MN]},"inputEvent","otherZone","runGuarded","bucket","each","ifAbsent","cell","objects","orElse","k","elements","offset","comp","key1","key2",{func:"Q5",ret:J.kn,args:[P.jp]},{func:"dc",args:[J.O,P.a]},"leadingSurrogate","nextCodeUnit","matched",{func:"Tl",ret:J.im,args:[J.O]},{func:"Zh",ret:J.GW,args:[J.O]},"factor","quotient","pathSegments","base","reference","ss","ch",{func:"cd",ret:J.kn,args:[J.im]},"digit",{func:"an",ret:J.im,args:[J.im]},"part",{func:"wJ",ret:J.im,args:[null,null]},"byteString",{func:"BC",ret:J.im,args:[J.im,J.im]},"byte","buffer",{func:"YI",void:true,args:[P.a]},"title","xhr","header","shouldAdd","prevValue","selector","stream","pos",L.DP,{func:"JA",ret:L.DP},{func:"Qs",args:[L.DP]},E.tuj,F.Vct,A.D13,N.WZq,{func:"Rs",ret:J.kn,args:[P.Z0]},{func:"Xb",args:[P.Z0,J.im]},{func:"hN",ret:J.O,args:[J.kn]},"newSpace",K.pva,"response","st",{func:"iR",args:[J.im,null]},{func:"pw",void:true,args:[J.kn,null]},"expand",Z.cda,Z.uL,J.im,[J.Q,L.Y2],[J.Q,J.O],"codeCaller",{func:"UO",args:[L.Vi]},J.Q,L.XN,{func:"cH",ret:J.im},{func:"r5",ret:J.Q},{func:"mR",args:[J.Q]},{func:"ub",void:true,args:[L.bv,J.im,P.Z0]},"totalSamples",{func:"F9",void:true,args:[L.bv]},{func:"bN",ret:J.O,args:[L.Y2]},"row",{func:"Sz",void:true,args:[W.ea,null,W.cv]},X.waa,"profile",{func:"Wy",ret:L.bv},{func:"Gt",args:[L.bv]},D.V0,Z.V4,M.V10,"logLevel","rec",{func:"IM",args:[N.HV]},{func:"cr",ret:[J.Q,P.Z0]},A.V11,A.V12,A.V13,A.V14,A.V15,A.V16,A.V17,L.dZ,L.Nu,L.yU,"label",[P.Z0,J.O,L.rj],[J.Q,L.kx],[P.Z0,J.O,J.GW],{func:"Ik",ret:L.CM},{func:"Ve",args:[L.CM]},"address","coverages","timer",[P.Z0,J.O,L.bv],"E",{func:"EU",ret:P.iD},{func:"Y4",args:[P.iD]},{func:"zs",ret:J.O,args:[J.O]},"scriptURL",{func:"jN",ret:J.O,args:[J.O,J.O]},"isolateId",{func:"fP",ret:J.GW},{func:"mV",args:[J.GW]},[J.Q,L.DP],"calls","codes","instructionList","profileCode",{func:"VL",args:[L.kx,L.kx]},[J.Q,L.c2],{func:"dt",ret:P.cX},"lineNumber","hits",{func:"ZD",args:[[J.Q,P.Z0]]},"responseString","requestString",{func:"Tz",void:true,args:[null,null]},"children","rowIndex",V.V18,{func:"AG",void:true,args:[J.O,J.O,J.O]},{func:"ru",ret:L.mL},{func:"pu",args:[L.mL]},{func:"nxg",ret:J.O,args:[J.GW]},"time","bytes",{func:"kX",ret:J.O,args:[P.Z0]},"frame",{func:"h6",ret:J.kn,args:[J.O]},Z.LP,{func:"Aa",args:[P.e4,P.JB]},{func:"TB",args:[P.JB,P.e4,P.JB,{func:"Dv",args:[null]}]},{func:"S5",ret:J.kn,args:[P.a]},{func:"D8",args:[[J.Q,G.DA]]},{func:"Gm",args:[[J.Q,T.z2]]},"superDecl","delegates","matcher","scopeDescriptor","cssText","properties","onName","eventType","declaration","elementElement","root",{func:"rj",void:true,args:[J.O,J.O]},"preventCascade",{func:"KT",void:true,args:[[P.cX,T.z2]]},"changes","events",{func:"WW",void:true,args:[W.ea]},"callbackOrMethod","pair","p",{func:"YT",void:true,args:[[J.Q,T.z2]]},"d","def",{func:"Zu",args:[J.O,null,null]},"arg0",{func:"pp",ret:U.zX,args:[U.hw,U.hw]},"h","item","kind","precedence","prefix",3,{func:"Nt",args:[U.hw]},A.T5,L.rj,{func:"LW",ret:L.rj},{func:"PF",args:[L.rj]},{func:"Yg",ret:J.O,args:[L.c2]},U.V19,"coverage","link",Q.Ds,K.V20,X.V21,"y","instanceRef",{func:"en",ret:J.O,args:[P.a]},{func:"QF",ret:J.O,args:[[J.Q,P.a]]},"values","instanceNodes",{func:"K7",void:true,args:[[J.Q,G.DA]]},];$=null
I = I.$finishIsolateConstructor(I)
$=new I()
function convertToFastObject(properties) {
@@ -24343,9 +24738,9 @@
init.currentScript = currentScript;
if (typeof dartMainRunner === "function") {
- dartMainRunner(function() { H.oT(E.Pc()); });
+ dartMainRunner(function() { H.oT(E.nE()); });
} else {
- H.oT(E.Pc());
+ H.oT(E.nE());
}
})
function init(){I.p={}
@@ -24473,11 +24868,11 @@
$desc=$collectedClasses.qE
if($desc instanceof Array)$desc=$desc[1]
qE.prototype=$desc
-function SV(){}SV.builtin$cls="SV"
-if(!"name" in SV)SV.name="SV"
-$desc=$collectedClasses.SV
+function ho(){}ho.builtin$cls="ho"
+if(!"name" in ho)ho.name="ho"
+$desc=$collectedClasses.ho
if($desc instanceof Array)$desc=$desc[1]
-SV.prototype=$desc
+ho.prototype=$desc
function Gh(){}Gh.builtin$cls="Gh"
if(!"name" in Gh)Gh.name="Gh"
$desc=$collectedClasses.Gh
@@ -24569,19 +24964,19 @@
$desc=$collectedClasses.Ny
if($desc instanceof Array)$desc=$desc[1]
Ny.prototype=$desc
-function nx(){}nx.builtin$cls="nx"
-if(!"name" in nx)nx.name="nx"
-$desc=$collectedClasses.nx
+function Zv(){}Zv.builtin$cls="Zv"
+if(!"name" in Zv)Zv.name="Zv"
+$desc=$collectedClasses.Zv
if($desc instanceof Array)$desc=$desc[1]
-nx.prototype=$desc
-nx.prototype.gRn=function(receiver){return receiver.data}
-nx.prototype.gB=function(receiver){return receiver.length}
-function QQ(){}QQ.builtin$cls="QQ"
-if(!"name" in QQ)QQ.name="QQ"
-$desc=$collectedClasses.QQ
+Zv.prototype=$desc
+Zv.prototype.gRn=function(receiver){return receiver.data}
+Zv.prototype.gB=function(receiver){return receiver.length}
+function QQS(){}QQS.builtin$cls="QQS"
+if(!"name" in QQS)QQS.name="QQS"
+$desc=$collectedClasses.QQS
if($desc instanceof Array)$desc=$desc[1]
-QQ.prototype=$desc
-QQ.prototype.gtT=function(receiver){return receiver.code}
+QQS.prototype=$desc
+QQS.prototype.gtT=function(receiver){return receiver.code}
function BR(){}BR.builtin$cls="BR"
if(!"name" in BR)BR.name="BR"
$desc=$collectedClasses.BR
@@ -24800,11 +25195,11 @@
zU.prototype.giC=function(receiver){return receiver.responseText}
zU.prototype.gys=function(receiver){return receiver.status}
zU.prototype.gpo=function(receiver){return receiver.statusText}
-function pk(){}pk.builtin$cls="pk"
-if(!"name" in pk)pk.name="pk"
-$desc=$collectedClasses.pk
+function rk(){}rk.builtin$cls="rk"
+if(!"name" in rk)rk.name="rk"
+$desc=$collectedClasses.rk
if($desc instanceof Array)$desc=$desc[1]
-pk.prototype=$desc
+rk.prototype=$desc
function tX(){}tX.builtin$cls="tX"
if(!"name" in tX)tX.name="tX"
$desc=$collectedClasses.tX
@@ -25108,11 +25503,11 @@
$desc=$collectedClasses.FH
if($desc instanceof Array)$desc=$desc[1]
FH.prototype=$desc
-function iL(){}iL.builtin$cls="iL"
-if(!"name" in iL)iL.name="iL"
-$desc=$collectedClasses.iL
+function SN(){}SN.builtin$cls="SN"
+if(!"name" in SN)SN.name="SN"
+$desc=$collectedClasses.SN
if($desc instanceof Array)$desc=$desc[1]
-iL.prototype=$desc
+SN.prototype=$desc
function HD(){}HD.builtin$cls="HD"
if(!"name" in HD)HD.name="HD"
$desc=$collectedClasses.HD
@@ -25211,35 +25606,35 @@
lp.prototype.gt5=function(receiver){return receiver.type}
lp.prototype.gP=function(receiver){return receiver.value}
lp.prototype.sP=function(receiver,v){return receiver.value=v}
-function pD(){}pD.builtin$cls="pD"
-if(!"name" in pD)pD.name="pD"
-$desc=$collectedClasses.pD
+function kd(){}kd.builtin$cls="kd"
+if(!"name" in kd)kd.name="kd"
+$desc=$collectedClasses.kd
if($desc instanceof Array)$desc=$desc[1]
-pD.prototype=$desc
+kd.prototype=$desc
function I0(){}I0.builtin$cls="I0"
if(!"name" in I0)I0.name="I0"
$desc=$collectedClasses.I0
if($desc instanceof Array)$desc=$desc[1]
I0.prototype=$desc
I0.prototype.gpQ=function(receiver){return receiver.applyAuthorStyles}
-function QR(){}QR.builtin$cls="QR"
-if(!"name" in QR)QR.name="QR"
-$desc=$collectedClasses.QR
+function CY(){}CY.builtin$cls="CY"
+if(!"name" in CY)CY.name="CY"
+$desc=$collectedClasses.CY
if($desc instanceof Array)$desc=$desc[1]
-QR.prototype=$desc
-QR.prototype.gLA=function(receiver){return receiver.src}
-QR.prototype.gt5=function(receiver){return receiver.type}
-QR.prototype.st5=function(receiver,v){return receiver.type=v}
-function Cp(){}Cp.builtin$cls="Cp"
-if(!"name" in Cp)Cp.name="Cp"
-$desc=$collectedClasses.Cp
+CY.prototype=$desc
+CY.prototype.gLA=function(receiver){return receiver.src}
+CY.prototype.gt5=function(receiver){return receiver.type}
+CY.prototype.st5=function(receiver,v){return receiver.type=v}
+function Wt(){}Wt.builtin$cls="Wt"
+if(!"name" in Wt)Wt.name="Wt"
+$desc=$collectedClasses.Wt
if($desc instanceof Array)$desc=$desc[1]
-Cp.prototype=$desc
-function Ta(){}Ta.builtin$cls="Ta"
-if(!"name" in Ta)Ta.name="Ta"
-$desc=$collectedClasses.Ta
+Wt.prototype=$desc
+function uaa(){}uaa.builtin$cls="uaa"
+if(!"name" in uaa)uaa.name="uaa"
+$desc=$collectedClasses.uaa
if($desc instanceof Array)$desc=$desc[1]
-Ta.prototype=$desc
+uaa.prototype=$desc
function zD9(){}zD9.builtin$cls="zD9"
if(!"name" in zD9)zD9.name="zD9"
$desc=$collectedClasses.zD9
@@ -25267,13 +25662,13 @@
bk.prototype.gzZ=function(receiver){return receiver.newValue}
bk.prototype.gjL=function(receiver){return receiver.oldValue}
bk.prototype.gO3=function(receiver){return receiver.url}
-function fq(){}fq.builtin$cls="fq"
-if(!"name" in fq)fq.name="fq"
-$desc=$collectedClasses.fq
+function Lx(){}Lx.builtin$cls="Lx"
+if(!"name" in Lx)Lx.name="Lx"
+$desc=$collectedClasses.Lx
if($desc instanceof Array)$desc=$desc[1]
-fq.prototype=$desc
-fq.prototype.gt5=function(receiver){return receiver.type}
-fq.prototype.st5=function(receiver,v){return receiver.type=v}
+Lx.prototype=$desc
+Lx.prototype.gt5=function(receiver){return receiver.type}
+Lx.prototype.st5=function(receiver,v){return receiver.type=v}
function Er(){}Er.builtin$cls="Er"
if(!"name" in Er)Er.name="Er"
$desc=$collectedClasses.Er
@@ -25352,11 +25747,11 @@
RH.prototype.gfY=function(receiver){return receiver.kind}
RH.prototype.sfY=function(receiver,v){return receiver.kind=v}
RH.prototype.gLA=function(receiver){return receiver.src}
-function ho(){}ho.builtin$cls="ho"
-if(!"name" in ho)ho.name="ho"
-$desc=$collectedClasses.ho
+function pU(){}pU.builtin$cls="pU"
+if(!"name" in pU)pU.name="pU"
+$desc=$collectedClasses.pU
if($desc instanceof Array)$desc=$desc[1]
-ho.prototype=$desc
+pU.prototype=$desc
function OJ(){}OJ.builtin$cls="OJ"
if(!"name" in OJ)OJ.name="OJ"
$desc=$collectedClasses.OJ
@@ -25382,11 +25777,11 @@
$desc=$collectedClasses.aG
if($desc instanceof Array)$desc=$desc[1]
aG.prototype=$desc
-function J6(){}J6.builtin$cls="J6"
-if(!"name" in J6)J6.name="J6"
-$desc=$collectedClasses.J6
+function fA(){}fA.builtin$cls="fA"
+if(!"name" in fA)fA.name="fA"
+$desc=$collectedClasses.fA
if($desc instanceof Array)$desc=$desc[1]
-J6.prototype=$desc
+fA.prototype=$desc
function u9(){}u9.builtin$cls="u9"
if(!"name" in u9)u9.name="u9"
$desc=$collectedClasses.u9
@@ -25443,21 +25838,21 @@
$desc=$collectedClasses.F2
if($desc instanceof Array)$desc=$desc[1]
F2.prototype=$desc
-function VB(){}VB.builtin$cls="VB"
-if(!"name" in VB)VB.name="VB"
-$desc=$collectedClasses.VB
+function nL(){}nL.builtin$cls="nL"
+if(!"name" in nL)nL.name="nL"
+$desc=$collectedClasses.nL
if($desc instanceof Array)$desc=$desc[1]
-VB.prototype=$desc
+nL.prototype=$desc
function QV(){}QV.builtin$cls="QV"
if(!"name" in QV)QV.name="QV"
$desc=$collectedClasses.QV
if($desc instanceof Array)$desc=$desc[1]
QV.prototype=$desc
-function Zv(){}Zv.builtin$cls="Zv"
-if(!"name" in Zv)Zv.name="Zv"
-$desc=$collectedClasses.Zv
+function q0(){}q0.builtin$cls="q0"
+if(!"name" in q0)q0.name="q0"
+$desc=$collectedClasses.q0
if($desc instanceof Array)$desc=$desc[1]
-Zv.prototype=$desc
+q0.prototype=$desc
function Q7(){}Q7.builtin$cls="Q7"
if(!"name" in Q7)Q7.name="Q7"
$desc=$collectedClasses.Q7
@@ -25480,12 +25875,12 @@
Dh.prototype=$desc
Dh.prototype.gN=function(receiver){return receiver.target}
Dh.prototype.gmH=function(receiver){return receiver.href}
-function ZJ(){}ZJ.builtin$cls="ZJ"
-if(!"name" in ZJ)ZJ.name="ZJ"
-$desc=$collectedClasses.ZJ
+function Ue(){}Ue.builtin$cls="Ue"
+if(!"name" in Ue)Ue.name="Ue"
+$desc=$collectedClasses.Ue
if($desc instanceof Array)$desc=$desc[1]
-ZJ.prototype=$desc
-ZJ.prototype.gmH=function(receiver){return receiver.href}
+Ue.prototype=$desc
+Ue.prototype.gmH=function(receiver){return receiver.href}
function mU(){}mU.builtin$cls="mU"
if(!"name" in mU)mU.name="mU"
$desc=$collectedClasses.mU
@@ -25551,13 +25946,13 @@
$desc=$collectedClasses.eG
if($desc instanceof Array)$desc=$desc[1]
eG.prototype=$desc
-function lv(){}lv.builtin$cls="lv"
-if(!"name" in lv)lv.name="lv"
-$desc=$collectedClasses.lv
+function bd(){}bd.builtin$cls="bd"
+if(!"name" in bd)bd.name="bd"
+$desc=$collectedClasses.bd
if($desc instanceof Array)$desc=$desc[1]
-lv.prototype=$desc
-lv.prototype.gt5=function(receiver){return receiver.type}
-lv.prototype.gUQ=function(receiver){return receiver.values}
+bd.prototype=$desc
+bd.prototype.gt5=function(receiver){return receiver.type}
+bd.prototype.gUQ=function(receiver){return receiver.values}
function pf(){}pf.builtin$cls="pf"
if(!"name" in pf)pf.name="pf"
$desc=$collectedClasses.pf
@@ -25714,11 +26109,11 @@
$desc=$collectedClasses.vd
if($desc instanceof Array)$desc=$desc[1]
vd.prototype=$desc
-function Jq(){}Jq.builtin$cls="Jq"
-if(!"name" in Jq)Jq.name="Jq"
-$desc=$collectedClasses.Jq
+function uzr(){}uzr.builtin$cls="uzr"
+if(!"name" in uzr)uzr.name="uzr"
+$desc=$collectedClasses.uzr
if($desc instanceof Array)$desc=$desc[1]
-Jq.prototype=$desc
+uzr.prototype=$desc
function Yd(){}Yd.builtin$cls="Yd"
if(!"name" in Yd)Yd.name="Yd"
$desc=$collectedClasses.Yd
@@ -25760,14 +26155,14 @@
$desc=$collectedClasses.NJ
if($desc instanceof Array)$desc=$desc[1]
NJ.prototype=$desc
-function Ue(){}Ue.builtin$cls="Ue"
-if(!"name" in Ue)Ue.name="Ue"
-$desc=$collectedClasses.Ue
+function nd(){}nd.builtin$cls="nd"
+if(!"name" in nd)nd.name="nd"
+$desc=$collectedClasses.nd
if($desc instanceof Array)$desc=$desc[1]
-Ue.prototype=$desc
-Ue.prototype.gt5=function(receiver){return receiver.type}
-Ue.prototype.st5=function(receiver,v){return receiver.type=v}
-Ue.prototype.gmH=function(receiver){return receiver.href}
+nd.prototype=$desc
+nd.prototype.gt5=function(receiver){return receiver.type}
+nd.prototype.st5=function(receiver,v){return receiver.type=v}
+nd.prototype.gmH=function(receiver){return receiver.href}
function vt(){}vt.builtin$cls="vt"
if(!"name" in vt)vt.name="vt"
$desc=$collectedClasses.vt
@@ -25778,13 +26173,13 @@
$desc=$collectedClasses.rQ
if($desc instanceof Array)$desc=$desc[1]
rQ.prototype=$desc
-function Lx(){}Lx.builtin$cls="Lx"
-if(!"name" in Lx)Lx.name="Lx"
-$desc=$collectedClasses.Lx
+function Lu(){}Lu.builtin$cls="Lu"
+if(!"name" in Lu)Lu.name="Lu"
+$desc=$collectedClasses.Lu
if($desc instanceof Array)$desc=$desc[1]
-Lx.prototype=$desc
-Lx.prototype.gt5=function(receiver){return receiver.type}
-Lx.prototype.st5=function(receiver,v){return receiver.type=v}
+Lu.prototype=$desc
+Lu.prototype.gt5=function(receiver){return receiver.type}
+Lu.prototype.st5=function(receiver,v){return receiver.type=v}
function LR(){}LR.builtin$cls="LR"
if(!"name" in LR)LR.name="LR"
$desc=$collectedClasses.LR
@@ -26001,11 +26396,11 @@
$desc=$collectedClasses.L3
if($desc instanceof Array)$desc=$desc[1]
L3.prototype=$desc
-function xj(){}xj.builtin$cls="xj"
-if(!"name" in xj)xj.name="xj"
-$desc=$collectedClasses.xj
+function zz(){}zz.builtin$cls="zz"
+if(!"name" in zz)zz.name="zz"
+$desc=$collectedClasses.zz
if($desc instanceof Array)$desc=$desc[1]
-xj.prototype=$desc
+zz.prototype=$desc
function dE(){}dE.builtin$cls="dE"
if(!"name" in dE)dE.name="dE"
$desc=$collectedClasses.dE
@@ -26052,11 +26447,11 @@
$desc=$collectedClasses.kn
if($desc instanceof Array)$desc=$desc[1]
kn.prototype=$desc
-function ht(){}ht.builtin$cls="Null"
-if(!"name" in ht)ht.name="ht"
-$desc=$collectedClasses.ht
+function Jh(){}Jh.builtin$cls="Null"
+if(!"name" in Jh)Jh.name="Jh"
+$desc=$collectedClasses.Jh
if($desc instanceof Array)$desc=$desc[1]
-ht.prototype=$desc
+Jh.prototype=$desc
function QI(){}QI.builtin$cls="QI"
if(!"name" in QI)QI.name="QI"
$desc=$collectedClasses.QI
@@ -26082,11 +26477,11 @@
$desc=$collectedClasses.nM
if($desc instanceof Array)$desc=$desc[1]
nM.prototype=$desc
-function ZC(){}ZC.builtin$cls="ZC"
-if(!"name" in ZC)ZC.name="ZC"
-$desc=$collectedClasses.ZC
+function iY(){}iY.builtin$cls="iY"
+if(!"name" in iY)iY.name="iY"
+$desc=$collectedClasses.iY
if($desc instanceof Array)$desc=$desc[1]
-ZC.prototype=$desc
+iY.prototype=$desc
function Jt(){}Jt.builtin$cls="Jt"
if(!"name" in Jt)Jt.name="Jt"
$desc=$collectedClasses.Jt
@@ -26292,11 +26687,11 @@
$desc=$collectedClasses.hz
if($desc instanceof Array)$desc=$desc[1]
hz.prototype=$desc
-function iY(){}iY.builtin$cls="iY"
-if(!"name" in iY)iY.name="iY"
-$desc=$collectedClasses.iY
+function AP(){}AP.builtin$cls="AP"
+if(!"name" in AP)AP.name="AP"
+$desc=$collectedClasses.AP
if($desc instanceof Array)$desc=$desc[1]
-iY.prototype=$desc
+AP.prototype=$desc
function yH(Kf,zu,p9){this.Kf=Kf
this.zu=zu
this.p9=p9}yH.builtin$cls="yH"
@@ -26688,6 +27083,16 @@
$desc=$collectedClasses.Vf
if($desc instanceof Array)$desc=$desc[1]
Vf.prototype=$desc
+function j3(a){this.a=a}j3.builtin$cls="j3"
+if(!"name" in j3)j3.name="j3"
+$desc=$collectedClasses.j3
+if($desc instanceof Array)$desc=$desc[1]
+j3.prototype=$desc
+function i0(){}i0.builtin$cls="i0"
+if(!"name" in i0)i0.name="i0"
+$desc=$collectedClasses.i0
+if($desc instanceof Array)$desc=$desc[1]
+i0.prototype=$desc
function Tg(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
@@ -26739,6 +27144,16 @@
$desc=$collectedClasses.pv
if($desc instanceof Array)$desc=$desc[1]
pv.prototype=$desc
+function RI(a){this.a=a}RI.builtin$cls="RI"
+if(!"name" in RI)RI.name="RI"
+$desc=$collectedClasses.RI
+if($desc instanceof Array)$desc=$desc[1]
+RI.prototype=$desc
+function Ye(){}Ye.builtin$cls="Ye"
+if(!"name" in Ye)Ye.name="Ye"
+$desc=$collectedClasses.Ye
+if($desc instanceof Array)$desc=$desc[1]
+Ye.prototype=$desc
function CN(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
@@ -26790,7 +27205,7 @@
$desc=$collectedClasses.Vfx
if($desc instanceof Array)$desc=$desc[1]
Vfx.prototype=$desc
-function i6(zh,HX,Uy,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.zh=zh
+function E0(zh,HX,Uy,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.zh=zh
this.HX=HX
this.Uy=Uy
this.AP=AP
@@ -26807,28 +27222,64 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}i6.builtin$cls="i6"
-if(!"name" in i6)i6.name="i6"
-$desc=$collectedClasses.i6
+this.X0=X0}E0.builtin$cls="E0"
+if(!"name" in E0)E0.name="E0"
+$desc=$collectedClasses.E0
if($desc instanceof Array)$desc=$desc[1]
-i6.prototype=$desc
-i6.prototype.gzh=function(receiver){return receiver.zh}
-i6.prototype.gzh.$reflectable=1
-i6.prototype.szh=function(receiver,v){return receiver.zh=v}
-i6.prototype.szh.$reflectable=1
-i6.prototype.gHX=function(receiver){return receiver.HX}
-i6.prototype.gHX.$reflectable=1
-i6.prototype.sHX=function(receiver,v){return receiver.HX=v}
-i6.prototype.sHX.$reflectable=1
-i6.prototype.gUy=function(receiver){return receiver.Uy}
-i6.prototype.gUy.$reflectable=1
-i6.prototype.sUy=function(receiver,v){return receiver.Uy=v}
-i6.prototype.sUy.$reflectable=1
+E0.prototype=$desc
+E0.prototype.gzh=function(receiver){return receiver.zh}
+E0.prototype.gzh.$reflectable=1
+E0.prototype.szh=function(receiver,v){return receiver.zh=v}
+E0.prototype.szh.$reflectable=1
+E0.prototype.gHX=function(receiver){return receiver.HX}
+E0.prototype.gHX.$reflectable=1
+E0.prototype.sHX=function(receiver,v){return receiver.HX=v}
+E0.prototype.sHX.$reflectable=1
+E0.prototype.gUy=function(receiver){return receiver.Uy}
+E0.prototype.gUy.$reflectable=1
+E0.prototype.sUy=function(receiver,v){return receiver.Uy=v}
+E0.prototype.sUy.$reflectable=1
function Dsd(){}Dsd.builtin$cls="Dsd"
if(!"name" in Dsd)Dsd.name="Dsd"
$desc=$collectedClasses.Dsd
if($desc instanceof Array)$desc=$desc[1]
Dsd.prototype=$desc
+function lw(GV,Hu,nx,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.GV=GV
+this.Hu=Hu
+this.nx=nx
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}lw.builtin$cls="lw"
+if(!"name" in lw)lw.name="lw"
+$desc=$collectedClasses.lw
+if($desc instanceof Array)$desc=$desc[1]
+lw.prototype=$desc
+lw.prototype.gGV=function(receiver){return receiver.GV}
+lw.prototype.gGV.$reflectable=1
+lw.prototype.sGV=function(receiver,v){return receiver.GV=v}
+lw.prototype.sGV.$reflectable=1
+lw.prototype.gHu=function(receiver){return receiver.Hu}
+lw.prototype.gHu.$reflectable=1
+lw.prototype.sHu=function(receiver,v){return receiver.Hu=v}
+lw.prototype.sHu.$reflectable=1
+lw.prototype.gnx=function(receiver){return receiver.nx}
+lw.prototype.gnx.$reflectable=1
+lw.prototype.snx=function(receiver,v){return receiver.nx=v}
+lw.prototype.snx.$reflectable=1
+function Nr(){}Nr.builtin$cls="Nr"
+if(!"name" in Nr)Nr.name="Nr"
+$desc=$collectedClasses.Nr
+if($desc instanceof Array)$desc=$desc[1]
+Nr.prototype=$desc
function wJ(){}wJ.builtin$cls="wJ"
if(!"name" in wJ)wJ.name="wJ"
$desc=$collectedClasses.wJ
@@ -27371,6 +27822,19 @@
$desc=$collectedClasses.b8
if($desc instanceof Array)$desc=$desc[1]
b8.prototype=$desc
+function j7(a,b){this.a=a
+this.b=b}j7.builtin$cls="j7"
+if(!"name" in j7)j7.name="j7"
+$desc=$collectedClasses.j7
+if($desc instanceof Array)$desc=$desc[1]
+j7.prototype=$desc
+function ff(a,c,d){this.a=a
+this.c=c
+this.d=d}ff.builtin$cls="ff"
+if(!"name" in ff)ff.name="ff"
+$desc=$collectedClasses.ff
+if($desc instanceof Array)$desc=$desc[1]
+ff.prototype=$desc
function Ia(){}Ia.builtin$cls="Ia"
if(!"name" in Ia)Ia.name="Ia"
$desc=$collectedClasses.Ia
@@ -27468,6 +27932,7 @@
$desc=$collectedClasses.OM
if($desc instanceof Array)$desc=$desc[1]
OM.prototype=$desc
+OM.prototype.gFR=function(receiver){return this.FR}
OM.prototype.gaw=function(){return this.aw}
OM.prototype.saw=function(v){return this.aw=v}
function qh(){}qh.builtin$cls="qh"
@@ -27671,13 +28136,13 @@
$desc=$collectedClasses.ez
if($desc instanceof Array)$desc=$desc[1]
ez.prototype=$desc
-function lx(aw){this.aw=aw}lx.builtin$cls="lx"
-if(!"name" in lx)lx.name="lx"
-$desc=$collectedClasses.lx
+function ti(aw){this.aw=aw}ti.builtin$cls="ti"
+if(!"name" in ti)ti.name="ti"
+$desc=$collectedClasses.ti
if($desc instanceof Array)$desc=$desc[1]
-lx.prototype=$desc
-lx.prototype.gaw=function(){return this.aw}
-lx.prototype.saw=function(v){return this.aw=v}
+ti.prototype=$desc
+ti.prototype.gaw=function(){return this.aw}
+ti.prototype.saw=function(v){return this.aw=v}
function LV(P,aw){this.P=P
this.aw=aw}LV.builtin$cls="LV"
if(!"name" in LV)LV.name="LV"
@@ -27699,11 +28164,11 @@
$desc=$collectedClasses.JF
if($desc instanceof Array)$desc=$desc[1]
JF.prototype=$desc
-function Je(){}Je.builtin$cls="Je"
-if(!"name" in Je)Je.name="Je"
-$desc=$collectedClasses.Je
+function ht(){}ht.builtin$cls="ht"
+if(!"name" in ht)ht.name="ht"
+$desc=$collectedClasses.ht
if($desc instanceof Array)$desc=$desc[1]
-Je.prototype=$desc
+ht.prototype=$desc
function CR(a,b){this.a=a
this.b=b}CR.builtin$cls="CR"
if(!"name" in CR)CR.name="CR"
@@ -27886,11 +28351,11 @@
$desc=$collectedClasses.eM
if($desc instanceof Array)$desc=$desc[1]
eM.prototype=$desc
-function Uez(a){this.a=a}Uez.builtin$cls="Uez"
-if(!"name" in Uez)Uez.name="Uez"
-$desc=$collectedClasses.Uez
+function Ha(a){this.a=a}Ha.builtin$cls="Ha"
+if(!"name" in Ha)Ha.name="Ha"
+$desc=$collectedClasses.Ha
if($desc instanceof Array)$desc=$desc[1]
-Uez.prototype=$desc
+Ha.prototype=$desc
function nU(){}nU.builtin$cls="nU"
if(!"name" in nU)nU.name="nU"
$desc=$collectedClasses.nU
@@ -28289,11 +28754,11 @@
$desc=$collectedClasses.by
if($desc instanceof Array)$desc=$desc[1]
by.prototype=$desc
-function dI(Xi){this.Xi=Xi}dI.builtin$cls="dI"
-if(!"name" in dI)dI.name="dI"
-$desc=$collectedClasses.dI
+function pD(Xi){this.Xi=Xi}pD.builtin$cls="pD"
+if(!"name" in pD)pD.name="pD"
+$desc=$collectedClasses.pD
if($desc instanceof Array)$desc=$desc[1]
-dI.prototype=$desc
+pD.prototype=$desc
function Cf(N5){this.N5=N5}Cf.builtin$cls="Cf"
if(!"name" in Cf)Cf.name="Cf"
$desc=$collectedClasses.Cf
@@ -28349,11 +28814,11 @@
$desc=$collectedClasses.a2
if($desc instanceof Array)$desc=$desc[1]
a2.prototype=$desc
-function fR(){}fR.builtin$cls="fR"
-if(!"name" in fR)fR.name="fR"
-$desc=$collectedClasses.fR
+function Tx(){}Tx.builtin$cls="Tx"
+if(!"name" in Tx)Tx.name="Tx"
+$desc=$collectedClasses.Tx
if($desc instanceof Array)$desc=$desc[1]
-fR.prototype=$desc
+Tx.prototype=$desc
function iP(y3,aL){this.y3=y3
this.aL=aL}iP.builtin$cls="iP"
if(!"name" in iP)iP.name="iP"
@@ -28885,7 +29350,7 @@
$desc=$collectedClasses.RX
if($desc instanceof Array)$desc=$desc[1]
RX.prototype=$desc
-function bO(xY){this.xY=xY}bO.builtin$cls="bO"
+function bO(Vy){this.Vy=Vy}bO.builtin$cls="bO"
if(!"name" in bO)bO.name="bO"
$desc=$collectedClasses.bO
if($desc instanceof Array)$desc=$desc[1]
@@ -29211,7 +29676,17 @@
$desc=$collectedClasses.D13
if($desc instanceof Array)$desc=$desc[1]
D13.prototype=$desc
-function GG(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
+function e5(a){this.a=a}e5.builtin$cls="e5"
+if(!"name" in e5)e5.name="e5"
+$desc=$collectedClasses.e5
+if($desc instanceof Array)$desc=$desc[1]
+e5.prototype=$desc
+function Ni(){}Ni.builtin$cls="Ni"
+if(!"name" in Ni)Ni.name="Ni"
+$desc=$collectedClasses.Ni
+if($desc instanceof Array)$desc=$desc[1]
+Ni.prototype=$desc
+function AX(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
this.AP=AP
@@ -29228,11 +29703,11 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}GG.builtin$cls="GG"
-if(!"name" in GG)GG.name="GG"
-$desc=$collectedClasses.GG
+this.X0=X0}AX.builtin$cls="AX"
+if(!"name" in AX)AX.name="AX"
+$desc=$collectedClasses.AX
if($desc instanceof Array)$desc=$desc[1]
-GG.prototype=$desc
+AX.prototype=$desc
function yb(Z8,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Z8=Z8
this.AP=AP
this.fn=fn
@@ -29262,12 +29737,24 @@
$desc=$collectedClasses.WZq
if($desc instanceof Array)$desc=$desc[1]
WZq.prototype=$desc
-function NM(GQ,J0,Oc,CO,e6,an,Ol,X3,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.GQ=GQ
+function QR(a){this.a=a}QR.builtin$cls="QR"
+if(!"name" in QR)QR.name="QR"
+$desc=$collectedClasses.QR
+if($desc instanceof Array)$desc=$desc[1]
+QR.prototype=$desc
+function Yx(){}Yx.builtin$cls="Yx"
+if(!"name" in Yx)Yx.name="Yx"
+$desc=$collectedClasses.Yx
+if($desc instanceof Array)$desc=$desc[1]
+Yx.prototype=$desc
+function NM(GQ,J0,Oc,CO,bV,vR,LY,q3,Ol,X3,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.GQ=GQ
this.J0=J0
this.Oc=Oc
this.CO=CO
-this.e6=e6
-this.an=an
+this.bV=bV
+this.vR=vR
+this.LY=LY
+this.q3=q3
this.Ol=Ol
this.X3=X3
this.AP=AP
@@ -29305,14 +29792,22 @@
NM.prototype.gCO.$reflectable=1
NM.prototype.sCO=function(receiver,v){return receiver.CO=v}
NM.prototype.sCO.$reflectable=1
-NM.prototype.ge6=function(receiver){return receiver.e6}
-NM.prototype.ge6.$reflectable=1
-NM.prototype.se6=function(receiver,v){return receiver.e6=v}
-NM.prototype.se6.$reflectable=1
-NM.prototype.gan=function(receiver){return receiver.an}
-NM.prototype.gan.$reflectable=1
-NM.prototype.san=function(receiver,v){return receiver.an=v}
-NM.prototype.san.$reflectable=1
+NM.prototype.gbV=function(receiver){return receiver.bV}
+NM.prototype.gbV.$reflectable=1
+NM.prototype.sbV=function(receiver,v){return receiver.bV=v}
+NM.prototype.sbV.$reflectable=1
+NM.prototype.gvR=function(receiver){return receiver.vR}
+NM.prototype.gvR.$reflectable=1
+NM.prototype.svR=function(receiver,v){return receiver.vR=v}
+NM.prototype.svR.$reflectable=1
+NM.prototype.gLY=function(receiver){return receiver.LY}
+NM.prototype.gLY.$reflectable=1
+NM.prototype.sLY=function(receiver,v){return receiver.LY=v}
+NM.prototype.sLY.$reflectable=1
+NM.prototype.gq3=function(receiver){return receiver.q3}
+NM.prototype.gq3.$reflectable=1
+NM.prototype.sq3=function(receiver,v){return receiver.q3=v}
+NM.prototype.sq3.$reflectable=1
NM.prototype.gOl=function(receiver){return receiver.Ol}
NM.prototype.gOl.$reflectable=1
NM.prototype.sOl=function(receiver,v){return receiver.Ol=v}
@@ -29326,16 +29821,26 @@
$desc=$collectedClasses.pva
if($desc instanceof Array)$desc=$desc[1]
pva.prototype=$desc
-function bd(a){this.a=a}bd.builtin$cls="bd"
-if(!"name" in bd)bd.name="bd"
-$desc=$collectedClasses.bd
+function nx(a){this.a=a}nx.builtin$cls="nx"
+if(!"name" in nx)nx.name="nx"
+$desc=$collectedClasses.nx
if($desc instanceof Array)$desc=$desc[1]
-bd.prototype=$desc
-function LS(){}LS.builtin$cls="LS"
-if(!"name" in LS)LS.name="LS"
-$desc=$collectedClasses.LS
+nx.prototype=$desc
+function jm(){}jm.builtin$cls="jm"
+if(!"name" in jm)jm.name="jm"
+$desc=$collectedClasses.jm
if($desc instanceof Array)$desc=$desc[1]
-LS.prototype=$desc
+jm.prototype=$desc
+function xj(a){this.a=a}xj.builtin$cls="xj"
+if(!"name" in xj)xj.name="xj"
+$desc=$collectedClasses.xj
+if($desc instanceof Array)$desc=$desc[1]
+xj.prototype=$desc
+function VB(){}VB.builtin$cls="VB"
+if(!"name" in VB)VB.name="VB"
+$desc=$collectedClasses.VB
+if($desc instanceof Array)$desc=$desc[1]
+VB.prototype=$desc
function aI(b,c){this.b=b
this.c=c}aI.builtin$cls="aI"
if(!"name" in aI)aI.name="aI"
@@ -29430,10 +29935,7 @@
$desc=$collectedClasses.GS
if($desc instanceof Array)$desc=$desc[1]
GS.prototype=$desc
-function pR(qX,AP,fn,tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.qX=qX
-this.AP=AP
-this.fn=fn
-this.tY=tY
+function pR(tY,Pe,m0,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.tY=tY
this.Pe=Pe
this.m0=m0
this.AP=AP
@@ -29455,25 +29957,16 @@
$desc=$collectedClasses.pR
if($desc instanceof Array)$desc=$desc[1]
pR.prototype=$desc
-pR.prototype.gqX=function(receiver){return receiver.qX}
-pR.prototype.gqX.$reflectable=1
-pR.prototype.sqX=function(receiver,v){return receiver.qX=v}
-pR.prototype.sqX.$reflectable=1
-function T5(){}T5.builtin$cls="T5"
-if(!"name" in T5)T5.name="T5"
-$desc=$collectedClasses.T5
+function Js(a){this.a=a}Js.builtin$cls="Js"
+if(!"name" in Js)Js.name="Js"
+$desc=$collectedClasses.Js
if($desc instanceof Array)$desc=$desc[1]
-T5.prototype=$desc
-function YE(a){this.a=a}YE.builtin$cls="YE"
-if(!"name" in YE)YE.name="YE"
-$desc=$collectedClasses.YE
+Js.prototype=$desc
+function fM(){}fM.builtin$cls="fM"
+if(!"name" in fM)fM.name="fM"
+$desc=$collectedClasses.fM
if($desc instanceof Array)$desc=$desc[1]
-YE.prototype=$desc
-function we(){}we.builtin$cls="we"
-if(!"name" in we)we.name="we"
-$desc=$collectedClasses.we
-if($desc instanceof Array)$desc=$desc[1]
-we.prototype=$desc
+fM.prototype=$desc
function hx(Xh,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Xh=Xh
this.AP=AP
this.fn=fn
@@ -29520,11 +30013,16 @@
$desc=$collectedClasses.u7
if($desc instanceof Array)$desc=$desc[1]
u7.prototype=$desc
-function fW(){}fW.builtin$cls="fW"
+function fW(a){this.a=a}fW.builtin$cls="fW"
if(!"name" in fW)fW.name="fW"
$desc=$collectedClasses.fW
if($desc instanceof Array)$desc=$desc[1]
fW.prototype=$desc
+function Ey(b){this.b=b}Ey.builtin$cls="Ey"
+if(!"name" in Ey)Ey.name="Ey"
+$desc=$collectedClasses.Ey
+if($desc instanceof Array)$desc=$desc[1]
+Ey.prototype=$desc
function qm(Aq,tT,eT,yt,wd,oH,np,AP,fn){this.Aq=Aq
this.tT=tT
this.eT=eT
@@ -29591,17 +30089,17 @@
$desc=$collectedClasses.waa
if($desc instanceof Array)$desc=$desc[1]
waa.prototype=$desc
-function RR(a,b){this.a=a
-this.b=b}RR.builtin$cls="RR"
-if(!"name" in RR)RR.name="RR"
-$desc=$collectedClasses.RR
+function SV(a,b){this.a=a
+this.b=b}SV.builtin$cls="SV"
+if(!"name" in SV)SV.name="SV"
+$desc=$collectedClasses.SV
if($desc instanceof Array)$desc=$desc[1]
-RR.prototype=$desc
-function EL(c){this.c=c}EL.builtin$cls="EL"
-if(!"name" in EL)EL.name="EL"
-$desc=$collectedClasses.EL
+SV.prototype=$desc
+function vH(c){this.c=c}vH.builtin$cls="vH"
+if(!"name" in vH)vH.name="vH"
+$desc=$collectedClasses.vH
if($desc instanceof Array)$desc=$desc[1]
-EL.prototype=$desc
+vH.prototype=$desc
function St(Pw,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Pw=Pw
this.AP=AP
this.fn=fn
@@ -29716,6 +30214,16 @@
$desc=$collectedClasses.V10
if($desc instanceof Array)$desc=$desc[1]
V10.prototype=$desc
+function Jq(a){this.a=a}Jq.builtin$cls="Jq"
+if(!"name" in Jq)Jq.name="Jq"
+$desc=$collectedClasses.Jq
+if($desc instanceof Array)$desc=$desc[1]
+Jq.prototype=$desc
+function RJ(){}RJ.builtin$cls="RJ"
+if(!"name" in RJ)RJ.name="RJ"
+$desc=$collectedClasses.RJ
+if($desc instanceof Array)$desc=$desc[1]
+RJ.prototype=$desc
function TJ(oc,eT,n2,Cj,wd,Gs){this.oc=oc
this.eT=eT
this.n2=n2
@@ -29791,17 +30299,17 @@
PF.prototype.gGj.$reflectable=1
PF.prototype.sGj=function(receiver,v){return receiver.Gj=v}
PF.prototype.sGj.$reflectable=1
-function fA(T9,Jt){this.T9=T9
-this.Jt=Jt}fA.builtin$cls="fA"
-if(!"name" in fA)fA.name="fA"
-$desc=$collectedClasses.fA
+function T4(T9,Jt){this.T9=T9
+this.Jt=Jt}T4.builtin$cls="T4"
+if(!"name" in T4)T4.name="T4"
+$desc=$collectedClasses.T4
if($desc instanceof Array)$desc=$desc[1]
-fA.prototype=$desc
-function tz(){}tz.builtin$cls="tz"
-if(!"name" in tz)tz.name="tz"
-$desc=$collectedClasses.tz
+T4.prototype=$desc
+function Qz(){}Qz.builtin$cls="Qz"
+if(!"name" in Qz)Qz.name="Qz"
+$desc=$collectedClasses.Qz
if($desc instanceof Array)$desc=$desc[1]
-tz.prototype=$desc
+Qz.prototype=$desc
function jA(oc){this.oc=oc}jA.builtin$cls="jA"
if(!"name" in jA)jA.name="jA"
$desc=$collectedClasses.jA
@@ -29818,7 +30326,7 @@
$desc=$collectedClasses.c5
if($desc instanceof Array)$desc=$desc[1]
c5.prototype=$desc
-function qT(hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.hm=hm
+function F1(hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.hm=hm
this.AP=AP
this.fn=fn
this.AP=AP
@@ -29830,12 +30338,14 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}qT.builtin$cls="qT"
-if(!"name" in qT)qT.name="qT"
-$desc=$collectedClasses.qT
+this.X0=X0}F1.builtin$cls="F1"
+if(!"name" in F1)F1.name="F1"
+$desc=$collectedClasses.F1
if($desc instanceof Array)$desc=$desc[1]
-qT.prototype=$desc
-function Xd(rK,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.rK=rK
+F1.prototype=$desc
+function aQ(KU,ZC,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.KU=KU
+this.ZC=ZC
+this.Jo=Jo
this.AP=AP
this.fn=fn
this.hm=hm
@@ -29850,20 +30360,227 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}Xd.builtin$cls="Xd"
-if(!"name" in Xd)Xd.name="Xd"
-$desc=$collectedClasses.Xd
+this.X0=X0}aQ.builtin$cls="aQ"
+if(!"name" in aQ)aQ.name="aQ"
+$desc=$collectedClasses.aQ
if($desc instanceof Array)$desc=$desc[1]
-Xd.prototype=$desc
-Xd.prototype.grK=function(receiver){return receiver.rK}
-Xd.prototype.grK.$reflectable=1
-Xd.prototype.srK=function(receiver,v){return receiver.rK=v}
-Xd.prototype.srK.$reflectable=1
+aQ.prototype=$desc
+aQ.prototype.gKU=function(receiver){return receiver.KU}
+aQ.prototype.gKU.$reflectable=1
+aQ.prototype.sKU=function(receiver,v){return receiver.KU=v}
+aQ.prototype.sKU.$reflectable=1
+aQ.prototype.gZC=function(receiver){return receiver.ZC}
+aQ.prototype.gZC.$reflectable=1
+aQ.prototype.sZC=function(receiver,v){return receiver.ZC=v}
+aQ.prototype.sZC.$reflectable=1
+aQ.prototype.gJo=function(receiver){return receiver.Jo}
+aQ.prototype.gJo.$reflectable=1
+aQ.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+aQ.prototype.sJo.$reflectable=1
function V11(){}V11.builtin$cls="V11"
if(!"name" in V11)V11.name="V11"
$desc=$collectedClasses.V11
if($desc instanceof Array)$desc=$desc[1]
V11.prototype=$desc
+function Qa(KU,ZC,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.KU=KU
+this.ZC=ZC
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}Qa.builtin$cls="Qa"
+if(!"name" in Qa)Qa.name="Qa"
+$desc=$collectedClasses.Qa
+if($desc instanceof Array)$desc=$desc[1]
+Qa.prototype=$desc
+Qa.prototype.gKU=function(receiver){return receiver.KU}
+Qa.prototype.gKU.$reflectable=1
+Qa.prototype.sKU=function(receiver,v){return receiver.KU=v}
+Qa.prototype.sKU.$reflectable=1
+Qa.prototype.gZC=function(receiver){return receiver.ZC}
+Qa.prototype.gZC.$reflectable=1
+Qa.prototype.sZC=function(receiver,v){return receiver.ZC=v}
+Qa.prototype.sZC.$reflectable=1
+function V12(){}V12.builtin$cls="V12"
+if(!"name" in V12)V12.name="V12"
+$desc=$collectedClasses.V12
+if($desc instanceof Array)$desc=$desc[1]
+V12.prototype=$desc
+function vI(rU,SB,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.rU=rU
+this.SB=SB
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}vI.builtin$cls="vI"
+if(!"name" in vI)vI.name="vI"
+$desc=$collectedClasses.vI
+if($desc instanceof Array)$desc=$desc[1]
+vI.prototype=$desc
+vI.prototype.grU=function(receiver){return receiver.rU}
+vI.prototype.grU.$reflectable=1
+vI.prototype.srU=function(receiver,v){return receiver.rU=v}
+vI.prototype.srU.$reflectable=1
+vI.prototype.gSB=function(receiver){return receiver.SB}
+vI.prototype.gSB.$reflectable=1
+vI.prototype.sSB=function(receiver,v){return receiver.SB=v}
+vI.prototype.sSB.$reflectable=1
+function V13(){}V13.builtin$cls="V13"
+if(!"name" in V13)V13.name="V13"
+$desc=$collectedClasses.V13
+if($desc instanceof Array)$desc=$desc[1]
+V13.prototype=$desc
+function tz(Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}tz.builtin$cls="tz"
+if(!"name" in tz)tz.name="tz"
+$desc=$collectedClasses.tz
+if($desc instanceof Array)$desc=$desc[1]
+tz.prototype=$desc
+tz.prototype.gJo=function(receiver){return receiver.Jo}
+tz.prototype.gJo.$reflectable=1
+tz.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+tz.prototype.sJo.$reflectable=1
+function V14(){}V14.builtin$cls="V14"
+if(!"name" in V14)V14.name="V14"
+$desc=$collectedClasses.V14
+if($desc instanceof Array)$desc=$desc[1]
+V14.prototype=$desc
+function fl(iy,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.iy=iy
+this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}fl.builtin$cls="fl"
+if(!"name" in fl)fl.name="fl"
+$desc=$collectedClasses.fl
+if($desc instanceof Array)$desc=$desc[1]
+fl.prototype=$desc
+fl.prototype.giy=function(receiver){return receiver.iy}
+fl.prototype.giy.$reflectable=1
+fl.prototype.siy=function(receiver,v){return receiver.iy=v}
+fl.prototype.siy.$reflectable=1
+fl.prototype.gJo=function(receiver){return receiver.Jo}
+fl.prototype.gJo.$reflectable=1
+fl.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+fl.prototype.sJo.$reflectable=1
+function V15(){}V15.builtin$cls="V15"
+if(!"name" in V15)V15.name="V15"
+$desc=$collectedClasses.V15
+if($desc instanceof Array)$desc=$desc[1]
+V15.prototype=$desc
+function Zt(Ap,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Ap=Ap
+this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}Zt.builtin$cls="Zt"
+if(!"name" in Zt)Zt.name="Zt"
+$desc=$collectedClasses.Zt
+if($desc instanceof Array)$desc=$desc[1]
+Zt.prototype=$desc
+Zt.prototype.gAp=function(receiver){return receiver.Ap}
+Zt.prototype.gAp.$reflectable=1
+Zt.prototype.sAp=function(receiver,v){return receiver.Ap=v}
+Zt.prototype.sAp.$reflectable=1
+Zt.prototype.gJo=function(receiver){return receiver.Jo}
+Zt.prototype.gJo.$reflectable=1
+Zt.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+Zt.prototype.sJo.$reflectable=1
+function V16(){}V16.builtin$cls="V16"
+if(!"name" in V16)V16.name="V16"
+$desc=$collectedClasses.V16
+if($desc instanceof Array)$desc=$desc[1]
+V16.prototype=$desc
+function wM(Au,Jo,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Au=Au
+this.Jo=Jo
+this.AP=AP
+this.fn=fn
+this.hm=hm
+this.AP=AP
+this.fn=fn
+this.AP=AP
+this.fn=fn
+this.dZ=dZ
+this.Sa=Sa
+this.Uk=Uk
+this.oq=oq
+this.Wz=Wz
+this.SO=SO
+this.B7=B7
+this.X0=X0}wM.builtin$cls="wM"
+if(!"name" in wM)wM.name="wM"
+$desc=$collectedClasses.wM
+if($desc instanceof Array)$desc=$desc[1]
+wM.prototype=$desc
+wM.prototype.gAu=function(receiver){return receiver.Au}
+wM.prototype.gAu.$reflectable=1
+wM.prototype.sAu=function(receiver,v){return receiver.Au=v}
+wM.prototype.sAu.$reflectable=1
+wM.prototype.gJo=function(receiver){return receiver.Jo}
+wM.prototype.gJo.$reflectable=1
+wM.prototype.sJo=function(receiver,v){return receiver.Jo=v}
+wM.prototype.sJo.$reflectable=1
+function V17(){}V17.builtin$cls="V17"
+if(!"name" in V17)V17.name="V17"
+$desc=$collectedClasses.V17
+if($desc instanceof Array)$desc=$desc[1]
+V17.prototype=$desc
function mL(Z6,DF,nI,AP,fn){this.Z6=Z6
this.DF=DF
this.nI=nI
@@ -29892,13 +30609,14 @@
if($desc instanceof Array)$desc=$desc[1]
qu.prototype=$desc
qu.prototype.gbG=function(receiver){return this.bG}
-function bv(WP,XR,Z0,md,mY,F3,rU,LE,iP,mU,mM,Td,AP,fn){this.WP=WP
+function bv(WP,XR,Z0,md,mY,e8,F3,Gg,LE,iP,mU,mM,Td,AP,fn){this.WP=WP
this.XR=XR
this.Z0=Z0
this.md=md
this.mY=mY
+this.e8=e8
this.F3=F3
-this.rU=rU
+this.Gg=Gg
this.LE=LE
this.iP=iP
this.mU=mU
@@ -30083,8 +30801,9 @@
c2.prototype=$desc
c2.prototype.gRd=function(receiver){return this.Rd}
c2.prototype.gRd.$reflectable=1
-function rj(W6,xN,Hz,Sw,UK,AP,fn){this.W6=W6
+function rj(W6,xN,ei,Hz,Sw,UK,AP,fn){this.W6=W6
this.xN=xN
+this.ei=ei
this.Hz=Hz
this.Sw=Sw
this.UK=UK
@@ -30181,7 +30900,7 @@
XN.prototype=$desc
XN.prototype.gWT=function(receiver){return this.WT}
XN.prototype.gWT.$reflectable=1
-function F1(k5,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.k5=k5
+function lI(k5,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.k5=k5
this.AP=AP
this.fn=fn
this.hm=hm
@@ -30196,20 +30915,20 @@
this.Wz=Wz
this.SO=SO
this.B7=B7
-this.X0=X0}F1.builtin$cls="F1"
-if(!"name" in F1)F1.name="F1"
-$desc=$collectedClasses.F1
+this.X0=X0}lI.builtin$cls="lI"
+if(!"name" in lI)lI.name="lI"
+$desc=$collectedClasses.lI
if($desc instanceof Array)$desc=$desc[1]
-F1.prototype=$desc
-F1.prototype.gk5=function(receiver){return receiver.k5}
-F1.prototype.gk5.$reflectable=1
-F1.prototype.sk5=function(receiver,v){return receiver.k5=v}
-F1.prototype.sk5.$reflectable=1
-function V12(){}V12.builtin$cls="V12"
-if(!"name" in V12)V12.name="V12"
-$desc=$collectedClasses.V12
+lI.prototype=$desc
+lI.prototype.gk5=function(receiver){return receiver.k5}
+lI.prototype.gk5.$reflectable=1
+lI.prototype.sk5=function(receiver,v){return receiver.k5=v}
+lI.prototype.sk5.$reflectable=1
+function V18(){}V18.builtin$cls="V18"
+if(!"name" in V18)V18.name="V18"
+$desc=$collectedClasses.V18
if($desc instanceof Array)$desc=$desc[1]
-V12.prototype=$desc
+V18.prototype=$desc
function uL(hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.hm=hm
this.AP=AP
this.fn=fn
@@ -30322,11 +31041,11 @@
DA.prototype=$desc
DA.prototype.gWA=function(){return this.WA}
DA.prototype.gIl=function(){return this.Il}
-function nd(){}nd.builtin$cls="nd"
-if(!"name" in nd)nd.name="nd"
-$desc=$collectedClasses.nd
+function ndx(){}ndx.builtin$cls="ndx"
+if(!"name" in ndx)ndx.name="ndx"
+$desc=$collectedClasses.ndx
if($desc instanceof Array)$desc=$desc[1]
-nd.prototype=$desc
+ndx.prototype=$desc
function vly(){}vly.builtin$cls="vly"
if(!"name" in vly)vly.name="vly"
$desc=$collectedClasses.vly
@@ -30876,14 +31595,14 @@
if($desc instanceof Array)$desc=$desc[1]
z6.prototype=$desc
z6.prototype.geT=function(receiver){return this.eT}
-function Mb(bO,Lv){this.bO=bO
-this.Lv=Lv}Mb.builtin$cls="Mb"
-if(!"name" in Mb)Mb.name="Mb"
-$desc=$collectedClasses.Mb
+function Ay0(bO,Lv){this.bO=bO
+this.Lv=Lv}Ay0.builtin$cls="Ay0"
+if(!"name" in Ay0)Ay0.name="Ay0"
+$desc=$collectedClasses.Ay0
if($desc instanceof Array)$desc=$desc[1]
-Mb.prototype=$desc
-Mb.prototype.sbO=function(v){return this.bO=v}
-Mb.prototype.gLv=function(){return this.Lv}
+Ay0.prototype=$desc
+Ay0.prototype.sbO=function(v){return this.bO=v}
+Ay0.prototype.gLv=function(){return this.Lv}
function Ed(Jd){this.Jd=Jd}Ed.builtin$cls="Ed"
if(!"name" in Ed)Ed.name="Ed"
$desc=$collectedClasses.Ed
@@ -31331,11 +32050,11 @@
knI.prototype.gzw.$reflectable=1
knI.prototype.szw=function(receiver,v){return receiver.zw=v}
knI.prototype.szw.$reflectable=1
-function qe(){}qe.builtin$cls="qe"
-if(!"name" in qe)qe.name="qe"
-$desc=$collectedClasses.qe
+function T5(){}T5.builtin$cls="T5"
+if(!"name" in T5)T5.name="T5"
+$desc=$collectedClasses.T5
if($desc instanceof Array)$desc=$desc[1]
-qe.prototype=$desc
+T5.prototype=$desc
function fI(Uz,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Uz=Uz
this.AP=AP
this.fn=fn
@@ -31360,11 +32079,11 @@
fI.prototype.gUz.$reflectable=1
fI.prototype.sUz=function(receiver,v){return receiver.Uz=v}
fI.prototype.sUz.$reflectable=1
-function V13(){}V13.builtin$cls="V13"
-if(!"name" in V13)V13.name="V13"
-$desc=$collectedClasses.V13
+function V19(){}V19.builtin$cls="V19"
+if(!"name" in V19)V19.name="V19"
+$desc=$collectedClasses.V19
if($desc instanceof Array)$desc=$desc[1]
-V13.prototype=$desc
+V19.prototype=$desc
function qq(a,b){this.a=a
this.b=b}qq.builtin$cls="qq"
if(!"name" in qq)qq.name="qq"
@@ -31415,8 +32134,7 @@
$desc=$collectedClasses.Ds
if($desc instanceof Array)$desc=$desc[1]
Ds.prototype=$desc
-function nm(Va,Mt,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Va=Va
-this.Mt=Mt
+function nm(Va,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.Va=Va
this.AP=AP
this.fn=fn
this.hm=hm
@@ -31440,15 +32158,11 @@
nm.prototype.gVa.$reflectable=1
nm.prototype.sVa=function(receiver,v){return receiver.Va=v}
nm.prototype.sVa.$reflectable=1
-nm.prototype.gMt=function(receiver){return receiver.Mt}
-nm.prototype.gMt.$reflectable=1
-nm.prototype.sMt=function(receiver,v){return receiver.Mt=v}
-nm.prototype.sMt.$reflectable=1
-function V14(){}V14.builtin$cls="V14"
-if(!"name" in V14)V14.name="V14"
-$desc=$collectedClasses.V14
+function V20(){}V20.builtin$cls="V20"
+if(!"name" in V20)V20.name="V20"
+$desc=$collectedClasses.V20
if($desc instanceof Array)$desc=$desc[1]
-V14.prototype=$desc
+V20.prototype=$desc
function Vu(V4,AP,fn,hm,AP,fn,AP,fn,dZ,Sa,Uk,oq,Wz,SO,B7,X0){this.V4=V4
this.AP=AP
this.fn=fn
@@ -31473,11 +32187,11 @@
Vu.prototype.gV4.$reflectable=1
Vu.prototype.sV4=function(receiver,v){return receiver.V4=v}
Vu.prototype.sV4.$reflectable=1
-function V15(){}V15.builtin$cls="V15"
-if(!"name" in V15)V15.name="V15"
-$desc=$collectedClasses.V15
+function V21(){}V21.builtin$cls="V21"
+if(!"name" in V21)V21.name="V21"
+$desc=$collectedClasses.V21
if($desc instanceof Array)$desc=$desc[1]
-V15.prototype=$desc
+V21.prototype=$desc
function At(a){this.a=a}At.builtin$cls="At"
if(!"name" in At)At.name="At"
$desc=$collectedClasses.At
@@ -31759,11 +32473,11 @@
$desc=$collectedClasses.wl
if($desc instanceof Array)$desc=$desc[1]
wl.prototype=$desc
-function T4(){}T4.builtin$cls="T4"
-if(!"name" in T4)T4.name="T4"
-$desc=$collectedClasses.T4
+function ve(){}ve.builtin$cls="ve"
+if(!"name" in ve)ve.name="ve"
+$desc=$collectedClasses.ve
if($desc instanceof Array)$desc=$desc[1]
-T4.prototype=$desc
+ve.prototype=$desc
function TR(qP){this.qP=qP}TR.builtin$cls="TR"
if(!"name" in TR)TR.name="TR"
$desc=$collectedClasses.TR
@@ -31775,4 +32489,4 @@
$desc=$collectedClasses.VD
if($desc instanceof Array)$desc=$desc[1]
VD.prototype=$desc
-return[qE,SV,Gh,A0,na,Mr,zx,P2,Xk,W2,it,Az,QP,QW,jr,Ny,nx,QQ,BR,di,d7,yJ,He,vz,vHT,n0,Em,pt,rV,K4,QF,Aj,cm,Nh,wj,cv,Fs,Ty,ea,D0,as,hH,Aa,u5,h4,W4,jP,Hd,tA,wa,Uq,QH,Rt,X2,zU,pk,tX,Sg,pA,Mi,Gt,In,wP,eP,mF,Qj,cS,YI,El,zm,Y7,aB,fJ,BK,Rv,HO,Kk,ZY,DD,EeC,Qb,PG,xe,Hw,bn,Imr,Ve,Oq,H9,o4,oU,ih,KV,yk,KY,G7,l9,Ql,Xp,bP,FH,iL,HD,ni,jg,qj,nC,KR,ew,fs,LY,BL,fe,By,j2,X4,lp,pD,I0,QR,Cp,Ta,zD9,Ul,G5,bk,fq,Er,qk,GI,Tb,tV,BT,yY,kJ,AE,xV,Dn,y6,RH,ho,OJ,Mf,dp,vw,aG,J6,u9,Bn,hq,UL,tZ,kc,AK,ty,Nf,F2,VB,QV,Zv,Q7,hF,OF,Dh,ZJ,mU,NE,lC,y5,jQ,Kg,ui,mk,DQ,Sm,LM,es,eG,lv,pf,NV,W1,mCz,kK,n5,bb,NdT,lc,Xu,qM,tk,me,oB,nh,EI,MI,ca,um,eW,kL,Fu,QN,N9,BA,d0,zp,br,PIw,vd,Jq,Yd,kN,lZ,Gr,XE,GH,lo,NJ,Ue,vt,rQ,Lx,LR,d5,hy,mq,Ke,CG,Xe,y0,Rk4,Eo,tL,pyk,ZD,rD,wD,Wv,yz,Fi,Ja,mj,cB,Mh,yR,GK,xJ,Nn,Et,NC,nb,Zn,xt,wx,P0,xlX,SQ,qD,TM,WZ,rn,df,Hg,L3,xj,dE,Eb,dT,N2,eE,V6,Lt,Gv,kn,ht,QI,FP,is,Q,nM,ZC,Jt,P,im,GW,vT,VP,BQ,O,PK,JO,f0,aX,cC,RA,IY,JH,jl,Iy,Z6,Ua,ns,yo,NA,NO,II,fP,X1,HU,oo,OW,hz,iY,yH,FA,Av,ku,Zd,xQ,F0,oH,LPe,bw,WT,jJ,XR,LI,A2,IW,F3,FD,Cj,u8,Zr,W0,az,vV,Am,XO,dr,TL,KX,uZ,OQ,Tp,Bp,v,Ll,dN,GT,Pe,Eq,lb,tD,hJ,tu,fw,Zz,cu,Lm,dC,wN,VX,VR,EK,KW,Pb,tQ,G6,Vf,Tg,Ps,pv,CN,vc,Vfx,i6,Dsd,wJ,aL,nH,a7,i1,xy,MH,A8,U5,SO,kV,rR,H6,wB,U1,SJ,SU7,Qr,w2Y,iK,GD,Sn,nI,TY,Lj,mb,am,cw,EE,Uz,uh,IB,oP,YX,BI,Un,M2,iu,mg,bl,tB,Oo,Tc,Ax,Wf,vk,Ei,U7,t0,Ld,Sz,Zk,fu,wt,ng,TN,Ar,rh,jB,ye,O1,Oh,Xh,Ca,Ik,JI,Ks,dz,tK,OR,Bg,DL,b8,Ia,Zf,vs,da,xw,dm,rH,ZL,rq,RW,RT,jZ,FZ,OM,qh,tG,jv,LB,zn,lz,Rl,Jb,M4,Jp,h7,pr,eN,PI,uO,j4,i9,VV,Dy,lU,OC,UH,Z5,ii,ib,MO,O9,oh,nP,KA,Vo,qB,ez,lx,LV,DS,JF,Je,CR,Qk,v1y,uR,Q0,YR,fB,nO,t3,dq,lO,aY,zG,e4,JB,Id,WH,TF,K5,Cg,Hs,dv,pV,uo,pK,eM,Uez,nU,R8,k6,oi,ce,DJ,PL,Fq,jG,fG,EQ,YB,a1,ou,S9,ey,xd,v6,db,i5,N6,Rr,YO,oz,b6,ef,zQ,Yp,lN,mW,ar,lD,ZQ,Sw,o0,qv,jp,vX,Ba,An,bF,LD,S6B,OG,uM,DN,ZM,HW,JC,f1,Uk,wI,Zi,Ud,K8,by,dI,Cf,Sh,tF,z0,E3,Rw,HB,CL,p4,a2,fR,iP,MF,Rq,Hn,Zl,B5,a6,P7,DW,Ge,LK,AT,bJ,Np,mp,ub,ds,lj,UV,VS,t7,HG,aE,eV,kM,EH,cX,Yl,Z0,L9,a,Od,MN,WU,Rn,wv,uq,iD,hb,XX,Kd,yZ,Gs,pm,Tw,wm,FB,Lk,XZ,Mx,C9,kZ,JT,d9,rI,QZ,VG,wz,B1,M5,Jn,DM,RAp,Gb,Kx,iO,bU,Yg,e7,nNL,ecX,kI,yoo,w1p,tJ,Zc,i7,nF,FK,Si,vf,Iw,Fc,hD,I4,e0,RO,eu,ie,Ea,pu,i2,b0,Ov,qO,RX,bO,Gm,Of,Qg,W9,vZ,dW,Dk,O7,IU,E4,Gn,r7,Tz,Wk,DV,Hp,Nz,Jd,QS,ej,NL,vr,D4,X9,Ms,ac,RS,RY,Ys,WS4,Gj,U4,B8q,Nx,LZ,Dg,Ob,Ip,Pg,Nb,nA,Fv,tuj,E9,Vct,m8,Gk,D13,GG,yb,WZq,NM,pva,bd,LS,aI,rG,yh,wO,Tm,q1,CA,YL,KC,xL,As,GE,rl,uQ,D7,hT,GS,pR,T5,YE,we,hx,cda,u7,fW,qm,vO,E7,waa,RR,EL,St,V0,vj,V4,LU,T2,V10,TJ,dG,qV,HV,em,Lb,PF,fA,tz,jA,PO,c5,qT,Xd,V11,mL,Kf,qu,bv,eS,IQ,TI,yU,Ub,dY,vY,zZ,dS,dZ,Qe,DP,WAE,N8,Vi,kx,fx,CM,xn,vu,c2,rj,Nu,Q4,aJ,u4,pF,Q2,r1,Rb,Y2,XN,F1,V12,uL,LP,Pi,z2,qI,J3,E5,o5,b5,zI,Zb,id,iV,DA,nd,vly,d3,lS,xh,wn,Ay,Bj,HA,qC,zT,Lo,WR,qL,Px,C4,Md,km,Zj,XP,q6,CK,LJ,ZG,Oc,MX,w9,r3y,yL,zs,WC,Xi,TV,Mq,Oa,n1,xf,L6,Rs,uJ,hm,Ji,Bf,ir,jpR,GN,bS,HJ,S0,V3,Bl,Fn,e3,pM,jh,W6,Lf,fT,pp,nl,ik,mf,LfS,HK,o8,ex,e9,Xy,G0,mY,GX,mB,XF,bX,lP,Uf,Ra,wJY,zOQ,W6o,MdQ,YJG,DOe,lPa,Ufa,Raa,w0,w4,w5,w7,c4,z6,Mb,Ed,G1,Os,B8,Wh,x5,ev,ID,qR,ek,Qv,Xm,mv,mG,uA,vl,Li,WK,iT,ja,zw,fa,WW,vQ,a9,VA,J1,fk,wL,B0,tc,hw,EZ,no,kB,ae,XC,w6,jK,uk,K9,zX,x9,Jy,xs,FX,Ae,Bt,vR,Pn,hc,hA,fr,cfS,JG,knI,qe,fI,V13,qq,FC,xI,Ds,nm,V14,Vu,V15,At,Sb,V2,D8,jY,H2,YJ,fTP,ppY,NP,jt,r0,jz,SA,hB,nv,ee,XI,hs,yp,ug,DT,OB,DO,p8,NW,HS,TG,ts,Kj,VU,Ya,XT,ic,wl,T4,TR,VD]}
\ No newline at end of file
+return[qE,ho,Gh,A0,na,Mr,zx,P2,Xk,W2,it,Az,QP,QW,jr,Ny,Zv,QQS,BR,di,d7,yJ,He,vz,vHT,n0,Em,pt,rV,K4,QF,Aj,cm,Nh,wj,cv,Fs,Ty,ea,D0,as,hH,Aa,u5,h4,W4,jP,Hd,tA,wa,Uq,QH,Rt,X2,zU,rk,tX,Sg,pA,Mi,Gt,In,wP,eP,mF,Qj,cS,YI,El,zm,Y7,aB,fJ,BK,Rv,HO,Kk,ZY,DD,EeC,Qb,PG,xe,Hw,bn,Imr,Ve,Oq,H9,o4,oU,ih,KV,yk,KY,G7,l9,Ql,Xp,bP,FH,SN,HD,ni,jg,qj,nC,KR,ew,fs,LY,BL,fe,By,j2,X4,lp,kd,I0,CY,Wt,uaa,zD9,Ul,G5,bk,Lx,Er,qk,GI,Tb,tV,BT,yY,kJ,AE,xV,Dn,y6,RH,pU,OJ,Mf,dp,vw,aG,fA,u9,Bn,hq,UL,tZ,kc,AK,ty,Nf,F2,nL,QV,q0,Q7,hF,OF,Dh,Ue,mU,NE,lC,y5,jQ,Kg,ui,mk,DQ,Sm,LM,es,eG,bd,pf,NV,W1,mCz,kK,n5,bb,NdT,lc,Xu,qM,tk,me,oB,nh,EI,MI,ca,um,eW,kL,Fu,QN,N9,BA,d0,zp,br,PIw,vd,uzr,Yd,kN,lZ,Gr,XE,GH,lo,NJ,nd,vt,rQ,Lu,LR,d5,hy,mq,Ke,CG,Xe,y0,Rk4,Eo,tL,pyk,ZD,rD,wD,Wv,yz,Fi,Ja,mj,cB,Mh,yR,GK,xJ,Nn,Et,NC,nb,Zn,xt,wx,P0,xlX,SQ,qD,TM,WZ,rn,df,Hg,L3,zz,dE,Eb,dT,N2,eE,V6,Lt,Gv,kn,Jh,QI,FP,is,Q,nM,iY,Jt,P,im,GW,vT,VP,BQ,O,PK,JO,f0,aX,cC,RA,IY,JH,jl,Iy,Z6,Ua,ns,yo,NA,NO,II,fP,X1,HU,oo,OW,hz,AP,yH,FA,Av,ku,Zd,xQ,F0,oH,LPe,bw,WT,jJ,XR,LI,A2,IW,F3,FD,Cj,u8,Zr,W0,az,vV,Am,XO,dr,TL,KX,uZ,OQ,Tp,Bp,v,Ll,dN,GT,Pe,Eq,lb,tD,hJ,tu,fw,Zz,cu,Lm,dC,wN,VX,VR,EK,KW,Pb,tQ,G6,Vf,j3,i0,Tg,Ps,pv,RI,Ye,CN,vc,Vfx,E0,Dsd,lw,Nr,wJ,aL,nH,a7,i1,xy,MH,A8,U5,SO,kV,rR,H6,wB,U1,SJ,SU7,Qr,w2Y,iK,GD,Sn,nI,TY,Lj,mb,am,cw,EE,Uz,uh,IB,oP,YX,BI,Un,M2,iu,mg,bl,tB,Oo,Tc,Ax,Wf,vk,Ei,U7,t0,Ld,Sz,Zk,fu,wt,ng,TN,Ar,rh,jB,ye,O1,Oh,Xh,Ca,Ik,JI,Ks,dz,tK,OR,Bg,DL,b8,j7,ff,Ia,Zf,vs,da,xw,dm,rH,ZL,rq,RW,RT,jZ,FZ,OM,qh,tG,jv,LB,zn,lz,Rl,Jb,M4,Jp,h7,pr,eN,PI,uO,j4,i9,VV,Dy,lU,OC,UH,Z5,ii,ib,MO,O9,oh,nP,KA,Vo,qB,ez,ti,LV,DS,JF,ht,CR,Qk,v1y,uR,Q0,YR,fB,nO,t3,dq,lO,aY,zG,e4,JB,Id,WH,TF,K5,Cg,Hs,dv,pV,uo,pK,eM,Ha,nU,R8,k6,oi,ce,DJ,PL,Fq,jG,fG,EQ,YB,a1,ou,S9,ey,xd,v6,db,i5,N6,Rr,YO,oz,b6,ef,zQ,Yp,lN,mW,ar,lD,ZQ,Sw,o0,qv,jp,vX,Ba,An,bF,LD,S6B,OG,uM,DN,ZM,HW,JC,f1,Uk,wI,Zi,Ud,K8,by,pD,Cf,Sh,tF,z0,E3,Rw,HB,CL,p4,a2,Tx,iP,MF,Rq,Hn,Zl,B5,a6,P7,DW,Ge,LK,AT,bJ,Np,mp,ub,ds,lj,UV,VS,t7,HG,aE,eV,kM,EH,cX,Yl,Z0,L9,a,Od,MN,WU,Rn,wv,uq,iD,hb,XX,Kd,yZ,Gs,pm,Tw,wm,FB,Lk,XZ,Mx,C9,kZ,JT,d9,rI,QZ,VG,wz,B1,M5,Jn,DM,RAp,Gb,Kx,iO,bU,Yg,e7,nNL,ecX,kI,yoo,w1p,tJ,Zc,i7,nF,FK,Si,vf,Iw,Fc,hD,I4,e0,RO,eu,ie,Ea,pu,i2,b0,Ov,qO,RX,bO,Gm,Of,Qg,W9,vZ,dW,Dk,O7,IU,E4,Gn,r7,Tz,Wk,DV,Hp,Nz,Jd,QS,ej,NL,vr,D4,X9,Ms,ac,RS,RY,Ys,WS4,Gj,U4,B8q,Nx,LZ,Dg,Ob,Ip,Pg,Nb,nA,Fv,tuj,E9,Vct,m8,Gk,D13,e5,Ni,AX,yb,WZq,QR,Yx,NM,pva,nx,jm,xj,VB,aI,rG,yh,wO,Tm,q1,CA,YL,KC,xL,As,GE,rl,uQ,D7,hT,GS,pR,Js,fM,hx,cda,u7,fW,Ey,qm,vO,E7,waa,SV,vH,St,V0,vj,V4,LU,T2,V10,Jq,RJ,TJ,dG,qV,HV,em,Lb,PF,T4,Qz,jA,PO,c5,F1,aQ,V11,Qa,V12,vI,V13,tz,V14,fl,V15,Zt,V16,wM,V17,mL,Kf,qu,bv,eS,IQ,TI,yU,Ub,dY,vY,zZ,dS,dZ,Qe,DP,WAE,N8,Vi,kx,fx,CM,xn,vu,c2,rj,Nu,Q4,aJ,u4,pF,Q2,r1,Rb,Y2,XN,lI,V18,uL,LP,Pi,z2,qI,J3,E5,o5,b5,zI,Zb,id,iV,DA,ndx,vly,d3,lS,xh,wn,Ay,Bj,HA,qC,zT,Lo,WR,qL,Px,C4,Md,km,Zj,XP,q6,CK,LJ,ZG,Oc,MX,w9,r3y,yL,zs,WC,Xi,TV,Mq,Oa,n1,xf,L6,Rs,uJ,hm,Ji,Bf,ir,jpR,GN,bS,HJ,S0,V3,Bl,Fn,e3,pM,jh,W6,Lf,fT,pp,nl,ik,mf,LfS,HK,o8,ex,e9,Xy,G0,mY,GX,mB,XF,bX,lP,Uf,Ra,wJY,zOQ,W6o,MdQ,YJG,DOe,lPa,Ufa,Raa,w0,w4,w5,w7,c4,z6,Ay0,Ed,G1,Os,B8,Wh,x5,ev,ID,qR,ek,Qv,Xm,mv,mG,uA,vl,Li,WK,iT,ja,zw,fa,WW,vQ,a9,VA,J1,fk,wL,B0,tc,hw,EZ,no,kB,ae,XC,w6,jK,uk,K9,zX,x9,Jy,xs,FX,Ae,Bt,vR,Pn,hc,hA,fr,cfS,JG,knI,T5,fI,V19,qq,FC,xI,Ds,nm,V20,Vu,V21,At,Sb,V2,D8,jY,H2,YJ,fTP,ppY,NP,jt,r0,jz,SA,hB,nv,ee,XI,hs,yp,ug,DT,OB,DO,p8,NW,HS,TG,ts,Kj,VU,Ya,XT,ic,wl,ve,TR,VD]}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/observatory_elements.dart b/runtime/bin/vmservice/client/lib/observatory_elements.dart
index ae03cd6..ac876de 100644
--- a/runtime/bin/vmservice/client/lib/observatory_elements.dart
+++ b/runtime/bin/vmservice/client/lib/observatory_elements.dart
@@ -7,6 +7,7 @@
export 'package:observatory/src/observatory_elements/code_ref.dart';
export 'package:observatory/src/observatory_elements/code_view.dart';
export 'package:observatory/src/observatory_elements/collapsible_content.dart';
+export 'package:observatory/src/observatory_elements/curly_block.dart';
export 'package:observatory/src/observatory_elements/error_view.dart';
export 'package:observatory/src/observatory_elements/field_ref.dart';
export 'package:observatory/src/observatory_elements/field_view.dart';
@@ -20,7 +21,7 @@
export 'package:observatory/src/observatory_elements/library_ref.dart';
export 'package:observatory/src/observatory_elements/library_view.dart';
export 'package:observatory/src/observatory_elements/message_viewer.dart';
-export 'package:observatory/src/observatory_elements/navigation_bar.dart';
+export 'package:observatory/src/observatory_elements/nav_bar.dart';
export
'package:observatory/src/observatory_elements/observatory_application.dart';
export 'package:observatory/src/observatory_elements/response_viewer.dart';
diff --git a/runtime/bin/vmservice/client/lib/observatory_elements.html b/runtime/bin/vmservice/client/lib/observatory_elements.html
index 6a927a9..6ad79ce1 100644
--- a/runtime/bin/vmservice/client/lib/observatory_elements.html
+++ b/runtime/bin/vmservice/client/lib/observatory_elements.html
@@ -6,6 +6,7 @@
<link rel="import" href="src/observatory_elements/class_view.html">
<link rel="import" href="src/observatory_elements/code_ref.html">
<link rel="import" href="src/observatory_elements/code_view.html">
+ <link rel="import" href="src/observatory_elements/curly_block.html">
<link rel="import" href="src/observatory_elements/collapsible_content.html">
<link rel="import" href="src/observatory_elements/disassembly_entry.html">
<link rel="import" href="src/observatory_elements/error_view.html">
@@ -21,7 +22,7 @@
<link rel="import" href="src/observatory_elements/library_ref.html">
<link rel="import" href="src/observatory_elements/library_view.html">
<link rel="import" href="src/observatory_elements/message_viewer.html">
- <link rel="import" href="src/observatory_elements/navigation_bar.html">
+ <link rel="import" href="src/observatory_elements/nav_bar.html">
<link rel="import"
href="src/observatory_elements/observatory_application.html">
<link rel="import"
@@ -33,4 +34,4 @@
<link rel="import" href="src/observatory_elements/stack_frame.html">
<link rel="import" href="src/observatory_elements/stack_trace.html">
</head>
-</html>
\ No newline at end of file
+</html>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/chart.dart b/runtime/bin/vmservice/client/lib/src/observatory/chart.dart
index dc3f192..37204e6 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/chart.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/chart.dart
@@ -93,12 +93,11 @@
/// with the current sort settings.
void refreshOptionsSortInfo() {
var props = _chart.callMethod('getSortInfo');
- print(options);
- if (props != null) {
+ if ((props != null) && (props['column'] != -1)) {
+ // Preserve current sort settings.
options['sortColumn'] = props['column'];
options['sortAscending'] = props['ascending'];
}
- print(options);
}
/// Draw this chart using [table] and the current [options].
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
index 08c4da9..0135c4b 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
@@ -15,6 +15,7 @@
@observable final List<Code> codes = new List<Code>();
@observable String id;
@observable String name;
+ @observable String vmName;
@observable Map entry;
@observable String rootLib;
@observable final Map<String, double> timers =
@@ -25,20 +26,20 @@
@observable Map topFrame = null;
@observable String fileAndLine = null;
-
- Isolate.fromId(this.id) : name = '' {}
-
+
+ Isolate.fromId(this.id) : name = 'isolate' {}
+
Isolate.fromMap(Map map)
: id = map['id'], name = map['name'] {
}
- void refresh() {
- var request = '/$id/';
- _application.requestManager.requestMap(request).then((map) {
- update(map);
- }).catchError((e, trace) {
- Logger.root.severe('Error while updating isolate summary: $e\n$trace');
- });
+ Future refresh() {
+ var request = '/$id/';
+ return _application.requestManager.requestMap(request).then((map) {
+ update(map);
+ }).catchError((e, trace) {
+ Logger.root.severe('Error while updating isolate summary: $e\n$trace');
+ });
}
void update(Map map) {
@@ -46,17 +47,20 @@
Logger.root.severe('Unexpected message type in Isolate.update: ${map["type"]}');
return;
}
- if (map['name'] == null ||
- map['rootLib'] == null ||
+ if (map['rootLib'] == null ||
map['timers'] == null ||
map['heap'] == null) {
Logger.root.severe("Malformed 'Isolate' response: $map");
return;
}
- name = map['name'];
rootLib = map['rootLib']['id'];
+ vmName = map['name'];
if (map['entry'] != null) {
entry = map['entry'];
+ name = entry['name'];
+ } else {
+ // fred
+ name = 'root isolate';
}
if (map['topFrame'] != null) {
topFrame = map['topFrame'];
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/isolate_manager.dart b/runtime/bin/vmservice/client/lib/src/observatory/isolate_manager.dart
index c9ae71d..02202b1 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/isolate_manager.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/isolate_manager.dart
@@ -29,7 +29,10 @@
if (isolate == null) {
isolate = new Isolate.fromId(id);
isolates[id] = isolate;
- return isolate;
+ }
+ if (isolate.vmName == null) {
+ // First time we are using this isolate.
+ isolate.refresh();
}
return isolate;
}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart b/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart
index 1283ef5..2b7c409 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart
@@ -65,7 +65,7 @@
return prefix.substring(2);
}
- Isolate currentIsolate() {
+ @observable Isolate currentIsolate() {
var id = currentIsolateId();
if (id == '') {
return null;
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/model.dart b/runtime/bin/vmservice/client/lib/src/observatory/model.dart
index 4a6f3e4..4d0545ae 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/model.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/model.dart
@@ -88,12 +88,7 @@
startAddress = int.parse(map['start'], radix: 16),
endAddress = int.parse(map['end'], radix: 16) {
functionRef = toObservable(map['function']);
- codeRef = toObservable({
- 'type': '@Code',
- 'id': map['id'],
- 'name': map['name'],
- 'user_name': map['user_name']
- });
+ codeRef = toObservable(map);
name = map['name'];
userName = map['user_name'];
if (map['disassembly'] != null) {
@@ -107,41 +102,20 @@
var endAddress;
var name;
var userName;
- var codeRef;
- var functionRef;
- // Initial extraction of startAddress, endAddress, and name depends on what
- // kind of code this is and whether or not the code has been collected.
- if (kind == CodeKind.Dart) {
- var code = map['code'];
- if (code != null) {
- // Extract from Dart code.
- startAddress = int.parse(code['start'], radix:16);
- endAddress = int.parse(code['end'], radix:16);
- name = code['name'];
- userName = code['user_name'];
- codeRef = toObservable({
- 'type': '@Code',
- 'id': code['id'],
- 'name': name,
- 'user_name': userName
- });
- functionRef = toObservable(code['function']);
- }
- }
- if (startAddress == null) {
- // Extract from Profile code.
- // This is either a native or collected piece of code.
- startAddress = int.parse(map['start'], radix:16);
- endAddress = int.parse(map['end'], radix: 16);
- name = map['name'];
- userName = name;
- }
+ var codeRef = map['code'];
+ assert(codeRef != null);
+ startAddress = int.parse(codeRef['start'], radix:16);
+ endAddress = int.parse(codeRef['end'], radix:16);
+ name = codeRef['name'];
+ userName = codeRef['user_name'];
var code = new Code(kind, name, startAddress, endAddress);
code.codeRef = codeRef;
- code.functionRef = functionRef;
+ code.functionRef = toObservable(codeRef['function']);;
code.userName = userName;
- if (map['disassembly'] != null) {
- code._loadInstructions(map['disassembly']);
+ if (codeRef['disassembly'] != null) {
+ code._loadInstructions(codeRef['disassembly']);
+ // Throw the JSON version away after loading the disassembly.
+ codeRef['disassembly'] = null;
}
return code;
}
@@ -284,13 +258,7 @@
}
int _extractCodeStartAddress(Map code) {
- var kind = CodeKind.fromString(code['kind']);
- if ((kind == CodeKind.Dart) && (code['code'] != null)) {
- // Start address is inside the dart code map.
- return int.parse(code['code']['start'], radix:16);
- }
- // Start address is inside the profile code map.
- return int.parse(code['start'], radix:16);
+ return int.parse(code['code']['start'], radix:16);
}
void _processCode(Map profileCode) {
@@ -334,6 +302,7 @@
class Script extends Observable {
@observable String kind = null;
@observable Map scriptRef = toObservable({});
+ @published String shortName;
@observable Map libraryRef = toObservable({});
@observable final List<ScriptLine> lines =
toObservable(new List<ScriptLine>());
@@ -345,6 +314,7 @@
'name': map['name'],
'user_name': map['user_name']
});
+ shortName = map['name'].substring(map['name'].lastIndexOf('/') + 1);
libraryRef = toObservable(map['library']);
kind = map['kind'];
_processSource(map['source']);
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/request_manager.dart b/runtime/bin/vmservice/client/lib/src/observatory/request_manager.dart
index c90fe9b..6aabbfd 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/request_manager.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/request_manager.dart
@@ -232,14 +232,14 @@
/// future which contains the reply from the VM service.
Future<String> request(String requestString);
- Future<Map> requestMap(String requestString) {
+ Future<ObservableMap> requestMap(String requestString) {
if (requestString.startsWith('#')) {
requestString = requestString.substring(1);
}
return request(requestString).then((response) {
try {
var m = JSON.decode(response);
- return m;
+ return toObservable(m);
} catch (e) { }
return null;
});
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/view_model.dart b/runtime/bin/vmservice/client/lib/src/observatory/view_model.dart
index 1fa12e6..302f824 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/view_model.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/view_model.dart
@@ -60,15 +60,12 @@
void toggle(int rowIndex) {
assert(rowIndex >= 0);
assert(rowIndex < rows.length);
- print(rowIndex);
- print(rows.length);
var row = rows[rowIndex];
if (row.toggle()) {
_expand(row);
} else {
_collapse(row);
}
- print('e');
}
int _index(TableTreeRow row) => rows.indexOf(row);
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.dart
index deab7a2..5b8b1a1 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.dart
@@ -5,6 +5,7 @@
library breakpoint_list_element;
import 'observatory_element.dart';
+import 'package:logging/logging.dart';
import 'package:polymer/polymer.dart';
@CustomTag('breakpoint-list')
@@ -12,4 +13,13 @@
@published Map msg = toObservable({});
BreakpointListElement.created() : super.created();
-}
\ No newline at end of file
+
+ void refresh(var done) {
+ var url = app.locationManager.currentIsolateRelativeLink("breakpoints");
+ app.requestManager.requestMap(url).then((map) {
+ msg = map;
+ }).catchError((e, trace) {
+ Logger.root.severe('Error while refreshing breakpoint-list: $e\n$trace');
+ }).whenComplete(done);
+ }
+}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.html
index 8496dd2..99136af 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/breakpoint_list.html
@@ -1,8 +1,17 @@
<head>
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="breakpoint-list" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="breakpoints" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<template if="{{ msg['breakpoints'].isEmpty }}">
<div class="panel panel-warning">
<div class="panel-body">No breakpoints</div>
@@ -19,4 +28,4 @@
</template>
</template>
<script type="application/dart" src="breakpoint_list.dart"></script>
-</polymer-element>
\ No newline at end of file
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.dart
index 8eeaf52..d8bea9b 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.dart
@@ -4,6 +4,7 @@
library class_view_element;
+import 'package:logging/logging.dart';
import 'package:polymer/polymer.dart';
import 'observatory_element.dart';
@@ -11,4 +12,13 @@
class ClassViewElement extends ObservatoryElement {
@published Map cls;
ClassViewElement.created() : super.created();
+
+ void refresh(var done) {
+ var url = app.locationManager.currentIsolateRelativeLink(cls['id']);
+ app.requestManager.requestMap(url).then((map) {
+ cls = map;
+ }).catchError((e, trace) {
+ Logger.root.severe('Error while refreshing class-view: $e\n$trace');
+ }).whenComplete(done);
+ }
}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.html
index 7e2de30..65afc6c 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/class_view.html
@@ -1,13 +1,23 @@
<head>
- <link rel="import" href="observatory_element.html">
<link rel="import" href="error_view.html">
<link rel="import" href="field_ref.html">
<link rel="import" href="function_ref.html">
<link rel="import" href="instance_ref.html">
<link rel="import" href="library_ref.html">
+ <link rel="import" href="nav_bar.html">
+ <link rel="import" href="observatory_element.html">
</head>
<polymer-element name="class-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ cls['library'] }}"></library-nav-menu>
+ <class-nav-menu app="{{ app }}" cls="{{ cls }}" last="{{ true }}"></class-nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/code_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/code_view.html
index 7455fa7..d4ed7d9 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/code_view.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/code_view.html
@@ -1,10 +1,19 @@
<head>
<link rel="import" href="disassembly_entry.html">
<link rel="import" href="function_ref.html">
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="code-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="{{ code.functionRef['user_name'] }}" last="{{ true }}"></nav-menu>
+ <!-- TODO(turnidge): Implement code refresh -->
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="{{ cssPanelClass }}">
@@ -27,4 +36,4 @@
</div>
</template>
<script type="application/dart" src="code_view.dart"></script>
-</polymer-element>
\ No newline at end of file
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/curly_block.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/curly_block.dart
new file mode 100644
index 0000000..8317efc
--- /dev/null
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/curly_block.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library curly_block_element;
+
+import 'package:logging/logging.dart';
+import 'package:polymer/polymer.dart';
+
+@CustomTag('curly-block')
+class CurlyBlockElement extends PolymerElement {
+ CurlyBlockElement.created() : super.created();
+
+ @observable bool expanded = false;
+ @observable bool busy = false;
+ @published var callback = null;
+
+ void doneCallback() {
+ print("done callback");
+ expanded = !expanded;
+ busy = false;
+ }
+
+ void toggleExpand(var a, var b, var c) {
+ if (busy) {
+ return;
+ }
+ if (callback != null) {
+ busy = true;
+ callback(!expanded, doneCallback);
+ } else {
+ expanded = !expanded;
+ }
+ }
+}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/curly_block.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/curly_block.html
new file mode 100644
index 0000000..d105267
--- /dev/null
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/curly_block.html
@@ -0,0 +1,40 @@
+<polymer-element name="curly-block">
+ <template>
+ <style>
+ .idle {
+ display: inline-block;
+ color: #0489c3;
+ cursor: pointer;
+ }
+ .busy {
+ display: inline-block;
+ color: white;
+ cursor: wait;
+ }
+ </style>
+ <template if="{{ expanded }}">
+ <template if="{{ busy }}">
+ {<div class="busy"> ⊟ </div>
+ <br>
+ <content></content>
+ }
+ </template>
+ <template if="{{ !busy }}">
+ {<a on-click="{{ toggleExpand }}"><div class="idle"> ⊟ </div></a>
+ <br>
+ <content></content>
+ }
+ </template>
+ </template>
+
+ <template if="{{ !expanded }}">
+ <template if="{{ busy }}">
+ {<div class="busy"> ⊞ </div>}
+ </template>
+ <template if="{{ !busy }}">
+ {<a on-click="{{ toggleExpand }}"><div class="idle"> ⊞ </div></a>}
+ </template>
+ </template>
+ </template>
+ <script type="application/dart" src="curly_block.dart"></script>
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.dart
index 0e53468..ea6e704 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.dart
@@ -4,6 +4,7 @@
library field_view_element;
+import 'package:logging/logging.dart';
import 'package:polymer/polymer.dart';
import 'observatory_element.dart';
@@ -11,4 +12,13 @@
class FieldViewElement extends ObservatoryElement {
@published Map field;
FieldViewElement.created() : super.created();
+
+ void refresh(var done) {
+ var url = app.locationManager.currentIsolateRelativeLink(field['id']);
+ app.requestManager.requestMap(url).then((map) {
+ field = map;
+ }).catchError((e, trace) {
+ Logger.root.severe('Error while refreshing field-view: $e\n$trace');
+ }).whenComplete(done);
+ }
}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html
index 3d29e32..1925dcb 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html
@@ -1,9 +1,25 @@
<head>
<link rel="import" href="class_ref.html">
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="field-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <template if="{{ field['owner']['type'] == '@Class' }}">
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ field['owner'] }}"></class-nav-menu>
+ </template>
+ <template if="{{ field['owner']['type'] == '@Library' }}">
+ <library-nav-menu app="{{ app }}" library="{{ field['owner'] }}"></library-nav-menu>
+ </template>
+ <nav-menu link="." anchor="{{ field['user_name'] }}" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -40,4 +56,4 @@
</div>
</template>
<script type="application/dart" src="field_view.dart"></script>
-</polymer-element>
\ No newline at end of file
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.dart
index 8357595..dbcb66f 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.dart
@@ -4,6 +4,7 @@
library function_view_element;
+import 'package:logging/logging.dart';
import 'package:polymer/polymer.dart';
import 'observatory_element.dart';
@@ -11,4 +12,13 @@
class FunctionViewElement extends ObservatoryElement {
@published Map function;
FunctionViewElement.created() : super.created();
+
+ void refresh(var done) {
+ var url = app.locationManager.currentIsolateRelativeLink(function['id']);
+ app.requestManager.requestMap(url).then((map) {
+ function = map;
+ }).catchError((e, trace) {
+ Logger.root.severe('Error while refreshing field-view: $e\n$trace');
+ }).whenComplete(done);
+ }
}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.html
index f03e621..a89ce85 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/function_view.html
@@ -1,10 +1,26 @@
<head>
<link rel="import" href="class_ref.html">
<link rel="import" href="code_ref.html">
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="function-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <template if="{{ function['owner']['type'] == '@Class' }}">
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ function['owner'] }}"></class-nav-menu>
+ </template>
+ <template if="{{ function['owner']['type'] == '@Library' }}">
+ <library-nav-menu app="{{ app }}" library="{{ function['owner'] }}"></library-nav-menu>
+ </template>
+ <nav-menu link="." anchor="{{ function['user_name'] }}" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
@@ -51,4 +67,4 @@
</div>
</template>
<script type="application/dart" src="function_view.dart"></script>
-</polymer-element>
\ No newline at end of file
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.dart
index ca1b5bf..e281a07 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.dart
@@ -19,50 +19,72 @@
static const LIVE_AFTER_GC_SIZE = 3;
static const ALLOCATED_SINCE_GC = 4;
static const ALLOCATED_SINCE_GC_SIZE = 5;
+ static const ACCUMULATED = 6;
+ static const ACCUMULATED_SIZE = 7;
+ // Pie chart of new space usage.
var _newPieDataTable;
var _newPieChart;
+ // Pie chart of old space usage.
var _oldPieDataTable;
var _oldPieChart;
- var _tableDataTable;
- var _tableChart;
+ // The combined chart has old and new space merged.
+ var _combinedDataTable;
+ var _combinedChart;
+
+ // The full chart has separate columns for new and old space.
+ var _fullDataTable;
+ var _fullChart;
@published Map profile;
HeapProfileElement.created() : super.created() {
- _tableDataTable = new DataTable();
- _tableDataTable.addColumn('string', 'Class');
- _tableDataTable.addColumn('number', 'Current (new)');
- _tableDataTable.addColumn('number', 'Allocated Since GC (new)');
- _tableDataTable.addColumn('number', 'Total before GC (new)');
- _tableDataTable.addColumn('number', 'Survivors (new)');
- _tableDataTable.addColumn('number', 'Current (old)');
- _tableDataTable.addColumn('number', 'Allocated Since GC (old)');
- _tableDataTable.addColumn('number', 'Total before GC (old)');
- _tableDataTable.addColumn('number', 'Survivors (old)');
+ _fullDataTable = new DataTable();
+ _fullDataTable.addColumn('string', 'Class');
+ _fullDataTable.addColumn('number', 'Current (new)');
+ _fullDataTable.addColumn('number', 'Allocated Since GC (new)');
+ _fullDataTable.addColumn('number', 'Total before GC (new)');
+ _fullDataTable.addColumn('number', 'Survivors (new)');
+ _fullDataTable.addColumn('number', 'Current (old)');
+ _fullDataTable.addColumn('number', 'Allocated Since GC (old)');
+ _fullDataTable.addColumn('number', 'Total before GC (old)');
+ _fullDataTable.addColumn('number', 'Survivors (old)');
_newPieDataTable = new DataTable();
_newPieDataTable.addColumn('string', 'Type');
_newPieDataTable.addColumn('number', 'Size');
_oldPieDataTable = new DataTable();
_oldPieDataTable.addColumn('string', 'Type');
_oldPieDataTable.addColumn('number', 'Size');
+ _combinedDataTable = new DataTable();
+ _combinedDataTable.addColumn('string', 'Class');
+ _combinedDataTable.addColumn('number', 'Accumulator');
+ _combinedDataTable.addColumn('number', 'Accumulator Instances');
+ _combinedDataTable.addColumn('number', 'Current');
+ _combinedDataTable.addColumn('number', 'Allocated Since GC');
+ _combinedDataTable.addColumn('number', 'Total before GC');
+ _combinedDataTable.addColumn('number', 'Survivors after GC');
}
void enteredView() {
super.enteredView();
- _tableChart = new Chart('Table',
+ _fullChart = new Chart('Table',
shadowRoot.querySelector('#table'));
- _tableChart.options['allowHtml'] = true;
- _tableChart.options['sortColumn'] = 1;
- _tableChart.options['sortAscending'] = false;
+ _fullChart.options['allowHtml'] = true;
+ _fullChart.options['sortColumn'] = 1;
+ _fullChart.options['sortAscending'] = false;
_newPieChart = new Chart('PieChart',
shadowRoot.querySelector('#newPieChart'));
_newPieChart.options['title'] = 'New Space';
_oldPieChart = new Chart('PieChart',
shadowRoot.querySelector('#oldPieChart'));
_oldPieChart.options['title'] = 'Old Space';
+ _combinedChart = new Chart('Table',
+ shadowRoot.querySelector('#simpleTable'));
+ _combinedChart.options['allowHtml'] = true;
+ _combinedChart.options['sortColumn'] = 1;
+ _combinedChart.options['sortAscending'] = false;
_draw();
}
@@ -73,21 +95,38 @@
(profile['members'].length == 0)) {
return;
}
- assert(_tableDataTable != null);
- _tableDataTable.clearRows();
+ assert(_fullDataTable != null);
+ assert(_combinedDataTable != null);
+ _fullDataTable.clearRows();
+ _combinedDataTable.clearRows();
for (Map cls in profile['members']) {
+ if (_classHasNoAllocations(cls)) {
+ // If a class has no allocations, don't display it.
+ continue;
+ }
+ var vm_name = cls['class']['name'];
var url =
app.locationManager.currentIsolateRelativeLink(cls['class']['id']);
- _tableDataTable.addRow(
- ['<a href="$url">${_columnValue(cls, 0)}</a>',
- _columnValue(cls, 1),
- _columnValue(cls, 2),
- _columnValue(cls, 3),
- _columnValue(cls, 4),
- _columnValue(cls, 5),
- _columnValue(cls, 6),
- _columnValue(cls, 7),
- _columnValue(cls, 8)]);
+ _fullDataTable.addRow([
+ '<a title="$vm_name" href="$url">'
+ '${_fullTableColumnValue(cls, 0)}</a>',
+ _fullTableColumnValue(cls, 1),
+ _fullTableColumnValue(cls, 2),
+ _fullTableColumnValue(cls, 3),
+ _fullTableColumnValue(cls, 4),
+ _fullTableColumnValue(cls, 5),
+ _fullTableColumnValue(cls, 6),
+ _fullTableColumnValue(cls, 7),
+ _fullTableColumnValue(cls, 8)]);
+ _combinedDataTable.addRow([
+ '<a title="$vm_name" href="$url">'
+ '${_combinedTableColumnValue(cls, 0)}</a>',
+ _combinedTableColumnValue(cls, 1),
+ _combinedTableColumnValue(cls, 2),
+ _combinedTableColumnValue(cls, 3),
+ _combinedTableColumnValue(cls, 4),
+ _combinedTableColumnValue(cls, 5),
+ _combinedTableColumnValue(cls, 6)]);
}
_newPieDataTable.clearRows();
var heap = profile['heaps']['new'];
@@ -101,15 +140,34 @@
}
void _draw() {
- if (_tableChart == null) {
+ if ((_fullChart == null) || (_combinedChart == null)) {
return;
}
- _tableChart.draw(_tableDataTable);
+ _combinedChart.refreshOptionsSortInfo();
+ _combinedChart.draw(_combinedDataTable);
+ _fullChart.refreshOptionsSortInfo();
+ _fullChart.draw(_fullDataTable);
_newPieChart.draw(_newPieDataTable);
_oldPieChart.draw(_oldPieDataTable);
}
- dynamic _columnValue(Map v, int index) {
+ bool _classHasNoAllocations(Map v) {
+ var newSpace = v['new'];
+ var oldSpace = v['old'];
+ for (var allocation in newSpace) {
+ if (allocation != 0) {
+ return false;
+ }
+ }
+ for (var allocation in oldSpace) {
+ if (allocation != 0) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ dynamic _fullTableColumnValue(Map v, int index) {
assert(index >= 0);
assert(index < 9);
switch (index) {
@@ -132,10 +190,39 @@
case 8:
return v['old'][LIVE_AFTER_GC_SIZE];
}
- return null;
+ throw new FallThroughError();
}
- void refreshData(Event e, var detail, Node target) {
+ dynamic _combinedTableColumnValue(Map v, int index) {
+ assert(index >= 0);
+ assert(index < 7);
+ switch (index) {
+ case 0:
+ return v['class']['user_name'];
+ case 1:
+ return v['new'][ACCUMULATED_SIZE] +
+ v['old'][ACCUMULATED_SIZE];
+ case 2:
+ return v['new'][ACCUMULATED] +
+ v['old'][ACCUMULATED];
+ case 3:
+ return v['new'][LIVE_AFTER_GC_SIZE] +
+ v['new'][ALLOCATED_SINCE_GC_SIZE] +
+ v['old'][LIVE_AFTER_GC_SIZE] +
+ v['old'][ALLOCATED_SINCE_GC_SIZE];
+ case 4:
+ return v['new'][ALLOCATED_SINCE_GC_SIZE] +
+ v['old'][ALLOCATED_SINCE_GC_SIZE];
+ case 5:
+ return v['new'][ALLOCATED_BEFORE_GC_SIZE] +
+ v['old'][ALLOCATED_BEFORE_GC_SIZE];
+ case 6:
+ return v['new'][LIVE_AFTER_GC_SIZE] + v['old'][LIVE_AFTER_GC_SIZE];
+ }
+ throw new FallThroughError();
+ }
+
+ void refresh(var done) {
var isolateId = app.locationManager.currentIsolateId();
var isolate = app.isolateManager.getIsolate(isolateId);
if (isolate == null) {
@@ -148,6 +235,22 @@
profile = response;
}).catchError((e, st) {
Logger.root.info('$e $st');
+ }).whenComplete(done);
+ }
+
+ void resetAccumulator(Event e, var detail, Node target) {
+ var isolateId = app.locationManager.currentIsolateId();
+ var isolate = app.isolateManager.getIsolate(isolateId);
+ if (isolate == null) {
+ Logger.root.info('No isolate found.');
+ return;
+ }
+ var request = '/$isolateId/allocationprofile/reset';
+ app.requestManager.requestMap(request).then((Map response) {
+ assert(response['type'] == 'AllocationProfile');
+ profile = response;
+ }).catchError((e, st) {
+ Logger.root.info('$e $st');
});
}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.html
index 50c1af9..196427f 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/heap_profile.html
@@ -1,12 +1,19 @@
<head>
<link rel="import" href="class_ref.html">
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="heap-profile" extends="observatory-element">
<template>
- <div>
- <button type="button" on-click="{{refreshData}}">Refresh</button>
- </div>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="heap profile" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
+ <button type="button" on-click="{{resetAccumulator}}">Reset Accumulator</button>
<div class="row">
<div id="newPieChart" class="col-md-4" style="height: 400px">
</div>
@@ -35,21 +42,30 @@
<tbody>
<tr>
<td>Collections</td>
- <td>{{ formattedCollections(true) }}</td>
+ <td>{{ formattedCollections(false) }}</td>
</tr>
<tr>
<td>Average Collection Time</td>
- <td>{{ formattedAverage(true) }}</td>
+ <td>{{ formattedAverage(false) }}</td>
</tr>
<tr>
<td>Cumulative Collection Time</td>
- <td>{{ formattedTotalCollectionTime(true) }}</td>
+ <td>{{ formattedTotalCollectionTime(false) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
+ <p class="col-md-2">Aggregate heap table</p>
+ </div>
+ <div class="row">
+ <div id="simpleTable" class="col-md-12" style="height: 800px"></div>
+ </div>
+ <div class="row">
+ <p class="col-md-2">Individual heap table</p>
+ </div>
+ <div class="row">
<div id="table" class="col-md-12" style="height: 800px"></div>
</div>
</template>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.dart
index ec99c73..e305c18 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.dart
@@ -12,8 +12,6 @@
class InstanceRefElement extends ServiceRefElement {
InstanceRefElement.created() : super.created();
- @published bool expanded = false;
-
String get name {
if (ref == null) {
return super.name;
@@ -21,20 +19,27 @@
return ref['preview'];
}
- void toggleExpand(var a, var b, var c) {
- if (expanded) {
- ref['fields'] = null;
- ref['elements'] = null;
- expanded = false;
- } else {
+ // TODO(turnidge): This is here to workaround vm/dart2js differences.
+ dynamic expander() {
+ return expandEvent;
+ }
+
+ void expandEvent(bool expand, var done) {
+ print("Calling expandEvent");
+ if (expand) {
app.requestManager.requestMap(url).then((map) {
+ print("Result is : $map");
ref['fields'] = map['fields'];
ref['elements'] = map['elements'];
ref['length'] = map['length'];
- expanded = true;
+ print("ref is $ref");
}).catchError((e, trace) {
Logger.root.severe('Error while expanding instance-ref: $e\n$trace');
- });
+ }).whenComplete(done);
+ } else {
+ ref['fields'] = null;
+ ref['elements'] = null;
+ done();
}
}
}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.html
index ce1ce3d..05beb9e 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.html
@@ -1,18 +1,14 @@
<head>
+ <link rel="import" href="curly_block.html">
<link rel="import" href="observatory_element.html">
<link rel="import" href="service_ref.html">
</head>
<polymer-element name="instance-ref" extends="service-ref">
<template>
<style>
- .memberList {
- margin-left: 3em;
- border-spacing: 0;
- border-collapse: collapse;
- }
.member {
- vertical-align: top;
- padding: 0 1em;
+ vertical-align: top;
+ padding: 0 0 0 1em;
}
</style>
<div>
@@ -37,27 +33,23 @@
</template>
<template if="{{ isInstanceRef(ref['type']) }}">
- <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> {
- <a on-click="{{ toggleExpand }}">...</a>
- <template if="{{ expanded }}">
- <table class="memberList">
+ <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a>
+ <curly-block callback="{{ expander() }}">
+ <table>
<tr template repeat="{{ field in ref['fields'] }}">
-
<td class="member">{{ field['decl']['user_name'] }}</td>
<td class="member">
<instance-ref app="{{ app }}" ref="{{ field['value'] }}"></instance-ref>
</td>
</tr>
</table>
- </template>
- }
+ </curly-block>
</template>
<template if="{{ isListRef(ref['type']) }}">
- <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['length']}})</a> {
- <a on-click="{{ toggleExpand }}">...</a>
- <template if="{{ expanded }}">
- <table class="memberList">
+ <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['length']}})</a>
+ <curly-block callback="{{ expander() }}">
+ <table>
<tr template repeat="{{ element in ref['elements'] }}">
<td class="member">[{{ element['index']}}]</td>
<td class="member">
@@ -65,8 +57,7 @@
</td>
</tr>
</table>
- </template>
- }
+ </curly-block>
</template>
</div>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.dart
index fcbeaa8..444b8ce 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.dart
@@ -11,4 +11,4 @@
class InstanceViewElement extends ObservatoryElement {
@published Map instance;
InstanceViewElement.created() : super.created();
-}
\ No newline at end of file
+}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.html
index 2b98ed2..7230481 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/instance_view.html
@@ -1,12 +1,23 @@
<head>
<link rel="import" href="class_ref.html">
- <link rel="import" href="observatory_element.html">
<link rel="import" href="error_view.html">
<link rel="import" href="field_ref.html">
<link rel="import" href="instance_ref.html">
+ <link rel="import" href="nav_bar.html">
+ <link rel="import" href="observatory_element.html">
</head>
<polymer-element name="instance-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <!-- TODO(turnidge): Add library nav menu here. -->
+ <class-nav-menu app="{{ app }}" cls="{{ instance['class'] }}"></class-nav-menu>
+ <nav-menu link="." anchor="instance" last="{{ true }}"></nav-menu>
+ <!-- TODO(turnidge): Add nav refresh here. -->
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-warning">
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.dart
index c03eca8..76a1717 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.dart
@@ -4,6 +4,7 @@
library isolate_list_element;
+import 'dart:async';
import 'dart:html';
import 'package:polymer/polymer.dart';
import 'observatory_element.dart';
@@ -13,9 +14,11 @@
class IsolateListElement extends ObservatoryElement {
IsolateListElement.created() : super.created();
- void refresh(Event e, var detail, Node target) {
+ void refresh(var done) {
+ var futures = [];
app.isolateManager.isolates.forEach((id, isolate) {
- isolate.refresh();
+ futures.add(isolate.refresh());
});
+ Future.wait(futures).then((_) => done());
}
}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.html
index 9cbc5dc..4ba897b 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_list.html
@@ -1,9 +1,14 @@
<head>
<link rel="import" href="isolate_summary.html">
+ <link rel="import" href="nav_bar.html">
</head>
<polymer-element name="isolate-list" extends="observatory-element">
<template>
- <button type="button" on-click="{{refresh}}">Refresh</button>
+ <nav-bar>
+ <top-nav-menu last="{{ true }}"></top-nav-menu>
+ <!-- TODO(turnidge): Why doesn't "this.refresh" work? -->
+ <nav-refresh callback="{{ refresh } }}"></nav-refresh>
+ </nav-bar>
<ul class="list-group">
<template repeat="{{ isolate in app.isolateManager.isolates.values }}">
<li class="list-group-item">
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.dart
index c5287a2..eff6f8d 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.dart
@@ -90,7 +90,7 @@
_refresh(isolate);
}
- void refreshData(Event e, var detail, Node target) {
+ void refresh(var done) {
var isolateId = app.locationManager.currentIsolateId();
var isolate = app.isolateManager.getIsolate(isolateId);
if (isolate == null) {
@@ -107,7 +107,7 @@
_endRequest();
}).catchError((e) {
_endRequest();
- });
+ }).whenComplete(done);
}
void _loadProfileData(Isolate isolate, int totalSamples, Map response) {
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.html
index d9009e9..0fbce1c 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_profile.html
@@ -1,11 +1,19 @@
<head>
<link rel="import" href="code_ref.html">
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="isolate-profile" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="cpu profile" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div>
- <button type="button" on-click="{{refreshData}}">Refresh profile data</button>
<span>Top</span>
<select selectedIndex="{{methodCountSelected}}" value="{{methodCounts[methodCountSelected]}}">
<option template repeat="{{count in methodCounts}}">{{count}}</option>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_summary.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_summary.html
index 957aa9c..be9da98 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_summary.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/isolate_summary.html
@@ -10,7 +10,7 @@
<img src="img/isolate_icon.png" class="img-polaroid">
</div>
- <div class="col-md-1">{{ isolate.name }}</div>
+ <div class="col-md-1">{{ isolate.vmName }}</div>
<!-- TODO(turnidge): Use function-ref when it can take isolate param -->
<div class="col-md-4">
@@ -18,12 +18,11 @@
<div class="row">
<template if="{{ isolate.entry['id'] != null }}">
<a href="{{ app.locationManager.relativeLink(isolate.id, isolate.entry['id']) }}">
- {{ isolate.entry['name'] }}
+ {{ isolate.name }}
</a>
</template>
<template if="{{ isolate.entry['id'] == null }}">
- <!-- fred -->
- root isolate
+ {{ isolate.name }}
</template>
</div>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.dart
index befd59e..05096de 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.dart
@@ -4,6 +4,7 @@
library library_view_element;
+import 'package:logging/logging.dart';
import 'package:polymer/polymer.dart';
import 'observatory_element.dart';
@@ -12,4 +13,13 @@
@published Map library = toObservable({});
LibraryViewElement.created() : super.created();
+
+ void refresh(var done) {
+ var url = app.locationManager.currentIsolateRelativeLink(library['id']);
+ app.requestManager.requestMap(url).then((map) {
+ library = map;
+ }).catchError((e, trace) {
+ Logger.root.severe('Error while refreshing library-view: $e\n$trace');
+ }).whenComplete(done);
+ }
}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.html
index b26816d..2b8f35c 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/library_view.html
@@ -4,12 +4,20 @@
<link rel="import" href="function_ref.html">
<link rel="import" href="instance_ref.html">
<link rel="import" href="library_ref.html">
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
<link rel="import" href="script_ref.html">
</head>
<polymer-element name="library-view" extends="observatory-element">
<template>
- <div class="alert alert-success">Library {{ library['name'] }}</div>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ library }}" last="{{ true }}"></library-nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<div class="alert alert-info">Scripts</div>
<table class="table table-hover">
<tbody>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/nav_bar.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/nav_bar.dart
new file mode 100644
index 0000000..625adae
--- /dev/null
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/nav_bar.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library nav_bar_element;
+
+import 'dart:html';
+import 'package:polymer/polymer.dart';
+import 'observatory_element.dart';
+
+@CustomTag('nav-bar')
+class NavBarElement extends ObservatoryElement {
+ NavBarElement.created() : super.created();
+}
+
+@CustomTag('nav-menu')
+class NavMenuElement extends ObservatoryElement {
+ @published String link = '#';
+ @published String anchor = '---';
+ @published bool last = false;
+
+ NavMenuElement.created() : super.created();
+}
+
+@CustomTag('nav-menu-item')
+class NavMenuItemElement extends ObservatoryElement {
+ @published String link = '#';
+ @published String anchor = '---';
+
+ NavMenuItemElement.created() : super.created();
+}
+
+@CustomTag('nav-refresh')
+class NavRefreshElement extends ObservatoryElement {
+ @published var callback;
+ @published bool active = false;
+
+ NavRefreshElement.created() : super.created();
+
+ void buttonClick(Event e, var detail, Node target) {
+ if (active) {
+ return;
+ }
+ active = true;
+ if (callback != null) {
+ callback(refreshDone);
+ }
+ }
+
+ void refreshDone() {
+ active = false;
+ }
+}
+
+@CustomTag('top-nav-menu')
+class TopNavMenuElement extends ObservatoryElement {
+ @published bool last = false;
+
+ TopNavMenuElement.created() : super.created();
+}
+
+@CustomTag('isolate-nav-menu')
+class IsolateNavMenuElement extends ObservatoryElement {
+ @published Isolate isolate;
+ @published bool last = false;
+
+ IsolateNavMenuElement.created() : super.created();
+}
+
+@CustomTag('library-nav-menu')
+class LibraryNavMenuElement extends ObservatoryElement {
+ @published Map library;
+ @published bool last = false;
+
+ LibraryNavMenuElement.created() : super.created();
+}
+
+@CustomTag('class-nav-menu')
+class ClassNavMenuElement extends ObservatoryElement {
+ @published Map cls;
+ @published bool last = false;
+
+ ClassNavMenuElement.created() : super.created();
+}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/nav_bar.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/nav_bar.html
new file mode 100644
index 0000000..0e7904a
--- /dev/null
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/nav_bar.html
@@ -0,0 +1,194 @@
+<head>
+ <link rel="import" href="observatory_element.html">
+</head>
+
+<polymer-element name="nav-bar" extends="observatory-element">
+ <template>
+ <style>
+ nav ul {
+ display: inline-table;
+ position: relative;
+ list-style: none;
+ padding-left: 0;
+ margin-left: 0;
+ width: 100%;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background-color: #0489c3;
+ }
+ nav ul:after {
+ content: ""; clear: both; display: block;
+ }
+ </style>
+ <nav>
+ <ul>
+ <content></content>
+ </ul>
+ </nav>
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-menu" extends="observatory-element">
+ <template>
+ <style>
+ .menu, .spacer {
+ float: left;
+ }
+ .menu a, .spacer {
+ display: block;
+ padding: 12px 8px;
+ color: White;
+ text-decoration: none;
+ }
+ .menu:hover {
+ background: #455;
+ }
+ .menu ul {
+ display: none;
+ position: absolute;
+ top: 100%;
+ list-style: none;
+ padding: 0;
+ margin-left: 0;
+ width: auto;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background: #567;
+ }
+ .menu ul:after {
+ content: ""; clear: both; display: block;
+ }
+ .menu:hover > ul {
+ display: block;
+ }
+ </style>
+
+ <li class="menu"><a href="{{ link }}">{{ anchor }}</a>
+ <ul><content></content></ul>
+ </li>
+ <template if="{{ !last }}">
+ <li class="spacer">></li>
+ </template>
+
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-menu-item" extends="observatory-element">
+ <template>
+ <style>
+ li {
+ float: none;
+ border-top: 1px solid #677;
+ border-bottom: 1px solid #556; position: relative;
+ }
+ li:hover {
+ background: #455;
+ }
+ li ul {
+ display: none;
+ position: absolute;
+ top:0;
+ left: 100%;
+ list-style: none;
+ padding: 0;
+ margin-left: 0;
+ width: auto;
+ z-index: 10;
+ font: 400 16px 'Montserrat', sans-serif;
+ color: white;
+ background: #567;
+ }
+ li ul:after {
+ content: ""; clear: both; display: block;
+ }
+ li:hover > ul {
+ display: block;
+ }
+ li a {
+ display: block;
+ padding: 12px 12px;
+ color: white;
+ text-decoration: none;
+ }
+ </style>
+ <li><a href="{{ link }}">{{ anchor }}</a>
+ <ul><content></content></ul>
+ </li>
+ </template>
+</polymer-element>
+
+<polymer-element name="nav-refresh" extends="observatory-element">
+ <template>
+ <style>
+ .active {
+ color: #aaa;
+ cursor: wait;
+ }
+ .idle {
+ color: #000;
+ }
+ li {
+ float: right;
+ margin: 0;
+ }
+ li button {
+ margin: 3px;
+ padding: 8px;
+ }
+ </style>
+ <li>
+ <template if="{{ active }}">
+ <button class="active" on-click="{{ buttonClick }}">Refresh</button>
+ </template>
+ <template if="{{ !active }}">
+ <button class="idle" on-click="{{ buttonClick }}">Refresh</button>
+ </template>
+ </li>
+ </template>
+</polymer-element>
+
+<polymer-element name="top-nav-menu">
+ <template>
+ <nav-menu link="#" anchor="Observatory" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="isolate-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="#" anchor="{{ isolate.name }}" last="{{ last }}">
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('stacktrace') }}"
+ anchor="stack trace"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('profile') }}"
+ anchor="cpu profile"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('allocationprofile') }}"
+ anchor="heap profile"></nav-menu-item>
+ <nav-menu-item link="{{ app.locationManager.currentIsolateRelativeLink('debug/breakpoints') }}"
+ anchor="breakpoints"></nav-menu-item>
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="library-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="{{ app.locationManager.currentIsolateRelativeLink(library['id']) }}"
+ anchor="{{ library['name'] }}" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<polymer-element name="class-nav-menu" extends="observatory-element">
+ <template>
+ <nav-menu link="{{ app.locationManager.currentIsolateRelativeLink(cls['id']) }}"
+ anchor="{{ cls['user_name'] }}" last="{{ last }}">
+ <content></content>
+ </nav-menu>
+ </template>
+</polymer-element>
+
+<script type="application/dart" src="nav_bar.dart"></script>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar.dart
deleted file mode 100644
index 167ba68..0000000
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library navigation_bar_element;
-
-import 'observatory_element.dart';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('navigation-bar')
-class NavigationBarElement extends ObservatoryElement {
- NavigationBarElement.created() : super.created();
-}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar.html
deleted file mode 100644
index 45c2c32..0000000
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<head>
- <link rel="import" href="navigation_bar_isolate.html">
- <link rel="import" href="observatory_element.html">
-</head>
-<polymer-element name="navigation-bar" extends="observatory-element">
- <template>
- <nav class="navbar navbar-default" role="navigation">
- <div class="navbar-header">
- <a class="navbar-brand" href="#/isolates">Observatory</a>
- </div>
- <template if="{{ app.locationManager.hasCurrentIsolate }}">
- <div class="collapse navbar-collapse navbar-ex1-collapse">
- <navigation-bar-isolate app="{{ app }}"></navigation-bar-isolate>
- </div>
- </template>
- </nav>
- </template>
- <script type="application/dart" src="navigation_bar.dart"></script>
-</polymer-element>
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar_isolate.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar_isolate.dart
deleted file mode 100644
index e42a66e..0000000
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar_isolate.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library navigation_bar_isolate_element;
-
-import 'observatory_element.dart';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('navigation-bar-isolate')
-class NavigationBarIsolateElement extends ObservatoryElement {
- NavigationBarIsolateElement.created() : super.created();
- @observable List<String> links = toObservable(
- [ 'Stacktrace', 'Library', 'CPU Profile']);
-
- void appChanged(oldValue) {
- super.appChanged(oldValue);
- notifyPropertyChange(#currentIsolateName, '', currentIsolateName);
- }
-
- String currentIsolateName() {
- if (app == null) {
- return '';
- }
- var isolate = app.locationManager.currentIsolate();
- if (isolate == null) {
- return '';
- }
- return isolate.name;
- }
-
- String currentIsolateLink(String link) {
- if (app == null) {
- return '';
- }
- switch (link) {
- case 'Stacktrace':
- return app.locationManager.currentIsolateRelativeLink('stacktrace');
- case 'Library':
- return app.locationManager.currentIsolateRelativeLink('library');
- case 'CPU Profile':
- return app.locationManager.currentIsolateRelativeLink('profile');
- default:
- return app.locationManager.currentIsolateRelativeLink('');
- }
- }
-}
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar_isolate.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar_isolate.html
deleted file mode 100644
index 480a12c..0000000
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/navigation_bar_isolate.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<head>
- <link rel="import" href="observatory_element.html">
-</head>
-<polymer-element name="navigation-bar-isolate" extends="observatory-element">
- <template>
- <ul class="nav navbar-nav">
- <li><a href="{{ currentIsolateLink('') }}"> {{currentIsolateName()}}</a></li>
- <template repeat="{{link in links}}">
- <li><a href="{{ currentIsolateLink(link) }}">{{ link }}</a></li>
- </template>
- </ul>
- </template>
- <script type="application/dart" src="navigation_bar_isolate.dart"></script>
-</polymer-element>
\ No newline at end of file
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_application.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_application.html
index 18a30af..effd98a 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_application.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_application.html
@@ -1,12 +1,10 @@
<head>
<link rel="import" href="isolate_profile.html">
- <link rel="import" href="navigation_bar.html">
<link rel="import" href="response_viewer.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="observatory-application" extends="observatory-element">
<template>
- <navigation-bar app="{{ app }}"></navigation-bar>
<template if="{{ app.locationManager.profile }}">
<isolate-profile app="{{ app }}"></isolate-profile>
</template>
@@ -15,4 +13,4 @@
</template>
</template>
<script type="application/dart" src="observatory_application.dart"></script>
-</polymer-element>
\ No newline at end of file
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.html
index 424102f..8a24a8c 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.html
@@ -1,3 +1,3 @@
<polymer-element name="observatory-element">
<script type="application/dart" src="observatory_element.dart"></script>
-</polymer-element>
\ No newline at end of file
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/script_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/script_view.html
index 6212830..05c884d 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/script_view.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/script_view.html
@@ -1,8 +1,17 @@
<head>
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
</head>
<polymer-element name="script-view" extends="observatory-element">
<template>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <library-nav-menu app="{{ app }}" library="{{ script.libraryRef }}"></library-nav-menu>
+ <nav-menu link="." anchor="{{ script.shortName }}" last="{{ true }}"></nav-menu>
+ </nav-bar>
+
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel-heading">
@@ -25,4 +34,4 @@
</div>
</template>
<script type="application/dart" src="script_view.dart"></script>
-</polymer-element>
\ No newline at end of file
+</polymer-element>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
index 349532f..9b3feb2 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
@@ -38,13 +38,15 @@
String get name {
if (ref == null) {
- return '';
+ return 'NULL REF';
}
String name_key = internal ? 'name' : 'user_name';
if (ref[name_key] != null) {
return ref[name_key];
} else if (ref['name'] != null) {
return ref['name'];
+ } else if (ref['user_name'] != null) {
+ return ref['user_name'];
}
return '';
}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.dart
index 31d6f333..118ddef 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.dart
@@ -10,11 +10,5 @@
@CustomTag('stack-frame')
class StackFrameElement extends ObservatoryElement {
@published Map frame = toObservable({});
- @published bool expanded = false;
-
StackFrameElement.created() : super.created();
-
- void toggleExpand(var a, var b, var c) {
- expanded = !expanded;
- }
}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.html
index 6eeb18c..dbbda32 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_frame.html
@@ -1,4 +1,5 @@
<head>
+ <link rel="import" href="curly_block.html">
<link rel="import" href="function_ref.html">
<link rel="import" href="instance_ref.html">
<link rel="import" href="observatory_element.html">
@@ -7,14 +8,9 @@
<polymer-element name="stack-frame" extends="observatory-element">
<template>
<style>
- .memberList {
- margin-left: 3em;
- border-spacing: 0;
- border-collapse: collapse;
- }
.member {
- vertical-align: top;
- padding: 0 1em;
+ vertical-align: top;
+ padding: 0 0 0 1em;
}
</style>
<div class="row">
@@ -25,11 +21,9 @@
<div class="col-md-9">
<function-ref app="{{ app }}" ref="{{ frame['function'] }}"></function-ref>
( <script-ref app="{{ app }}" ref="{{ frame['script'] }}" line="{{ frame['line'] }}">
- </script-ref> ) {
- <a on-click="{{ toggleExpand }}">...</a>
-
- <template if="{{ expanded }}">
- <table class="memberList">
+ </script-ref> )
+ <curly-block>
+ <table>
<tr template repeat="{{ v in frame['vars'] }}">
<td class="member">{{ v['name']}}</td>
<td class="member">
@@ -37,8 +31,7 @@
</td>
</tr>
</table>
- </template>
- }
+ </curly-block>
</div>
<div class="col-md-1"></div>
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.dart
index 7bc0e2c..8256949 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.dart
@@ -5,9 +5,9 @@
library stack_trace_element;
import 'dart:html';
-import 'observatory_element.dart';
import 'package:logging/logging.dart';
import 'package:polymer/polymer.dart';
+import 'observatory_element.dart';
@CustomTag('stack-trace')
class StackTraceElement extends ObservatoryElement {
@@ -15,12 +15,12 @@
StackTraceElement.created() : super.created();
- void refresh(Event e, var detail, Node target) {
+ void refresh(var done) {
var url = app.locationManager.currentIsolateRelativeLink('stacktrace');
app.requestManager.requestMap(url).then((map) {
trace = map;
}).catchError((e, trace) {
Logger.root.severe('Error while reloading stack trace: $e\n$trace');
- });
+ }).whenComplete(done);
}
}
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.html
index 0ad6cfb..2c2ba89 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.html
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/stack_trace.html
@@ -1,10 +1,18 @@
<head>
+ <link rel="import" href="nav_bar.html">
<link rel="import" href="observatory_element.html">
<link rel="import" href="stack_frame.html">
</head>
<polymer-element name="stack-trace" extends="observatory-element">
<template>
- <button type="button" on-click="{{refresh}}">Refresh</button>
+ <nav-bar>
+ <top-nav-menu></top-nav-menu>
+ <isolate-nav-menu app="{{ app }}" isolate="{{ app.locationManager.currentIsolate() }}">
+ </isolate-nav-menu>
+ <nav-menu link="." anchor="stack trace" last="{{ true }}"></nav-menu>
+ <nav-refresh callback="{{ refresh }}"></nav-refresh>
+ </nav-bar>
+
<template if="{{ trace['members'].isEmpty }}">
<div class="col-md-1"></div>
<div class="col-md-11">
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 90ecac1..95a38f94 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -72,6 +72,20 @@
*/
/**
+ * An isolate is the unit of concurrency in Dart. Each isolate has
+ * its own memory and thread of control. No state is shared between
+ * isolates. Instead, isolates communicate by message passing.
+ *
+ * Each thread keeps track of its current isolate, which is the
+ * isolate which is ready to execute on the current thread. The
+ * current isolate may be NULL, in which case no isolate is ready to
+ * execute. Most of the Dart apis require there to be a current
+ * isolate in order to function without error. The current isolate is
+ * set by any call to Dart_CreateIsolate or Dart_EnterIsolate.
+ */
+typedef struct _Dart_Isolate* Dart_Isolate;
+
+/**
* An object reference managed by the Dart VM garbage collector.
*
* Because the garbage collector may move objects, it is unsafe to
@@ -195,6 +209,7 @@
typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle;
typedef void (*Dart_WeakPersistentHandleFinalizer)(
+ Dart_Isolate isolate,
Dart_WeakPersistentHandle handle,
void* peer);
typedef void (*Dart_PeerFinalizer)(void* peer);
@@ -421,7 +436,7 @@
* Allocates a weak persistent handle for an object.
*
* This handle has the lifetime of the current isolate unless it is
- * explicitly deallocated by calling Dart_DeletePersistentHandle.
+ * explicitly deallocated by calling Dart_DeleteWeakPersistentHandle.
*
* If the object becomes unreachable the callback is invoked with the weak
* persistent handle and the peer as arguments. This gives the native code the
@@ -446,6 +461,7 @@
Dart_WeakPersistentHandleFinalizer callback);
DART_EXPORT void Dart_DeleteWeakPersistentHandle(
+ Dart_Isolate isolate,
Dart_WeakPersistentHandle object);
/**
@@ -461,7 +477,7 @@
* weak persistent handles strongly reference their referents.
*
* This handle has the lifetime of the current isolate unless it is
- * explicitly deallocated by calling Dart_DeletePersistentHandle.
+ * explicitly deallocated by calling Dart_DeleteWeakPersistentHandle.
*
* Requires there to be a current isolate.
*
@@ -600,20 +616,6 @@
DART_EXPORT const char* Dart_VersionString();
/**
- * An isolate is the unit of concurrency in Dart. Each isolate has
- * its own memory and thread of control. No state is shared between
- * isolates. Instead, isolates communicate by message passing.
- *
- * Each thread keeps track of its current isolate, which is the
- * isolate which is ready to execute on the current thread. The
- * current isolate may be NULL, in which case no isolate is ready to
- * execute. Most of the Dart apis require there to be a current
- * isolate in order to function without error. The current isolate is
- * set by any call to Dart_CreateIsolate or Dart_EnterIsolate.
- */
-typedef struct _Dart_Isolate* Dart_Isolate;
-
-/**
* An isolate creation and initialization callback function.
*
* This callback, provided by the embedder, is called when the vm
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index f527df7..acb421b 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -475,6 +475,15 @@
return _function;
}
+ // TODO(12602): Remove this special case.
+ delegate(Invocation invocation) {
+ if (invocation.isMethod && (invocation.memberName == #call)) {
+ return this.apply(invocation.positionalArguments,
+ invocation.namedArguments).reflectee;
+ }
+ return super.delegate(invocation);
+ }
+
InstanceMirror apply(List<Object> positionalArguments,
[Map<Symbol, Object> namedArguments]) {
// TODO(12602): When closures get an ordinary call method, this can be
@@ -1054,7 +1063,9 @@
}
bool get hasReflectedType => false;
- Type get reflectedType => throw new UnsupportedError();
+ Type get reflectedType {
+ throw new UnsupportedError('Type variables have no reflected type');
+ }
Type get _reflectedType => _reflectee;
List<TypeVariableMirror> get typeVariables => emptyList;
@@ -1131,6 +1142,15 @@
return _referent;
}
+ bool get hasReflectedType => !_isGenericDeclaration;
+ Type get reflectedType {
+ if (!hasReflectedType) {
+ throw new UnsupportedError(
+ "Declarations of generics have no reflected type");
+ }
+ return _reflectedType;
+ }
+
bool get isOriginalDeclaration => !_isGeneric || _isGenericDeclaration;
TypedefMirror get originalDeclaration {
@@ -1229,33 +1249,6 @@
new _UnmodifiableMapView<Symbol, DeclarationMirror>(_members);
}
-
- var _cachedTopLevelMembers;
- Map<Symbol, MethodMirror> get topLevelMembers {
- if (_cachedTopLevelMembers == null) {
- var result = new Map<Symbol, MethodMirror>();
- declarations.values.forEach((decl) {
- if (decl is MethodMirror) {
- result[decl.simpleName] = decl;
- }
- if (decl is VariableMirror) {
- var getterName = decl.simpleName;
- result[getterName] =
- new _SyntheticAccessor(this, getterName, true, true, true, decl);
- if (!decl.isFinal) {
- var setterName = _asSetter(decl.simpleName, this);
- result[setterName] = new _SyntheticAccessor(
- this, setterName, false, true, true, decl);
- }
- }
- });
- _cachedTopLevelMembers =
- new _UnmodifiableMapView<Symbol, MethodMirror>(result);
- }
- return _cachedTopLevelMembers;
- }
-
-
Map<Symbol, Mirror> _cachedMembers;
Map<Symbol, Mirror> get _members {
if (_cachedMembers == null) {
@@ -1565,6 +1558,12 @@
List<InstanceMirror> get metadata => emptyList;
+ bool get hasReflectedType => simpleName == #dynamic;
+ Type get reflectedType {
+ if (simpleName == #dynamic) return dynamic;
+ throw new UnsupportedError("void has no reflected type");
+ }
+
List<TypeVariableMirror> get typeVariables => emptyList;
List<TypeMirror> get typeArguments => emptyList;
diff --git a/runtime/lib/typed_data.cc b/runtime/lib/typed_data.cc
index 0a10465..65f5e74 100644
--- a/runtime/lib/typed_data.cc
+++ b/runtime/lib/typed_data.cc
@@ -43,8 +43,10 @@
}
- static void PeerFinalizer(Dart_WeakPersistentHandle handle, void* peer) {
- Dart_DeleteWeakPersistentHandle(handle);
+static void PeerFinalizer(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer) {
+ Dart_DeleteWeakPersistentHandle(isolate, handle);
OS::AlignedFree(peer);
}
diff --git a/runtime/third_party/double-conversion/.gitignore b/runtime/third_party/double-conversion/.gitignore
new file mode 100644
index 0000000..3e9e1b5
--- /dev/null
+++ b/runtime/third_party/double-conversion/.gitignore
@@ -0,0 +1,3 @@
+.sconsign.dblite
+run_tests
+*.o
diff --git a/runtime/third_party/double-conversion/AUTHORS b/runtime/third_party/double-conversion/AUTHORS
index 8a170b5..a5c45a2 100644
--- a/runtime/third_party/double-conversion/AUTHORS
+++ b/runtime/third_party/double-conversion/AUTHORS
@@ -5,6 +5,9 @@
# Name/Organization <email address>
Google Inc.
+Mozilla Foundation
Jeff Muizelaar <jmuizelaar@mozilla.com>
+Mike Hommey <mhommey@mozilla.com>
Martin Olsson <mnemo@minimum.se>
+Kent Williams <chaircrusher@gmail.com>
diff --git a/runtime/third_party/double-conversion/Changelog b/runtime/third_party/double-conversion/Changelog
new file mode 100644
index 0000000..7d906f4
--- /dev/null
+++ b/runtime/third_party/double-conversion/Changelog
@@ -0,0 +1,33 @@
+2014-01-12:
+ Tagged v1.1.5.
+ Enabled shared libraries in v1.1 branch.
+
+2014-01-12:
+ Tagged v1.1.4.
+ Backported SConstruct improvements.
+
+2014-01-12:
+ Tagged v1.1.3.
+ Backported warning fixes from 2.0 branch.
+
+2013-12-23:
+ Fix compilation for ARMv8 64bit (used wrong define).
+
+2013-11-09:
+ Tagged v1.1.2.
+ Add support for ARM 64 and OsX ppc.
+ Rewrite tests so they pass under Visual Studio.
+ Add CMake build system support.
+ Fix warnings.
+
+2012-06-10:
+ Tagged v1.1.1.
+ Null terminate exponent buffer (only an issue when asserts are enabled).
+ Support more architectures.
+
+2012-02-05:
+ Merged in Single-branch with single-precision support.
+ Tagged v1.1 (based on b28450f33e1db493948a535d8f84e88fa211bd10).
+
+2012-02-05:
+ Tagged v1.0 (based on eda0196e9ac8fcdf59e92cb62885ee0af5391969).
diff --git a/runtime/third_party/double-conversion/README.dart b/runtime/third_party/double-conversion/README.dart
index 347418b..d12842c 100644
--- a/runtime/third_party/double-conversion/README.dart
+++ b/runtime/third_party/double-conversion/README.dart
@@ -1,5 +1,5 @@
URL: http://code.google.com/p/double-conversion/
-Version: c8b89fb5c5b4 ('Merge in branch unused.').
+Version: double-conversion 1.1.5
License: BSD
License File: LICENSE
@@ -8,4 +8,4 @@
for v8.
Local Modifications:
-Removed the test directory, the Makefile and the scons-files.
+Removed the test directory and the build files.
diff --git a/runtime/third_party/double-conversion/src/bignum-dtoa.cc b/runtime/third_party/double-conversion/src/bignum-dtoa.cc
index 00724e8..f1ad7a5 100644
--- a/runtime/third_party/double-conversion/src/bignum-dtoa.cc
+++ b/runtime/third_party/double-conversion/src/bignum-dtoa.cc
@@ -30,7 +30,7 @@
#include "bignum-dtoa.h"
#include "bignum.h"
-#include "double.h"
+#include "ieee.h"
namespace double_conversion {
@@ -49,7 +49,9 @@
static int EstimatePower(int exponent);
// Computes v / 10^estimated_power exactly, as a ratio of two bignums, numerator
// and denominator.
-static void InitialScaledStartValues(double v,
+static void InitialScaledStartValues(uint64_t significand,
+ int exponent,
+ bool lower_boundary_is_closer,
int estimated_power,
bool need_boundary_deltas,
Bignum* numerator,
@@ -88,9 +90,24 @@
Vector<char> buffer, int* length, int* decimal_point) {
ASSERT(v > 0);
ASSERT(!Double(v).IsSpecial());
- uint64_t significand = Double(v).Significand();
+ uint64_t significand;
+ int exponent;
+ bool lower_boundary_is_closer;
+ if (mode == BIGNUM_DTOA_SHORTEST_SINGLE) {
+ float f = static_cast<float>(v);
+ ASSERT(f == v);
+ significand = Single(f).Significand();
+ exponent = Single(f).Exponent();
+ lower_boundary_is_closer = Single(f).LowerBoundaryIsCloser();
+ } else {
+ significand = Double(v).Significand();
+ exponent = Double(v).Exponent();
+ lower_boundary_is_closer = Double(v).LowerBoundaryIsCloser();
+ }
+ bool need_boundary_deltas =
+ (mode == BIGNUM_DTOA_SHORTEST || mode == BIGNUM_DTOA_SHORTEST_SINGLE);
+
bool is_even = (significand & 1) == 0;
- int exponent = Double(v).Exponent();
int normalized_exponent = NormalizedExponent(significand, exponent);
// estimated_power might be too low by 1.
int estimated_power = EstimatePower(normalized_exponent);
@@ -118,8 +135,8 @@
// The maximum double is 1.7976931348623157e308 which needs fewer than
// 308*4 binary digits.
ASSERT(Bignum::kMaxSignificantBits >= 324*4);
- bool need_boundary_deltas = (mode == BIGNUM_DTOA_SHORTEST);
- InitialScaledStartValues(v, estimated_power, need_boundary_deltas,
+ InitialScaledStartValues(significand, exponent, lower_boundary_is_closer,
+ estimated_power, need_boundary_deltas,
&numerator, &denominator,
&delta_minus, &delta_plus);
// We now have v = (numerator / denominator) * 10^estimated_power.
@@ -130,6 +147,7 @@
// 1 <= (numerator + delta_plus) / denominator < 10
switch (mode) {
case BIGNUM_DTOA_SHORTEST:
+ case BIGNUM_DTOA_SHORTEST_SINGLE:
GenerateShortestDigits(&numerator, &denominator,
&delta_minus, &delta_plus,
is_even, buffer, length);
@@ -174,13 +192,13 @@
delta_plus = delta_minus;
}
*length = 0;
- while (true) {
+ for (;;) {
uint16_t digit;
digit = numerator->DivideModuloIntBignum(*denominator);
ASSERT(digit <= 9); // digit is a uint16_t and therefore always positive.
// digit = numerator / denominator (integer division).
// numerator = numerator % denominator.
- buffer[(*length)++] = digit + '0';
+ buffer[(*length)++] = static_cast<char>(digit + '0');
// Can we stop already?
// If the remainder of the division is less than the distance to the lower
@@ -264,7 +282,7 @@
// exponent (decimal_point), when rounding upwards.
static void GenerateCountedDigits(int count, int* decimal_point,
Bignum* numerator, Bignum* denominator,
- Vector<char>(buffer), int* length) {
+ Vector<char> buffer, int* length) {
ASSERT(count >= 0);
for (int i = 0; i < count - 1; ++i) {
uint16_t digit;
@@ -272,7 +290,7 @@
ASSERT(digit <= 9); // digit is a uint16_t and therefore always positive.
// digit = numerator / denominator (integer division).
// numerator = numerator % denominator.
- buffer[i] = digit + '0';
+ buffer[i] = static_cast<char>(digit + '0');
// Prepare for next iteration.
numerator->Times10();
}
@@ -282,7 +300,8 @@
if (Bignum::PlusCompare(*numerator, *numerator, *denominator) >= 0) {
digit++;
}
- buffer[count - 1] = digit + '0';
+ ASSERT(digit <= 10);
+ buffer[count - 1] = static_cast<char>(digit + '0');
// Correct bad digits (in case we had a sequence of '9's). Propagate the
// carry until we hat a non-'9' or til we reach the first digit.
for (int i = count - 1; i > 0; --i) {
@@ -388,7 +407,7 @@
const double k1Log10 = 0.30102999566398114; // 1/lg(10)
// For doubles len(f) == 53 (don't forget the hidden bit).
- const int kSignificandSize = 53;
+ const int kSignificandSize = Double::kSignificandSize;
double estimate = ceil((exponent + kSignificandSize - 1) * k1Log10 - 1e-10);
return static_cast<int>(estimate);
}
@@ -396,7 +415,8 @@
// See comments for InitialScaledStartValues.
static void InitialScaledStartValuesPositiveExponent(
- double v, int estimated_power, bool need_boundary_deltas,
+ uint64_t significand, int exponent,
+ int estimated_power, bool need_boundary_deltas,
Bignum* numerator, Bignum* denominator,
Bignum* delta_minus, Bignum* delta_plus) {
// A positive exponent implies a positive power.
@@ -405,8 +425,8 @@
// by 10^estimated_power.
// numerator = v.
- numerator->AssignUInt64(Double(v).Significand());
- numerator->ShiftLeft(Double(v).Exponent());
+ numerator->AssignUInt64(significand);
+ numerator->ShiftLeft(exponent);
// denominator = 10^estimated_power.
denominator->AssignPowerUInt16(10, estimated_power);
@@ -418,35 +438,20 @@
// Let v = f * 2^e, then m+ - v = 1/2 * 2^e; With the common
// denominator (of 2) delta_plus equals 2^e.
delta_plus->AssignUInt16(1);
- delta_plus->ShiftLeft(Double(v).Exponent());
- // Same for delta_minus (with adjustments below if f == 2^p-1).
+ delta_plus->ShiftLeft(exponent);
+ // Same for delta_minus. The adjustments if f == 2^p-1 are done later.
delta_minus->AssignUInt16(1);
- delta_minus->ShiftLeft(Double(v).Exponent());
-
- // If the significand (without the hidden bit) is 0, then the lower
- // boundary is closer than just half a ulp (unit in the last place).
- // There is only one exception: if the next lower number is a denormal then
- // the distance is 1 ulp. This cannot be the case for exponent >= 0 (but we
- // have to test it in the other function where exponent < 0).
- uint64_t v_bits = Double(v).AsUint64();
- if ((v_bits & Double::kSignificandMask) == 0) {
- // The lower boundary is closer at half the distance of "normal" numbers.
- // Increase the common denominator and adapt all but the delta_minus.
- denominator->ShiftLeft(1); // *2
- numerator->ShiftLeft(1); // *2
- delta_plus->ShiftLeft(1); // *2
- }
+ delta_minus->ShiftLeft(exponent);
}
}
// See comments for InitialScaledStartValues
static void InitialScaledStartValuesNegativeExponentPositivePower(
- double v, int estimated_power, bool need_boundary_deltas,
+ uint64_t significand, int exponent,
+ int estimated_power, bool need_boundary_deltas,
Bignum* numerator, Bignum* denominator,
Bignum* delta_minus, Bignum* delta_plus) {
- uint64_t significand = Double(v).Significand();
- int exponent = Double(v).Exponent();
// v = f * 2^e with e < 0, and with estimated_power >= 0.
// This means that e is close to 0 (have a look at how estimated_power is
// computed).
@@ -469,36 +474,18 @@
// Given that the denominator already includes v's exponent the distance
// to the boundaries is simply 1.
delta_plus->AssignUInt16(1);
- // Same for delta_minus (with adjustments below if f == 2^p-1).
+ // Same for delta_minus. The adjustments if f == 2^p-1 are done later.
delta_minus->AssignUInt16(1);
-
- // If the significand (without the hidden bit) is 0, then the lower
- // boundary is closer than just one ulp (unit in the last place).
- // There is only one exception: if the next lower number is a denormal
- // then the distance is 1 ulp. Since the exponent is close to zero
- // (otherwise estimated_power would have been negative) this cannot happen
- // here either.
- uint64_t v_bits = Double(v).AsUint64();
- if ((v_bits & Double::kSignificandMask) == 0) {
- // The lower boundary is closer at half the distance of "normal" numbers.
- // Increase the denominator and adapt all but the delta_minus.
- denominator->ShiftLeft(1); // *2
- numerator->ShiftLeft(1); // *2
- delta_plus->ShiftLeft(1); // *2
- }
}
}
// See comments for InitialScaledStartValues
static void InitialScaledStartValuesNegativeExponentNegativePower(
- double v, int estimated_power, bool need_boundary_deltas,
+ uint64_t significand, int exponent,
+ int estimated_power, bool need_boundary_deltas,
Bignum* numerator, Bignum* denominator,
Bignum* delta_minus, Bignum* delta_plus) {
- const uint64_t kMinimalNormalizedExponent =
- UINT64_2PART_C(0x00100000, 00000000);
- uint64_t significand = Double(v).Significand();
- int exponent = Double(v).Exponent();
// Instead of multiplying the denominator with 10^estimated_power we
// multiply all values (numerator and deltas) by 10^-estimated_power.
@@ -535,18 +522,7 @@
// delta_plus = 10^-estimated_power, and
// delta_minus = 10^-estimated_power.
// These assignments have been done earlier.
-
- // The special case where the lower boundary is twice as close.
- // This time we have to look out for the exception too.
- uint64_t v_bits = Double(v).AsUint64();
- if ((v_bits & Double::kSignificandMask) == 0 &&
- // The only exception where a significand == 0 has its boundaries at
- // "normal" distances:
- (v_bits & Double::kExponentMask) != kMinimalNormalizedExponent) {
- numerator->ShiftLeft(1); // *2
- denominator->ShiftLeft(1); // *2
- delta_plus->ShiftLeft(1); // *2
- }
+ // The adjustments if f == 2^p-1 (lower boundary is closer) are done later.
}
}
@@ -586,27 +562,39 @@
//
// It is then easy to kickstart the digit-generation routine.
//
-// The boundary-deltas are only filled if need_boundary_deltas is set.
-static void InitialScaledStartValues(double v,
+// The boundary-deltas are only filled if the mode equals BIGNUM_DTOA_SHORTEST
+// or BIGNUM_DTOA_SHORTEST_SINGLE.
+
+static void InitialScaledStartValues(uint64_t significand,
+ int exponent,
+ bool lower_boundary_is_closer,
int estimated_power,
bool need_boundary_deltas,
Bignum* numerator,
Bignum* denominator,
Bignum* delta_minus,
Bignum* delta_plus) {
- if (Double(v).Exponent() >= 0) {
+ if (exponent >= 0) {
InitialScaledStartValuesPositiveExponent(
- v, estimated_power, need_boundary_deltas,
+ significand, exponent, estimated_power, need_boundary_deltas,
numerator, denominator, delta_minus, delta_plus);
} else if (estimated_power >= 0) {
InitialScaledStartValuesNegativeExponentPositivePower(
- v, estimated_power, need_boundary_deltas,
+ significand, exponent, estimated_power, need_boundary_deltas,
numerator, denominator, delta_minus, delta_plus);
} else {
InitialScaledStartValuesNegativeExponentNegativePower(
- v, estimated_power, need_boundary_deltas,
+ significand, exponent, estimated_power, need_boundary_deltas,
numerator, denominator, delta_minus, delta_plus);
}
+
+ if (need_boundary_deltas && lower_boundary_is_closer) {
+ // The lower boundary is closer at half the distance of "normal" numbers.
+ // Increase the common denominator and adapt all but the delta_minus.
+ denominator->ShiftLeft(1); // *2
+ numerator->ShiftLeft(1); // *2
+ delta_plus->ShiftLeft(1); // *2
+ }
}
diff --git a/runtime/third_party/double-conversion/src/bignum-dtoa.h b/runtime/third_party/double-conversion/src/bignum-dtoa.h
index 4657d78..34b9619 100644
--- a/runtime/third_party/double-conversion/src/bignum-dtoa.h
+++ b/runtime/third_party/double-conversion/src/bignum-dtoa.h
@@ -37,6 +37,8 @@
// For example the output of 0.299999999999999988897 is (the less accurate but
// correct) 0.3.
BIGNUM_DTOA_SHORTEST,
+ // Same as BIGNUM_DTOA_SHORTEST but for single-precision floats.
+ BIGNUM_DTOA_SHORTEST_SINGLE,
// Return a fixed number of digits after the decimal point.
// For instance fixed(0.1, 4) becomes 0.1000
// If the input number is big, the output will be big.
diff --git a/runtime/third_party/double-conversion/src/bignum.cc b/runtime/third_party/double-conversion/src/bignum.cc
index d2c8aa9..2743d67 100644
--- a/runtime/third_party/double-conversion/src/bignum.cc
+++ b/runtime/third_party/double-conversion/src/bignum.cc
@@ -40,6 +40,7 @@
template<typename S>
static int BitSize(S value) {
+ (void) value; // Mark variable as used.
return 8 * sizeof(value);
}
@@ -122,9 +123,8 @@
static int HexCharValue(char c) {
if ('0' <= c && c <= '9') return c - '0';
if ('a' <= c && c <= 'f') return 10 + c - 'a';
- if ('A' <= c && c <= 'F') return 10 + c - 'A';
- UNREACHABLE();
- return 0; // To make compiler happy.
+ ASSERT('A' <= c && c <= 'F');
+ return 10 + c - 'A';
}
@@ -501,13 +501,14 @@
// Start by removing multiples of 'other' until both numbers have the same
// number of digits.
while (BigitLength() > other.BigitLength()) {
- // This naive approach is extremely inefficient if the this divided other
- // might be big. This function is implemented for doubleToString where
+ // This naive approach is extremely inefficient if `this` divided by other
+ // is big. This function is implemented for doubleToString where
// the result should be small (less than 10).
ASSERT(other.bigits_[other.used_digits_ - 1] >= ((1 << kBigitSize) / 16));
+ ASSERT(bigits_[used_digits_ - 1] < 0x10000);
// Remove the multiples of the first digit.
// Example this = 23 and other equals 9. -> Remove 2 multiples.
- result += bigits_[used_digits_ - 1];
+ result += static_cast<uint16_t>(bigits_[used_digits_ - 1]);
SubtractTimes(other, bigits_[used_digits_ - 1]);
}
@@ -523,13 +524,15 @@
// Shortcut for easy (and common) case.
int quotient = this_bigit / other_bigit;
bigits_[used_digits_ - 1] = this_bigit - other_bigit * quotient;
- result += quotient;
+ ASSERT(quotient < 0x10000);
+ result += static_cast<uint16_t>(quotient);
Clamp();
return result;
}
int division_estimate = this_bigit / (other_bigit + 1);
- result += division_estimate;
+ ASSERT(division_estimate < 0x10000);
+ result += static_cast<uint16_t>(division_estimate);
SubtractTimes(other, division_estimate);
if (other_bigit * (division_estimate + 1) > this_bigit) {
@@ -560,8 +563,8 @@
static char HexCharOfValue(int value) {
ASSERT(0 <= value && value <= 16);
- if (value < 10) return value + '0';
- return value - 10 + 'A';
+ if (value < 10) return static_cast<char>(value + '0');
+ return static_cast<char>(value - 10 + 'A');
}
diff --git a/runtime/third_party/double-conversion/src/bignum.h b/runtime/third_party/double-conversion/src/bignum.h
index fca36ba..5ec3544 100644
--- a/runtime/third_party/double-conversion/src/bignum.h
+++ b/runtime/third_party/double-conversion/src/bignum.h
@@ -69,6 +69,10 @@
bool ToHexString(char* buffer, int buffer_size) const;
+ // Returns
+ // -1 if a < b,
+ // 0 if a == b, and
+ // +1 if a > b.
static int Compare(const Bignum& a, const Bignum& b);
static bool Equal(const Bignum& a, const Bignum& b) {
return Compare(a, b) == 0;
diff --git a/runtime/third_party/double-conversion/src/cached-powers.cc b/runtime/third_party/double-conversion/src/cached-powers.cc
index c676429..d1359ff 100644
--- a/runtime/third_party/double-conversion/src/cached-powers.cc
+++ b/runtime/third_party/double-conversion/src/cached-powers.cc
@@ -152,6 +152,7 @@
ASSERT(0 <= index && index < kCachedPowersLength);
CachedPower cached_power = kCachedPowers[index];
ASSERT(min_exponent <= cached_power.binary_exponent);
+ (void) max_exponent; // Mark variable as used.
ASSERT(cached_power.binary_exponent <= max_exponent);
*decimal_exponent = cached_power.decimal_exponent;
*power = DiyFp(cached_power.significand, cached_power.binary_exponent);
diff --git a/runtime/third_party/double-conversion/src/double-conversion.cc b/runtime/third_party/double-conversion/src/double-conversion.cc
index efc1341..db3feec 100644
--- a/runtime/third_party/double-conversion/src/double-conversion.cc
+++ b/runtime/third_party/double-conversion/src/double-conversion.cc
@@ -31,9 +31,9 @@
#include "double-conversion.h"
#include "bignum-dtoa.h"
-#include "double.h"
#include "fast-dtoa.h"
#include "fixed-dtoa.h"
+#include "ieee.h"
#include "strtod.h"
#include "utils.h"
@@ -98,7 +98,8 @@
}
ASSERT(exponent < 1e4);
const int kMaxExponentLength = 5;
- char buffer[kMaxExponentLength];
+ char buffer[kMaxExponentLength + 1];
+ buffer[kMaxExponentLength] = '\0';
int first_char_pos = kMaxExponentLength;
while (exponent > 0) {
buffer[--first_char_pos] = '0' + (exponent % 10);
@@ -157,8 +158,11 @@
}
-bool DoubleToStringConverter::ToShortest(double value,
- StringBuilder* result_builder) const {
+bool DoubleToStringConverter::ToShortestIeeeNumber(
+ double value,
+ StringBuilder* result_builder,
+ DoubleToStringConverter::DtoaMode mode) const {
+ ASSERT(mode == SHORTEST || mode == SHORTEST_SINGLE);
if (Double(value).IsSpecial()) {
return HandleSpecialValues(value, result_builder);
}
@@ -169,7 +173,7 @@
char decimal_rep[kDecimalRepCapacity];
int decimal_rep_length;
- DoubleToAscii(value, SHORTEST, 0, decimal_rep, kDecimalRepCapacity,
+ DoubleToAscii(value, mode, 0, decimal_rep, kDecimalRepCapacity,
&sign, &decimal_rep_length, &decimal_point);
bool unique_zero = (flags_ & UNIQUE_ZERO) != 0;
@@ -338,11 +342,12 @@
DoubleToStringConverter::DtoaMode dtoa_mode) {
switch (dtoa_mode) {
case DoubleToStringConverter::SHORTEST: return BIGNUM_DTOA_SHORTEST;
+ case DoubleToStringConverter::SHORTEST_SINGLE:
+ return BIGNUM_DTOA_SHORTEST_SINGLE;
case DoubleToStringConverter::FIXED: return BIGNUM_DTOA_FIXED;
case DoubleToStringConverter::PRECISION: return BIGNUM_DTOA_PRECISION;
default:
UNREACHABLE();
- return BIGNUM_DTOA_SHORTEST; // To silence compiler.
}
}
@@ -357,7 +362,7 @@
int* point) {
Vector<char> vector(buffer, buffer_length);
ASSERT(!Double(v).IsSpecial());
- ASSERT(mode == SHORTEST || requested_digits >= 0);
+ ASSERT(mode == SHORTEST || mode == SHORTEST_SINGLE || requested_digits >= 0);
if (Double(v).Sign() < 0) {
*sign = true;
@@ -385,6 +390,10 @@
case SHORTEST:
fast_worked = FastDtoa(v, FAST_DTOA_SHORTEST, 0, vector, length, point);
break;
+ case SHORTEST_SINGLE:
+ fast_worked = FastDtoa(v, FAST_DTOA_SHORTEST_SINGLE, 0,
+ vector, length, point);
+ break;
case FIXED:
fast_worked = FastFixedDtoa(v, requested_digits, vector, length, point);
break;
@@ -393,8 +402,8 @@
vector, length, point);
break;
default:
- UNREACHABLE();
fast_worked = false;
+ UNREACHABLE();
}
if (fast_worked) return;
@@ -452,16 +461,43 @@
}
+// Returns true if 'c' is a decimal digit that is valid for the given radix.
+//
+// The function is small and could be inlined, but VS2012 emitted a warning
+// because it constant-propagated the radix and concluded that the last
+// condition was always true. By moving it into a separate function the
+// compiler wouldn't warn anymore.
+static bool IsDecimalDigitForRadix(int c, int radix) {
+ return '0' <= c && c <= '9' && (c - '0') < radix;
+}
+
+// Returns true if 'c' is a character digit that is valid for the given radix.
+// The 'a_character' should be 'a' or 'A'.
+//
+// The function is small and could be inlined, but VS2012 emitted a warning
+// because it constant-propagated the radix and concluded that the first
+// condition was always false. By moving it into a separate function the
+// compiler wouldn't warn anymore.
+static bool IsCharacterDigitForRadix(int c, int radix, char a_character) {
+ return radix > 10 && c >= a_character && c < a_character + radix - 10;
+}
+
+
// Parsing integers with radix 2, 4, 8, 16, 32. Assumes current != end.
template <int radix_log_2>
-static double RadixStringToDouble(const char* current,
- const char* end,
- bool sign,
- bool allow_trailing_junk,
- double junk_string_value,
- const char** trailing_pointer) {
+static double RadixStringToIeee(const char* current,
+ const char* end,
+ bool sign,
+ bool allow_trailing_junk,
+ double junk_string_value,
+ bool read_as_double,
+ const char** trailing_pointer) {
ASSERT(current != end);
+ const int kDoubleSize = Double::kSignificandSize;
+ const int kSingleSize = Single::kSignificandSize;
+ const int kSignificandSize = read_as_double? kDoubleSize: kSingleSize;
+
// Skip leading 0s.
while (*current == '0') {
++current;
@@ -477,11 +513,11 @@
do {
int digit;
- if (*current >= '0' && *current <= '9' && *current < '0' + radix) {
+ if (IsDecimalDigitForRadix(*current, radix)) {
digit = static_cast<char>(*current) - '0';
- } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) {
+ } else if (IsCharacterDigitForRadix(*current, radix, 'a')) {
digit = static_cast<char>(*current) - 'a' + 10;
- } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) {
+ } else if (IsCharacterDigitForRadix(*current, radix, 'A')) {
digit = static_cast<char>(*current) - 'A' + 10;
} else {
if (allow_trailing_junk || !AdvanceToNonspace(¤t, end)) {
@@ -492,7 +528,7 @@
}
number = number * radix + digit;
- int overflow = static_cast<int>(number >> 53);
+ int overflow = static_cast<int>(number >> kSignificandSize);
if (overflow != 0) {
// Overflow occurred. Need to determine which direction to round the
// result.
@@ -508,7 +544,7 @@
exponent = overflow_bits_count;
bool zero_tail = true;
- while (true) {
+ for (;;) {
++current;
if (current == end || !isDigit(*current, radix)) break;
zero_tail = zero_tail && *current == '0';
@@ -531,7 +567,7 @@
}
// Rounding up may cause overflow.
- if ((number & ((int64_t)1 << 53)) != 0) {
+ if ((number & ((int64_t)1 << kSignificandSize)) != 0) {
exponent++;
number >>= 1;
}
@@ -540,7 +576,7 @@
++current;
} while (current != end);
- ASSERT(number < ((int64_t)1 << 53));
+ ASSERT(number < ((int64_t)1 << kSignificandSize));
ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
*trailing_pointer = current;
@@ -558,10 +594,11 @@
}
-double StringToDoubleConverter::StringToDouble(
+double StringToDoubleConverter::StringToIeee(
const char* input,
int length,
- int* processed_characters_count) {
+ int* processed_characters_count,
+ bool read_as_double) const {
const char* current = input;
const char* end = input + length;
@@ -584,7 +621,7 @@
if (allow_leading_spaces || allow_trailing_spaces) {
if (!AdvanceToNonspace(¤t, end)) {
- *processed_characters_count = current - input;
+ *processed_characters_count = static_cast<int>(current - input);
return empty_string_value_;
}
if (!allow_leading_spaces && (input != current)) {
@@ -633,7 +670,7 @@
}
ASSERT(buffer_pos == 0);
- *processed_characters_count = current - input;
+ *processed_characters_count = static_cast<int>(current - input);
return sign ? -Double::Infinity() : Double::Infinity();
}
}
@@ -652,7 +689,7 @@
}
ASSERT(buffer_pos == 0);
- *processed_characters_count = current - input;
+ *processed_characters_count = static_cast<int>(current - input);
return sign ? -Double::NaN() : Double::NaN();
}
}
@@ -661,7 +698,7 @@
if (*current == '0') {
++current;
if (current == end) {
- *processed_characters_count = current - input;
+ *processed_characters_count = static_cast<int>(current - input);
return SignedZero(sign);
}
@@ -675,15 +712,16 @@
}
const char* tail_pointer = NULL;
- double result = RadixStringToDouble<4>(current,
- end,
- sign,
- allow_trailing_junk,
- junk_string_value_,
- &tail_pointer);
+ double result = RadixStringToIeee<4>(current,
+ end,
+ sign,
+ allow_trailing_junk,
+ junk_string_value_,
+ read_as_double,
+ &tail_pointer);
if (tail_pointer != NULL) {
if (allow_trailing_spaces) AdvanceToNonspace(&tail_pointer, end);
- *processed_characters_count = tail_pointer - input;
+ *processed_characters_count = static_cast<int>(tail_pointer - input);
}
return result;
}
@@ -692,7 +730,7 @@
while (*current == '0') {
++current;
if (current == end) {
- *processed_characters_count = current - input;
+ *processed_characters_count = static_cast<int>(current - input);
return SignedZero(sign);
}
}
@@ -740,7 +778,7 @@
while (*current == '0') {
++current;
if (current == end) {
- *processed_characters_count = current - input;
+ *processed_characters_count = static_cast<int>(current - input);
return SignedZero(sign);
}
exponent--; // Move this 0 into the exponent.
@@ -839,14 +877,15 @@
if (octal) {
double result;
const char* tail_pointer = NULL;
- result = RadixStringToDouble<3>(buffer,
- buffer + buffer_pos,
- sign,
- allow_trailing_junk,
- junk_string_value_,
- &tail_pointer);
+ result = RadixStringToIeee<3>(buffer,
+ buffer + buffer_pos,
+ sign,
+ allow_trailing_junk,
+ junk_string_value_,
+ read_as_double,
+ &tail_pointer);
ASSERT(tail_pointer != NULL);
- *processed_characters_count = current - input;
+ *processed_characters_count = static_cast<int>(current - input);
return result;
}
@@ -858,8 +897,13 @@
ASSERT(buffer_pos < kBufferSize);
buffer[buffer_pos] = '\0';
- double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
- *processed_characters_count = current - input;
+ double converted;
+ if (read_as_double) {
+ converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
+ } else {
+ converted = Strtof(Vector<const char>(buffer, buffer_pos), exponent);
+ }
+ *processed_characters_count = static_cast<int>(current - input);
return sign? -converted: converted;
}
diff --git a/runtime/third_party/double-conversion/src/double-conversion.gypi b/runtime/third_party/double-conversion/src/double-conversion.gypi
index aa474b8..46f98f1 100644
--- a/runtime/third_party/double-conversion/src/double-conversion.gypi
+++ b/runtime/third_party/double-conversion/src/double-conversion.gypi
@@ -20,13 +20,13 @@
'cached-powers.h',
'diy-fp.cc',
'diy-fp.h',
- 'double.h',
'double-conversion.cc',
'double-conversion.h',
'fast-dtoa.cc',
'fast-dtoa.h',
'fixed-dtoa.cc',
'fixed-dtoa.h',
+ 'ieee.h',
'strtod.cc',
'strtod.h',
'utils.h',
diff --git a/runtime/third_party/double-conversion/src/double-conversion.h b/runtime/third_party/double-conversion/src/double-conversion.h
index 10525d9..1c3387d 100644
--- a/runtime/third_party/double-conversion/src/double-conversion.h
+++ b/runtime/third_party/double-conversion/src/double-conversion.h
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -154,7 +154,14 @@
// Returns true if the conversion succeeds. The conversion always succeeds
// except when the input value is special and no infinity_symbol or
// nan_symbol has been given to the constructor.
- bool ToShortest(double value, StringBuilder* result_builder) const;
+ bool ToShortest(double value, StringBuilder* result_builder) const {
+ return ToShortestIeeeNumber(value, result_builder, SHORTEST);
+ }
+
+ // Same as ToShortest, but for single-precision floats.
+ bool ToShortestSingle(float value, StringBuilder* result_builder) const {
+ return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE);
+ }
// Computes a decimal representation with a fixed number of digits after the
@@ -269,6 +276,8 @@
// For example the output of 0.299999999999999988897 is (the less accurate
// but correct) 0.3.
SHORTEST,
+ // Same as SHORTEST, but for single-precision floats.
+ SHORTEST_SINGLE,
// Produce a fixed number of digits after the decimal point.
// For instance fixed(0.1, 4) becomes 0.1000
// If the input number is big, the output will be big.
@@ -285,7 +294,11 @@
// should be at least kBase10MaximalLength + 1 characters long.
static const int kBase10MaximalLength = 17;
- // Converts the given double 'v' to ascii.
+ // Converts the given double 'v' to ascii. 'v' must not be NaN, +Infinity, or
+ // -Infinity. In SHORTEST_SINGLE-mode this restriction also applies to 'v'
+ // after it has been casted to a single-precision float. That is, in this
+ // mode static_cast<float>(v) must not be NaN, +Infinity or -Infinity.
+ //
// The result should be interpreted as buffer * 10^(point-length).
//
// The output depends on the given mode:
@@ -296,6 +309,7 @@
// 'v'. If there are two at the same distance, than the one farther away
// from 0 is chosen (halfway cases - ending with 5 - are rounded up).
// In this mode the 'requested_digits' parameter is ignored.
+ // - SHORTEST_SINGLE: same as SHORTEST but with single-precision.
// - FIXED: produces digits necessary to print a given number with
// 'requested_digits' digits after the decimal point. The produced digits
// might be too short in which case the caller has to fill the remainder
@@ -313,9 +327,11 @@
// DoubleToAscii expects the given buffer to be big enough to hold all
// digits and a terminating null-character. In SHORTEST-mode it expects a
// buffer of at least kBase10MaximalLength + 1. In all other modes the
- // requested_digits parameter (+ 1 for the null-character) limits the size of
- // the output. The given length is only used in debug mode to ensure the
- // buffer is big enough.
+ // requested_digits parameter and the padding-zeroes limit the size of the
+ // output. Don't forget the decimal point, the exponent character and the
+ // terminating null-character when computing the maximal output size.
+ // The given length is only used in debug mode to ensure the buffer is big
+ // enough.
static void DoubleToAscii(double v,
DtoaMode mode,
int requested_digits,
@@ -326,6 +342,11 @@
int* point);
private:
+ // Implementation for ToShortest and ToShortestSingle.
+ bool ToShortestIeeeNumber(double value,
+ StringBuilder* result_builder,
+ DtoaMode mode) const;
+
// If the value is a special value (NaN or Infinity) constructs the
// corresponding string using the configured infinity/nan-symbol.
// If either of them is NULL or the value is not special then the
@@ -481,7 +502,19 @@
// in the 'processed_characters_count'. Trailing junk is never included.
double StringToDouble(const char* buffer,
int length,
- int* processed_characters_count);
+ int* processed_characters_count) const {
+ return StringToIeee(buffer, length, processed_characters_count, true);
+ }
+
+ // Same as StringToDouble but reads a float.
+ // Note that this is not equivalent to static_cast<float>(StringToDouble(...))
+ // due to potential double-rounding.
+ float StringToFloat(const char* buffer,
+ int length,
+ int* processed_characters_count) const {
+ return static_cast<float>(StringToIeee(buffer, length,
+ processed_characters_count, false));
+ }
private:
const int flags_;
@@ -490,6 +523,11 @@
const char* const infinity_symbol_;
const char* const nan_symbol_;
+ double StringToIeee(const char* buffer,
+ int length,
+ int* processed_characters_count,
+ bool read_as_double) const;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter);
};
diff --git a/runtime/third_party/double-conversion/src/double.h b/runtime/third_party/double-conversion/src/double.h
deleted file mode 100644
index 1f2ded27..0000000
--- a/runtime/third_party/double-conversion/src/double.h
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef DOUBLE_CONVERSION_DOUBLE_H_
-#define DOUBLE_CONVERSION_DOUBLE_H_
-
-#include "diy-fp.h"
-
-namespace double_conversion {
-
-// We assume that doubles and uint64_t have the same endianness.
-static uint64_t double_to_uint64(double d) { return BitCast<uint64_t>(d); }
-static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); }
-
-// Helper functions for doubles.
-class Double {
- public:
- static const uint64_t kSignMask = UINT64_2PART_C(0x80000000, 00000000);
- static const uint64_t kExponentMask = UINT64_2PART_C(0x7FF00000, 00000000);
- static const uint64_t kSignificandMask = UINT64_2PART_C(0x000FFFFF, FFFFFFFF);
- static const uint64_t kHiddenBit = UINT64_2PART_C(0x00100000, 00000000);
- static const int kPhysicalSignificandSize = 52; // Excludes the hidden bit.
- static const int kSignificandSize = 53;
-
- Double() : d64_(0) {}
- explicit Double(double d) : d64_(double_to_uint64(d)) {}
- explicit Double(uint64_t d64) : d64_(d64) {}
- explicit Double(DiyFp diy_fp)
- : d64_(DiyFpToUint64(diy_fp)) {}
-
- // The value encoded by this Double must be greater or equal to +0.0.
- // It must not be special (infinity, or NaN).
- DiyFp AsDiyFp() const {
- ASSERT(Sign() > 0);
- ASSERT(!IsSpecial());
- return DiyFp(Significand(), Exponent());
- }
-
- // The value encoded by this Double must be strictly greater than 0.
- DiyFp AsNormalizedDiyFp() const {
- ASSERT(value() > 0.0);
- uint64_t f = Significand();
- int e = Exponent();
-
- // The current double could be a denormal.
- while ((f & kHiddenBit) == 0) {
- f <<= 1;
- e--;
- }
- // Do the final shifts in one go.
- f <<= DiyFp::kSignificandSize - kSignificandSize;
- e -= DiyFp::kSignificandSize - kSignificandSize;
- return DiyFp(f, e);
- }
-
- // Returns the double's bit as uint64.
- uint64_t AsUint64() const {
- return d64_;
- }
-
- // Returns the next greater double. Returns +infinity on input +infinity.
- double NextDouble() const {
- if (d64_ == kInfinity) return Double(kInfinity).value();
- if (Sign() < 0 && Significand() == 0) {
- // -0.0
- return 0.0;
- }
- if (Sign() < 0) {
- return Double(d64_ - 1).value();
- } else {
- return Double(d64_ + 1).value();
- }
- }
-
- int Exponent() const {
- if (IsDenormal()) return kDenormalExponent;
-
- uint64_t d64 = AsUint64();
- int biased_e =
- static_cast<int>((d64 & kExponentMask) >> kPhysicalSignificandSize);
- return biased_e - kExponentBias;
- }
-
- uint64_t Significand() const {
- uint64_t d64 = AsUint64();
- uint64_t significand = d64 & kSignificandMask;
- if (!IsDenormal()) {
- return significand + kHiddenBit;
- } else {
- return significand;
- }
- }
-
- // Returns true if the double is a denormal.
- bool IsDenormal() const {
- uint64_t d64 = AsUint64();
- return (d64 & kExponentMask) == 0;
- }
-
- // We consider denormals not to be special.
- // Hence only Infinity and NaN are special.
- bool IsSpecial() const {
- uint64_t d64 = AsUint64();
- return (d64 & kExponentMask) == kExponentMask;
- }
-
- bool IsNan() const {
- uint64_t d64 = AsUint64();
- return ((d64 & kExponentMask) == kExponentMask) &&
- ((d64 & kSignificandMask) != 0);
- }
-
- bool IsInfinite() const {
- uint64_t d64 = AsUint64();
- return ((d64 & kExponentMask) == kExponentMask) &&
- ((d64 & kSignificandMask) == 0);
- }
-
- int Sign() const {
- uint64_t d64 = AsUint64();
- return (d64 & kSignMask) == 0? 1: -1;
- }
-
- // Precondition: the value encoded by this Double must be greater or equal
- // than +0.0.
- DiyFp UpperBoundary() const {
- ASSERT(Sign() > 0);
- return DiyFp(Significand() * 2 + 1, Exponent() - 1);
- }
-
- // Computes the two boundaries of this.
- // The bigger boundary (m_plus) is normalized. The lower boundary has the same
- // exponent as m_plus.
- // Precondition: the value encoded by this Double must be greater than 0.
- void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const {
- ASSERT(value() > 0.0);
- DiyFp v = this->AsDiyFp();
- bool significand_is_zero = (v.f() == kHiddenBit);
- DiyFp m_plus = DiyFp::Normalize(DiyFp((v.f() << 1) + 1, v.e() - 1));
- DiyFp m_minus;
- if (significand_is_zero && v.e() != kDenormalExponent) {
- // The boundary is closer. Think of v = 1000e10 and v- = 9999e9.
- // Then the boundary (== (v - v-)/2) is not just at a distance of 1e9 but
- // at a distance of 1e8.
- // The only exception is for the smallest normal: the largest denormal is
- // at the same distance as its successor.
- // Note: denormals have the same exponent as the smallest normals.
- m_minus = DiyFp((v.f() << 2) - 1, v.e() - 2);
- } else {
- m_minus = DiyFp((v.f() << 1) - 1, v.e() - 1);
- }
- m_minus.set_f(m_minus.f() << (m_minus.e() - m_plus.e()));
- m_minus.set_e(m_plus.e());
- *out_m_plus = m_plus;
- *out_m_minus = m_minus;
- }
-
- double value() const { return uint64_to_double(d64_); }
-
- // Returns the significand size for a given order of magnitude.
- // If v = f*2^e with 2^p-1 <= f <= 2^p then p+e is v's order of magnitude.
- // This function returns the number of significant binary digits v will have
- // once it's encoded into a double. In almost all cases this is equal to
- // kSignificandSize. The only exceptions are denormals. They start with
- // leading zeroes and their effective significand-size is hence smaller.
- static int SignificandSizeForOrderOfMagnitude(int order) {
- if (order >= (kDenormalExponent + kSignificandSize)) {
- return kSignificandSize;
- }
- if (order <= kDenormalExponent) return 0;
- return order - kDenormalExponent;
- }
-
- static double Infinity() {
- return Double(kInfinity).value();
- }
-
- static double NaN() {
- return Double(kNaN).value();
- }
-
- private:
- static const int kExponentBias = 0x3FF + kPhysicalSignificandSize;
- static const int kDenormalExponent = -kExponentBias + 1;
- static const int kMaxExponent = 0x7FF - kExponentBias;
- static const uint64_t kInfinity = UINT64_2PART_C(0x7FF00000, 00000000);
- static const uint64_t kNaN = UINT64_2PART_C(0x7FF80000, 00000000);
-
- const uint64_t d64_;
-
- static uint64_t DiyFpToUint64(DiyFp diy_fp) {
- uint64_t significand = diy_fp.f();
- int exponent = diy_fp.e();
- while (significand > kHiddenBit + kSignificandMask) {
- significand >>= 1;
- exponent++;
- }
- if (exponent >= kMaxExponent) {
- return kInfinity;
- }
- if (exponent < kDenormalExponent) {
- return 0;
- }
- while (exponent > kDenormalExponent && (significand & kHiddenBit) == 0) {
- significand <<= 1;
- exponent--;
- }
- uint64_t biased_exponent;
- if (exponent == kDenormalExponent && (significand & kHiddenBit) == 0) {
- biased_exponent = 0;
- } else {
- biased_exponent = static_cast<uint64_t>(exponent + kExponentBias);
- }
- return (significand & kSignificandMask) |
- (biased_exponent << kPhysicalSignificandSize);
- }
-};
-
-} // namespace double_conversion
-
-#endif // DOUBLE_CONVERSION_DOUBLE_H_
diff --git a/runtime/third_party/double-conversion/src/fast-dtoa.cc b/runtime/third_party/double-conversion/src/fast-dtoa.cc
index eb0dcc0..6135038 100644
--- a/runtime/third_party/double-conversion/src/fast-dtoa.cc
+++ b/runtime/third_party/double-conversion/src/fast-dtoa.cc
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -29,7 +29,7 @@
#include "cached-powers.h"
#include "diy-fp.h"
-#include "double.h"
+#include "ieee.h"
namespace double_conversion {
@@ -241,17 +241,14 @@
int number_bits,
uint32_t* power,
int* exponent_plus_one) {
- ASSERT(number < (static_cast<uint32_t>(1) << (number_bits + 1)));
+ ASSERT(number < (1u << (number_bits + 1)));
// 1233/4096 is approximately 1/lg(10).
int exponent_plus_one_guess = ((number_bits + 1) * 1233 >> 12);
// We increment to skip over the first entry in the kPowersOf10 table.
// Note: kPowersOf10[i] == 10^(i-1).
exponent_plus_one_guess++;
// We don't have any guarantees that 2^number_bits <= number.
- // TODO(floitsch): can we change the 'while' into an 'if'? We definitely see
- // number < (2^number_bits - 1), but I haven't encountered
- // number < (2^number_bits - 2) yet.
- while (number < kSmallPowersOfTen[exponent_plus_one_guess]) {
+ if (number < kSmallPowersOfTen[exponent_plus_one_guess]) {
exponent_plus_one_guess--;
}
*power = kSmallPowersOfTen[exponent_plus_one_guess];
@@ -350,7 +347,8 @@
// that is smaller than integrals.
while (*kappa > 0) {
int digit = integrals / divisor;
- buffer[*length] = '0' + digit;
+ ASSERT(digit <= 9);
+ buffer[*length] = static_cast<char>('0' + digit);
(*length)++;
integrals %= divisor;
(*kappa)--;
@@ -379,13 +377,14 @@
ASSERT(one.e() >= -60);
ASSERT(fractionals < one.f());
ASSERT(UINT64_2PART_C(0xFFFFFFFF, FFFFFFFF) / 10 >= one.f());
- while (true) {
+ for (;;) {
fractionals *= 10;
unit *= 10;
unsafe_interval.set_f(unsafe_interval.f() * 10);
// Integer division by one.
int digit = static_cast<int>(fractionals >> -one.e());
- buffer[*length] = '0' + digit;
+ ASSERT(digit <= 9);
+ buffer[*length] = static_cast<char>('0' + digit);
(*length)++;
fractionals &= one.f() - 1; // Modulo by one.
(*kappa)--;
@@ -459,7 +458,8 @@
// that is smaller than 'integrals'.
while (*kappa > 0) {
int digit = integrals / divisor;
- buffer[*length] = '0' + digit;
+ ASSERT(digit <= 9);
+ buffer[*length] = static_cast<char>('0' + digit);
(*length)++;
requested_digits--;
integrals %= divisor;
@@ -492,7 +492,8 @@
w_error *= 10;
// Integer division by one.
int digit = static_cast<int>(fractionals >> -one.e());
- buffer[*length] = '0' + digit;
+ ASSERT(digit <= 9);
+ buffer[*length] = static_cast<char>('0' + digit);
(*length)++;
requested_digits--;
fractionals &= one.f() - 1; // Modulo by one.
@@ -516,6 +517,7 @@
// digits might correctly yield 'v' when read again, the closest will be
// computed.
static bool Grisu3(double v,
+ FastDtoaMode mode,
Vector<char> buffer,
int* length,
int* decimal_exponent) {
@@ -525,7 +527,13 @@
// boundary_minus and boundary_plus will round to v when convert to a double.
// Grisu3 will never output representations that lie exactly on a boundary.
DiyFp boundary_minus, boundary_plus;
- Double(v).NormalizedBoundaries(&boundary_minus, &boundary_plus);
+ if (mode == FAST_DTOA_SHORTEST) {
+ Double(v).NormalizedBoundaries(&boundary_minus, &boundary_plus);
+ } else {
+ ASSERT(mode == FAST_DTOA_SHORTEST_SINGLE);
+ float single_v = static_cast<float>(v);
+ Single(single_v).NormalizedBoundaries(&boundary_minus, &boundary_plus);
+ }
ASSERT(boundary_plus.e() == w.e());
DiyFp ten_mk; // Cached power of ten: 10^-k
int mk; // -k
@@ -637,7 +645,8 @@
int decimal_exponent = 0;
switch (mode) {
case FAST_DTOA_SHORTEST:
- result = Grisu3(v, buffer, length, &decimal_exponent);
+ case FAST_DTOA_SHORTEST_SINGLE:
+ result = Grisu3(v, mode, buffer, length, &decimal_exponent);
break;
case FAST_DTOA_PRECISION:
result = Grisu3Counted(v, requested_digits,
diff --git a/runtime/third_party/double-conversion/src/fast-dtoa.h b/runtime/third_party/double-conversion/src/fast-dtoa.h
index bb45ad5..5f1e8ee 100644
--- a/runtime/third_party/double-conversion/src/fast-dtoa.h
+++ b/runtime/third_party/double-conversion/src/fast-dtoa.h
@@ -37,6 +37,8 @@
// result will be the most accurate number of this length. Longer
// representations might be more accurate.
FAST_DTOA_SHORTEST,
+ // Same as FAST_DTOA_SHORTEST but for single-precision floats.
+ FAST_DTOA_SHORTEST_SINGLE,
// Computes a representation where the precision (number of digits) is
// given as input. The precision is independent of the decimal point.
FAST_DTOA_PRECISION
@@ -45,6 +47,8 @@
// FastDtoa will produce at most kFastDtoaMaximalLength digits. This does not
// include the terminating '\0' character.
static const int kFastDtoaMaximalLength = 17;
+// Same for single-precision numbers.
+static const int kFastDtoaMaximalSingleLength = 9;
// Provides a decimal representation of v.
// The result should be interpreted as buffer * 10^(point - length).
diff --git a/runtime/third_party/double-conversion/src/fixed-dtoa.cc b/runtime/third_party/double-conversion/src/fixed-dtoa.cc
index 8b75f26..aef65fd 100644
--- a/runtime/third_party/double-conversion/src/fixed-dtoa.cc
+++ b/runtime/third_party/double-conversion/src/fixed-dtoa.cc
@@ -28,7 +28,7 @@
#include <math.h>
#include "fixed-dtoa.h"
-#include "double.h"
+#include "ieee.h"
namespace double_conversion {
@@ -133,7 +133,7 @@
while (number != 0) {
int digit = number % 10;
number /= 10;
- buffer[(*length) + number_length] = '0' + digit;
+ buffer[(*length) + number_length] = static_cast<char>('0' + digit);
number_length++;
}
// Exchange the digits.
@@ -150,7 +150,7 @@
}
-static void FillDigits64FixedLength(uint64_t number, int requested_length,
+static void FillDigits64FixedLength(uint64_t number,
Vector<char> buffer, int* length) {
const uint32_t kTen7 = 10000000;
// For efficiency cut the number into 3 uint32_t parts, and print those.
@@ -253,7 +253,8 @@
fractionals *= 5;
point--;
int digit = static_cast<int>(fractionals >> point);
- buffer[*length] = '0' + digit;
+ ASSERT(digit <= 9);
+ buffer[*length] = static_cast<char>('0' + digit);
(*length)++;
fractionals -= static_cast<uint64_t>(digit) << point;
}
@@ -274,7 +275,8 @@
fractionals128.Multiply(5);
point--;
int digit = fractionals128.DivModPowerOf2(point);
- buffer[*length] = '0' + digit;
+ ASSERT(digit <= 9);
+ buffer[*length] = static_cast<char>('0' + digit);
(*length)++;
}
if (fractionals128.BitAt(point - 1) == 1) {
@@ -358,7 +360,7 @@
remainder = (dividend % divisor) << exponent;
}
FillDigits32(quotient, buffer, length);
- FillDigits64FixedLength(remainder, divisor_power, buffer, length);
+ FillDigits64FixedLength(remainder, buffer, length);
*decimal_point = *length;
} else if (exponent >= 0) {
// 0 <= exponent <= 11
diff --git a/runtime/third_party/double-conversion/src/ieee.h b/runtime/third_party/double-conversion/src/ieee.h
new file mode 100644
index 0000000..661141d
--- /dev/null
+++ b/runtime/third_party/double-conversion/src/ieee.h
@@ -0,0 +1,402 @@
+// Copyright 2012 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef DOUBLE_CONVERSION_DOUBLE_H_
+#define DOUBLE_CONVERSION_DOUBLE_H_
+
+#include "diy-fp.h"
+
+namespace double_conversion {
+
+// We assume that doubles and uint64_t have the same endianness.
+static uint64_t double_to_uint64(double d) { return BitCast<uint64_t>(d); }
+static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); }
+static uint32_t float_to_uint32(float f) { return BitCast<uint32_t>(f); }
+static float uint32_to_float(uint32_t d32) { return BitCast<float>(d32); }
+
+// Helper functions for doubles.
+class Double {
+ public:
+ static const uint64_t kSignMask = UINT64_2PART_C(0x80000000, 00000000);
+ static const uint64_t kExponentMask = UINT64_2PART_C(0x7FF00000, 00000000);
+ static const uint64_t kSignificandMask = UINT64_2PART_C(0x000FFFFF, FFFFFFFF);
+ static const uint64_t kHiddenBit = UINT64_2PART_C(0x00100000, 00000000);
+ static const int kPhysicalSignificandSize = 52; // Excludes the hidden bit.
+ static const int kSignificandSize = 53;
+
+ Double() : d64_(0) {}
+ explicit Double(double d) : d64_(double_to_uint64(d)) {}
+ explicit Double(uint64_t d64) : d64_(d64) {}
+ explicit Double(DiyFp diy_fp)
+ : d64_(DiyFpToUint64(diy_fp)) {}
+
+ // The value encoded by this Double must be greater or equal to +0.0.
+ // It must not be special (infinity, or NaN).
+ DiyFp AsDiyFp() const {
+ ASSERT(Sign() > 0);
+ ASSERT(!IsSpecial());
+ return DiyFp(Significand(), Exponent());
+ }
+
+ // The value encoded by this Double must be strictly greater than 0.
+ DiyFp AsNormalizedDiyFp() const {
+ ASSERT(value() > 0.0);
+ uint64_t f = Significand();
+ int e = Exponent();
+
+ // The current double could be a denormal.
+ while ((f & kHiddenBit) == 0) {
+ f <<= 1;
+ e--;
+ }
+ // Do the final shifts in one go.
+ f <<= DiyFp::kSignificandSize - kSignificandSize;
+ e -= DiyFp::kSignificandSize - kSignificandSize;
+ return DiyFp(f, e);
+ }
+
+ // Returns the double's bit as uint64.
+ uint64_t AsUint64() const {
+ return d64_;
+ }
+
+ // Returns the next greater double. Returns +infinity on input +infinity.
+ double NextDouble() const {
+ if (d64_ == kInfinity) return Double(kInfinity).value();
+ if (Sign() < 0 && Significand() == 0) {
+ // -0.0
+ return 0.0;
+ }
+ if (Sign() < 0) {
+ return Double(d64_ - 1).value();
+ } else {
+ return Double(d64_ + 1).value();
+ }
+ }
+
+ double PreviousDouble() const {
+ if (d64_ == (kInfinity | kSignMask)) return -Double::Infinity();
+ if (Sign() < 0) {
+ return Double(d64_ + 1).value();
+ } else {
+ if (Significand() == 0) return -0.0;
+ return Double(d64_ - 1).value();
+ }
+ }
+
+ int Exponent() const {
+ if (IsDenormal()) return kDenormalExponent;
+
+ uint64_t d64 = AsUint64();
+ int biased_e =
+ static_cast<int>((d64 & kExponentMask) >> kPhysicalSignificandSize);
+ return biased_e - kExponentBias;
+ }
+
+ uint64_t Significand() const {
+ uint64_t d64 = AsUint64();
+ uint64_t significand = d64 & kSignificandMask;
+ if (!IsDenormal()) {
+ return significand + kHiddenBit;
+ } else {
+ return significand;
+ }
+ }
+
+ // Returns true if the double is a denormal.
+ bool IsDenormal() const {
+ uint64_t d64 = AsUint64();
+ return (d64 & kExponentMask) == 0;
+ }
+
+ // We consider denormals not to be special.
+ // Hence only Infinity and NaN are special.
+ bool IsSpecial() const {
+ uint64_t d64 = AsUint64();
+ return (d64 & kExponentMask) == kExponentMask;
+ }
+
+ bool IsNan() const {
+ uint64_t d64 = AsUint64();
+ return ((d64 & kExponentMask) == kExponentMask) &&
+ ((d64 & kSignificandMask) != 0);
+ }
+
+ bool IsInfinite() const {
+ uint64_t d64 = AsUint64();
+ return ((d64 & kExponentMask) == kExponentMask) &&
+ ((d64 & kSignificandMask) == 0);
+ }
+
+ int Sign() const {
+ uint64_t d64 = AsUint64();
+ return (d64 & kSignMask) == 0? 1: -1;
+ }
+
+ // Precondition: the value encoded by this Double must be greater or equal
+ // than +0.0.
+ DiyFp UpperBoundary() const {
+ ASSERT(Sign() > 0);
+ return DiyFp(Significand() * 2 + 1, Exponent() - 1);
+ }
+
+ // Computes the two boundaries of this.
+ // The bigger boundary (m_plus) is normalized. The lower boundary has the same
+ // exponent as m_plus.
+ // Precondition: the value encoded by this Double must be greater than 0.
+ void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const {
+ ASSERT(value() > 0.0);
+ DiyFp v = this->AsDiyFp();
+ DiyFp m_plus = DiyFp::Normalize(DiyFp((v.f() << 1) + 1, v.e() - 1));
+ DiyFp m_minus;
+ if (LowerBoundaryIsCloser()) {
+ m_minus = DiyFp((v.f() << 2) - 1, v.e() - 2);
+ } else {
+ m_minus = DiyFp((v.f() << 1) - 1, v.e() - 1);
+ }
+ m_minus.set_f(m_minus.f() << (m_minus.e() - m_plus.e()));
+ m_minus.set_e(m_plus.e());
+ *out_m_plus = m_plus;
+ *out_m_minus = m_minus;
+ }
+
+ bool LowerBoundaryIsCloser() const {
+ // The boundary is closer if the significand is of the form f == 2^p-1 then
+ // the lower boundary is closer.
+ // Think of v = 1000e10 and v- = 9999e9.
+ // Then the boundary (== (v - v-)/2) is not just at a distance of 1e9 but
+ // at a distance of 1e8.
+ // The only exception is for the smallest normal: the largest denormal is
+ // at the same distance as its successor.
+ // Note: denormals have the same exponent as the smallest normals.
+ bool physical_significand_is_zero = ((AsUint64() & kSignificandMask) == 0);
+ return physical_significand_is_zero && (Exponent() != kDenormalExponent);
+ }
+
+ double value() const { return uint64_to_double(d64_); }
+
+ // Returns the significand size for a given order of magnitude.
+ // If v = f*2^e with 2^p-1 <= f <= 2^p then p+e is v's order of magnitude.
+ // This function returns the number of significant binary digits v will have
+ // once it's encoded into a double. In almost all cases this is equal to
+ // kSignificandSize. The only exceptions are denormals. They start with
+ // leading zeroes and their effective significand-size is hence smaller.
+ static int SignificandSizeForOrderOfMagnitude(int order) {
+ if (order >= (kDenormalExponent + kSignificandSize)) {
+ return kSignificandSize;
+ }
+ if (order <= kDenormalExponent) return 0;
+ return order - kDenormalExponent;
+ }
+
+ static double Infinity() {
+ return Double(kInfinity).value();
+ }
+
+ static double NaN() {
+ return Double(kNaN).value();
+ }
+
+ private:
+ static const int kExponentBias = 0x3FF + kPhysicalSignificandSize;
+ static const int kDenormalExponent = -kExponentBias + 1;
+ static const int kMaxExponent = 0x7FF - kExponentBias;
+ static const uint64_t kInfinity = UINT64_2PART_C(0x7FF00000, 00000000);
+ static const uint64_t kNaN = UINT64_2PART_C(0x7FF80000, 00000000);
+
+ const uint64_t d64_;
+
+ static uint64_t DiyFpToUint64(DiyFp diy_fp) {
+ uint64_t significand = diy_fp.f();
+ int exponent = diy_fp.e();
+ while (significand > kHiddenBit + kSignificandMask) {
+ significand >>= 1;
+ exponent++;
+ }
+ if (exponent >= kMaxExponent) {
+ return kInfinity;
+ }
+ if (exponent < kDenormalExponent) {
+ return 0;
+ }
+ while (exponent > kDenormalExponent && (significand & kHiddenBit) == 0) {
+ significand <<= 1;
+ exponent--;
+ }
+ uint64_t biased_exponent;
+ if (exponent == kDenormalExponent && (significand & kHiddenBit) == 0) {
+ biased_exponent = 0;
+ } else {
+ biased_exponent = static_cast<uint64_t>(exponent + kExponentBias);
+ }
+ return (significand & kSignificandMask) |
+ (biased_exponent << kPhysicalSignificandSize);
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(Double);
+};
+
+class Single {
+ public:
+ static const uint32_t kSignMask = 0x80000000;
+ static const uint32_t kExponentMask = 0x7F800000;
+ static const uint32_t kSignificandMask = 0x007FFFFF;
+ static const uint32_t kHiddenBit = 0x00800000;
+ static const int kPhysicalSignificandSize = 23; // Excludes the hidden bit.
+ static const int kSignificandSize = 24;
+
+ Single() : d32_(0) {}
+ explicit Single(float f) : d32_(float_to_uint32(f)) {}
+ explicit Single(uint32_t d32) : d32_(d32) {}
+
+ // The value encoded by this Single must be greater or equal to +0.0.
+ // It must not be special (infinity, or NaN).
+ DiyFp AsDiyFp() const {
+ ASSERT(Sign() > 0);
+ ASSERT(!IsSpecial());
+ return DiyFp(Significand(), Exponent());
+ }
+
+ // Returns the single's bit as uint64.
+ uint32_t AsUint32() const {
+ return d32_;
+ }
+
+ int Exponent() const {
+ if (IsDenormal()) return kDenormalExponent;
+
+ uint32_t d32 = AsUint32();
+ int biased_e =
+ static_cast<int>((d32 & kExponentMask) >> kPhysicalSignificandSize);
+ return biased_e - kExponentBias;
+ }
+
+ uint32_t Significand() const {
+ uint32_t d32 = AsUint32();
+ uint32_t significand = d32 & kSignificandMask;
+ if (!IsDenormal()) {
+ return significand + kHiddenBit;
+ } else {
+ return significand;
+ }
+ }
+
+ // Returns true if the single is a denormal.
+ bool IsDenormal() const {
+ uint32_t d32 = AsUint32();
+ return (d32 & kExponentMask) == 0;
+ }
+
+ // We consider denormals not to be special.
+ // Hence only Infinity and NaN are special.
+ bool IsSpecial() const {
+ uint32_t d32 = AsUint32();
+ return (d32 & kExponentMask) == kExponentMask;
+ }
+
+ bool IsNan() const {
+ uint32_t d32 = AsUint32();
+ return ((d32 & kExponentMask) == kExponentMask) &&
+ ((d32 & kSignificandMask) != 0);
+ }
+
+ bool IsInfinite() const {
+ uint32_t d32 = AsUint32();
+ return ((d32 & kExponentMask) == kExponentMask) &&
+ ((d32 & kSignificandMask) == 0);
+ }
+
+ int Sign() const {
+ uint32_t d32 = AsUint32();
+ return (d32 & kSignMask) == 0? 1: -1;
+ }
+
+ // Computes the two boundaries of this.
+ // The bigger boundary (m_plus) is normalized. The lower boundary has the same
+ // exponent as m_plus.
+ // Precondition: the value encoded by this Single must be greater than 0.
+ void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const {
+ ASSERT(value() > 0.0);
+ DiyFp v = this->AsDiyFp();
+ DiyFp m_plus = DiyFp::Normalize(DiyFp((v.f() << 1) + 1, v.e() - 1));
+ DiyFp m_minus;
+ if (LowerBoundaryIsCloser()) {
+ m_minus = DiyFp((v.f() << 2) - 1, v.e() - 2);
+ } else {
+ m_minus = DiyFp((v.f() << 1) - 1, v.e() - 1);
+ }
+ m_minus.set_f(m_minus.f() << (m_minus.e() - m_plus.e()));
+ m_minus.set_e(m_plus.e());
+ *out_m_plus = m_plus;
+ *out_m_minus = m_minus;
+ }
+
+ // Precondition: the value encoded by this Single must be greater or equal
+ // than +0.0.
+ DiyFp UpperBoundary() const {
+ ASSERT(Sign() > 0);
+ return DiyFp(Significand() * 2 + 1, Exponent() - 1);
+ }
+
+ bool LowerBoundaryIsCloser() const {
+ // The boundary is closer if the significand is of the form f == 2^p-1 then
+ // the lower boundary is closer.
+ // Think of v = 1000e10 and v- = 9999e9.
+ // Then the boundary (== (v - v-)/2) is not just at a distance of 1e9 but
+ // at a distance of 1e8.
+ // The only exception is for the smallest normal: the largest denormal is
+ // at the same distance as its successor.
+ // Note: denormals have the same exponent as the smallest normals.
+ bool physical_significand_is_zero = ((AsUint32() & kSignificandMask) == 0);
+ return physical_significand_is_zero && (Exponent() != kDenormalExponent);
+ }
+
+ float value() const { return uint32_to_float(d32_); }
+
+ static float Infinity() {
+ return Single(kInfinity).value();
+ }
+
+ static float NaN() {
+ return Single(kNaN).value();
+ }
+
+ private:
+ static const int kExponentBias = 0x7F + kPhysicalSignificandSize;
+ static const int kDenormalExponent = -kExponentBias + 1;
+ static const int kMaxExponent = 0xFF - kExponentBias;
+ static const uint32_t kInfinity = 0x7F800000;
+ static const uint32_t kNaN = 0x7FC00000;
+
+ const uint32_t d32_;
+
+ DISALLOW_COPY_AND_ASSIGN(Single);
+};
+
+} // namespace double_conversion
+
+#endif // DOUBLE_CONVERSION_DOUBLE_H_
diff --git a/runtime/third_party/double-conversion/src/strtod.cc b/runtime/third_party/double-conversion/src/strtod.cc
index 5055788..3471756 100644
--- a/runtime/third_party/double-conversion/src/strtod.cc
+++ b/runtime/third_party/double-conversion/src/strtod.cc
@@ -31,7 +31,7 @@
#include "strtod.h"
#include "bignum.h"
#include "cached-powers.h"
-#include "double.h"
+#include "ieee.h"
namespace double_conversion {
@@ -108,7 +108,7 @@
}
-static void TrimToMaxSignificantDigits(Vector<const char> buffer,
+static void CutToMaxSignificantDigits(Vector<const char> buffer,
int exponent,
char* significant_buffer,
int* significant_exponent) {
@@ -125,6 +125,31 @@
exponent + (buffer.length() - kMaxSignificantDecimalDigits);
}
+
+// Trims the buffer and cuts it to at most kMaxSignificantDecimalDigits.
+// If possible the input-buffer is reused, but if the buffer needs to be
+// modified (due to cutting), then the input needs to be copied into the
+// buffer_copy_space.
+static void TrimAndCut(Vector<const char> buffer, int exponent,
+ char* buffer_copy_space, int space_size,
+ Vector<const char>* trimmed, int* updated_exponent) {
+ Vector<const char> left_trimmed = TrimLeadingZeros(buffer);
+ Vector<const char> right_trimmed = TrimTrailingZeros(left_trimmed);
+ exponent += left_trimmed.length() - right_trimmed.length();
+ if (right_trimmed.length() > kMaxSignificantDecimalDigits) {
+ (void) space_size; // Mark variable as used.
+ ASSERT(space_size >= kMaxSignificantDecimalDigits);
+ CutToMaxSignificantDigits(right_trimmed, exponent,
+ buffer_copy_space, updated_exponent);
+ *trimmed = Vector<const char>(buffer_copy_space,
+ kMaxSignificantDecimalDigits);
+ } else {
+ *trimmed = right_trimmed;
+ *updated_exponent = exponent;
+ }
+}
+
+
// Reads digits from the buffer and converts them to a uint64.
// Reads in as many digits as fit into a uint64.
// When the string starts with "1844674407370955161" no further digit is read.
@@ -239,7 +264,6 @@
case 7: return DiyFp(UINT64_2PART_C(0x98968000, 00000000), -40);
default:
UNREACHABLE();
- return DiyFp(0, 0);
}
}
@@ -357,22 +381,17 @@
}
-// Returns the correct double for the buffer*10^exponent.
-// The variable guess should be a close guess that is either the correct double
-// or its lower neighbor (the nearest double less than the correct one).
+// Returns
+// - -1 if buffer*10^exponent < diy_fp.
+// - 0 if buffer*10^exponent == diy_fp.
+// - +1 if buffer*10^exponent > diy_fp.
// Preconditions:
// buffer.length() + exponent <= kMaxDecimalPower + 1
// buffer.length() + exponent > kMinDecimalPower
// buffer.length() <= kMaxDecimalSignificantDigits
-static double BignumStrtod(Vector<const char> buffer,
- int exponent,
- double guess) {
- if (guess == Double::Infinity()) {
- return guess;
- }
-
- DiyFp upper_boundary = Double(guess).UpperBoundary();
-
+static int CompareBufferWithDiyFp(Vector<const char> buffer,
+ int exponent,
+ DiyFp diy_fp) {
ASSERT(buffer.length() + exponent <= kMaxDecimalPower + 1);
ASSERT(buffer.length() + exponent > kMinDecimalPower);
ASSERT(buffer.length() <= kMaxSignificantDecimalDigits);
@@ -381,21 +400,65 @@
// consume at most one bigit (< 64 bits).
// ln(10) == 3.3219...
ASSERT(((kMaxDecimalPower + 1) * 333 / 100) < Bignum::kMaxSignificantBits);
- Bignum input;
- Bignum boundary;
- input.AssignDecimalString(buffer);
- boundary.AssignUInt64(upper_boundary.f());
+ Bignum buffer_bignum;
+ Bignum diy_fp_bignum;
+ buffer_bignum.AssignDecimalString(buffer);
+ diy_fp_bignum.AssignUInt64(diy_fp.f());
if (exponent >= 0) {
- input.MultiplyByPowerOfTen(exponent);
+ buffer_bignum.MultiplyByPowerOfTen(exponent);
} else {
- boundary.MultiplyByPowerOfTen(-exponent);
+ diy_fp_bignum.MultiplyByPowerOfTen(-exponent);
}
- if (upper_boundary.e() > 0) {
- boundary.ShiftLeft(upper_boundary.e());
+ if (diy_fp.e() > 0) {
+ diy_fp_bignum.ShiftLeft(diy_fp.e());
} else {
- input.ShiftLeft(-upper_boundary.e());
+ buffer_bignum.ShiftLeft(-diy_fp.e());
}
- int comparison = Bignum::Compare(input, boundary);
+ return Bignum::Compare(buffer_bignum, diy_fp_bignum);
+}
+
+
+// Returns true if the guess is the correct double.
+// Returns false, when guess is either correct or the next-lower double.
+static bool ComputeGuess(Vector<const char> trimmed, int exponent,
+ double* guess) {
+ if (trimmed.length() == 0) {
+ *guess = 0.0;
+ return true;
+ }
+ if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
+ *guess = Double::Infinity();
+ return true;
+ }
+ if (exponent + trimmed.length() <= kMinDecimalPower) {
+ *guess = 0.0;
+ return true;
+ }
+
+ if (DoubleStrtod(trimmed, exponent, guess) ||
+ DiyFpStrtod(trimmed, exponent, guess)) {
+ return true;
+ }
+ if (*guess == Double::Infinity()) {
+ return true;
+ }
+ return false;
+}
+
+double Strtod(Vector<const char> buffer, int exponent) {
+ char copy_buffer[kMaxSignificantDecimalDigits];
+ Vector<const char> trimmed;
+ int updated_exponent;
+ TrimAndCut(buffer, exponent, copy_buffer, kMaxSignificantDecimalDigits,
+ &trimmed, &updated_exponent);
+ exponent = updated_exponent;
+
+ double guess;
+ bool is_correct = ComputeGuess(trimmed, exponent, &guess);
+ if (is_correct) return guess;
+
+ DiyFp upper_boundary = Double(guess).UpperBoundary();
+ int comparison = CompareBufferWithDiyFp(trimmed, exponent, upper_boundary);
if (comparison < 0) {
return guess;
} else if (comparison > 0) {
@@ -408,34 +471,85 @@
}
}
+float Strtof(Vector<const char> buffer, int exponent) {
+ char copy_buffer[kMaxSignificantDecimalDigits];
+ Vector<const char> trimmed;
+ int updated_exponent;
+ TrimAndCut(buffer, exponent, copy_buffer, kMaxSignificantDecimalDigits,
+ &trimmed, &updated_exponent);
+ exponent = updated_exponent;
-double Strtod(Vector<const char> buffer, int exponent) {
- Vector<const char> left_trimmed = TrimLeadingZeros(buffer);
- Vector<const char> trimmed = TrimTrailingZeros(left_trimmed);
- exponent += left_trimmed.length() - trimmed.length();
- if (trimmed.length() == 0) return 0.0;
- if (trimmed.length() > kMaxSignificantDecimalDigits) {
- char significant_buffer[kMaxSignificantDecimalDigits];
- int significant_exponent;
- TrimToMaxSignificantDigits(trimmed, exponent,
- significant_buffer, &significant_exponent);
- return Strtod(Vector<const char>(significant_buffer,
- kMaxSignificantDecimalDigits),
- significant_exponent);
- }
- if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
- return Double::Infinity();
- }
- if (exponent + trimmed.length() <= kMinDecimalPower) {
- return 0.0;
+ double double_guess;
+ bool is_correct = ComputeGuess(trimmed, exponent, &double_guess);
+
+ float float_guess = static_cast<float>(double_guess);
+ if (float_guess == double_guess) {
+ // This shortcut triggers for integer values.
+ return float_guess;
}
- double guess;
- if (DoubleStrtod(trimmed, exponent, &guess) ||
- DiyFpStrtod(trimmed, exponent, &guess)) {
+ // We must catch double-rounding. Say the double has been rounded up, and is
+ // now a boundary of a float, and rounds up again. This is why we have to
+ // look at previous too.
+ // Example (in decimal numbers):
+ // input: 12349
+ // high-precision (4 digits): 1235
+ // low-precision (3 digits):
+ // when read from input: 123
+ // when rounded from high precision: 124.
+ // To do this we simply look at the neigbors of the correct result and see
+ // if they would round to the same float. If the guess is not correct we have
+ // to look at four values (since two different doubles could be the correct
+ // double).
+
+ double double_next = Double(double_guess).NextDouble();
+ double double_previous = Double(double_guess).PreviousDouble();
+
+ float f1 = static_cast<float>(double_previous);
+ float f2 = float_guess;
+ float f3 = static_cast<float>(double_next);
+ float f4;
+ if (is_correct) {
+ f4 = f3;
+ } else {
+ double double_next2 = Double(double_next).NextDouble();
+ f4 = static_cast<float>(double_next2);
+ }
+ (void) f2; // Mark variable as used.
+ ASSERT(f1 <= f2 && f2 <= f3 && f3 <= f4);
+
+ // If the guess doesn't lie near a single-precision boundary we can simply
+ // return its float-value.
+ if (f1 == f4) {
+ return float_guess;
+ }
+
+ ASSERT((f1 != f2 && f2 == f3 && f3 == f4) ||
+ (f1 == f2 && f2 != f3 && f3 == f4) ||
+ (f1 == f2 && f2 == f3 && f3 != f4));
+
+ // guess and next are the two possible canditates (in the same way that
+ // double_guess was the lower candidate for a double-precision guess).
+ float guess = f1;
+ float next = f4;
+ DiyFp upper_boundary;
+ if (guess == 0.0f) {
+ float min_float = 1e-45f;
+ upper_boundary = Double(static_cast<double>(min_float) / 2).AsDiyFp();
+ } else {
+ upper_boundary = Single(guess).UpperBoundary();
+ }
+ int comparison = CompareBufferWithDiyFp(trimmed, exponent, upper_boundary);
+ if (comparison < 0) {
return guess;
+ } else if (comparison > 0) {
+ return next;
+ } else if ((Single(guess).Significand() & 1) == 0) {
+ // Round towards even.
+ return guess;
+ } else {
+ return next;
}
- return BignumStrtod(trimmed, exponent, guess);
}
} // namespace double_conversion
diff --git a/runtime/third_party/double-conversion/src/strtod.h b/runtime/third_party/double-conversion/src/strtod.h
index 1f0b78c..ed0293b 100644
--- a/runtime/third_party/double-conversion/src/strtod.h
+++ b/runtime/third_party/double-conversion/src/strtod.h
@@ -36,6 +36,10 @@
// contain a dot or a sign. It must not start with '0', and must not be empty.
double Strtod(Vector<const char> buffer, int exponent);
+// The buffer must only contain digits in the range [0-9]. It must not
+// contain a dot or a sign. It must not start with '0', and must not be empty.
+float Strtof(Vector<const char> buffer, int exponent);
+
} // namespace double_conversion
#endif // DOUBLE_CONVERSION_STRTOD_H_
diff --git a/runtime/third_party/double-conversion/src/utils.h b/runtime/third_party/double-conversion/src/utils.h
index 90a9a3c..dc7d209 100644
--- a/runtime/third_party/double-conversion/src/utils.h
+++ b/runtime/third_party/double-conversion/src/utils.h
@@ -56,10 +56,16 @@
// disabled.)
// On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
#if defined(_M_X64) || defined(__x86_64__) || \
- defined(__ARMEL__) || \
- defined(_MIPS_ARCH_MIPS32)
+ defined(__ARMEL__) || defined(__avr32__) || \
+ defined(__hppa__) || defined(__ia64__) || \
+ defined(__mips__) || \
+ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+ defined(__SH4__) || defined(__alpha__) || \
+ defined(_MIPS_ARCH_MIPS32R2) || \
+ defined(__AARCH64EL__)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
-#elif defined(_M_IX86) || defined(__i386__)
+#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
#if defined(_WIN32)
// Windows uses a 64bit wide floating point stack.
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
@@ -70,6 +76,11 @@
#error Target architecture was not detected as supported by Double-Conversion.
#endif
+#if defined(__GNUC__)
+#define DOUBLE_CONVERSION_UNUSED __attribute__((unused))
+#else
+#define DOUBLE_CONVERSION_UNUSED
+#endif
#if defined(_WIN32) && !defined(__MINGW32__)
@@ -295,7 +306,8 @@
inline Dest BitCast(const Source& source) {
// Compile time assertion: sizeof(Dest) == sizeof(Source)
// A compile error here means your Dest and Source have different sizes.
- typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
+ DOUBLE_CONVERSION_UNUSED
+ typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
Dest dest;
memmove(&dest, &source, sizeof(dest));
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index e1a4658..9d2f409 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -2331,21 +2331,35 @@
}
+static void ComputeCounterAddressesForCid(intptr_t cid,
+ Heap::Space space,
+ Address* count_address,
+ Address* size_address) {
+ ASSERT(cid < kNumPredefinedCids);
+ Isolate* isolate = Isolate::Current();
+ ClassTable* class_table = isolate->class_table();
+ const uword class_heap_stats_table_address =
+ class_table->PredefinedClassHeapStatsTableAddress();
+ const uword class_offset = cid * sizeof(ClassHeapStats); // NOLINT
+ const uword count_field_offset = (space == Heap::kNew) ?
+ ClassHeapStats::allocated_since_gc_new_space_offset() :
+ ClassHeapStats::allocated_since_gc_old_space_offset();
+ const uword size_field_offset = (space == Heap::kNew) ?
+ ClassHeapStats::allocated_size_since_gc_new_space_offset() :
+ ClassHeapStats::allocated_size_since_gc_old_space_offset();
+ *count_address = Address::Absolute(
+ class_heap_stats_table_address + class_offset + count_field_offset);
+ *size_address = Address::Absolute(
+ class_heap_stats_table_address + class_offset + size_field_offset);
+}
+
void Assembler::UpdateAllocationStats(intptr_t cid,
Register temp_reg,
Heap::Space space) {
ASSERT(cid > 0);
- Isolate* isolate = Isolate::Current();
- ClassTable* class_table = isolate->class_table();
if (cid < kNumPredefinedCids) {
- const uword class_heap_stats_table_address =
- class_table->PredefinedClassHeapStatsTableAddress();
- const uword class_offset = cid * sizeof(ClassHeapStats); // NOLINT
- const uword count_field_offset = (space == Heap::kNew) ?
- ClassHeapStats::allocated_since_gc_new_space_offset() :
- ClassHeapStats::allocated_since_gc_old_space_offset();
- const Address& count_address = Address::Absolute(
- class_heap_stats_table_address + class_offset + count_field_offset);
+ Address count_address(kNoRegister, 0), size_address(kNoRegister, 0);
+ ComputeCounterAddressesForCid(cid, space, &count_address, &size_address);
incl(count_address);
} else {
ASSERT(temp_reg != kNoRegister);
@@ -2354,6 +2368,7 @@
ClassHeapStats::allocated_since_gc_new_space_offset() :
ClassHeapStats::allocated_since_gc_old_space_offset();
// temp_reg gets address of class table pointer.
+ ClassTable* class_table = Isolate::Current()->class_table();
movl(temp_reg, Address::Absolute(class_table->ClassStatsTableAddress()));
// Increment allocation count.
incl(Address(temp_reg, class_offset + count_field_offset));
@@ -2366,39 +2381,24 @@
Register temp_reg,
Heap::Space space) {
ASSERT(cid > 0);
- Isolate* isolate = Isolate::Current();
- ClassTable* class_table = isolate->class_table();
- if (cid < kNumPredefinedCids) {
- const uword class_heap_stats_table_address =
- class_table->PredefinedClassHeapStatsTableAddress();
- const uword class_offset = cid * sizeof(ClassHeapStats); // NOLINT
- const uword count_field_offset = (space == Heap::kNew) ?
- ClassHeapStats::allocated_since_gc_new_space_offset() :
- ClassHeapStats::allocated_since_gc_old_space_offset();
- const uword size_field_offset = (space == Heap::kNew) ?
- ClassHeapStats::allocated_size_since_gc_new_space_offset() :
- ClassHeapStats::allocated_size_since_gc_old_space_offset();
- const Address& count_address = Address::Absolute(
- class_heap_stats_table_address + class_offset + count_field_offset);
- const Address& size_address = Address::Absolute(
- class_heap_stats_table_address + class_offset + size_field_offset);
- incl(count_address);
- addl(size_address, size_reg);
- } else {
- ASSERT(temp_reg != kNoRegister);
- const uword class_offset = cid * sizeof(ClassHeapStats); // NOLINT
- const uword count_field_offset = (space == Heap::kNew) ?
- ClassHeapStats::allocated_since_gc_new_space_offset() :
- ClassHeapStats::allocated_since_gc_old_space_offset();
- const uword size_field_offset = (space == Heap::kNew) ?
- ClassHeapStats::allocated_size_since_gc_new_space_offset() :
- ClassHeapStats::allocated_size_since_gc_old_space_offset();
- // temp_reg gets address of class table pointer.
- movl(temp_reg, Address::Absolute(class_table->ClassStatsTableAddress()));
- // Increment allocation count.
- incl(Address(temp_reg, class_offset + count_field_offset));
- addl(Address(temp_reg, class_offset + size_field_offset), size_reg);
- }
+ ASSERT(cid < kNumPredefinedCids);
+ Address count_address(kNoRegister, 0), size_address(kNoRegister, 0);
+ ComputeCounterAddressesForCid(cid, space, &count_address, &size_address);
+ incl(count_address);
+ addl(size_address, size_reg);
+}
+
+
+void Assembler::UpdateAllocationStatsWithSize(intptr_t cid,
+ intptr_t size_in_bytes,
+ Register temp_reg,
+ Heap::Space space) {
+ ASSERT(cid > 0);
+ ASSERT(cid < kNumPredefinedCids);
+ Address count_address(kNoRegister, 0), size_address(kNoRegister, 0);
+ ComputeCounterAddressesForCid(cid, space, &count_address, &size_address);
+ incl(count_address);
+ addl(size_address, Immediate(size_in_bytes));
}
diff --git a/runtime/vm/assembler_ia32.h b/runtime/vm/assembler_ia32.h
index d3d3dbe..1c88535 100644
--- a/runtime/vm/assembler_ia32.h
+++ b/runtime/vm/assembler_ia32.h
@@ -772,6 +772,10 @@
Register size_reg,
Register temp_reg,
Heap::Space space = Heap::kNew);
+ void UpdateAllocationStatsWithSize(intptr_t cid,
+ intptr_t instance_size,
+ Register temp_reg,
+ Heap::Space space = Heap::kNew);
// Inlined allocation of an instance of class 'cls', code has no runtime
// calls. Jump to 'failure' if the instance cannot be allocated here.
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 4696537..2f2c0ab 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -133,42 +133,35 @@
void ClassHeapStats::Initialize() {
- allocated_before_gc_old_space = 0;
- allocated_before_gc_new_space = 0;
- allocated_size_before_gc_old_space = 0;
- allocated_size_before_gc_new_space = 0;
- live_after_gc_old_space = 0;
- live_after_gc_new_space = 0;
- live_size_after_gc_old_space = 0;
- live_size_after_gc_new_space = 0;
- allocated_since_gc_new_space = 0;
- allocated_since_gc_old_space = 0;
- allocated_size_since_gc_new_space = 0;
- allocated_size_since_gc_old_space = 0;
+ pre_gc.Reset();
+ post_gc.Reset();
+ recent.Reset();
+ accumulated.Reset();
+ last_reset.Reset();
}
void ClassHeapStats::ResetAtNewGC() {
- allocated_before_gc_new_space = live_after_gc_new_space +
- allocated_since_gc_new_space;
- allocated_size_before_gc_new_space = live_size_after_gc_new_space +
- allocated_size_since_gc_new_space;
- live_after_gc_new_space = 0;
- live_size_after_gc_new_space = 0;
- allocated_since_gc_new_space = 0;
- allocated_size_since_gc_new_space = 0;
+ pre_gc.new_count = post_gc.new_count + recent.new_count;
+ pre_gc.new_size = post_gc.new_size + recent.new_size;
+ // Accumulate allocations.
+ accumulated.new_count += recent.new_count - last_reset.new_count;
+ accumulated.new_size += recent.new_size - last_reset.new_size;
+ last_reset.ResetNew();
+ post_gc.ResetNew();
+ recent.ResetNew();
}
void ClassHeapStats::ResetAtOldGC() {
- allocated_before_gc_old_space = live_after_gc_old_space +
- allocated_since_gc_old_space;
- allocated_size_before_gc_old_space = live_size_after_gc_old_space +
- allocated_size_since_gc_old_space;
- live_after_gc_old_space = 0;
- live_size_after_gc_old_space = 0;
- allocated_since_gc_old_space = 0;
- allocated_size_since_gc_old_space = 0;
+ pre_gc.old_count = post_gc.old_count + recent.old_count;
+ pre_gc.old_size = post_gc.old_size + recent.old_size;
+ // Accumulate allocations.
+ accumulated.old_count += recent.old_count - last_reset.old_count;
+ accumulated.old_size += recent.old_size - last_reset.old_size;
+ last_reset.ResetOld();
+ post_gc.ResetOld();
+ recent.ResetOld();
}
@@ -176,18 +169,23 @@
ASSERT(instance_size > 0);
// For classes with fixed instance size we do not emit code to update
// the size statistics. Update them here.
- allocated_size_before_gc_old_space =
- allocated_before_gc_old_space * instance_size;
- allocated_size_before_gc_new_space =
- allocated_before_gc_new_space * instance_size;
- live_size_after_gc_old_space =
- live_after_gc_old_space * instance_size;
- live_size_after_gc_new_space =
- live_after_gc_new_space * instance_size;
- allocated_size_since_gc_new_space =
- allocated_since_gc_new_space * instance_size;
- allocated_size_since_gc_old_space =
- allocated_since_gc_old_space * instance_size;
+ pre_gc.old_size = pre_gc.old_count * instance_size;
+ pre_gc.new_size = pre_gc.new_count * instance_size;
+ post_gc.old_size = post_gc.old_count * instance_size;
+ post_gc.new_size = post_gc.new_count * instance_size;
+ recent.new_size = recent.new_count * instance_size;
+ recent.old_size = recent.old_count * instance_size;
+}
+
+
+void ClassHeapStats::ResetAccumulator() {
+ // Remember how much was allocated so we can subtract this from the result
+ // when printing.
+ last_reset.new_count = recent.new_count;
+ last_reset.new_size = recent.new_size;
+ last_reset.old_count = recent.old_count;
+ last_reset.old_size = recent.old_size;
+ accumulated.Reset();
}
@@ -197,21 +195,29 @@
obj.AddProperty("class", cls);
{
JSONArray new_stats(&obj, "new");
- new_stats.AddValue(allocated_before_gc_new_space);
- new_stats.AddValue(allocated_size_before_gc_new_space);
- new_stats.AddValue(live_after_gc_new_space);
- new_stats.AddValue(live_size_after_gc_new_space);
- new_stats.AddValue(allocated_since_gc_new_space);
- new_stats.AddValue(allocated_size_since_gc_new_space);
+ new_stats.AddValue(pre_gc.new_count);
+ new_stats.AddValue(pre_gc.new_size);
+ new_stats.AddValue(post_gc.new_count);
+ new_stats.AddValue(post_gc.new_size);
+ new_stats.AddValue(recent.new_count);
+ new_stats.AddValue(recent.new_size);
+ new_stats.AddValue64(accumulated.new_count + recent.new_count -
+ last_reset.new_count);
+ new_stats.AddValue64(accumulated.new_size + recent.new_size -
+ last_reset.new_size);
}
{
JSONArray old_stats(&obj, "old");
- old_stats.AddValue(allocated_before_gc_old_space);
- old_stats.AddValue(allocated_size_before_gc_old_space);
- old_stats.AddValue(live_after_gc_old_space);
- old_stats.AddValue(live_size_after_gc_old_space);
- old_stats.AddValue(allocated_since_gc_old_space);
- old_stats.AddValue(allocated_size_since_gc_old_space);
+ old_stats.AddValue(pre_gc.old_count);
+ old_stats.AddValue(pre_gc.old_size);
+ old_stats.AddValue(post_gc.old_count);
+ old_stats.AddValue(post_gc.old_size);
+ old_stats.AddValue(recent.old_count);
+ old_stats.AddValue(recent.old_size);
+ old_stats.AddValue64(accumulated.old_count + recent.old_count -
+ last_reset.old_count);
+ old_stats.AddValue64(accumulated.old_size + recent.old_size -
+ last_reset.old_size);
}
}
@@ -220,8 +226,7 @@
ClassHeapStats* stats = StatsAt(cid);
ASSERT(stats != NULL);
ASSERT(size != 0);
- stats->allocated_since_gc_new_space++;
- stats->allocated_size_since_gc_new_space += size;
+ stats->recent.AddNew(size);
}
@@ -229,8 +234,7 @@
ClassHeapStats* stats = StatsAt(cid);
ASSERT(stats != NULL);
ASSERT(size != 0);
- stats->allocated_since_gc_old_space++;
- stats->allocated_size_since_gc_old_space += size;
+ stats->recent.AddOld(size);
}
@@ -322,12 +326,48 @@
}
+void ClassTable::ResetAllocationAccumulators() {
+ Class& cls = Class::Handle();
+ for (intptr_t i = 1; i < kNumPredefinedCids; i++) {
+ if (!HasValidClassAt(i) || (i == kFreeListElement) || (i == kSmiCid)) {
+ continue;
+ }
+ cls = At(i);
+ if (!(cls.is_finalized() || cls.is_prefinalized())) {
+ // Not finalized.
+ continue;
+ }
+ // Update size before resetting accumulator.
+ if (ShouldUpdateSizeForClassId(i)) {
+ intptr_t instance_size = cls.instance_size();
+ predefined_class_heap_stats_table_[i].UpdateSize(instance_size);
+ }
+ predefined_class_heap_stats_table_[i].ResetAccumulator();
+ }
+ for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
+ if (!HasValidClassAt(i)) {
+ continue;
+ }
+ cls = At(i);
+ if (!(cls.is_finalized() || cls.is_prefinalized())) {
+ // Not finalized.
+ continue;
+ }
+ // Update size before resetting accumulator.
+ if (ShouldUpdateSizeForClassId(i)) {
+ intptr_t instance_size = cls.instance_size();
+ class_heap_stats_table_[i].UpdateSize(instance_size);
+ }
+ class_heap_stats_table_[i].ResetAccumulator();
+ }
+}
+
+
void ClassTable::UpdateLiveOld(intptr_t cid, intptr_t size) {
ClassHeapStats* stats = StatsAt(cid);
ASSERT(stats != NULL);
ASSERT(size >= 0);
- stats->live_after_gc_old_space++;
- stats->live_size_after_gc_old_space += size;
+ stats->post_gc.AddOld(size);
}
@@ -335,8 +375,7 @@
ClassHeapStats* stats = StatsAt(cid);
ASSERT(stats != NULL);
ASSERT(size >= 0);
- stats->live_after_gc_new_space++;
- stats->live_size_after_gc_new_space += size;
+ stats->post_gc.AddNew(size);
}
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index c20e1b7..dccc8f7 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -17,43 +17,76 @@
class ObjectPointerVisitor;
class RawClass;
+template<typename T>
+class AllocStats {
+ public:
+ T new_count;
+ T new_size;
+ T old_count;
+ T old_size;
+
+ void ResetNew() {
+ new_count = 0;
+ new_size = 0;
+ }
+
+ void AddNew(T size) {
+ new_count++;
+ new_size += size;
+ }
+
+ void ResetOld() {
+ old_count = 0;
+ old_size = 0;
+ }
+
+ void AddOld(T size) {
+ old_count++;
+ old_size += size;
+ }
+
+ void Reset() {
+ new_count = 0;
+ new_size = 0;
+ old_count = 0;
+ old_size = 0;
+ }
+};
class ClassHeapStats {
public:
- // Total allocated before GC.
- intptr_t allocated_before_gc_old_space;
- intptr_t allocated_before_gc_new_space;
- intptr_t allocated_size_before_gc_old_space;
- intptr_t allocated_size_before_gc_new_space;
-
+ // Snapshot before GC.
+ AllocStats<intptr_t> pre_gc;
// Live after GC.
- intptr_t live_after_gc_old_space;
- intptr_t live_after_gc_new_space;
- intptr_t live_size_after_gc_old_space;
- intptr_t live_size_after_gc_new_space;
-
- // Allocated since GC.
- intptr_t allocated_since_gc_new_space;
- intptr_t allocated_since_gc_old_space;
- intptr_t allocated_size_since_gc_new_space;
- intptr_t allocated_size_since_gc_old_space;
+ AllocStats<intptr_t> post_gc;
+ // Allocations since the last GC.
+ AllocStats<intptr_t> recent;
+ // Accumulated (across GC) allocations .
+ AllocStats<int64_t> accumulated;
+ // Snapshot of recent at the time of the last reset.
+ AllocStats<intptr_t> last_reset;
static intptr_t allocated_since_gc_new_space_offset() {
- return OFFSET_OF(ClassHeapStats, allocated_since_gc_new_space);
+ return OFFSET_OF(ClassHeapStats, recent) +
+ OFFSET_OF(AllocStats<intptr_t>, new_count);
}
static intptr_t allocated_since_gc_old_space_offset() {
- return OFFSET_OF(ClassHeapStats, allocated_since_gc_old_space);
+ return OFFSET_OF(ClassHeapStats, recent) +
+ OFFSET_OF(AllocStats<intptr_t>, old_count);
}
static intptr_t allocated_size_since_gc_new_space_offset() {
- return OFFSET_OF(ClassHeapStats, allocated_size_since_gc_new_space);
+ return OFFSET_OF(ClassHeapStats, recent) +
+ OFFSET_OF(AllocStats<intptr_t>, new_size);
}
static intptr_t allocated_size_since_gc_old_space_offset() {
- return OFFSET_OF(ClassHeapStats, allocated_size_since_gc_old_space);
+ return OFFSET_OF(ClassHeapStats, recent) +
+ OFFSET_OF(AllocStats<intptr_t>, old_size);
}
void Initialize();
void ResetAtNewGC();
void ResetAtOldGC();
+ void ResetAccumulator();
void UpdateSize(intptr_t instance_size);
void PrintTOJSONArray(const Class& cls, JSONArray* array);
};
@@ -113,6 +146,7 @@
void AllocationProfilePrintToJSONStream(JSONStream* stream);
+ void ResetAllocationAccumulators();
private:
friend class MarkingVisitor;
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 6f65346..87b4dd0 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -870,6 +870,7 @@
if (!error.IsNull()) {
return error.raw();
}
+ func.ClearCode();
}
}
// Inner functions get added to the closures array. As part of compilation
@@ -885,6 +886,7 @@
if (!error.IsNull()) {
return error.raw();
}
+ func.ClearCode();
}
}
}
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 3665f6b..ca6d91b 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -155,29 +155,6 @@
}
-PersistentHandle* Api::UnwrapAsPersistentHandle(Dart_PersistentHandle object) {
- ASSERT(Isolate::Current()->api_state()->IsValidPersistentHandle(object));
- return reinterpret_cast<PersistentHandle*>(object);
-}
-
-
-FinalizablePersistentHandle* Api::UnwrapAsWeakPersistentHandle(
- Dart_WeakPersistentHandle object) {
- ASSERT(Isolate::Current()->api_state()->IsValidWeakPersistentHandle(object) ||
- Isolate::Current()->api_state()->
- IsValidPrologueWeakPersistentHandle(object));
- return reinterpret_cast<FinalizablePersistentHandle*>(object);
-}
-
-
-FinalizablePersistentHandle* Api::UnwrapAsPrologueWeakPersistentHandle(
- Dart_WeakPersistentHandle object) {
- ASSERT(Isolate::Current()->api_state()->IsValidPrologueWeakPersistentHandle(
- object));
- return reinterpret_cast<FinalizablePersistentHandle*>(object);
-}
-
-
Dart_Handle Api::CheckIsolateState(Isolate* isolate) {
if (!isolate->AllowClassFinalization()) {
// Class finalization is blocked for the isolate. Do nothing.
@@ -358,7 +335,26 @@
void Api::SetWeakHandleReturnValue(NativeArguments* args,
Dart_WeakPersistentHandle retval) {
- args->SetReturnUnsafe(Api::UnwrapAsWeakPersistentHandle(retval)->raw());
+ args->SetReturnUnsafe(FinalizablePersistentHandle::Cast(retval)->raw());
+}
+
+
+PersistentHandle* PersistentHandle::Cast(Dart_PersistentHandle handle) {
+ ASSERT(Isolate::Current()->api_state()->IsValidPersistentHandle(handle));
+ return reinterpret_cast<PersistentHandle*>(handle);
+}
+
+
+FinalizablePersistentHandle* FinalizablePersistentHandle::Cast(
+ Dart_WeakPersistentHandle handle) {
+#if defined(DEBUG)
+ ApiState* state = Isolate::Current()->api_state();
+ ASSERT(state->IsValidWeakPersistentHandle(handle) ||
+ state->IsValidPrologueWeakPersistentHandle(handle));
+#endif
+ uword addr = reinterpret_cast<uword>(handle);
+ return reinterpret_cast<FinalizablePersistentHandle*>(
+ addr & ~kWeakPersistentTagMask);
}
@@ -568,9 +564,8 @@
CHECK_ISOLATE(isolate);
ApiState* state = isolate->api_state();
ASSERT(state != NULL);
- ASSERT(state->IsValidPersistentHandle(object));
- return Api::NewHandle(isolate,
- reinterpret_cast<PersistentHandle*>(object)->raw());
+ PersistentHandle* ref = PersistentHandle::Cast(object);
+ return Api::NewHandle(isolate, ref->raw());
}
@@ -580,10 +575,9 @@
CHECK_ISOLATE(isolate);
ApiState* state = isolate->api_state();
ASSERT(state != NULL);
- ASSERT(state->IsValidWeakPersistentHandle(object) ||
- state->IsValidPrologueWeakPersistentHandle(object));
- return Api::NewHandle(
- isolate, reinterpret_cast<FinalizablePersistentHandle*>(object)->raw());
+ FinalizablePersistentHandle* weak_ref =
+ FinalizablePersistentHandle::Cast(object);
+ return Api::NewHandle(isolate, weak_ref->raw());
}
@@ -595,7 +589,7 @@
const Object& old_ref = Object::Handle(isolate, Api::UnwrapHandle(object));
PersistentHandle* new_ref = state->persistent_handles().AllocateHandle();
new_ref->set_raw(old_ref);
- return reinterpret_cast<Dart_PersistentHandle>(new_ref);
+ return new_ref->apiHandle();
}
@@ -607,25 +601,34 @@
ASSERT(state != NULL);
ASSERT(state->IsValidPersistentHandle(obj1));
const Object& obj2_ref = Object::Handle(isolate, Api::UnwrapHandle(obj2));
- PersistentHandle* obj1_ref = Api::UnwrapAsPersistentHandle(obj1);
+ PersistentHandle* obj1_ref = PersistentHandle::Cast(obj1);
obj1_ref->set_raw(obj2_ref);
}
static Dart_WeakPersistentHandle AllocateFinalizableHandle(
Isolate* isolate,
- FinalizablePersistentHandles* handles,
Dart_Handle object,
+ bool is_prologue,
void* peer,
Dart_WeakPersistentHandleFinalizer callback) {
+ ApiState* state = isolate->api_state();
+ ASSERT(state != NULL);
ReusableObjectHandleScope reused_obj_handle(isolate);
Object& ref = reused_obj_handle.Handle();
ref = Api::UnwrapHandle(object);
- FinalizablePersistentHandle* finalizable_ref = handles->AllocateHandle();
+ FinalizablePersistentHandle* finalizable_ref = is_prologue ?
+ state->prologue_weak_persistent_handles().AllocateHandle() :
+ state->weak_persistent_handles().AllocateHandle();
+
finalizable_ref->set_raw(ref);
finalizable_ref->set_peer(peer);
finalizable_ref->set_callback(callback);
- return reinterpret_cast<Dart_WeakPersistentHandle>(finalizable_ref);
+ if (is_prologue) {
+ return finalizable_ref->apiPrologueHandle();
+ } else {
+ return finalizable_ref->apiHandle();
+ }
}
@@ -635,11 +638,9 @@
Dart_WeakPersistentHandleFinalizer callback) {
Isolate* isolate = Isolate::Current();
CHECK_ISOLATE(isolate);
- ApiState* state = isolate->api_state();
- ASSERT(state != NULL);
return AllocateFinalizableHandle(isolate,
- &state->weak_persistent_handles(),
object,
+ false,
peer,
callback);
}
@@ -651,11 +652,9 @@
Dart_WeakPersistentHandleFinalizer callback) {
Isolate* isolate = Isolate::Current();
CHECK_ISOLATE(isolate);
- ApiState* state = isolate->api_state();
- ASSERT(state != NULL);
return AllocateFinalizableHandle(isolate,
- &state->prologue_weak_persistent_handles(),
object,
+ true,
peer,
callback);
}
@@ -666,7 +665,7 @@
CHECK_ISOLATE(isolate);
ApiState* state = isolate->api_state();
ASSERT(state != NULL);
- PersistentHandle* ref = Api::UnwrapAsPersistentHandle(object);
+ PersistentHandle* ref = PersistentHandle::Cast(object);
ASSERT(!state->IsProtectedHandle(ref));
if (!state->IsProtectedHandle(ref)) {
state->persistent_handles().FreeHandle(ref);
@@ -675,31 +674,38 @@
DART_EXPORT void Dart_DeleteWeakPersistentHandle(
+ Dart_Isolate current_isolate,
Dart_WeakPersistentHandle object) {
- Isolate* isolate = Isolate::Current();
+ Isolate* isolate = reinterpret_cast<Isolate*>(current_isolate);
CHECK_ISOLATE(isolate);
+ ASSERT(isolate == Isolate::Current());
ApiState* state = isolate->api_state();
ASSERT(state != NULL);
- if (state->IsValidPrologueWeakPersistentHandle(object)) {
- FinalizablePersistentHandle* prologue_weak_ref =
- Api::UnwrapAsPrologueWeakPersistentHandle(object);
- state->prologue_weak_persistent_handles().FreeHandle(prologue_weak_ref);
- return;
+ if (FinalizablePersistentHandle::IsPrologueWeakPersistentHandle(object)) {
+ ASSERT(state->IsValidPrologueWeakPersistentHandle(object));
+ FinalizablePersistentHandle* weak_ref =
+ FinalizablePersistentHandle::Cast(object);
+ state->prologue_weak_persistent_handles().FreeHandle(weak_ref);
+ } else {
+ ASSERT(!state->IsValidPrologueWeakPersistentHandle(object));
+ FinalizablePersistentHandle* weak_ref =
+ FinalizablePersistentHandle::Cast(object);
+ state->weak_persistent_handles().FreeHandle(weak_ref);
}
- FinalizablePersistentHandle* weak_ref =
- Api::UnwrapAsWeakPersistentHandle(object);
- state->weak_persistent_handles().FreeHandle(weak_ref);
- return;
}
DART_EXPORT bool Dart_IsPrologueWeakPersistentHandle(
Dart_WeakPersistentHandle object) {
+#if defined(DEBUG)
Isolate* isolate = Isolate::Current();
CHECK_ISOLATE(isolate);
ApiState* state = isolate->api_state();
ASSERT(state != NULL);
- return state->IsValidPrologueWeakPersistentHandle(object);
+ ASSERT(state->IsValidPrologueWeakPersistentHandle(object) ==
+ FinalizablePersistentHandle::IsPrologueWeakPersistentHandle(object));
+#endif
+ return FinalizablePersistentHandle::IsPrologueWeakPersistentHandle(object);
}
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index 772d77a..2f10f43 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -129,19 +129,6 @@
static const Instance& UnwrapInstanceHandle(
const ReusableObjectHandleScope& reused, Dart_Handle object);
- // Validates and converts the passed in handle as a persistent handle.
- static PersistentHandle* UnwrapAsPersistentHandle(
- Dart_PersistentHandle object);
-
- // Validates and converts the passed in handle as a weak persistent handle.
- static FinalizablePersistentHandle* UnwrapAsWeakPersistentHandle(
- Dart_WeakPersistentHandle object);
-
- // Validates and converts the passed in handle as a prologue weak
- // persistent handle.
- static FinalizablePersistentHandle* UnwrapAsPrologueWeakPersistentHandle(
- Dart_WeakPersistentHandle object);
-
// Returns an Error handle if isolate is in an inconsistent state.
// Returns a Success handle when no error condition exists.
static Dart_Handle CheckIsolateState(Isolate *isolate);
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 9f4c55f..5c32bc9 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -1696,9 +1696,10 @@
}
-static void ExternalTypedDataFinalizer(Dart_WeakPersistentHandle handle,
- void* peer) {
- Dart_DeleteWeakPersistentHandle(handle);
+static void ExternalTypedDataFinalizer(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer) {
+ Dart_DeleteWeakPersistentHandle(isolate, handle);
*static_cast<int*>(peer) = 42;
}
@@ -1842,22 +1843,22 @@
HANDLESCOPE(isolate);
for (int i = 0; i < 500; i++) {
String& str = String::Handle();
- str ^= Api::UnwrapAsPersistentHandle(handles[i])->raw();
+ str ^= PersistentHandle::Cast(handles[i])->raw();
EXPECT(str.Equals(kTestString1));
}
for (int i = 500; i < 1000; i++) {
String& str = String::Handle();
- str ^= Api::UnwrapAsPersistentHandle(handles[i])->raw();
+ str ^= PersistentHandle::Cast(handles[i])->raw();
EXPECT(str.Equals(kTestString2));
}
for (int i = 1000; i < 1500; i++) {
String& str = String::Handle();
- str ^= Api::UnwrapAsPersistentHandle(handles[i])->raw();
+ str ^= PersistentHandle::Cast(handles[i])->raw();
EXPECT(str.Equals(kTestString1));
}
for (int i = 1500; i < 2000; i++) {
String& str = String::Handle();
- str ^= Api::UnwrapAsPersistentHandle(handles[i])->raw();
+ str ^= PersistentHandle::Cast(handles[i])->raw();
EXPECT(str.Equals(kTestString2));
}
}
@@ -1914,13 +1915,13 @@
Dart_Handle ref1 = Api::NewHandle(isolate, String::New(kTestString1));
Dart_PersistentHandle obj = Dart_NewPersistentHandle(ref1);
EXPECT(state->IsValidPersistentHandle(obj));
- str ^= Api::UnwrapAsPersistentHandle(obj)->raw();
+ str ^= PersistentHandle::Cast(obj)->raw();
EXPECT(str.Equals(kTestString1));
// Now create another local handle and assign it to the persistent handle.
Dart_Handle ref2 = Api::NewHandle(isolate, String::New(kTestString2));
Dart_SetPersistentHandle(obj, ref2);
- str ^= Api::UnwrapAsPersistentHandle(obj)->raw();
+ str ^= PersistentHandle::Cast(obj)->raw();
EXPECT(str.Equals(kTestString2));
// Now assign Null to the persistent handle and check.
@@ -2051,8 +2052,9 @@
Dart_ExitScope();
}
- Dart_DeleteWeakPersistentHandle(weak_new_ref);
- Dart_DeleteWeakPersistentHandle(weak_old_ref);
+ Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
+ Dart_DeleteWeakPersistentHandle(isolate, weak_new_ref);
+ Dart_DeleteWeakPersistentHandle(isolate, weak_old_ref);
// Garbage collect one last time to revisit deleted handles.
Isolate::Current()->heap()->CollectGarbage(Heap::kNew);
@@ -2060,8 +2062,9 @@
}
-static void WeakPersistentHandlePeerFinalizer(
- Dart_WeakPersistentHandle handle, void* peer) {
+static void WeakPersistentHandlePeerFinalizer(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer) {
*static_cast<int*>(peer) = 42;
}
@@ -2083,7 +2086,8 @@
EXPECT(peer == 0);
GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks);
EXPECT(peer == 42);
- Dart_DeleteWeakPersistentHandle(weak_ref);
+ Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
+ Dart_DeleteWeakPersistentHandle(isolate, weak_ref);
}
@@ -2100,7 +2104,8 @@
}
// A finalizer is not invoked on a deleted handle. Therefore, the
// peer value should not change after the referent is collected.
- Dart_DeleteWeakPersistentHandle(weak_ref);
+ Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
+ Dart_DeleteWeakPersistentHandle(isolate, weak_ref);
EXPECT(peer == 0);
Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
EXPECT(peer == 0);
diff --git a/runtime/vm/dart_api_state.h b/runtime/vm/dart_api_state.h
index 4db8fab..1f63276 100644
--- a/runtime/vm/dart_api_state.h
+++ b/runtime/vm/dart_api_state.h
@@ -151,8 +151,14 @@
void set_raw(const LocalHandle& ref) { raw_ = ref.raw(); }
void set_raw(const Object& object) { raw_ = object.raw(); }
RawObject** raw_addr() { return &raw_; }
+ Dart_PersistentHandle apiHandle() {
+ return reinterpret_cast<Dart_PersistentHandle>(this);
+ }
+
static intptr_t raw_offset() { return OFFSET_OF(PersistentHandle, raw_); }
+ static PersistentHandle* Cast(Dart_PersistentHandle handle);
+
private:
friend class PersistentHandles;
@@ -197,19 +203,44 @@
void set_callback(Dart_WeakPersistentHandleFinalizer callback) {
callback_ = callback;
}
+ Dart_WeakPersistentHandle apiPrologueHandle() {
+ uword addr = reinterpret_cast<uword>(this);
+ return reinterpret_cast<Dart_WeakPersistentHandle>(
+ addr | kPrologueWeakPersistentTag);
+ }
+ Dart_WeakPersistentHandle apiHandle() {
+ return reinterpret_cast<Dart_WeakPersistentHandle>(this);
+ }
- static void Finalize(FinalizablePersistentHandle* handle) {
+ static bool IsPrologueWeakPersistentHandle(Dart_WeakPersistentHandle handle) {
+ uword addr = reinterpret_cast<uword>(handle);
+ return (addr & kWeakPersistentTagMask) == kPrologueWeakPersistentTag;
+ }
+ static FinalizablePersistentHandle* Cast(Dart_WeakPersistentHandle handle);
+ static void Finalize(Isolate* isolate,
+ FinalizablePersistentHandle* handle,
+ bool is_prologue_weak) {
Dart_WeakPersistentHandleFinalizer callback = handle->callback();
if (callback != NULL) {
void* peer = handle->peer();
handle->Clear();
- (*callback)(reinterpret_cast<Dart_WeakPersistentHandle>(handle), peer);
+ Dart_WeakPersistentHandle object = is_prologue_weak ?
+ handle->apiPrologueHandle() :
+ handle->apiHandle();
+ (*callback)(reinterpret_cast<Dart_Isolate>(isolate), object, peer);
} else {
handle->Clear();
}
}
private:
+ enum {
+ kWeakPersistentTag = 0,
+ kPrologueWeakPersistentTag = 1,
+ kWeakPersistentTagSize = 1,
+ kWeakPersistentTagMask = 1,
+ };
+
friend class FinalizablePersistentHandles;
FinalizablePersistentHandle() : raw_(NULL), peer_(NULL), callback_(NULL) { }
@@ -403,7 +434,7 @@
: Handles<kFinalizablePersistentHandleSizeInWords,
kFinalizablePersistentHandlesPerChunk,
kOffsetOfRawPtrInFinalizablePersistentHandle>(),
- free_list_(NULL) { }
+ free_list_(NULL) { }
~FinalizablePersistentHandles() {
free_list_ = NULL;
}
@@ -413,10 +444,11 @@
void set_free_list(FinalizablePersistentHandle* value) { free_list_ = value; }
// Visit all handles stored in the various handle blocks.
- void VisitHandles(HandleVisitor* visitor) {
+ void VisitHandles(HandleVisitor* visitor, bool is_prologue_weak) {
Handles<kFinalizablePersistentHandleSizeInWords,
kFinalizablePersistentHandlesPerChunk,
- kOffsetOfRawPtrInFinalizablePersistentHandle>::Visit(visitor);
+ kOffsetOfRawPtrInFinalizablePersistentHandle>::Visit(
+ visitor, is_prologue_weak);
}
// Visit all object pointers stored in the various handles.
@@ -479,16 +511,18 @@
RawObject** get_key(intptr_t i) {
ASSERT(i >= 0);
ASSERT(i < num_keys_);
- return (reinterpret_cast<FinalizablePersistentHandle*>(keys_[i]))->
- raw_addr();
+ FinalizablePersistentHandle* ref =
+ FinalizablePersistentHandle::Cast(keys_[i]);
+ return ref->raw_addr();
}
intptr_t num_values() const { return num_values_; }
RawObject** get_value(intptr_t i) {
ASSERT(i >= 0);
ASSERT(i < num_values_);
- return (reinterpret_cast<FinalizablePersistentHandle*>(values_[i]))->
- raw_addr();
+ FinalizablePersistentHandle* ref =
+ FinalizablePersistentHandle::Cast(values_[i]);
+ return ref->raw_addr();
}
static WeakReferenceSet* Pop(WeakReferenceSet** queue) {
@@ -652,9 +686,9 @@
void VisitWeakHandles(HandleVisitor* visitor,
bool visit_prologue_weak_handles) {
- weak_persistent_handles().VisitHandles(visitor);
+ weak_persistent_handles().VisitHandles(visitor, false);
if (visit_prologue_weak_handles) {
- prologue_weak_persistent_handles().VisitHandles(visitor);
+ prologue_weak_persistent_handles().VisitHandles(visitor, true);
}
}
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc
index ab9e6cd..3632b92 100644
--- a/runtime/vm/deferred_objects.cc
+++ b/runtime/vm/deferred_objects.cc
@@ -116,12 +116,22 @@
const Instance& obj = Instance::ZoneHandle(Instance::New(cls));
+ Smi& offset = Smi::Handle();
Field& field = Field::Handle();
Object& value = Object::Handle();
+ const Array& offset_map = Array::Handle(cls.OffsetToFieldMap());
+
for (intptr_t i = 0; i < field_count_; i++) {
- field ^= GetField(i);
+ offset ^= GetFieldOffset(i);
+ field ^= offset_map.At(offset.Value() / kWordSize);
value = GetValue(i);
- obj.SetField(field, value);
+ if (!field.IsNull()) {
+ obj.SetField(field, value);
+ } else {
+ ASSERT(cls.IsSignatureClass() ||
+ (offset.Value() == cls.type_arguments_field_offset()));
+ obj.SetFieldAtOffset(offset.Value(), value);
+ }
if (FLAG_trace_deoptimization_verbose) {
OS::PrintErr(" %s <- %s\n",
diff --git a/runtime/vm/deferred_objects.h b/runtime/vm/deferred_objects.h
index 2e0733c..9619d16 100644
--- a/runtime/vm/deferred_objects.h
+++ b/runtime/vm/deferred_objects.h
@@ -164,7 +164,7 @@
};
enum {
- kFieldIndex = 0,
+ kOffsetIndex = 0,
kValueIndex,
kFieldEntrySize,
};
@@ -178,8 +178,8 @@
return args_[kClassIndex];
}
- RawObject* GetField(intptr_t index) const {
- return args_[kFieldsStartIndex + kFieldEntrySize * index + kFieldIndex];
+ RawObject* GetFieldOffset(intptr_t index) const {
+ return args_[kFieldsStartIndex + kFieldEntrySize * index + kOffsetIndex];
}
RawObject* GetValue(intptr_t index) const {
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 9dca795..3e31cb2 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -364,12 +364,6 @@
Object& obj = Object::Handle();
for (intptr_t i = 0; i < dest_frame_size_; i++) {
obj = reinterpret_cast<RawObject*>(dest_frame_[i]);
- ASSERT(obj.IsNull() ||
- obj.IsInstance() ||
- obj.IsContext() ||
- obj.IsTypeArguments() ||
- obj.IsClass() || // TODO(turnidge): Ask around and find out why
- obj.IsField()); // Class/Field show up here. Maybe type feedback?
dest_array.SetAt(i, obj);
}
return dest_array.raw();
@@ -1377,8 +1371,9 @@
AddConstant(mat->cls(), dest_index++);
for (intptr_t i = 0; i < mat->InputCount(); i++) {
if (!mat->InputAt(i)->BindsToConstantNull()) {
- // Emit field-value pair.
- AddConstant(mat->FieldAt(i), dest_index++);
+ // Emit offset-value pair.
+ AddConstant(Smi::Handle(Smi::New(mat->FieldOffsetAt(i))),
+ dest_index++);
AddCopy(mat->InputAt(i), mat->LocationAt(i), dest_index++);
}
}
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
index 044e100..5b85dca 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -101,6 +101,7 @@
bool Disassembler::CanFindOldObject(uword addr) {
FindAddrVisitor visitor(addr);
+ NoGCScope no_gc;
return Isolate::Current()->heap()->FindOldObject(&visitor) != Object::null();
}
diff --git a/runtime/vm/disassembler_ia32.cc b/runtime/vm/disassembler_ia32.cc
index 1a6877f..eca4dd4 100644
--- a/runtime/vm/disassembler_ia32.cc
+++ b/runtime/vm/disassembler_ia32.cc
@@ -485,7 +485,6 @@
void X86Decoder::PrintAddress(uword addr) {
- NoGCScope no_gc;
char addr_buffer[32];
OS::SNPrint(addr_buffer, sizeof(addr_buffer), "%#" Px "", addr);
Print(addr_buffer);
@@ -494,6 +493,7 @@
reinterpret_cast<RawObject*>(addr)->IsOldObject() &&
!Isolate::Current()->heap()->CodeContains(addr) &&
Disassembler::CanFindOldObject(addr)) {
+ NoGCScope no_gc;
const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
if (obj.IsArray()) {
const Array& arr = Array::Cast(obj);
@@ -526,15 +526,11 @@
// Print only if jumping to entry point.
const Code& code = Code::Handle(Code::LookupCode(addr));
if (!code.IsNull() && (code.EntryPoint() == addr)) {
- const Function& function = Function::Handle(code.function());
- if (function.IsNull()) {
- Print(" [ stub ]");
- } else {
- const char* name_of_function = function.ToFullyQualifiedCString();
- Print(" [");
- Print(name_of_function);
- Print("]");
- }
+ const String& name = String::Handle(code.UserName());
+ const char* name_c = name.ToCString();
+ Print(" [");
+ Print(name_c);
+ Print("]");
}
}
}
diff --git a/runtime/vm/disassembler_x64.cc b/runtime/vm/disassembler_x64.cc
index 4d58672..40a0e45 100644
--- a/runtime/vm/disassembler_x64.cc
+++ b/runtime/vm/disassembler_x64.cc
@@ -802,7 +802,6 @@
void DisassemblerX64::AppendAddressToBuffer(uint8_t* addr_byte_ptr) {
- NoGCScope no_gc;
uword addr = reinterpret_cast<uword>(addr_byte_ptr);
AppendToBuffer("%#" Px "", addr);
// Try to print as heap object or stub name
@@ -810,6 +809,7 @@
reinterpret_cast<RawObject*>(addr)->IsOldObject() &&
!Isolate::Current()->heap()->CodeContains(addr) &&
Disassembler::CanFindOldObject(addr)) {
+ NoGCScope no_gc;
const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
if (obj.IsArray()) {
const Array& arr = Array::Cast(obj);
@@ -838,13 +838,9 @@
// Print only if jumping to entry point.
const Code& code = Code::Handle(Code::LookupCode(addr));
if (!code.IsNull() && (code.EntryPoint() == addr)) {
- const Function& function = Function::Handle(code.function());
- if (function.IsNull()) {
- AppendToBuffer(" [ stub ]");
- } else {
- const char* name_of_function = function.ToFullyQualifiedCString();
- AppendToBuffer(" [%s]", name_of_function);
- }
+ const String& name = String::Handle(code.UserName());
+ const char* name_c = name.ToCString();
+ AppendToBuffer(" [%s]", name_c);
}
}
}
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 49238be..9188027 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -732,7 +732,9 @@
Definition* EffectGraphVisitor::BuildLoadLocal(const LocalVariable& local) {
- if (local.is_captured()) {
+ if (local.IsConst()) {
+ return new ConstantInstr(*local.ConstValue());
+ } else if (local.is_captured()) {
intptr_t delta =
owner()->context_level() - local.owner()->context_level();
ASSERT(delta >= 0);
@@ -3489,6 +3491,22 @@
}
}
+ // This check may be deleted if the generated code is leaf.
+ // Native functions don't need a stack check at entry.
+ const Function& function = owner()->parsed_function()->function();
+ if ((node == owner()->parsed_function()->node_sequence()) &&
+ !function.is_native()) {
+ // Always allocate CheckOverflowInstr so that deopt-ids match regardless
+ // if we inline or not.
+ CheckStackOverflowInstr* check =
+ new CheckStackOverflowInstr(function.token_pos(), 0);
+ // If we are inlining don't actually attach the stack check. We must still
+ // create the stack check in order to allocate a deopt id.
+ if (!owner()->IsInlining()) {
+ AddInstruction(check);
+ }
+ }
+
if (FLAG_enable_type_checks &&
(node == owner()->parsed_function()->node_sequence())) {
const Function& function = owner()->parsed_function()->function();
@@ -3864,23 +3882,11 @@
if (FLAG_print_scopes) {
AstPrinter::PrintFunctionScope(*parsed_function());
}
- const Function& function = parsed_function()->function();
TargetEntryInstr* normal_entry =
new TargetEntryInstr(AllocateBlockId(),
CatchClauseNode::kInvalidTryIndex);
graph_entry_ = new GraphEntryInstr(parsed_function(), normal_entry, osr_id_);
EffectGraphVisitor for_effect(this);
- // This check may be deleted if the generated code is leaf.
- // Native functions don't need a stack check at entry.
- if (!function.is_native()) {
- CheckStackOverflowInstr* check =
- new CheckStackOverflowInstr(function.token_pos(), 0);
- // If we are inlining don't actually attach the stack check. We must still
- // create the stack check in order to allocate a deopt id.
- if (!IsInlining()) {
- for_effect.AddInstruction(check);
- }
- }
parsed_function()->node_sequence()->Visit(&for_effect);
AppendFragment(normal_entry, for_effect);
// Check that the graph is properly terminated.
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 58b9f5f..347a743 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -1237,35 +1237,6 @@
}
-// Returns true if checking against this type is a direct class id comparison.
-bool FlowGraphCompiler::TypeCheckAsClassEquality(const AbstractType& type) {
- ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
- // Requires CHA, which can be applied in optimized code only,
- if (!FLAG_use_cha || !is_optimizing()) return false;
- if (!type.IsInstantiated()) return false;
- const Class& type_class = Class::Handle(type.type_class());
- // Signature classes have different type checking rules.
- if (type_class.IsSignatureClass()) return false;
- // Could be an interface check?
- if (type_class.is_implemented()) return false;
- const intptr_t type_cid = type_class.id();
- if (CHA::HasSubclasses(type_cid)) return false;
- const intptr_t num_type_args = type_class.NumTypeArguments();
- if (num_type_args > 0) {
- // Only raw types can be directly compared, thus disregarding type
- // arguments.
- const intptr_t num_type_params = type_class.NumTypeParameters();
- const intptr_t from_index = num_type_args - num_type_params;
- const TypeArguments& type_arguments =
- TypeArguments::Handle(type.arguments());
- const bool is_raw_type = type_arguments.IsNull() ||
- type_arguments.IsRaw(from_index, num_type_params);
- return is_raw_type;
- }
- return true;
-}
-
-
static int HighestCountFirst(const CidTarget* a, const CidTarget* b) {
// Negative if 'a' should sort before 'b'.
return b->count - a->count;
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index eb7fa01..c31dbaf 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -505,20 +505,6 @@
// type error. A null value is handled prior to executing this inline code.
return SubtypeTestCache::null();
}
- if (TypeCheckAsClassEquality(type)) {
- const intptr_t type_cid = Class::Handle(type.type_class()).id();
- const Register kInstanceReg = R0;
- __ tst(kInstanceReg, ShifterOperand(kSmiTagMask));
- if (type_cid == kSmiCid) {
- __ b(is_instance_lbl, EQ);
- } else {
- __ b(is_not_instance_lbl, EQ);
- __ CompareClassId(kInstanceReg, type_cid, R3);
- __ b(is_instance_lbl, EQ);
- }
- __ b(is_not_instance_lbl);
- return SubtypeTestCache::null();
- }
if (type.IsInstantiated()) {
const Class& type_class = Class::ZoneHandle(type.type_class());
// A class equality check is only applicable with a dst type of a
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 94af4b2..f540b32 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -518,20 +518,6 @@
// type error. A null value is handled prior to executing this inline code.
return SubtypeTestCache::null();
}
- if (TypeCheckAsClassEquality(type)) {
- const intptr_t type_cid = Class::Handle(type.type_class()).id();
- const Register kInstanceReg = EAX;
- __ testl(kInstanceReg, Immediate(kSmiTagMask));
- if (type_cid == kSmiCid) {
- __ j(ZERO, is_instance_lbl);
- } else {
- __ j(ZERO, is_not_instance_lbl);
- __ CompareClassId(kInstanceReg, type_cid, EDI);
- __ j(EQUAL, is_instance_lbl);
- }
- __ jmp(is_not_instance_lbl);
- return SubtypeTestCache::null();
- }
if (type.IsInstantiated()) {
const Class& type_class = Class::ZoneHandle(type.type_class());
// A class equality check is only applicable with a dst type of a
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index f2fd7f8..42578b9 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -500,20 +500,6 @@
// type error. A null value is handled prior to executing this inline code.
return SubtypeTestCache::null();
}
- if (TypeCheckAsClassEquality(type)) {
- const intptr_t type_cid = Class::Handle(type.type_class()).id();
- const Register kInstanceReg = A0;
- __ andi(CMPRES1, kInstanceReg, Immediate(kSmiTagMask));
- if (type_cid == kSmiCid) {
- __ beq(CMPRES1, ZR, is_instance_lbl);
- } else {
- __ beq(CMPRES1, ZR, is_not_instance_lbl);
- __ LoadClassId(T0, kInstanceReg);
- __ BranchEqual(T0, type_cid, is_instance_lbl);
- }
- __ b(is_not_instance_lbl);
- return SubtypeTestCache::null();
- }
if (type.IsInstantiated()) {
const Class& type_class = Class::ZoneHandle(type.type_class());
// A class equality check is only applicable with a dst type of a
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 31e1fb9..871d955 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -506,20 +506,6 @@
// type error. A null value is handled prior to executing this inline code.
return SubtypeTestCache::null();
}
- if (TypeCheckAsClassEquality(type)) {
- const intptr_t type_cid = Class::Handle(type.type_class()).id();
- const Register kInstanceReg = RAX;
- __ testq(kInstanceReg, Immediate(kSmiTagMask));
- if (type_cid == kSmiCid) {
- __ j(ZERO, is_instance_lbl);
- } else {
- __ j(ZERO, is_not_instance_lbl);
- __ CompareClassId(kInstanceReg, type_cid);
- __ j(EQUAL, is_instance_lbl);
- }
- __ jmp(is_not_instance_lbl);
- return SubtypeTestCache::null();
- }
if (type.IsInstantiated()) {
const Class& type_class = Class::ZoneHandle(type.type_class());
// A class equality check is only applicable with a dst type of a
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 0226f61..4a0e35e 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -3559,6 +3559,35 @@
}
+// Returns true if checking against this type is a direct class id comparison.
+static bool TypeCheckAsClassEquality(const AbstractType& type) {
+ ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
+ // Requires CHA.
+ if (!FLAG_use_cha) return false;
+ if (!type.IsInstantiated()) return false;
+ const Class& type_class = Class::Handle(type.type_class());
+ // Signature classes have different type checking rules.
+ if (type_class.IsSignatureClass()) return false;
+ // Could be an interface check?
+ if (type_class.is_implemented()) return false;
+ const intptr_t type_cid = type_class.id();
+ if (CHA::HasSubclasses(type_cid)) return false;
+ const intptr_t num_type_args = type_class.NumTypeArguments();
+ if (num_type_args > 0) {
+ // Only raw types can be directly compared, thus disregarding type
+ // arguments.
+ const intptr_t num_type_params = type_class.NumTypeParameters();
+ const intptr_t from_index = num_type_args - num_type_params;
+ const TypeArguments& type_arguments =
+ TypeArguments::Handle(type.arguments());
+ const bool is_raw_type = type_arguments.IsNull() ||
+ type_arguments.IsRaw(from_index, num_type_params);
+ return is_raw_type;
+ }
+ return true;
+}
+
+
// TODO(srdjan): Use ICData to check if always true or false.
void FlowGraphOptimizer::ReplaceWithInstanceOf(InstanceCallInstr* call) {
ASSERT(Token::IsTypeTestOperator(call->token_kind()));
@@ -3590,6 +3619,27 @@
return;
}
}
+
+ if (TypeCheckAsClassEquality(type)) {
+ LoadClassIdInstr* left_cid = new LoadClassIdInstr(new Value(left));
+ InsertBefore(call,
+ left_cid,
+ NULL,
+ Definition::kValue);
+ const intptr_t type_cid = Class::Handle(type.type_class()).id();
+ ConstantInstr* cid =
+ flow_graph()->GetConstant(Smi::Handle(Smi::New(type_cid)));
+
+ StrictCompareInstr* check_cid =
+ new StrictCompareInstr(call->token_pos(),
+ negate ? Token::kNE_STRICT : Token::kEQ_STRICT,
+ new Value(left_cid),
+ new Value(cid),
+ false); // No number check.
+ ReplaceCall(call, check_cid);
+ return;
+ }
+
InstanceOfInstr* instance_of =
new InstanceOfInstr(call->token_pos(),
new Value(left),
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index 57ac9f4..a8ce1be 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -298,15 +298,17 @@
class MarkingWeakVisitor : public HandleVisitor {
public:
- MarkingWeakVisitor() {
+ MarkingWeakVisitor() : HandleVisitor(Isolate::Current()) {
}
- void VisitHandle(uword addr) {
+ void VisitHandle(uword addr, bool is_prologue_weak) {
FinalizablePersistentHandle* handle =
reinterpret_cast<FinalizablePersistentHandle*>(addr);
RawObject* raw_obj = handle->raw();
if (IsUnreachable(raw_obj)) {
- FinalizablePersistentHandle::Finalize(handle);
+ FinalizablePersistentHandle::Finalize(isolate(),
+ handle,
+ is_prologue_weak);
}
}
diff --git a/runtime/vm/handles.h b/runtime/vm/handles.h
index 612682c..561f3d0 100644
--- a/runtime/vm/handles.h
+++ b/runtime/vm/handles.h
@@ -64,10 +64,17 @@
class HandleVisitor {
public:
- virtual void VisitHandle(uword addr) = 0;
+ explicit HandleVisitor(Isolate* isolate) : isolate_(isolate) {}
+ virtual ~HandleVisitor() {}
- virtual ~HandleVisitor() {
- }
+ Isolate* isolate() const { return isolate_; }
+
+ virtual void VisitHandle(uword addr, bool is_prologue_weak) = 0;
+
+ private:
+ Isolate* isolate_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(HandleVisitor);
};
@@ -97,7 +104,7 @@
void VisitUnvisitedScopedHandles(ObjectPointerVisitor* visitor);
// Visit all of the various handles.
- void Visit(HandleVisitor* visitor);
+ void Visit(HandleVisitor* visitor, bool is_prologue_weak);
// Reset the handles so that we can reuse.
void Reset();
@@ -172,7 +179,7 @@
void VisitObjectPointers(ObjectPointerVisitor* visitor);
// Visit all of the handles in the handle block.
- void Visit(HandleVisitor* visitor);
+ void Visit(HandleVisitor* visitor, bool is_prologue_weak);
#if defined(DEBUG)
// Zaps the free handle area to an uninitialized value.
diff --git a/runtime/vm/handles_impl.h b/runtime/vm/handles_impl.h
index a40a671..be9e7d4 100644
--- a/runtime/vm/handles_impl.h
+++ b/runtime/vm/handles_impl.h
@@ -49,18 +49,19 @@
template <int kHandleSizeInWords, int kHandlesPerChunk, int kOffsetOfRawPtr>
void Handles<kHandleSizeInWords,
kHandlesPerChunk,
- kOffsetOfRawPtr>::Visit(HandleVisitor* visitor) {
+ kOffsetOfRawPtr>::Visit(HandleVisitor* visitor,
+ bool is_prologue_weak) {
// Visit all zone handles.
HandlesBlock* block = zone_blocks_;
while (block != NULL) {
- block->Visit(visitor);
+ block->Visit(visitor, is_prologue_weak);
block = block->next_block();
}
// Visit all scoped handles.
block = &first_scoped_block_;
do {
- block->Visit(visitor);
+ block->Visit(visitor, is_prologue_weak);
block = block->next_block();
} while (block != NULL);
}
@@ -341,10 +342,11 @@
template <int kHandleSizeInWords, int kHandlesPerChunk, int kOffsetOfRawPtr>
void Handles<kHandleSizeInWords,
kHandlesPerChunk,
- kOffsetOfRawPtr>::HandlesBlock::Visit(HandleVisitor* visitor) {
+ kOffsetOfRawPtr>::HandlesBlock::Visit(HandleVisitor* visitor,
+ bool is_prologue_weak) {
ASSERT(visitor != NULL);
for (intptr_t i = 0; i < next_handle_slot_; i += kHandleSizeInWords) {
- visitor->VisitHandle(reinterpret_cast<uword>(&data_[i]));
+ visitor->VisitHandle(reinterpret_cast<uword>(&data_[i]), is_prologue_weak);
}
}
diff --git a/runtime/vm/heap_test.cc b/runtime/vm/heap_test.cc
index de78bea..d20f7f2 100644
--- a/runtime/vm/heap_test.cc
+++ b/runtime/vm/heap_test.cc
@@ -56,9 +56,9 @@
}
static void DumpClassHeapStats(ClassHeapStats* stats) {
- printf("%" Pd " ", stats->allocated_since_gc_new_space);
- printf("%" Pd " ", stats->live_after_gc_new_space);
- printf("%" Pd " ", stats->allocated_before_gc_new_space);
+ printf("%" Pd " ", stats->recent.new_count);
+ printf("%" Pd " ", stats->post_gc.new_count);
+ printf("%" Pd " ", stats->pre_gc.new_count);
printf("\n");
}
};
@@ -101,64 +101,64 @@
ClassHeapStatsTestHelper::GetHeapStatsForCid(class_table,
cid);
// Verify preconditions:
- EXPECT_EQ(0, class_stats->allocated_before_gc_old_space);
- EXPECT_EQ(0, class_stats->live_after_gc_old_space);
- EXPECT_EQ(0, class_stats->allocated_since_gc_old_space);
- EXPECT_EQ(0, class_stats->allocated_before_gc_new_space);
- EXPECT_EQ(0, class_stats->live_after_gc_new_space);
+ EXPECT_EQ(0, class_stats->pre_gc.old_count);
+ EXPECT_EQ(0, class_stats->post_gc.old_count);
+ EXPECT_EQ(0, class_stats->recent.old_count);
+ EXPECT_EQ(0, class_stats->pre_gc.new_count);
+ EXPECT_EQ(0, class_stats->post_gc.new_count);
// Class allocated twice since GC from new space.
- EXPECT_EQ(2, class_stats->allocated_since_gc_new_space);
+ EXPECT_EQ(2, class_stats->recent.new_count);
// Perform GC.
heap->CollectGarbage(Heap::kNew);
// Verify postconditions:
- EXPECT_EQ(0, class_stats->allocated_before_gc_old_space);
- EXPECT_EQ(0, class_stats->live_after_gc_old_space);
- EXPECT_EQ(0, class_stats->allocated_since_gc_old_space);
+ EXPECT_EQ(0, class_stats->pre_gc.old_count);
+ EXPECT_EQ(0, class_stats->post_gc.old_count);
+ EXPECT_EQ(0, class_stats->recent.old_count);
// Total allocations before GC.
- EXPECT_EQ(2, class_stats->allocated_before_gc_new_space);
+ EXPECT_EQ(2, class_stats->pre_gc.new_count);
// Only one survived.
- EXPECT_EQ(1, class_stats->live_after_gc_new_space);
- EXPECT_EQ(0, class_stats->allocated_since_gc_new_space);
+ EXPECT_EQ(1, class_stats->post_gc.new_count);
+ EXPECT_EQ(0, class_stats->recent.new_count);
// Perform GC. The following is heavily dependent on the behaviour
// of the GC: Retained instance of A will be promoted.
heap->CollectGarbage(Heap::kNew);
// Verify postconditions:
- EXPECT_EQ(0, class_stats->allocated_before_gc_old_space);
- EXPECT_EQ(0, class_stats->live_after_gc_old_space);
+ EXPECT_EQ(0, class_stats->pre_gc.old_count);
+ EXPECT_EQ(0, class_stats->post_gc.old_count);
// Promotion counted as an allocation from old space.
- EXPECT_EQ(1, class_stats->allocated_since_gc_old_space);
+ EXPECT_EQ(1, class_stats->recent.old_count);
// There was one instance allocated before GC.
- EXPECT_EQ(1, class_stats->allocated_before_gc_new_space);
+ EXPECT_EQ(1, class_stats->pre_gc.new_count);
// There are no instances allocated in new space after GC.
- EXPECT_EQ(0, class_stats->live_after_gc_new_space);
+ EXPECT_EQ(0, class_stats->post_gc.new_count);
// No new allocations.
- EXPECT_EQ(0, class_stats->allocated_since_gc_new_space);
+ EXPECT_EQ(0, class_stats->recent.new_count);
// Perform a GC on new space.
heap->CollectGarbage(Heap::kNew);
// There were no instances allocated before GC.
- EXPECT_EQ(0, class_stats->allocated_before_gc_new_space);
+ EXPECT_EQ(0, class_stats->pre_gc.new_count);
// There are no instances allocated in new space after GC.
- EXPECT_EQ(0, class_stats->live_after_gc_new_space);
+ EXPECT_EQ(0, class_stats->post_gc.new_count);
// No new allocations.
- EXPECT_EQ(0, class_stats->allocated_since_gc_new_space);
+ EXPECT_EQ(0, class_stats->recent.new_count);
heap->CollectGarbage(Heap::kOld);
// Verify postconditions:
- EXPECT_EQ(1, class_stats->allocated_before_gc_old_space);
- EXPECT_EQ(1, class_stats->live_after_gc_old_space);
- EXPECT_EQ(0, class_stats->allocated_since_gc_old_space);
+ EXPECT_EQ(1, class_stats->pre_gc.old_count);
+ EXPECT_EQ(1, class_stats->post_gc.old_count);
+ EXPECT_EQ(0, class_stats->recent.old_count);
// Exit scope, freeing instance.
Dart_ExitScope();
// Perform GC.
heap->CollectGarbage(Heap::kOld);
// Verify postconditions:
- EXPECT_EQ(1, class_stats->allocated_before_gc_old_space);
- EXPECT_EQ(0, class_stats->live_after_gc_old_space);
- EXPECT_EQ(0, class_stats->allocated_since_gc_old_space);
+ EXPECT_EQ(1, class_stats->pre_gc.old_count);
+ EXPECT_EQ(0, class_stats->post_gc.old_count);
+ EXPECT_EQ(0, class_stats->recent.old_count);
// Perform GC.
heap->CollectGarbage(Heap::kOld);
- EXPECT_EQ(0, class_stats->allocated_before_gc_old_space);
- EXPECT_EQ(0, class_stats->live_after_gc_old_space);
- EXPECT_EQ(0, class_stats->allocated_since_gc_old_space);
+ EXPECT_EQ(0, class_stats->pre_gc.old_count);
+ EXPECT_EQ(0, class_stats->post_gc.old_count);
+ EXPECT_EQ(0, class_stats->recent.old_count);
}
} // namespace dart.
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 8804088..117a816 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -4073,8 +4073,8 @@
}
const Class& cls() const { return cls_; }
- const Field& FieldAt(intptr_t i) const {
- return *fields_[i];
+ intptr_t FieldOffsetAt(intptr_t i) const {
+ return fields_[i]->Offset();
}
const Location& LocationAt(intptr_t i) {
return locations_[i];
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index f1248a2..aca4b09 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -24,6 +24,7 @@
DECLARE_FLAG(bool, propagate_ic_data);
DECLARE_FLAG(bool, use_osr);
DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
+DECLARE_FLAG(bool, use_slow_path);
// Generic summary for call instructions that have all arguments pushed
// on the stack and return the result in a fixed register EAX.
@@ -2255,6 +2256,16 @@
LocationSummary* AllocateContextInstr::MakeLocationSummary(bool opt) const {
+ if (opt) {
+ const intptr_t kNumInputs = 0;
+ const intptr_t kNumTemps = 2;
+ LocationSummary* locs = new LocationSummary(
+ kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
+ locs->set_temp(0, Location::RegisterLocation(ECX));
+ locs->set_temp(1, Location::RegisterLocation(EBX));
+ locs->set_out(Location::RegisterLocation(EAX));
+ return locs;
+ }
const intptr_t kNumInputs = 0;
const intptr_t kNumTemps = 1;
LocationSummary* locs =
@@ -2265,7 +2276,108 @@
}
+class AllocateContextSlowPath : public SlowPathCode {
+ public:
+ explicit AllocateContextSlowPath(AllocateContextInstr* instruction)
+ : instruction_(instruction) { }
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
+ __ Comment("AllocateContextSlowPath");
+ __ Bind(entry_label());
+
+ LocationSummary* locs = instruction_->locs();
+ locs->live_registers()->Remove(locs->out());
+
+ compiler->SaveLiveRegisters(locs);
+
+ __ movl(EDX, Immediate(instruction_->num_context_variables()));
+ const ExternalLabel label("alloc_context",
+ StubCode::AllocateContextEntryPoint());
+ compiler->GenerateCall(instruction_->token_pos(),
+ &label,
+ PcDescriptors::kOther,
+ locs);
+ ASSERT(instruction_->locs()->out().reg() == EAX);
+ compiler->RestoreLiveRegisters(instruction_->locs());
+ __ jmp(exit_label());
+ }
+
+ private:
+ AllocateContextInstr* instruction_;
+};
+
+
+
void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ if (compiler->is_optimizing()) {
+ Register temp0 = locs()->temp(0).reg();
+ Register temp1 = locs()->temp(1).reg();
+ Register result = locs()->out().reg();
+ // Try allocate the object.
+ AllocateContextSlowPath* slow_path = new AllocateContextSlowPath(this);
+ compiler->AddSlowPathCode(slow_path);
+ intptr_t instance_size = Context::InstanceSize(num_context_variables());
+ __ movl(temp1, Immediate(instance_size));
+ Isolate* isolate = Isolate::Current();
+ Heap* heap = isolate->heap();
+ __ movl(result, Address::Absolute(heap->TopAddress()));
+ __ addl(temp1, result);
+ // Check if the allocation fits into the remaining space.
+ // EAX: potential new object.
+ // EBX: potential next object start.
+ __ cmpl(temp1, Address::Absolute(heap->EndAddress()));
+ if (FLAG_use_slow_path) {
+ __ jmp(slow_path->entry_label());
+ } else {
+ __ j(ABOVE_EQUAL, slow_path->entry_label());
+ }
+
+ // Successfully allocated the object, now update top to point to
+ // next object start and initialize the object.
+ // EAX: new object.
+ // EBX: next object start.
+ // EDX: number of context variables.
+ __ movl(Address::Absolute(heap->TopAddress()), temp1);
+ __ addl(result, Immediate(kHeapObjectTag));
+ __ UpdateAllocationStatsWithSize(kContextCid, instance_size, kNoRegister);
+
+ // Calculate the size tag and write tags.
+ intptr_t size_tag = (instance_size > RawObject::SizeTag::kMaxSizeTag)
+ ? 0 : instance_size << (RawObject::kSizeTagBit - kObjectAlignmentLog2);
+
+ intptr_t tags = size_tag | RawObject::ClassIdTag::encode(kContextCid);
+ __ movl(FieldAddress(result, Context::tags_offset()), Immediate(tags));
+
+ // Setup up number of context variables field.
+ // EAX: new object.
+ __ movl(FieldAddress(result, Context::num_variables_offset()),
+ Immediate(num_context_variables()));
+
+ // Setup isolate field.
+ __ movl(FieldAddress(result, Context::isolate_offset()),
+ Immediate(reinterpret_cast<int32_t>(isolate)));
+
+ // Setup the parent field.
+ const Immediate& raw_null =
+ Immediate(reinterpret_cast<intptr_t>(Object::null()));
+ __ movl(FieldAddress(result, Context::parent_offset()), raw_null);
+
+ // Initialize the context variables.
+ // EAX: new object.
+ if (num_context_variables() > 0) {
+ Label loop;
+ __ leal(temp1, FieldAddress(result, Context::variable_offset(0)));
+ __ movl(temp0, Immediate(num_context_variables()));
+ __ Bind(&loop);
+ __ decl(temp0);
+ __ movl(Address(temp1, temp0, TIMES_4, 0), raw_null);
+ __ j(NOT_ZERO, &loop, Assembler::kNearJump);
+ }
+ // EAX: new object.
+ __ Bind(slow_path->exit_label());
+ return;
+ }
+
ASSERT(locs()->temp(0).reg() == EDX);
ASSERT(locs()->out().reg() == EAX);
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index cee3a58..05c521f 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -725,13 +725,13 @@
class FinalizeWeakPersistentHandlesVisitor : public HandleVisitor {
public:
- FinalizeWeakPersistentHandlesVisitor() {
+ FinalizeWeakPersistentHandlesVisitor() : HandleVisitor(Isolate::Current()) {
}
- void VisitHandle(uword addr) {
+ void VisitHandle(uword addr, bool is_prologue_weak) {
FinalizablePersistentHandle* handle =
reinterpret_cast<FinalizablePersistentHandle*>(addr);
- FinalizablePersistentHandle::Finalize(handle);
+ FinalizablePersistentHandle::Finalize(isolate(), handle, is_prologue_weak);
}
private:
@@ -779,8 +779,9 @@
// Finalize any weak persistent handles with a non-null referent.
FinalizeWeakPersistentHandlesVisitor visitor;
- api_state()->weak_persistent_handles().VisitHandles(&visitor);
- api_state()->prologue_weak_persistent_handles().VisitHandles(&visitor);
+ api_state()->weak_persistent_handles().VisitHandles(&visitor, false);
+ api_state()->prologue_weak_persistent_handles().VisitHandles(
+ &visitor, true);
CompilerStats::Print();
if (FLAG_trace_isolates) {
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 11ef015..9253476 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -72,7 +72,6 @@
V(Function) \
V(Field) \
V(Class) \
- V(AbstractType) \
V(TypeParameter) \
V(TypeArguments) \
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 1c60d5b..9fffcae 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -182,6 +182,12 @@
}
+void JSONStream::PrintValue64(int64_t i) {
+ PrintCommaIfNeeded();
+ buffer_.Printf("%" Pd64 "", i);
+}
+
+
void JSONStream::PrintValue(double d) {
PrintCommaIfNeeded();
buffer_.Printf("%f", d);
@@ -239,6 +245,12 @@
}
+void JSONStream::PrintProperty64(const char* name, int64_t i) {
+ PrintPropertyName(name);
+ PrintValue64(i);
+}
+
+
void JSONStream::PrintProperty(const char* name, double d) {
PrintPropertyName(name);
PrintValue(d);
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index ba09e5d..81b3272 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -72,6 +72,7 @@
void PrintValueBool(bool b);
void PrintValue(intptr_t i);
+ void PrintValue64(int64_t i);
void PrintValue(double d);
void PrintValue(const char* s);
void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
@@ -80,6 +81,7 @@
void PrintPropertyBool(const char* name, bool b);
void PrintProperty(const char* name, intptr_t i);
+ void PrintProperty64(const char* name, int64_t i);
void PrintProperty(const char* name, double d);
void PrintProperty(const char* name, const char* s);
void PrintfProperty(const char* name, const char* format, ...)
@@ -128,6 +130,9 @@
void AddProperty(const char* name, intptr_t i) const {
stream_->PrintProperty(name, i);
}
+ void AddProperty64(const char* name, int64_t i) const {
+ stream_->PrintProperty64(name, i);
+ }
void AddProperty(const char* name, double d) const {
stream_->PrintProperty(name, d);
}
@@ -167,6 +172,7 @@
void AddValue(bool b) const { stream_->PrintValueBool(b); }
void AddValue(intptr_t i) const { stream_->PrintValue(i); }
+ void AddValue64(int64_t i) const { stream_->PrintValue64(i); }
void AddValue(double d) const { stream_->PrintValue(d); }
void AddValue(const char* s) const { stream_->PrintValue(s); }
void AddValue(const Object& obj, bool ref = true) const {
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index dc49aab..15cc8a2 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -419,8 +419,10 @@
}
-static void DeleteWeakPersistentHandle(Dart_WeakPersistentHandle handle) {
- ApiState* state = Isolate::Current()->api_state();
+static void DeleteWeakPersistentHandle(Dart_Isolate current_isolate,
+ Dart_WeakPersistentHandle handle) {
+ Isolate* isolate = reinterpret_cast<Isolate*>(current_isolate);
+ ApiState* state = isolate->api_state();
ASSERT(state != NULL);
FinalizablePersistentHandle* weak_ref =
reinterpret_cast<FinalizablePersistentHandle*>(handle);
@@ -2018,14 +2020,16 @@
}
-intptr_t Class::NumTypeParameters() const {
+intptr_t Class::NumTypeParameters(Isolate* isolate) const {
if (IsMixinApplication() && !is_mixin_type_applied()) {
ClassFinalizer::ApplyMixinType(*this);
}
if (type_parameters() == TypeArguments::null()) {
return 0;
}
- const TypeArguments& type_params = TypeArguments::Handle(type_parameters());
+ ReusableHandleScope reused_handles(isolate);
+ TypeArguments& type_params = reused_handles.TypeArgumentsHandle();
+ type_params = type_parameters();
return type_params.Length();
}
@@ -4528,7 +4532,13 @@
StorePointer(&raw_ptr()->code_, value.raw());
ASSERT(Function::Handle(value.function()).IsNull() ||
(value.function() == this->raw()));
- value.set_function(*this);
+ value.set_owner(*this);
+}
+
+
+void Function::ClearCode() const {
+ StorePointer(&raw_ptr()->code_, Code::null());
+ StorePointer(&raw_ptr()->unoptimized_code_, Code::null());
}
@@ -6655,10 +6665,12 @@
}
-void TokenStream::DataFinalizer(Dart_WeakPersistentHandle handle, void *peer) {
+void TokenStream::DataFinalizer(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void *peer) {
ASSERT(peer != NULL);
::free(peer);
- DeleteWeakPersistentHandle(handle);
+ DeleteWeakPersistentHandle(isolate, handle);
}
@@ -10258,8 +10270,8 @@
}
-RawCode* Code::LookupCode(uword pc) {
- Isolate* isolate = Isolate::Current();
+RawCode* Code::LookupCodeInIsolate(Isolate* isolate, uword pc) {
+ ASSERT((isolate == Isolate::Current()) || (isolate == Dart::vm_isolate()));
NoGCScope no_gc;
FindRawCodeVisitor visitor(pc);
RawInstructions* instr;
@@ -10274,6 +10286,16 @@
}
+RawCode* Code::LookupCode(uword pc) {
+ return LookupCodeInIsolate(Isolate::Current(), pc);
+}
+
+
+RawCode* Code::LookupCodeInVmIsolate(uword pc) {
+ return LookupCodeInIsolate(Dart::vm_isolate(), pc);
+}
+
+
intptr_t Code::GetTokenIndexOfPC(uword pc) const {
intptr_t token_pos = -1;
const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
@@ -10322,31 +10344,68 @@
}
+RawString* Code::Name() const {
+ const Object& obj = Object::Handle(owner());
+ if (obj.IsNull()) {
+ // Regular stub.
+ const char* name = StubCode::NameOfStub(EntryPoint());
+ ASSERT(name != NULL);
+ return String::New(name);
+ } else if (obj.IsClass()) {
+ // Allocation stub.
+ const Class& cls = Class::Cast(obj);
+ String& cls_name = String::Handle(cls.Name());
+ ASSERT(!cls_name.IsNull());
+ return String::Concat(Symbols::AllocationStubFor(), cls_name);
+ } else {
+ ASSERT(obj.IsFunction());
+ // Dart function.
+ return Function::Cast(obj).name();
+ }
+}
+
+
+RawString* Code::UserName() const {
+ const Object& obj = Object::Handle(owner());
+ if (obj.IsNull()) {
+ // Regular stub.
+ const char* name = StubCode::NameOfStub(EntryPoint());
+ ASSERT(name != NULL);
+ return String::New(name);
+ } else if (obj.IsClass()) {
+ // Allocation stub.
+ const Class& cls = Class::Cast(obj);
+ String& cls_name = String::Handle(cls.Name());
+ ASSERT(!cls_name.IsNull());
+ return String::Concat(Symbols::AllocationStubFor(), cls_name);
+ } else {
+ ASSERT(obj.IsFunction());
+ // Dart function.
+ return Function::Cast(obj).QualifiedUserVisibleName();
+ }
+}
+
+
void Code::PrintToJSONStream(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
jsobj.AddProperty("type", JSONType(ref));
jsobj.AddPropertyF("id", "code/%" Px "", EntryPoint());
jsobj.AddPropertyF("start", "%" Px "", EntryPoint());
jsobj.AddPropertyF("end", "%" Px "", EntryPoint() + Size());
- Function& func = Function::Handle();
- func ^= function();
- ASSERT(!func.IsNull());
- String& name = String::Handle();
- ASSERT(!func.IsNull());
- name ^= func.name();
- const char* internal_function_name = name.ToCString();
- jsobj.AddPropertyF("name", "%s%s", is_optimized() ? "*" : "",
- internal_function_name);
- name ^= func.QualifiedUserVisibleName();
- const char* function_name = name.ToCString();
- jsobj.AddPropertyF("user_name", "%s%s", is_optimized() ? "*" : "",
- function_name);
+ jsobj.AddProperty("is_optimized", is_optimized());
+ jsobj.AddProperty("is_alive", is_alive());
+ const String& name = String::Handle(Name());
+ const String& user_name = String::Handle(UserName());
+ const char* name_prefix = is_optimized() ? "*" : "";
+ jsobj.AddPropertyF("name", "%s%s", name_prefix, name.ToCString());
+ jsobj.AddPropertyF("user_name", "%s%s", name_prefix, user_name.ToCString());
+ const Object& obj = Object::Handle(owner());
+ if (obj.IsFunction()) {
+ jsobj.AddProperty("function", obj);
+ }
if (ref) {
return;
}
- jsobj.AddProperty("is_optimized", is_optimized());
- jsobj.AddProperty("is_alive", is_alive());
- jsobj.AddProperty("function", Object::Handle(function()));
JSONArray jsarr(&jsobj, "disassembly");
if (is_alive()) {
// Only disassemble alive code objects.
@@ -12786,17 +12845,18 @@
if (arguments() == other_type.arguments()) {
return true;
}
- const Class& cls = Class::Handle(type_class());
- const intptr_t num_type_params = cls.NumTypeParameters();
+ Isolate* isolate = Isolate::Current();
+ const Class& cls = Class::Handle(isolate, type_class());
+ const intptr_t num_type_params = cls.NumTypeParameters(isolate);
if (num_type_params == 0) {
// Shortcut unnecessary handle allocation below.
return true;
}
const intptr_t num_type_args = cls.NumTypeArguments();
const intptr_t from_index = num_type_args - num_type_params;
- const TypeArguments& type_args = TypeArguments::Handle(arguments());
+ const TypeArguments& type_args = TypeArguments::Handle(isolate, arguments());
const TypeArguments& other_type_args = TypeArguments::Handle(
- other_type.arguments());
+ isolate, other_type.arguments());
if (type_args.IsNull()) {
return other_type_args.IsRaw(from_index, num_type_params);
}
@@ -12805,8 +12865,8 @@
}
ASSERT(type_args.Length() >= (from_index + num_type_params));
ASSERT(other_type_args.Length() >= (from_index + num_type_params));
- AbstractType& type_arg = AbstractType::Handle();
- AbstractType& other_type_arg = AbstractType::Handle();
+ AbstractType& type_arg = AbstractType::Handle(isolate);
+ AbstractType& other_type_arg = AbstractType::Handle(isolate);
for (intptr_t i = 0; i < num_type_params; i++) {
type_arg = type_args.TypeAt(from_index + i);
other_type_arg = other_type_args.TypeAt(from_index + i);
@@ -15847,9 +15907,11 @@
}
-void OneByteString::Finalize(Dart_WeakPersistentHandle handle, void* peer) {
+void OneByteString::Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer) {
delete reinterpret_cast<ExternalStringData<uint8_t>*>(peer);
- DeleteWeakPersistentHandle(handle);
+ DeleteWeakPersistentHandle(isolate, handle);
}
@@ -16021,9 +16083,11 @@
}
-void TwoByteString::Finalize(Dart_WeakPersistentHandle handle, void* peer) {
+void TwoByteString::Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer) {
delete reinterpret_cast<ExternalStringData<uint16_t>*>(peer);
- DeleteWeakPersistentHandle(handle);
+ DeleteWeakPersistentHandle(isolate, handle);
}
@@ -16058,10 +16122,11 @@
}
-void ExternalOneByteString::Finalize(Dart_WeakPersistentHandle handle,
+void ExternalOneByteString::Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
void* peer) {
delete reinterpret_cast<ExternalStringData<uint8_t>*>(peer);
- DeleteWeakPersistentHandle(handle);
+ DeleteWeakPersistentHandle(isolate, handle);
}
@@ -16096,10 +16161,11 @@
}
-void ExternalTwoByteString::Finalize(Dart_WeakPersistentHandle handle,
+void ExternalTwoByteString::Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
void* peer) {
delete reinterpret_cast<ExternalStringData<uint16_t>*>(peer);
- DeleteWeakPersistentHandle(handle);
+ DeleteWeakPersistentHandle(isolate, handle);
}
@@ -16266,12 +16332,18 @@
RawArray* Array::MakeArray(const GrowableObjectArray& growable_array) {
ASSERT(!growable_array.IsNull());
intptr_t used_len = growable_array.Length();
- if (used_len == 0) {
+ // Get the type arguments and prepare to copy them.
+ const TypeArguments& type_arguments =
+ TypeArguments::Handle(growable_array.GetTypeArguments());
+ if ((used_len == 0) && (type_arguments.IsNull())) {
+ // This is a raw List (as in no type arguments), so we can return the
+ // simple empty array.
return Object::empty_array().raw();
}
intptr_t capacity_len = growable_array.Capacity();
Isolate* isolate = Isolate::Current();
const Array& array = Array::Handle(isolate, growable_array.data());
+ array.SetTypeArguments(type_arguments);
intptr_t capacity_size = Array::InstanceSize(capacity_len);
intptr_t used_size = Array::InstanceSize(used_len);
NoGCScope no_gc;
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index faf01cc..b1c89e8 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -742,7 +742,10 @@
return raw_ptr()->type_parameters_;
}
void set_type_parameters(const TypeArguments& value) const;
- intptr_t NumTypeParameters() const;
+ intptr_t NumTypeParameters(Isolate* isolate) const;
+ intptr_t NumTypeParameters() const {
+ return NumTypeParameters(Isolate::Current());
+ }
static intptr_t type_parameters_offset() {
return OFFSET_OF(RawClass, type_parameters_);
}
@@ -1480,6 +1483,7 @@
// Sets function's code and code's function.
void SetCode(const Code& value) const;
+ void ClearCode() const;
// Disables optimized code and switches to unoptimized code.
void SwitchToUnoptimizedCode() const;
@@ -2345,7 +2349,9 @@
void SetPrivateKey(const String& value) const;
static RawTokenStream* New();
- static void DataFinalizer(Dart_WeakPersistentHandle handle, void *peer);
+ static void DataFinalizer(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void *peer);
FINAL_HEAP_OBJECT_IMPLEMENTATION(TokenStream, Object);
friend class Class;
@@ -3276,11 +3282,22 @@
}
RawFunction* function() const {
- return raw_ptr()->function_;
+ return reinterpret_cast<RawFunction*>(raw_ptr()->owner_);
}
- void set_function(const Function& function) const {
+
+ RawObject* owner() const {
+ return raw_ptr()->owner_;
+ }
+
+ void set_owner(const Function& function) const {
ASSERT(function.IsOld());
- StorePointer(&raw_ptr()->function_, function.raw());
+ StorePointer(&raw_ptr()->owner_,
+ reinterpret_cast<RawObject*>(function.raw()));
+ }
+
+ void set_owner(const Class& cls) {
+ ASSERT(cls.IsOld());
+ StorePointer(&raw_ptr()->owner_, reinterpret_cast<RawObject*>(cls.raw()));
}
// We would have a VisitPointers function here to traverse all the
@@ -3305,6 +3322,7 @@
Assembler* assembler,
bool optimized = false);
static RawCode* LookupCode(uword pc);
+ static RawCode* LookupCodeInVmIsolate(uword pc);
int32_t GetPointerOffsetAt(int index) const {
return *PointerOffsetAddrAt(index);
@@ -3331,6 +3349,9 @@
// Returns an array indexed by deopt id, containing the extracted ICData.
RawArray* ExtractTypeFeedbackArray() const;
+ RawString* Name() const;
+ RawString* UserName() const;
+
private:
void set_state_bits(intptr_t bits) const;
@@ -3383,6 +3404,7 @@
}
intptr_t BinarySearchInSCallTable(uword pc) const;
+ static RawCode* LookupCodeInIsolate(Isolate* isolate, uword pc);
// New is a private method as RawInstruction and RawCode objects should
// only be created using the Code::FinalizeCode method. This method creates
@@ -4044,6 +4066,7 @@
friend class SnapshotWriter;
friend class StubCode;
friend class TypedDataView;
+ friend class DeferredObject;
};
@@ -4937,6 +4960,7 @@
ch_(0),
index_(-1),
end_(str.Length()) {
+ ASSERT(!str_.IsNull());
}
CodePointIterator(const String& str, intptr_t start, intptr_t length)
@@ -5270,7 +5294,9 @@
void* peer,
Dart_PeerFinalizer cback);
- static void Finalize(Dart_WeakPersistentHandle handle, void* peer);
+ static void Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer);
static const ClassId kClassId = kOneByteStringCid;
@@ -5361,7 +5387,9 @@
void* peer,
Dart_PeerFinalizer cback);
- static void Finalize(Dart_WeakPersistentHandle handle, void* peer);
+ static void Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer);
static RawTwoByteString* null() {
return reinterpret_cast<RawTwoByteString*>(Object::null());
@@ -5454,7 +5482,9 @@
raw_ptr(str)->external_data_ = data;
}
- static void Finalize(Dart_WeakPersistentHandle handle, void* peer);
+ static void Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer);
static RawExternalOneByteString* ReadFrom(SnapshotReader* reader,
intptr_t object_id,
@@ -5525,7 +5555,9 @@
raw_ptr(str)->external_data_ = data;
}
- static void Finalize(Dart_WeakPersistentHandle handle, void* peer);
+ static void Finalize(Dart_Isolate isolate,
+ Dart_WeakPersistentHandle handle,
+ void* peer);
static RawExternalTwoByteString* ReadFrom(SnapshotReader* reader,
intptr_t object_id,
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index ca542df..de9405d 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -7608,9 +7608,15 @@
if (((op_kind == Token::kIS) || (op_kind == Token::kISNOT) ||
(op_kind == Token::kAS)) &&
type.IsMalformedOrMalbounded()) {
- // Note that a type error is thrown even if the tested value is null
- // in a type test or in a type cast.
- return ThrowTypeError(type_pos, type);
+ // Note that a type error is thrown in a type test or in
+ // a type cast even if the tested value is null.
+ // We need to evaluate the left operand for potential
+ // side effects.
+ LetNode* let = new LetNode(left_operand->token_pos());
+ let->AddNode(left_operand);
+ let->AddNode(ThrowTypeError(type_pos, type));
+ left_operand = let;
+ break; // Type checks and casts can't be chained.
}
}
if (Token::IsRelationalOperator(op_kind)
@@ -9012,11 +9018,7 @@
}
if (local != NULL) {
if (node != NULL) {
- if (local->IsConst()) {
- *node = new LiteralNode(ident_pos, *local->ConstValue());
- } else {
- *node = new LoadLocalNode(ident_pos, local);
- }
+ *node = new LoadLocalNode(ident_pos, local);
}
return true;
}
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 0eb106f..c8a2374 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -329,7 +329,31 @@
AddCallEntry(callees_table_, index);
}
- void PrintToJSONArray(JSONArray* events, bool full) {
+ void PrintNativeCode(JSONObject* profile_code_obj) {
+ ASSERT(kind() == kNativeCode);
+ JSONObject obj(profile_code_obj, "code");
+ obj.AddProperty("type", "@Code");
+ obj.AddProperty("kind", "Native");
+ obj.AddProperty("name", name());
+ obj.AddProperty("user_name", name());
+ obj.AddPropertyF("start", "%" Px "", start());
+ obj.AddPropertyF("end", "%" Px "", end());
+ obj.AddPropertyF("id", "code/native/%" Px "", start());
+ }
+
+ void PrintCollectedCode(JSONObject* profile_code_obj) {
+ ASSERT(kind() == kCollectedCode);
+ JSONObject obj(profile_code_obj, "code");
+ obj.AddProperty("type", "@Code");
+ obj.AddProperty("kind", "Collected");
+ obj.AddProperty("name", name());
+ obj.AddProperty("user_name", name());
+ obj.AddPropertyF("start", "%" Px "", start());
+ obj.AddPropertyF("end", "%" Px "", end());
+ obj.AddPropertyF("id", "code/collected/%" Px "", start());
+ }
+
+ void PrintToJSONArray(Isolate* isolate, JSONArray* events, bool full) {
JSONObject obj(events);
obj.AddProperty("type", "ProfileCode");
obj.AddProperty("kind", KindToCString(kind()));
@@ -337,36 +361,27 @@
obj.AddPropertyF("exclusive_ticks", "%" Pd "", exclusive_ticks());
if (kind() == kDartCode) {
// Look up code in Dart heap.
- Code& code = Code::Handle(Code::LookupCode(start()));
- Function& func = Function::Handle();
- ASSERT(!code.IsNull());
- func ^= code.function();
- if (func.IsNull()) {
- if (name() == NULL) {
- const char* stub_name = StubCode::NameOfStub(start());
- GenerateAndSetSymbolName(stub_name == NULL ? "Stub" : stub_name);
- }
- obj.AddPropertyF("start", "%" Px "", start());
- obj.AddPropertyF("end", "%" Px "", end());
- obj.AddProperty("name", name());
- } else {
- obj.AddProperty("code", code, !full);
+ Code& code = Code::Handle();
+ code ^= Code::LookupCode(start());
+ if (code.IsNull()) {
+ // Code is a stub in the Vm isolate.
+ code ^= Code::LookupCodeInVmIsolate(start());
}
+ ASSERT(!code.IsNull());
+ obj.AddProperty("code", code, !full);
} else if (kind() == kCollectedCode) {
if (name() == NULL) {
+ // Lazily set generated name.
GenerateAndSetSymbolName("Collected");
}
- obj.AddPropertyF("start", "%" Px "", start());
- obj.AddPropertyF("end", "%" Px "", end());
- obj.AddProperty("name", name());
+ PrintCollectedCode(&obj);
} else {
ASSERT(kind() == kNativeCode);
if (name() == NULL) {
+ // Lazily set generated name.
GenerateAndSetSymbolName("Native");
}
- obj.AddPropertyF("start", "%" Px "", start());
- obj.AddPropertyF("end", "%" Px "", end());
- obj.AddProperty("name", name());
+ PrintNativeCode(&obj);
}
{
JSONArray ticks(&obj, "ticks");
@@ -549,13 +564,19 @@
}
CodeRegion* CreateCodeRegion(uword pc) {
- Code& code = Code::Handle(Code::LookupCode(pc));
+ Code& code = Code::Handle();
+ code ^= Code::LookupCode(pc);
+ if (!code.IsNull()) {
+ return new CodeRegion(CodeRegion::kDartCode, code.EntryPoint(),
+ code.EntryPoint() + code.Size());
+ }
+ code ^= Code::LookupCodeInVmIsolate(pc);
if (!code.IsNull()) {
return new CodeRegion(CodeRegion::kDartCode, code.EntryPoint(),
code.EntryPoint() + code.Size());
}
if (heap_->CodeContains(pc)) {
- const intptr_t kDartCodeAlignment = 0x10;
+ const intptr_t kDartCodeAlignment = OS::PreferredCodeAlignment();
const intptr_t kDartCodeAlignmentMask = ~(kDartCodeAlignment - 1);
return new CodeRegion(CodeRegion::kCollectedCode, pc,
(pc & kDartCodeAlignmentMask) + kDartCodeAlignment);
@@ -790,7 +811,7 @@
for (intptr_t i = 0; i < code_region_table.Length(); i++) {
CodeRegion* region = code_region_table.At(i);
ASSERT(region != NULL);
- region->PrintToJSONArray(&codes, full);
+ region->PrintToJSONArray(isolate, &codes, full);
}
}
}
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index e876e66..0910e90 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -439,6 +439,7 @@
friend class Api;
friend class Array;
+ friend class Code;
friend class FreeListElement;
friend class GCMarker;
friend class ExternalTypedData;
@@ -816,7 +817,10 @@
return reinterpret_cast<RawObject**>(&ptr()->instructions_);
}
RawInstructions* instructions_;
- RawFunction* function_;
+ // If owner_ is Function::null() the owner is a regular stub.
+ // If owner_ is a Class the owner is the allocation stub for that class.
+ // Else, owner_ is a regular Dart Function.
+ RawObject* owner_; // Function, Null, or a Class.
RawExceptionHandlers* exception_handlers_;
RawPcDescriptors* pc_descriptors_;
RawArray* deopt_info_array_;
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index afbab51..ae6501e 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -271,15 +271,19 @@
class ScavengerWeakVisitor : public HandleVisitor {
public:
- explicit ScavengerWeakVisitor(Scavenger* scavenger) : scavenger_(scavenger) {
+ explicit ScavengerWeakVisitor(Scavenger* scavenger)
+ : HandleVisitor(Isolate::Current()),
+ scavenger_(scavenger) {
}
- void VisitHandle(uword addr) {
+ void VisitHandle(uword addr, bool is_prologue_weak) {
FinalizablePersistentHandle* handle =
reinterpret_cast<FinalizablePersistentHandle*>(addr);
RawObject** p = handle->raw_addr();
if (scavenger_->IsUnreachable(p)) {
- FinalizablePersistentHandle::Finalize(handle);
+ FinalizablePersistentHandle::Finalize(isolate(),
+ handle,
+ is_prologue_weak);
}
}
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index afc31be..40d6a86 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -216,7 +216,7 @@
sizeof(_VmServiceNativeEntries) / sizeof(_VmServiceNativeEntries[0]);
for (intptr_t i = 0; i < n; i++) {
VmServiceNativeEntry entry = _VmServiceNativeEntries[i];
- if (!strcmp(function_name, entry.name) &&
+ if ((strcmp(function_name, entry.name) == 0) &&
(num_arguments == entry.num_arguments)) {
return entry.function;
}
@@ -834,15 +834,15 @@
return true;
} else if (js->num_arguments() >= 3) {
const char* second = js->GetArgument(2);
- if (!strcmp(second, "closures")) {
+ if (strcmp(second, "closures") == 0) {
return HandleClassesClosures(isolate, cls, js);
- } else if (!strcmp(second, "fields")) {
+ } else if (strcmp(second, "fields") == 0) {
return HandleClassesFields(isolate, cls, js);
- } else if (!strcmp(second, "functions")) {
+ } else if (strcmp(second, "functions") == 0) {
return HandleClassesFunctions(isolate, cls, js);
- } else if (!strcmp(second, "implicit_closures")) {
+ } else if (strcmp(second, "implicit_closures") == 0) {
return HandleClassesImplicitClosures(isolate, cls, js);
- } else if (!strcmp(second, "dispatchers")) {
+ } else if (strcmp(second, "dispatchers") == 0) {
return HandleClassesDispatchers(isolate, cls, js);
} else {
PrintError(js, "Invalid sub collection %s", second);
@@ -1015,7 +1015,7 @@
return true;
}
const char* command = js->GetArgument(1);
- if (!strcmp(command, "breakpoints")) {
+ if (strcmp(command, "breakpoints") == 0) {
if (js->num_arguments() == 2) {
// Print breakpoint list.
JSONObject jsobj(js);
@@ -1057,19 +1057,50 @@
}
+static bool HandleNullCode(uintptr_t pc, JSONStream* js) {
+ Object::null_object().PrintToJSONStream(js, false);
+ return true;
+}
+
+
static bool HandleCode(Isolate* isolate, JSONStream* js) {
REQUIRE_COLLECTION_ID("code");
uintptr_t pc;
+ if (js->num_arguments() > 3) {
+ PrintError(js, "Command too long");
+ return true;
+ }
+ if (js->num_arguments() == 3) {
+ const char* command = js->GetArgument(1);
+ if ((strcmp("collected", command) == 0) ||
+ (strcmp("native", command) == 0)) {
+ if (!GetUnsignedIntegerId(js->GetArgument(1), &pc, 16)) {
+ PrintError(js, "Must specify code address: code/%s/c0deadd0.", command);
+ return true;
+ }
+ return HandleNullCode(pc, js);
+ } else {
+ PrintError(js, "Unrecognized subcommand '%s'", js->GetArgument(1));
+ return true;
+ }
+ }
+ ASSERT(js->num_arguments() == 2);
if (!GetUnsignedIntegerId(js->GetArgument(1), &pc, 16)) {
PrintError(js, "Must specify code address: code/c0deadd0.");
return true;
}
- Code& code = Code::Handle(Code::LookupCode(pc));
- if (code.IsNull()) {
- PrintError(js, "Could not find code at %" Px "", pc);
+ Code& code = Code::Handle();
+ code ^= Code::LookupCode(pc);
+ if (!code.IsNull()) {
+ code.PrintToJSONStream(js, false);
return true;
}
- code.PrintToJSONStream(js, false);
+ code ^= Code::LookupCodeInVmIsolate(pc);
+ if (!code.IsNull()) {
+ code.PrintToJSONStream(js, false);
+ return true;
+ }
+ PrintError(js, "Could not find code at %" Px "", pc);
return true;
}
@@ -1086,6 +1117,21 @@
static bool HandleAllocationProfile(Isolate* isolate, JSONStream* js) {
+ if (js->num_arguments() == 2) {
+ const char* sub_command = js->GetArgument(1);
+ if (!strcmp(sub_command, "reset")) {
+ isolate->class_table()->ResetAllocationAccumulators();
+ isolate->class_table()->AllocationProfilePrintToJSONStream(js);
+ return true;
+ } else {
+ PrintError(js, "Unrecognized subcommand '%s'", sub_command);
+ return true;
+ }
+ }
+ if (js->num_arguments() != 1) {
+ PrintError(js, "Command too long");
+ return true;
+ }
isolate->class_table()->AllocationProfilePrintToJSONStream(js);
return true;
}
@@ -1122,7 +1168,7 @@
sizeof(isolate_handlers[0]);
for (intptr_t i = 0; i < num_message_handlers; i++) {
const IsolateMessageHandlerEntry& entry = isolate_handlers[i];
- if (!strcmp(command, entry.command)) {
+ if (strcmp(command, entry.command) == 0) {
return entry.handler;
}
}
@@ -1226,7 +1272,7 @@
sizeof(root_handlers[0]);
for (intptr_t i = 0; i < num_message_handlers; i++) {
const RootMessageHandlerEntry& entry = root_handlers[i];
- if (!strcmp(command, entry.command)) {
+ if (strcmp(command, entry.command) == 0) {
return entry.handler;
}
}
@@ -1286,7 +1332,7 @@
const char* name) {
EmbedderServiceHandler* current = isolate_service_handler_head_;
while (current != NULL) {
- if (!strcmp(name, current->name())) {
+ if (strcmp(name, current->name()) == 0) {
return current;
}
current = current->next();
@@ -1324,7 +1370,7 @@
const char* name) {
EmbedderServiceHandler* current = root_service_handler_head_;
while (current != NULL) {
- if (!strcmp(name, current->name())) {
+ if (strcmp(name, current->name()) == 0) {
return current;
}
current = current->next();
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 43dec6b..0ed1e23 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -615,6 +615,41 @@
}
+TEST_CASE(Service_AllocationProfile) {
+ const char* kScript =
+ "var port;\n" // Set to our mock port by C++.
+ "\n"
+ "var x = 7;\n"
+ "main() {\n"
+ " x = x * x;\n"
+ " x = x / 13;\n"
+ "}";
+
+ Isolate* isolate = Isolate::Current();
+ Dart_Handle h_lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(h_lib);
+ Library& lib = Library::Handle();
+ lib ^= Api::UnwrapHandle(h_lib);
+ EXPECT(!lib.IsNull());
+ Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
+
+ // Build a mock message handler and wrap it in a dart port.
+ ServiceTestMessageHandler handler;
+ Dart_Port port_id = PortMap::CreatePort(&handler);
+ Dart_Handle port =
+ Api::NewHandle(isolate, DartLibraryCalls::NewSendPort(port_id));
+ EXPECT_VALID(port);
+ EXPECT_VALID(Dart_SetField(h_lib, NewString("port"), port));
+
+ Instance& service_msg = Instance::Handle();
+ service_msg = Eval(h_lib, "[port, ['allocationprofile'], [], []]");
+ Service::HandleIsolateMessage(isolate, service_msg);
+ handler.HandleNextMessage();
+ EXPECT_SUBSTRING("\"type\":\"AllocationProfile\"", handler.msg());
+}
+
+
static const char* alpha_callback(
const char* name,
const char** arguments,
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 7c1e5e7..ad58fb4 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -150,7 +150,7 @@
// that the code is called while a GC is in progress, that is ok.
NoGCScope no_gc;
RawCode* code = GetCodeObject();
- ASSERT(code == Code::null() || code->ptr()->function_ != Function::null());
+ ASSERT(code == Code::null() || code->ptr()->owner_ != Function::null());
return code;
}
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 05ce432..70144e9 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -105,6 +105,7 @@
const char* name = cls.ToCString();
StubCode::GenerateAllocationStubForClass(&assembler, cls);
stub ^= Code::FinalizeCode(name, &assembler);
+ stub.set_owner(cls);
cls.set_allocation_stub(stub);
if (FLAG_disassemble_stubs) {
OS::Print("Code for allocation stub '%s': {\n", name);
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 4a7d2b0..309ccc9 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -308,6 +308,7 @@
V(OptimizedOut, "<optimized out>") \
V(NotInitialized, "<not initialized>") \
V(ClassId, "get:_classId") \
+ V(AllocationStubFor, "Allocation stub for ") \
// Contains a list of frequently used strings in a canonicalized form. This
diff --git a/runtime/vm/verifier.cc b/runtime/vm/verifier.cc
index 4270af2..e903644 100644
--- a/runtime/vm/verifier.cc
+++ b/runtime/vm/verifier.cc
@@ -39,7 +39,7 @@
}
-void VerifyWeakPointersVisitor::VisitHandle(uword addr) {
+void VerifyWeakPointersVisitor::VisitHandle(uword addr, bool is_prologue_weak) {
FinalizablePersistentHandle* handle =
reinterpret_cast<FinalizablePersistentHandle*>(addr);
RawObject* raw_obj = handle->raw();
diff --git a/runtime/vm/verifier.h b/runtime/vm/verifier.h
index a622955..d0077ed 100644
--- a/runtime/vm/verifier.h
+++ b/runtime/vm/verifier.h
@@ -54,10 +54,11 @@
class VerifyWeakPointersVisitor : public HandleVisitor {
public:
explicit VerifyWeakPointersVisitor(VerifyPointersVisitor* visitor)
- : visitor_(visitor) {
+ : HandleVisitor(Isolate::Current()),
+ visitor_(visitor) {
}
- virtual void VisitHandle(uword addr);
+ virtual void VisitHandle(uword addr, bool is_prologue_weak);
private:
ObjectPointerVisitor* visitor_;
diff --git a/sdk/lib/_internal/compiler/implementation/apiimpl.dart b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
index 9a17d8e..3995d34 100644
--- a/sdk/lib/_internal/compiler/implementation/apiimpl.dart
+++ b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
@@ -63,8 +63,8 @@
buildId: extractStringOption(
options, '--build-id=',
"build number could not be determined"),
- hidePackageWarnings:
- hasOption(options, '--hide-package-warnings')) {
+ showPackageWarnings:
+ hasOption(options, '--show-package-warnings')) {
if (!libraryRoot.path.endsWith("/")) {
throw new ArgumentError("libraryRoot must end with a /");
}
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 3409a8e..aa38e28 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -373,7 +373,11 @@
*/
final bool analyzeSignaturesOnly;
final bool enableNativeLiveTypeAnalysis;
-
+ /**
+ * If true, stop compilation after type inference is complete. Used for
+ * debugging and testing purposes only.
+ */
+ bool stopAfterTypeInference = false;
/**
* If [:true:], comment tokens are collected in [commentMap] during scanning.
*/
@@ -393,13 +397,17 @@
/// Emit terse diagnostics without howToFix.
final bool terseDiagnostics;
- /// If `true`, warnings and hints not from user code are not reported.
- final bool hidePackageWarnings;
+ /// If `true`, warnings and hints not from user code are reported.
+ final bool showPackageWarnings;
/// `true` if the last diagnostic was filtered, in which case the
/// accompanying info message should be filtered as well.
bool lastDiagnosticWasFiltered = false;
+ /// Map containing information about the warnings and hints that have been
+ /// suppressed for each library.
+ Map<Uri, SuppressionInfo> suppressedWarnings = <Uri, SuppressionInfo>{};
+
final api.CompilerOutputProvider outputProvider;
bool disableInlining = false;
@@ -622,7 +630,7 @@
this.buildId: UNDETERMINED_BUILD_ID,
this.terseDiagnostics: false,
this.dumpInfo: false,
- this.hidePackageWarnings: false,
+ this.showPackageWarnings: false,
outputProvider,
List<String> strips: const []})
: this.analyzeOnly = analyzeOnly || analyzeSignaturesOnly,
@@ -1094,6 +1102,22 @@
enqueuer.resolution.logSummary(log);
if (compilationFailed) return;
+ if (!showPackageWarnings) {
+ suppressedWarnings.forEach((Uri uri, SuppressionInfo info) {
+ MessageKind kind = MessageKind.HIDDEN_WARNINGS_HINTS;
+ if (info.warnings == 0) {
+ kind = MessageKind.HIDDEN_HINTS;
+ } else if (info.hints == 0) {
+ kind = MessageKind.HIDDEN_WARNINGS;
+ }
+ reportDiagnostic(null,
+ kind.message({'warnings': info.warnings,
+ 'hints': info.hints,
+ 'uri': uri},
+ terseDiagnostics),
+ api.Diagnostic.HINT);
+ });
+ }
if (analyzeOnly) {
if (!analyzeAll) {
// No point in reporting unused code when [analyzeAll] is true: all
@@ -1120,6 +1144,8 @@
log('Inferring types...');
typesTask.onResolutionComplete(main);
+ if(stopAfterTypeInference) return;
+
log('Compiling...');
phase = PHASE_COMPILING;
// TODO(johnniwinther): Move these to [CodegenEnqueuer].
@@ -1386,11 +1412,20 @@
MessageKind messageKind,
Map arguments,
api.Diagnostic kind) {
- if (hidePackageWarnings) {
+ if (!showPackageWarnings) {
switch (kind) {
case api.Diagnostic.WARNING:
case api.Diagnostic.HINT:
- if (!inUserCode(elementFromSpannable(node))) {
+ Element element = elementFromSpannable(node);
+ if (!inUserCode(element)) {
+ Uri uri = getCanonicalUri(element);
+ SuppressionInfo info =
+ suppressedWarnings.putIfAbsent(uri, () => new SuppressionInfo());
+ if (kind == api.Diagnostic.WARNING) {
+ info.warnings++;
+ } else {
+ info.hints++;
+ }
lastDiagnosticWasFiltered = true;
return;
}
@@ -1590,8 +1625,6 @@
/// 'file:///foo.dart' then every library whose canonical URI scheme is
/// 'file' is in user code.
bool inUserCode(Element element) {
- if (element == null) return false;
- Uri libraryUri = element.getLibrary().canonicalUri;
List<Uri> entrypoints = <Uri>[];
if (mainApp != null) {
entrypoints.add(mainApp.canonicalUri);
@@ -1599,6 +1632,12 @@
if (librariesToAnalyzeWhenRun != null) {
entrypoints.addAll(librariesToAnalyzeWhenRun);
}
+ if (entrypoints.isEmpty) {
+ // Assume in user code since [mainApp] has not been set yet.
+ return true;
+ }
+ if (element == null) return false;
+ Uri libraryUri = element.getLibrary().canonicalUri;
if (libraryUri.scheme == 'package') {
for (Uri uri in entrypoints) {
if (uri.scheme != 'package') continue;
@@ -1622,6 +1661,24 @@
return false;
}
+ /// Return a canonical URI for the source of [element].
+ ///
+ /// For a package library with canonical URI 'package:foo/bar/baz.dart' the
+ /// return URI is 'package:foo'. For non-package libraries the returned URI is
+ /// the canonical URI of the library itself.
+ Uri getCanonicalUri(Element element) {
+ if (element == null) return null;
+ Uri libraryUri = element.getLibrary().canonicalUri;
+ if (libraryUri.scheme == 'package') {
+ int slashPos = libraryUri.path.indexOf('/');
+ if (slashPos != -1) {
+ String packageName = libraryUri.path.substring(0, slashPos);
+ return new Uri(scheme: 'package', path: packageName);
+ }
+ }
+ return libraryUri;
+ }
+
}
class CompilerTask {
@@ -1760,3 +1817,9 @@
return new NullSink('$name.$extension');
}
}
+
+/// Information about suppressed warnings and hints for a given library.
+class SuppressionInfo {
+ int warnings = 0;
+ int hints = 0;
+}
diff --git a/sdk/lib/_internal/compiler/implementation/constants.dart b/sdk/lib/_internal/compiler/implementation/constants.dart
index 31ba869..83af12a 100644
--- a/sdk/lib/_internal/compiler/implementation/constants.dart
+++ b/sdk/lib/_internal/compiler/implementation/constants.dart
@@ -218,6 +218,14 @@
}
ti.TypeMask computeMask(Compiler compiler) {
+ // We have to distinguish -0.0 from 0, but for all practical purposes
+ // -0.0 is an integer.
+ // TODO(17235): this kind of special casing should only happen in the
+ // backend.
+ if (isMinusZero() && compiler.backend.constantSystem.isInt(this)) {
+ return compiler.typesTask.uint31Type;
+ }
+ assert(!compiler.backend.constantSystem.isInt(this));
return compiler.typesTask.doubleType;
}
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index b445415..49c002f 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -279,7 +279,7 @@
new OptionHandler('--dump-info', passThrough),
new OptionHandler('--disallow-unsafe-eval',
(_) => hasDisallowUnsafeEval = true),
- new OptionHandler('--hide-package-warnings', passThrough),
+ new OptionHandler('--show-package-warnings', passThrough),
new OptionHandler('-D.+=.*', addInEnvironment),
// The following two options must come last.
@@ -558,8 +558,8 @@
Emit diagnostics without suggestions for how to get rid of the diagnosed
problems.
- --hide-package-warnings
- Hide warnings and hints generated from packages.
+ --show-package-warnings
+ Show warnings and hints generated from packages.
The following options are only used for compiler development and may
be removed in a future version:
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
index 8bd75a3..6f824f5 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
@@ -13,12 +13,6 @@
ElementAst(this.ast, this.treeElements);
- factory ElementAst.rewrite(compiler, ast, treeElements, stripAsserts) {
- final rewriter =
- new FunctionBodyRewriter(compiler, treeElements, stripAsserts);
- return new ElementAst(rewriter.visit(ast), rewriter.cloneTreeElements);
- }
-
ElementAst.forClassLike(this.ast)
: this.treeElements = new TreeElementMapping(null);
}
@@ -67,55 +61,6 @@
}
}
-class FunctionBodyRewriter extends CloningVisitor {
- final Compiler compiler;
- final bool stripAsserts;
-
- FunctionBodyRewriter(this.compiler, originalTreeElements, this.stripAsserts)
- : super(originalTreeElements);
-
- visitBlock(Block block) {
- shouldOmit(Statement statement) {
- if (statement is EmptyStatement) return true;
- ExpressionStatement expressionStatement =
- statement.asExpressionStatement();
- if (expressionStatement != null) {
- Send send = expressionStatement.expression.asSend();
- if (send != null) {
- Element element = originalTreeElements[send];
- if (stripAsserts && identical(element, compiler.assertMethod)) {
- return true;
- }
- }
- }
- return false;
- }
-
- rewriteStatement(Statement statement) {
- Block block = statement.asBlock();
- if (block != null) {
- Link statements = block.statements.nodes;
- if (!statements.isEmpty && statements.tail.isEmpty) {
- Statement single = statements.head;
- bool isDeclaration =
- single is VariableDefinitions || single is FunctionDeclaration;
- if (!isDeclaration) return single;
- }
- }
- return statement;
- }
-
- NodeList statements = block.statements;
- LinkBuilder<Statement> builder = new LinkBuilder<Statement>();
- for (Statement statement in statements.nodes) {
- if (!shouldOmit(statement)) {
- builder.addLast(visit(rewriteStatement(statement)));
- }
- }
- return new Block(rewriteNodeList(statements, builder.toLink()));
- }
-}
-
class DartBackend extends Backend {
final List<CompilerTask> tasks;
final bool forceStripTypes;
@@ -364,8 +309,7 @@
});
resolvedElements.forEach((element, treeElements) {
if (!shouldOutput(element) || treeElements == null) return;
- var elementAst = new ElementAst.rewrite(
- compiler, parse(element), treeElements, stripAsserts);
+ var elementAst = new ElementAst(parse(element), treeElements);
if (element.isField()) {
final list = (element as VariableElement).variables;
elementAst = elementAsts.putIfAbsent(
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_backend.dart
index a4410d4..ce41941 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_backend.dart
@@ -24,4 +24,3 @@
part 'emitter.dart';
part 'renamer.dart';
part 'placeholder_collector.dart';
-part 'utils.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart
deleted file mode 100644
index 190b292..0000000
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart
+++ /dev/null
@@ -1,317 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart_backend;
-
-class CloningVisitor implements Visitor<Node> {
- final TreeElements originalTreeElements;
- final TreeElementMapping cloneTreeElements;
-
- CloningVisitor(originalTreeElements)
- : cloneTreeElements =
- new TreeElementMapping(originalTreeElements.currentElement),
- this.originalTreeElements = originalTreeElements;
-
- visit(Node node) {
- if (node == null) return null;
- final clone = node.accept(this);
-
- final originalElement = originalTreeElements[node];
- if (originalElement != null) cloneTreeElements[clone] = originalElement;
-
- final originalType = originalTreeElements.getType(node);
- if (originalType != null) cloneTreeElements.setType(clone, originalType);
- return clone;
- }
-
- Node visitBlock(Block node) => new Block(visit(node.statements));
-
- Node visitBreakStatement(BreakStatement node) => new BreakStatement(
- visit(node.target), node.keywordToken, node.semicolonToken);
-
- Node visitCascade(Cascade node) => new Cascade(visit(node.expression));
-
- Node visitCascadeReceiver(CascadeReceiver node) => new CascadeReceiver(
- visit(node.expression), node.cascadeOperator);
-
- Node visitCaseMatch(CaseMatch node) => new CaseMatch(
- node.caseKeyword, visit(node.expression), node.colonToken);
-
- Node visitCatchBlock(CatchBlock node) => new CatchBlock(
- visit(node.type), visit(node.formals), visit(node.block),
- node.onKeyword, node.catchKeyword);
-
- Node visitClassNode(ClassNode node) => new ClassNode(
- visit(node.modifiers), visit(node.name), visit(node.typeParameters),
- visit(node.superclass), visit(node.interfaces),
- node.beginToken, node.extendsKeyword, visit(node.body), node.endToken);
-
- Node visitConditional(Conditional node) => new Conditional(
- visit(node.condition), visit(node.thenExpression),
- visit(node.elseExpression), node.questionToken, node.colonToken);
-
- Node visitContinueStatement(ContinueStatement node) => new ContinueStatement(
- visit(node.target), node.keywordToken, node.semicolonToken);
-
- Node visitDoWhile(DoWhile node) => new DoWhile(
- visit(node.body), visit(node.condition),
- node.doKeyword, node.whileKeyword, node.endToken);
-
- Node visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
- node.semicolonToken);
-
- Node visitExpressionStatement(ExpressionStatement node) => new ExpressionStatement(
- visit(node.expression), node.endToken);
-
- Node visitFor(For node) => new For(
- visit(node.initializer), visit(node.conditionStatement),
- visit(node.update), visit(node.body), node.forToken);
-
- Node visitForIn(ForIn node) => new ForIn(
- visit(node.declaredIdentifier), visit(node.expression), visit(node.body),
- node.forToken, node.inToken);
-
- Node visitFunctionDeclaration(FunctionDeclaration node) => new FunctionDeclaration(
- visit(node.function));
-
- Node rewriteFunctionExpression(FunctionExpression node, Statement body) =>
- new FunctionExpression(
- visit(node.name), visit(node.parameters), body,
- visit(node.returnType), visit(node.modifiers),
- visit(node.initializers), node.getOrSet);
-
- Node visitFunctionExpression(FunctionExpression node) =>
- rewriteFunctionExpression(node, visit(node.body));
-
- Node visitIdentifier(Identifier node) => new Identifier(node.token);
-
- Node visitIf(If node) => new If(
- visit(node.condition), visit(node.thenPart), visit(node.elsePart),
- node.ifToken, node.elseToken);
-
- Node visitLabel(Label node) =>
- new Label(visit(node.identifier), node.colonToken);
-
- Node visitLabeledStatement(LabeledStatement node) => new LabeledStatement(
- visit(node.labels), visit(node.statement));
-
- Node visitLiteralBool(LiteralBool node) => new LiteralBool(
- node.token, node.handler);
-
- Node visitLiteralDouble(LiteralDouble node) => new LiteralDouble(
- node.token, node.handler);
-
- Node visitLiteralInt(LiteralInt node) =>
- new LiteralInt(node.token, node.handler);
-
- Node visitLiteralList(LiteralList node) => new LiteralList(
- visit(node.typeArguments), visit(node.elements), node.constKeyword);
-
- Node visitLiteralMap(LiteralMap node) => new LiteralMap(
- visit(node.typeArguments), visit(node.entries), node.constKeyword);
-
- Node visitLiteralMapEntry(LiteralMapEntry node) => new LiteralMapEntry(
- visit(node.key), node.colonToken, visit(node.value));
-
- Node visitLiteralNull(LiteralNull node) => new LiteralNull(node.token);
-
- Node visitLiteralString(LiteralString node) => new LiteralString(
- node.token, node.dartString);
-
- Node visitMetadata(Metadata node) => new Metadata(
- node.token, visit(node.expression));
-
- Node visitMixinApplication(MixinApplication node) => new MixinApplication(
- visit(node.superclass), visit(node.mixins));
-
- Node visitNamedMixinApplication(NamedMixinApplication node) =>
- new NamedMixinApplication(visit(node.name),
- visit(node.typeParameters),
- visit(node.modifiers),
- visit(node.mixinApplication),
- visit(node.interfaces),
- node.classKeyword,
- node.endToken);
-
- Node visitModifiers(Modifiers node) => new Modifiers(visit(node.nodes));
-
- Node visitNamedArgument(NamedArgument node) => new NamedArgument(
- visit(node.name), node.colonToken, visit(node.expression));
-
- Node visitNewExpression(NewExpression node) => new NewExpression(
- node.newToken, visit(node.send));
-
- Node rewriteNodeList(NodeList node, Link link) =>
- new NodeList(node.beginToken, link, node.endToken, node.delimiter);
-
- Node visitNodeList(NodeList node) {
- // Special case for classes which exist in hierarchy, but not
- // in the visitor.
- if (node is Prefix) {
- return node.nodes.isEmpty ?
- new Prefix() : new Prefix.singleton(visit(node.nodes.head));
- }
- if (node is Postfix) {
- return node.nodes.isEmpty ?
- new Postfix() : new Postfix.singleton(visit(node.nodes.head));
- }
- LinkBuilder<Node> builder = new LinkBuilder<Node>();
- for (Node n in node.nodes) {
- builder.addLast(visit(n));
- }
- return rewriteNodeList(node, builder.toLink());
- }
-
- Node visitOperator(Operator node) => new Operator(node.token);
-
- Node visitParenthesizedExpression(ParenthesizedExpression node) =>
- new ParenthesizedExpression(visit(node.expression), node.beginToken);
-
- Node visitRethrow(Rethrow node) => new Rethrow(
- node.throwToken, node.endToken);
-
- Node visitReturn(Return node) => new Return(
- node.beginToken, node.endToken, visit(node.expression));
-
- Node visitSend(Send node) => new Send(
- visit(node.receiver), visit(node.selector), visit(node.argumentsNode));
-
- Node visitSendSet(SendSet node) => new SendSet(
- visit(node.receiver), visit(node.selector),
- visit(node.assignmentOperator), visit(node.argumentsNode));
-
- Node visitStringInterpolation(StringInterpolation node) =>
- new StringInterpolation(visit(node.string), visit(node.parts));
-
- Node visitStringInterpolationPart(StringInterpolationPart node) =>
- new StringInterpolationPart(visit(node.expression), visit(node.string));
-
- Node visitStringJuxtaposition(StringJuxtaposition node) =>
- new StringJuxtaposition(visit(node.first), visit(node.second));
-
- Node visitSwitchCase(SwitchCase node) => new SwitchCase(
- visit(node.labelsAndCases), node.defaultKeyword, visit(node.statements),
- node.startToken);
-
- Node visitSwitchStatement(SwitchStatement node) => new SwitchStatement(
- visit(node.parenthesizedExpression), visit(node.cases),
- node.switchKeyword);
-
- Node visitLiteralSymbol(LiteralSymbol node) => new LiteralSymbol(
- node.hashToken, visit(node.identifiers));
-
- Node visitThrow(Throw node) => new Throw(
- visit(node.expression), node.throwToken, node.endToken);
-
- Node visitTryStatement(TryStatement node) => new TryStatement(
- visit(node.tryBlock), visit(node.catchBlocks), visit(node.finallyBlock),
- node.tryKeyword, node.finallyKeyword);
-
- Node visitTypeAnnotation(TypeAnnotation node) => new TypeAnnotation(
- visit(node.typeName), visit(node.typeArguments));
-
- Node visitTypedef(Typedef node) => new Typedef(
- visit(node.returnType), visit(node.name), visit(node.typeParameters),
- visit(node.formals), node.typedefKeyword, node.endToken);
-
- Node visitTypeVariable(TypeVariable node) => new TypeVariable(
- visit(node.name), visit(node.bound));
-
- Node visitVariableDefinitions(VariableDefinitions node) =>
- new VariableDefinitions.forParameter(
- visit(node.metadata), visit(node.type),
- visit(node.modifiers), visit(node.definitions));
-
- Node visitWhile(While node) => new While(
- visit(node.condition), visit(node.body), node.whileKeyword);
-
- Node visitNode(Node node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitCombinator(Combinator node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitExport(Export node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitExpression(Expression node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitGotoStatement(GotoStatement node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitImport(Import node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitLibraryDependency(LibraryTag node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitLibraryName(LibraryName node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitLibraryTag(LibraryTag node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitLiteral(Literal node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitLoop(Loop node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitPart(Part node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitPartOf(PartOf node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitPostfix(Postfix node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitPrefix(Prefix node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitStatement(Statement node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- Node visitStringNode(StringNode node) {
- unimplemented('visitNode', node: node);
- return null;
- }
-
- unimplemented(String message, {Node node}) {
- throw message;
- }
-}
diff --git a/sdk/lib/_internal/compiler/implementation/deferred_load.dart b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
index fc1b601..7fdb796 100644
--- a/sdk/lib/_internal/compiler/implementation/deferred_load.dart
+++ b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
@@ -271,7 +271,10 @@
Set<Constant> constants) {
element = element.implementation;
for (MetadataAnnotation metadata in element.metadata) {
- if (metadata.value != null) constants.add(metadata.value);
+ if (metadata.value != null) {
+ constants.add(metadata.value);
+ elements.add(metadata.value.computeType(compiler).element);
+ }
}
if (element.isClass()) {
// If we see a class, add everything its instance members refer
@@ -379,6 +382,23 @@
LibraryElement deferredLibrary = _allDeferredImports[deferredImport];
for (LibraryElement library in
_nonDeferredReachableLibraries(deferredLibrary)) {
+ // TODO(sigurdm): The metadata should go to the right output unit.
+ // For now they all go to the main output unit.
+ for (MetadataAnnotation metadata in library.metadata) {
+ if (metadata.value != null) {
+ _mapDependencies(metadata.value.computeType(compiler).element,
+ _fakeMainImport);
+ }
+ }
+ for (LibraryTag tag in library.tags) {
+ for (MetadataAnnotation metadata in tag.metadata) {
+ if (metadata.value != null) {
+ _mapDependencies(metadata.value.computeType(compiler).element,
+ _fakeMainImport);
+ }
+ }
+ }
+
if (mirrorTask.librariesWithUsage.contains(library)) {
Map<LibraryElement, List<MirrorUsage>> mirrorsResult =
diff --git a/sdk/lib/_internal/compiler/implementation/dump_info.dart b/sdk/lib/_internal/compiler/implementation/dump_info.dart
index 93c3425..159b07e 100644
--- a/sdk/lib/_internal/compiler/implementation/dump_info.dart
+++ b/sdk/lib/_internal/compiler/implementation/dump_info.dart
@@ -272,14 +272,14 @@
InfoNode visitFieldElement(FieldElement element) {
CodeBuffer emittedCode = compiler.backend.codeOf(element);
- int size = 0;
- DartType type = element.computeType(compiler);
TypeMask inferredType = compiler.typesTask
.getGuaranteedTypeOfElement(element);
// If a field has an empty inferred type it is never used.
if ((inferredType == null || inferredType.isEmpty) && emittedCode == null) {
return null;
}
+ int size = 0;
+ DartType type = element.computeType(compiler);
List<InfoNode> contents = new List<InfoNode>();
if (emittedCode != null) {
contents.add(new CodeInfoNode(
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index f4ee00c..4300207 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -487,6 +487,10 @@
registerInvokedSetter(selector);
}
+ void registerGetterForSuperMethod(Element element) {
+ universe.methodsNeedingSuperGetter.add(element);
+ }
+
void registerFieldGetter(Element element) {
universe.fieldGetters.add(element);
}
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart
index 3fa8060..76aaa00 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart
@@ -412,6 +412,12 @@
return _stringType;
}
+ @override
+ ConcreteType stringLiteralType(_) {
+ inferrer.augmentSeenClasses(compiler.backend.stringImplementation);
+ return _stringType;
+ }
+
/**
* Returns the [TypeMask] representation of [baseType].
*/
@@ -591,8 +597,8 @@
ConcreteType allocateMap(ConcreteType type,
Node node,
Element element,
- [ConcreteType keyType,
- ConcreteType valueType]) {
+ [List<ConcreteType> keyTypes,
+ List<ConcreteType> valueTypes]) {
// TODO(polux): treat maps the same way we treat lists
return type;
}
@@ -903,10 +909,22 @@
throw new UnsupportedError("");
}
+ bool get isMap {
+ throw new UnsupportedError("");
+ }
+
+ bool get isDictionary {
+ throw new UnsupportedError("");
+ }
+
bool get isForwarding {
throw new UnsupportedError("");
}
+ bool get isValue {
+ throw new UnsupportedError("");
+ }
+
bool containsOnlyInt(Compiler compiler) {
throw new UnsupportedError("");
}
@@ -974,10 +992,6 @@
bool containsMask(TypeMask other, Compiler compiler) {
throw new UnsupportedError("");
}
-
- bool get isMap {
- throw new UnsupportedError("");
- }
}
class WorkQueue {
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart b/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart
index 94d80bb..f15a77f 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart
@@ -35,6 +35,8 @@
T get stringType;
T get typeType;
+ T stringLiteralType(DartString value);
+
T nonNullSubtype(ClassElement type);
T nonNullSubclass(ClassElement type);
T nonNullExact(ClassElement type);
@@ -47,7 +49,8 @@
Element enclosing,
[T elementType, int length]);
- T allocateMap(T type, Node node, Element element, [T keyType, T valueType]);
+ T allocateMap(T type, Node node, Element element, [List<T> keyType,
+ List<T> valueType]);
T allocateClosure(Node node, Element element);
@@ -680,7 +683,7 @@
}
T visitLiteralString(LiteralString node) {
- return types.stringType;
+ return types.stringLiteralType(node.dartString);
}
T visitStringInterpolation(StringInterpolation node) {
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/list_tracer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/list_tracer.dart
index df9630a..e95f986 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/list_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/list_tracer.dart
@@ -200,8 +200,8 @@
callsGrowableMethod = true;
assignments.add(inferrer.types.nullType);
}
- } else if (selector.isCall()
- && !info.targets.every((element) => element.isFunction())) {
+ } else if (selector.isCall() &&
+ !info.targets.every((element) => element.isFunction())) {
bailout('Passed to a closure');
return;
}
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/map_tracer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/map_tracer.dart
index 595505a..76cc9e5 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/map_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/map_tracer.dart
@@ -6,6 +6,13 @@
Set<String> okMapSelectorsSet = new Set.from(
const <String>[
+ // From Object.
+ "==",
+ "hashCode",
+ "toString",
+ "noSuchMethod",
+ "runtimeType",
+ // From Map
"[]",
"isEmpty",
"isNotEmpty",
@@ -19,8 +26,14 @@
"remove"]);
class MapTracerVisitor extends TracerVisitor {
+ // These lists are used to keep track of newly discovered assignments to
+ // the map. Note that elements at corresponding indices are expected to
+ // belong to the same assignment operation.
List<TypeInformation> keyAssignments = <TypeInformation>[];
List<TypeInformation> valueAssignments = <TypeInformation>[];
+ // This list is used to keep track of assignments of entire maps to
+ // this map.
+ List<MapTypeInformation> mapAssignments = <MapTypeInformation>[];
MapTracerVisitor(tracedType, inferrer) : super(tracedType, inferrer);
@@ -37,7 +50,7 @@
map.flowsInto.addAll(flowsInto);
return true;
}
- keyAssignments = valueAssignments = null;
+ keyAssignments = valueAssignments = mapAssignments = null;
return false;
}
@@ -66,8 +79,7 @@
// the map.
TypeInformation map = info.arguments.positional[0];
if (map is MapTypeInformation) {
- keyAssignments.add(map.keyType);
- valueAssignments.add(map.valueType);
+ mapAssignments.add(map);
} else {
// If we could select a component from a [TypeInformation],
// like the keytype or valuetype in this case, we could
@@ -91,19 +103,19 @@
// of a [ListTypeInformation], so I have nowhere to propagate
// that information.
// TODO(herhut): add support for Map.keys and Map.values.
- bailout('Map used in a not-ok selector');
+ bailout('Map used in a not-ok selector [$selectorName]');
return;
}
} else if (selector.isIndexSet()) {
keyAssignments.add(info.arguments.positional[0]);
valueAssignments.add(info.arguments.positional[1]);
} else if (!selector.isIndex()) {
- bailout('Map used in a not-ok selector');
+ bailout('Map used in a not-ok selector [$selectorName]');
return;
}
}
- } else if (selector.isCall()
- && !info.targets.every((element) => element.isFunction())) {
+ } else if (selector.isCall() &&
+ !info.targets.every((element) => element.isFunction())) {
bailout('Passed to a closure');
return;
}
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
index 98a6589..73a81dc 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
@@ -86,8 +86,7 @@
// Work list of maps to analyze after analyzing the users of a
// [TypeInformation]. We know the [tracedType] has been stored in these
// maps and we must check how it escapes from these maps.
- final List<MapTypeInformation> mapsToAnalyze =
- <MapTypeInformation>[];
+ final List<MapTypeInformation> mapsToAnalyze = <MapTypeInformation>[];
final Setlet<TypeInformation> flowsInto = new Setlet<TypeInformation>();
@@ -162,6 +161,8 @@
}
void visitConcreteTypeInformation(ConcreteTypeInformation info) {}
+ void visitStringLiteralTypeInformation(StringLiteralTypeInformation info) {}
+
void visitClosureTypeInformation(ClosureTypeInformation info) {}
void visitClosureCallSiteTypeInformation(
@@ -186,7 +187,7 @@
if (returnsListElementTypeSet.contains(user.selector)) {
addNewEscapeInformation(user);
} else if (!doesNotEscapeListSet.contains(user.selector.name)) {
- bailout('Escape from a list');
+ bailout('Escape from a list via [${user.selector.name}]');
}
});
});
@@ -205,7 +206,7 @@
if (user.selector.isIndex()) {
addNewEscapeInformation(user);
} else if (!doesNotEscapeMapSet.contains(user.selector.name)) {
- bailout('Escape from a map');
+ bailout('Escape from a map via [${user.selector.name}]');
}
});
});
@@ -236,6 +237,7 @@
DynamicCallSiteTypeInformation info) {
if (isAddedToContainer(info)) {
ContainerTypeMask mask = info.receiver.type;
+
if (mask.allocationNode != null) {
ListTypeInformation list =
inferrer.types.allocatedLists[mask.allocationNode];
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
index 5934b6e..89e9015 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
@@ -14,7 +14,7 @@
import '../util/util.dart' show Link, Spannable, Setlet;
import '../types/types.dart'
show TypesInferrer, FlatTypeMask, TypeMask, ContainerTypeMask,
- ElementTypeMask, TypeSystem, MinimalInferrerEngine;
+ ElementTypeMask, ValueTypeMask, TypeSystem, MinimalInferrerEngine;
import 'inferrer_visitor.dart';
// BUG(8802): There's a bug in the analyzer that makes the re-export
@@ -92,6 +92,8 @@
TypeMask get typeType => compiler.typesTask.typeType;
bool isNull(TypeMask mask) => mask.isEmpty && mask.isNullable;
+ TypeMask stringLiteralType(ast.DartString value) => stringType;
+
TypeMask nonNullSubtype(ClassElement type)
=> new TypeMask.nonNullSubtype(type.declaration);
TypeMask nonNullSubclass(ClassElement type)
@@ -108,7 +110,7 @@
}
TypeMask allocateMap(TypeMask type, ast.Node node, Element element,
- [TypeMask keys, TypeMask values]) {
+ [List<TypeMask> keys, List<TypeMask> values]) {
return type;
}
@@ -646,32 +648,20 @@
T visitLiteralMap(ast.LiteralMap node) {
return inferrer.concreteTypes.putIfAbsent(node, () {
ast.NodeList entries = node.entries;
- T keyType;
- T valueType;
- if (entries.isEmpty) {
- keyType = types.nonNullEmpty();
- valueType = types.nonNullEmpty();
- } else {
- for (ast.LiteralMapEntry entry in entries) {
- T key = visit(entry.key);
- keyType = keyType == null
- ? types.allocatePhi(null, null, key)
- : types.addPhiInput(null, keyType, key);
+ List<T> keyTypes = [];
+ List<T> valueTypes = [];
- T value = visit(entry.value);
- valueType = valueType == null
- ? types.allocatePhi(null, null, value)
- : types.addPhiInput(null, valueType, value);
- }
- keyType = types.simplifyPhi(null, null, keyType);
- valueType = types.simplifyPhi(null, null, valueType);
+ for (ast.LiteralMapEntry entry in entries) {
+ keyTypes.add(visit(entry.key));
+ valueTypes.add(visit(entry.value));
}
+
T type = node.isConst() ? types.constMapType : types.mapType;
return types.allocateMap(type,
node,
outermostElement,
- keyType,
- valueType);
+ keyTypes,
+ valueTypes);
});
}
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
index eda5c33..c87036e 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
@@ -7,17 +7,17 @@
import 'dart:collection' show Queue, IterableBase;
import '../dart_types.dart' show DartType, InterfaceType, TypeKind;
import '../elements/elements.dart';
-import '../tree/tree.dart' as ast show LiteralList, Node;
+import '../tree/tree.dart' as ast show DartString, Node;
import '../ir/ir_nodes.dart' as ir show Node;
import '../types/types.dart'
- show TypeMask, ContainerTypeMask, MapTypeMask, TypesInferrer;
+ show TypeMask, ContainerTypeMask, MapTypeMask, DictionaryTypeMask,
+ ValueTypeMask, TypesInferrer;
import '../universe/universe.dart' show Selector, TypedSelector, SideEffects;
import '../dart2jslib.dart' show Compiler, TreeElementMapping;
import 'inferrer_visitor.dart' show TypeSystem, ArgumentsTypes;
import '../native_handler.dart' as native;
import '../util/util.dart' show Spannable, Setlet;
import 'simple_types_inferrer.dart';
-import 'ir_type_inferrer.dart';
import '../dart2jslib.dart' show invariant, Constant, FunctionConstant;
part 'type_graph_nodes.dart';
@@ -45,15 +45,15 @@
]);
bool returnsListElementType(Selector selector) {
- return (selector.mask != null)
- && selector.mask.isContainer
- && returnsListElementTypeSet.contains(selector.asUntyped);
+ return (selector.mask != null) &&
+ selector.mask.isContainer &&
+ returnsListElementTypeSet.contains(selector.asUntyped);
}
bool returnsMapValueType(Selector selector) {
- return (selector.mask != null)
- && selector.mask.isMap
- && selector.isIndex();
+ return (selector.mask != null) &&
+ selector.mask.isMap &&
+ selector.isIndex();
}
class TypeInformationSystem extends TypeSystem<TypeInformation> {
@@ -203,6 +203,12 @@
TypeInformation nonNullEmptyType;
+
+ TypeInformation stringLiteralType(ast.DartString value) {
+ return new StringLiteralTypeInformation(
+ value, compiler.typesTask.stringType);
+ }
+
TypeInformation computeLUB(TypeInformation firstType,
TypeInformation secondType) {
if (firstType == null) return secondType;
@@ -236,8 +242,8 @@
if (annotation.isVoid) return nullType;
if (annotation.element == compiler.objectClass) return type;
TypeMask otherType;
- if (annotation.kind == TypeKind.TYPEDEF
- || annotation.kind == TypeKind.FUNCTION) {
+ if (annotation.kind == TypeKind.TYPEDEF ||
+ annotation.kind == TypeKind.FUNCTION) {
otherType = functionType.type;
} else if (annotation.kind == TypeKind.TYPE_VARIABLE) {
// TODO(ngeoffray): Narrow to bound.
@@ -294,12 +300,12 @@
ast.Node node,
Element enclosing,
[TypeInformation elementType, int length]) {
- bool isTypedArray = (compiler.typedDataClass != null)
- && type.type.satisfies(compiler.typedDataClass, compiler);
+ bool isTypedArray = (compiler.typedDataClass != null) &&
+ type.type.satisfies(compiler.typedDataClass, compiler);
bool isConst = (type.type == compiler.typesTask.constListType);
- bool isFixed = (type.type == compiler.typesTask.fixedListType)
- || isConst
- || isTypedArray;
+ bool isFixed = (type.type == compiler.typesTask.fixedListType) ||
+ isConst ||
+ isTypedArray;
bool isElementInferred = isConst || isTypedArray;
int inferredLength = isFixed ? length : null;
@@ -326,31 +332,42 @@
TypeInformation allocateMap(ConcreteTypeInformation type,
ast.Node node,
Element element,
- [TypeInformation keyType,
- TypeInformation valueType]) {
+ [List<TypeInformation> keyTypes,
+ List<TypeInformation> valueTypes]) {
+ assert(keyTypes.length == valueTypes.length);
bool isFixed = (type.type == compiler.typesTask.constMapType);
- // transform the key and value into inferrable type informations
- KeyInMapTypeInformation inferredKeyType =
- new KeyInMapTypeInformation(keyType);
- ValueInMapTypeInformation inferredValueType =
- new ValueInMapTypeInformation(valueType);
+ TypeMask keyType, valueType;
if (isFixed) {
- inferredValueType.inferred = inferredKeyType.inferred = true;
+ keyType = keyTypes.fold(nonNullEmptyType.type,
+ (type, info) => type.union(info.type, compiler));
+ valueType = valueTypes.fold(nonNullEmptyType.type,
+ (type, info) => type.union(info.type, compiler));
+ } else {
+ keyType = valueType = dynamicType.type;
}
MapTypeMask mask = new MapTypeMask(type.type,
node,
element,
- isFixed ? keyType.type
- : dynamicType.type,
- isFixed ? valueType.type
- : dynamicType.type);
+ keyType,
+ valueType);
+
+ TypeInformation keyTypeInfo = new KeyInMapTypeInformation(null);
+ TypeInformation valueTypeInfo = new ValueInMapTypeInformation(null);
+ allocatedTypes.add(keyTypeInfo);
+ allocatedTypes.add(valueTypeInfo);
MapTypeInformation map =
- new MapTypeInformation(inferredKeyType, inferredValueType, mask);
+ new MapTypeInformation(mask, keyTypeInfo, valueTypeInfo);
- allocatedTypes.add(inferredKeyType);
- allocatedTypes.add(inferredValueType);
+ for (int i = 0; i < keyTypes.length; ++i) {
+ TypeInformation newType =
+ map.addEntryAssignment(keyTypes[i], valueTypes[i], true);
+ if (newType != null) allocatedTypes.add(newType);
+ }
+
+ if (isFixed) map.markAsInferred();
+
allocatedMaps[node] = map;
return map;
}
@@ -380,8 +397,8 @@
// Check if [inputType] is a phi for a local updated in
// the try/catch block [node]. If it is, no need to allocate a new
// phi.
- if (inputType is PhiElementTypeInformation
- && inputType.branchNode == node) {
+ if (inputType is PhiElementTypeInformation &&
+ inputType.branchNode == node) {
return inputType;
}
PhiElementTypeInformation result =
@@ -479,10 +496,11 @@
void analyzeListAndEnqueue(ListTypeInformation info) {
if (info.analyzed) return;
info.analyzed = true;
+
ListTracerVisitor tracer = new ListTracerVisitor(info, this);
- if (!tracer.run()) {
- return;
- }
+ bool succeeded = tracer.run();
+ if (!succeeded) return;
+
info.bailedOut = false;
info.elementType.inferred = true;
TypeMask fixedListType = compiler.typesTask.fixedListType;
@@ -499,15 +517,24 @@
if (info.analyzed) return;
info.analyzed = true;
MapTracerVisitor tracer = new MapTracerVisitor(info, this);
- if (!tracer.run()) return;
+
+ bool succeeded = tracer.run();
+ if (!succeeded) return;
+
info.bailedOut = false;
- info.keyType.inferred = true;
- tracer.keyAssignments.forEach(info.keyType.addAssignment);
+ for (int i = 0; i < tracer.keyAssignments.length; ++i) {
+ TypeInformation newType = info.addEntryAssignment(
+ tracer.keyAssignments[i], tracer.valueAssignments[i]);
+ if (newType != null) workQueue.add(newType);
+ }
+ for (TypeInformation map in tracer.mapAssignments) {
+ workQueue.addAll(info.addMapAssignment(map));
+ }
+
+ info.markAsInferred();
workQueue.add(info.keyType);
- info.valueType.inferred = true;
- tracer.valueAssignments.forEach(info.valueType.addAssignment);
- // Enqueue the map for later refinement
workQueue.add(info.valueType);
+ workQueue.addAll(info.typeInfoMap.values);
workQueue.add(info);
}
@@ -573,12 +600,18 @@
types.allocatedLists.values.forEach((ListTypeInformation info) {
print('${info.type} '
'for ${info.originalContainerType.allocationNode} '
- 'at ${info.originalContainerType.allocationElement}');
+ 'at ${info.originalContainerType.allocationElement} '
+ 'after ${info.refineCount}');
});
types.allocatedMaps.values.forEach((MapTypeInformation info) {
print('${info.type} '
'for ${(info.type as MapTypeMask).allocationNode} '
- 'at ${(info.type as MapTypeMask).allocationElement}');
+ 'at ${(info.type as MapTypeMask).allocationElement} '
+ 'after ${info.refineCount}');
+ });
+ analyzedElements.forEach((Element elem) {
+ TypeInformation type = types.getInferredTypeOf(elem);
+ print('${elem} :: ${type} from ${type.assignments} ');
});
}
@@ -592,12 +625,8 @@
if (analyzedElements.contains(element)) return;
analyzedElements.add(element);
- var visitor;
- if (compiler.irBuilder.hasIr(element)) {
- visitor = new IrTypeInferrerVisitor(compiler, element, this);
- } else {
- visitor = new SimpleTypeInferrerVisitor(element, compiler, this);
- }
+ SimpleTypeInferrerVisitor visitor =
+ new SimpleTypeInferrerVisitor(element, compiler, this);
TypeInformation type;
compiler.withCurrentElement(element, () {
type = visitor.run();
@@ -637,14 +666,14 @@
} else {
recordTypeOfNonFinalField(node, element, type);
}
- if (Elements.isStaticOrTopLevelField(element)
- && node.asSendSet() != null
- && !element.modifiers.isConst()) {
+ if (Elements.isStaticOrTopLevelField(element) &&
+ node.asSendSet() != null &&
+ !element.modifiers.isConst()) {
var argument = node.asSendSet().arguments.head;
// TODO(13429): We could do better here by using the
// constant handler to figure out if it's a lazy field or not.
- if (argument.asSend() != null
- || (argument.asNewExpression() != null && !argument.isConst())) {
+ if (argument.asSend() != null ||
+ (argument.asNewExpression() != null && !argument.isConst())) {
recordType(element, types.nullType);
}
}
@@ -658,8 +687,8 @@
if (!info.inLoop) return;
if (info is StaticCallSiteTypeInformation) {
compiler.world.addFunctionCalledInLoop(info.calledElement);
- } else if (info.selector.mask != null
- && !info.selector.mask.containsAll(compiler)) {
+ } else if (info.selector.mask != null &&
+ !info.selector.mask.containsAll(compiler)) {
// For instance methods, we only register a selector called in a
// loop if it is a typed selector, to avoid marking too many
// methods as being called from within a loop. This cuts down
@@ -966,8 +995,8 @@
*/
TypeInformation typeOfElementWithSelector(Element element,
Selector selector) {
- if (element.name == Compiler.NO_SUCH_METHOD
- && selector.name != element.name) {
+ if (element.name == Compiler.NO_SUCH_METHOD &&
+ selector.name != element.name) {
// An invocation can resolve to a [noSuchMethod], in which case
// we get the return type of [noSuchMethod].
return returnTypeOfElement(element);
@@ -1053,7 +1082,7 @@
MapTypeMask mask = selector.mask;
TypeMask valueType = mask.valueType;
return valueType == null ? compiler.typesTask.dynamicType
- : valueType.nullable();
+ : valueType;
}
TypeMask result = const TypeMask.nonNullEmpty();
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart
index 92c6543b..b411f48 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart
@@ -240,8 +240,8 @@
factory ElementTypeInformation(Element element) {
var assignments = null;
- if (element.enclosingElement.isInstanceMember()
- && (element.isParameter() || element.isFieldParameter())) {
+ if (element.enclosingElement.isInstanceMember() &&
+ (element.isParameter() || element.isFieldParameter())) {
assignments = new ParameterAssignments();
}
return new ElementTypeInformation.internal(element, assignments);
@@ -286,9 +286,9 @@
// traced.
giveUp(inferrer, clearAssignments: false);
return type;
- } else if (enclosing.isInstanceMember()
- && (enclosing.name == Compiler.NO_SUCH_METHOD
- || enclosing.name == Compiler.CALL_OPERATOR_NAME)) {
+ } else if (enclosing.isInstanceMember() &&
+ (enclosing.name == Compiler.NO_SUCH_METHOD ||
+ enclosing.name == Compiler.CALL_OPERATOR_NAME)) {
// Do not infer types for parameters of [noSuchMethod] and
// [call] instance methods.
giveUp(inferrer);
@@ -303,9 +303,9 @@
return type;
}
}
- if (element.isField()
- || element.isParameter()
- || element.isFieldParameter()) {
+ if (element.isField() ||
+ element.isParameter() ||
+ element.isFieldParameter()) {
if (!inferrer.compiler.backend.canBeUsedForGlobalOptimizations(element)) {
// Do not infer types for fields and parameters being assigned
// by synthesized calls.
@@ -322,9 +322,9 @@
return inferrer.typeOfNativeBehavior(
native.NativeBehavior.ofFieldLoad(element, inferrer.compiler)).type;
} else {
- assert(element.isFunction()
- || element.isGetter()
- || element.isSetter());
+ assert(element.isFunction() ||
+ element.isGetter() ||
+ element.isSetter());
var elementType = element.computeType(inferrer.compiler);
if (elementType.kind != TypeKind.FUNCTION) {
return type;
@@ -359,9 +359,9 @@
}
if (element.isGenerativeConstructor() || element.isSetter()) return mask;
var type = element.computeType(compiler);
- if (element.isFunction()
- || element.isGetter()
- || element.isFactoryConstructor()) {
+ if (element.isFunction() ||
+ element.isGetter() ||
+ element.isFactoryConstructor()) {
type = type.returnType;
}
return new TypeMaskSystem(compiler).narrowType(mask, type);
@@ -390,8 +390,8 @@
}
// The number of assignments of non-final fields is
// not stable. Therefore such a field cannot be stable.
- if (element.isField()
- && !(element.modifiers.isConst() || element.modifiers.isFinal())) {
+ if (element.isField() &&
+ !(element.modifiers.isConst() || element.modifiers.isFinal())) {
return false;
}
// If the method is closurized, the closure tracing phase will go
@@ -485,9 +485,9 @@
}
bool hasStableType(TypeGraphInferrerEngine inferrer) {
- return inferrer.types.getInferredTypeOf(calledElement).isStable
- && (arguments == null || arguments.every((info) => info.isStable))
- && super.hasStableType(inferrer);
+ return inferrer.types.getInferredTypeOf(calledElement).isStable &&
+ (arguments == null || arguments.every((info) => info.isStable)) &&
+ super.hasStableType(inferrer);
}
void removeAndClearReferences(TypeGraphInferrerEngine inferrer) {
@@ -536,6 +536,7 @@
Selector computeTypedSelector(TypeGraphInferrerEngine inferrer) {
TypeMask receiverType = receiver.type;
+
if (selector.mask != receiverType) {
return receiverType == inferrer.compiler.typesTask.dynamicType
? selector.asUntyped
@@ -580,10 +581,10 @@
// Dart code, for example:
// int + int -> int
// uint31 | uint31 -> uint31
- if (name == '*' || name == '+' || name == '%' || name == 'remainder'
- || name == '~/') {
- if (isPositiveInt(receiver)
- && arguments.hasOnePositionalArgumentThatMatches(isPositiveInt)) {
+ if (name == '*' || name == '+' || name == '%' || name == 'remainder' ||
+ name == '~/') {
+ if (isPositiveInt(receiver) &&
+ arguments.hasOnePositionalArgumentThatMatches(isPositiveInt)) {
return inferrer.types.positiveIntType;
} else if (arguments.hasOnePositionalArgumentThatMatches(isInt)) {
return inferrer.types.intType;
@@ -593,8 +594,8 @@
return null;
}
} else if (name == '|' || name == '^') {
- if (isUInt31(receiver)
- && arguments.hasOnePositionalArgumentThatMatches(isUInt31)) {
+ if (isUInt31(receiver) &&
+ arguments.hasOnePositionalArgumentThatMatches(isUInt31)) {
return inferrer.types.uint31Type;
}
} else if (name == '>>') {
@@ -602,8 +603,8 @@
return inferrer.types.uint31Type;
}
} else if (name == '&') {
- if (isUInt31(receiver)
- || arguments.hasOnePositionalArgumentThatMatches(isUInt31)) {
+ if (isUInt31(receiver) ||
+ arguments.hasOnePositionalArgumentThatMatches(isUInt31)) {
return inferrer.types.uint31Type;
}
} else if (name == 'unary-') {
@@ -631,8 +632,8 @@
Compiler compiler = inferrer.compiler;
Selector selectorToUse = typedSelector.extendIfReachesAll(compiler);
- bool canReachAll = compiler.enabledInvokeOn
- && (selectorToUse != typedSelector);
+ bool canReachAll = compiler.enabledInvokeOn &&
+ (selectorToUse != typedSelector);
// If this call could potentially reach all methods that satisfy
// the untyped selector (through noSuchMethod's `Invocation`
@@ -669,8 +670,30 @@
ContainerTypeMask mask = receiver.type;
return mask.elementType;
} else if (returnsMapValueType(typedSelector)) {
- MapTypeMask mask = receiver.type;
- return mask.valueType.nullable();
+ if (typedSelector.mask.isDictionary &&
+ arguments.positional[0].type.isValue) {
+ DictionaryTypeMask mask = typedSelector.mask;
+ ValueTypeMask arg = arguments.positional[0].type;
+ String key = arg.value;
+ if (mask.typeMap.containsKey(key)) {
+ if (_VERBOSE) {
+ print("Dictionary lookup for $key yields ${mask.typeMap[key]}.");
+ }
+ return mask.typeMap[key];
+ } else {
+ // The typeMap is precise, so if we do not find the key, the lookup
+ // will be [null] at runtime.
+ if (_VERBOSE) {
+ print("Dictionary lookup for $key yields [null].");
+ }
+ return inferrer.types.nullType.type;
+ }
+ }
+ MapTypeMask mask = typedSelector.mask;
+ if (_VERBOSE) {
+ print("Map lookup for $typedSelector yields ${mask.valueType}.");
+ }
+ return mask.valueType;
} else {
TypeInformation info =
handleIntrisifiedSelector(typedSelector, inferrer);
@@ -731,11 +754,11 @@
}
bool hasStableType(TypeGraphInferrerEngine inferrer) {
- return receiver.isStable
- && targets.every(
- (element) => inferrer.types.getInferredTypeOf(element).isStable)
- && (arguments == null || arguments.every((info) => info.isStable))
- && super.hasStableType(inferrer);
+ return receiver.isStable &&
+ targets.every(
+ (element) => inferrer.types.getInferredTypeOf(element).isStable) &&
+ (arguments == null || arguments.every((info) => info.isStable)) &&
+ super.hasStableType(inferrer);
}
}
@@ -829,6 +852,21 @@
}
}
+class StringLiteralTypeInformation extends ConcreteTypeInformation {
+ final ast.DartString value;
+
+ StringLiteralTypeInformation(value, TypeMask mask)
+ : super(new ValueTypeMask(mask, value.slowToString())),
+ this.value = value;
+
+ String asString() => value.slowToString();
+ String toString() => 'Type $type value ${value.slowToString()}';
+
+ accept(TypeInformationVisitor visitor) {
+ return visitor.visitStringLiteralTypeInformation(this);
+ }
+}
+
/**
* A [NarrowTypeInformation] narrows a [TypeInformation] to a type,
* represented in [typeAnnotation].
@@ -943,9 +981,9 @@
TypeMask refine(TypeGraphInferrerEngine inferrer) {
var mask = type;
- if (!mask.isContainer
- || mask.elementType != elementType.type
- || mask.length != inferredLength) {
+ if (!mask.isContainer ||
+ mask.elementType != elementType.type ||
+ mask.length != inferredLength) {
return new ContainerTypeMask(originalContainerType.forwardTo,
originalContainerType.allocationNode,
originalContainerType.allocationElement,
@@ -954,6 +992,17 @@
}
return mask;
}
+
+ void giveUp(TypeGraphInferrerEngine inferrer, {bool clearAssignments: true}) {
+ super.giveUp(inferrer, clearAssignments: clearAssignments);
+ // We still know that this node represents a container, so we explicitly
+ // preserve that information here.
+ type = new ContainerTypeMask(originalContainerType.forwardTo,
+ originalContainerType.allocationNode,
+ originalContainerType.allocationElement,
+ inferrer.types.dynamicType.type,
+ null);
+ }
}
/**
@@ -975,6 +1024,10 @@
* for maps.
*/
class MapTypeInformation extends TypeInformation {
+ // When in Dictionary mode, this map tracks the type of the values that
+ // have been assigned to a specific [String] key.
+ final Map<String, ValueInMapTypeInformation> typeInfoMap = {};
+ // These fields track the overall type of the keys/values in the map.
final KeyInMapTypeInformation keyType;
final ValueInMapTypeInformation valueType;
final MapTypeMask initialType;
@@ -987,38 +1040,132 @@
bool bailedOut = true;
bool analyzed = false;
- MapTypeInformation(this.keyType, this.valueType, this.initialType) {
+ // Set to false if a statically unknown key flows into this map.
+ bool isDictionary = true;
+
+ MapTypeInformation(this.initialType, this.keyType, this.valueType) {
keyType.addUser(this);
valueType.addUser(this);
type = initialType;
}
+ TypeInformation addEntryAssignment(TypeInformation key,
+ TypeInformation value,
+ [bool nonNull = false]) {
+ TypeInformation newInfo = null;
+ if (isDictionary && key is StringLiteralTypeInformation) {
+ String keyString = key.asString();
+ typeInfoMap.putIfAbsent(keyString,
+ () => newInfo = new ValueInMapTypeInformation(null, nonNull));
+ typeInfoMap[keyString].addAssignment(value);
+ } else {
+ isDictionary = false;
+ typeInfoMap.clear();
+ }
+ keyType.addAssignment(key);
+ valueType.addAssignment(value);
+ if (newInfo != null) newInfo.addUser(this);
+
+ return newInfo;
+ }
+
+ List<TypeInformation> addMapAssignment(MapTypeInformation map) {
+ List<TypeInformation> newInfos = <TypeInformation>[];
+ if (map.isDictionary) {
+ map.typeInfoMap.forEach((keyString, value) {
+ typeInfoMap.putIfAbsent(keyString, () {
+ TypeInformation newInfo = new ValueInMapTypeInformation(null, false);
+ newInfos.add(newInfo);
+ return newInfo;
+ });
+ typeInfoMap[keyString].addAssignment(value);
+ });
+ }
+ keyType.addAssignment(map.keyType);
+ valueType.addAssignment(map.valueType);
+
+ return newInfos;
+ }
+
+ markAsInferred() {
+ keyType.inferred = valueType.inferred = true;
+ typeInfoMap.values.forEach((v) => v.inferred = true);
+ }
+
+ addAssignment(TypeInformation other) {
+ throw "not supported";
+ }
+
accept(TypeInformationVisitor visitor) {
return visitor.visitMapTypeInformation(this);
}
- TypeMask refine(TypeGraphInferrerEngine inferrer) {
- var mask = type;
- if (!mask.isMap
- || mask.keyType != keyType.type
- || mask.valueType != valueType.type) {
+ TypeMask toTypeMask(TypeGraphInferrerEngine inferrer) {
+ Map<String, TypeMask> mappings;
+ if (isDictionary) {
+ mappings = new Map<String, TypeMask>();
+ for (var key in typeInfoMap.keys) {
+ // We strip out entries that contain no information
+ if (!typeInfoMap[key].type.containsAll(inferrer.compiler) ||
+ !typeInfoMap[key].type.isNullable) {
+ mappings[key] = typeInfoMap[key].type;
+ }
+ }
+ }
+ if (mappings != null && !mappings.isEmpty) {
+ return new DictionaryTypeMask(initialType.forwardTo,
+ initialType.allocationNode,
+ initialType.allocationElement,
+ keyType.type,
+ valueType.type,
+ mappings);
+ } else {
return new MapTypeMask(initialType.forwardTo,
initialType.allocationNode,
initialType.allocationElement,
keyType.type,
valueType.type);
}
+ }
- return mask;
+ TypeMask refine(TypeGraphInferrerEngine inferrer) {
+ if (type.isDictionary != isDictionary) {
+ return toTypeMask(inferrer);
+ } else if (type.isDictionary) {
+ DictionaryTypeMask mask = type;
+ for (var key in typeInfoMap.keys) {
+ TypeInformation value = typeInfoMap[key];
+ if (!mask.typeMap.containsKey(key) &&
+ !value.type.containsAll(inferrer.compiler) &&
+ !value.type.isNullable) {
+ return toTypeMask(inferrer);
+ }
+ if (mask.typeMap[key] != typeInfoMap[key].type) {
+ return toTypeMask(inferrer);
+ }
+ }
+ } else if (type.isMap) {
+ MapTypeMask mask = type;
+ if (mask.keyType != keyType.type ||
+ mask.valueType != valueType.type) {
+ return toTypeMask(inferrer);
+ }
+ } else {
+ return toTypeMask(inferrer);
+ }
+
+ return type;
}
bool hasStableType(TypeGraphInferrerEngine inferrer) {
- return keyType.isStable
- && valueType.isStable
- && super.hasStableType(inferrer);
+ return keyType.isStable &&
+ valueType.isStable &&
+ super.hasStableType(inferrer);
}
- String toString() => 'Map $type (K:$keyType, V:$valueType)';
+ String toString() {
+ return 'Map $type (K:$keyType, V:$valueType) contents $typeInfoMap';
+ }
}
/**
@@ -1044,14 +1191,20 @@
* for the values in a [MapTypeInformation]
*/
class ValueInMapTypeInformation extends InferredTypeInformation {
- ValueInMapTypeInformation(TypeInformation valueType) : super(valueType);
+ // [nonNull] is set to true if this value is known to be part of the map.
+ // Note that only values assigned to a specific key value in dictionary
+ // mode can ever be marked as [nonNull].
+ final bool nonNull;
+
+ ValueInMapTypeInformation(TypeInformation valueType, [this.nonNull = false])
+ : super(valueType);
accept(TypeInformationVisitor visitor) {
return visitor.visitValueInMapTypeInformation(this);
}
TypeMask refine(TypeGraphInferrerEngine inferrer) {
- return super.refine(inferrer);
+ return nonNull ? super.refine(inferrer) : super.refine(inferrer).nullable();
}
String toString() => 'Value in Map $type';
@@ -1110,6 +1263,7 @@
T visitListTypeInformation(ListTypeInformation info);
T visitMapTypeInformation(MapTypeInformation info);
T visitConcreteTypeInformation(ConcreteTypeInformation info);
+ T visitStringLiteralTypeInformation(StringLiteralTypeInformation info);
T visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info);
T visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info);
T visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info);
diff --git a/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart b/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart
index 17b37d2..f901806 100644
--- a/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart
@@ -6,7 +6,6 @@
import 'ir_nodes.dart' as ir;
import '../elements/elements.dart';
-import '../elements/modelx.dart' show FunctionElementX;
import '../dart2jslib.dart';
import '../source_file.dart';
import '../tree/tree.dart' as ast;
@@ -21,8 +20,8 @@
*
* The functionality of the IrNodes is added gradually, therefore elements might
* have an IR or not, depending on the language features that are used. For
- * elements that do have an IR, the tree [ast.Node]s and the [Token]s are not used
- * in the rest of the compilation. This is ensured by setting the element's
+ * elements that do have an IR, the tree [ast.Node]s and the [Token]s are not
+ * used in the rest of the compilation. This is ensured by setting the element's
* cached tree to [:null:] and also breaking the token stream to crash future
* attempts to parse.
*
@@ -80,7 +79,6 @@
return true;
});
nodes[element] = irNode;
- unlinkTreeAndToken(element);
}
}
ensureIr(element);
@@ -171,15 +169,6 @@
}
}
- void unlinkTreeAndToken(element) {
- // Ensure the function signature has been computed (requires the AST).
- assert(element is !FunctionElementX || element.functionSignature != null);
- if (inCheckedMode) {
- element.beginToken.next = null;
- element.cachedNode = null;
- }
- }
-
SourceFile elementSourceFile(Element element) {
if (element is FunctionElement) {
FunctionElement functionElement = element;
diff --git a/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart b/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
index 1ea1611..5282c6b 100644
--- a/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
@@ -96,7 +96,7 @@
/**
* This class is only used during SSA generation, its instances never appear in
- * the representation of a function. See [SsaFromAstInliner.enterInlinedMethod].
+ * the representation of a function.
*/
class InlinedInvocationDummy extends Expression {
InlinedInvocationDummy() : super(0);
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 8e8366b..d157b56 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -55,7 +55,6 @@
class JavaScriptBackend extends Backend {
SsaBuilderTask builder;
- SsaFromIrBuilderTask fromIrBuilder;
SsaOptimizerTask optimizer;
SsaCodeGeneratorTask generator;
CodeEmitterTask emitter;
@@ -298,7 +297,6 @@
super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) {
emitter = new CodeEmitterTask(compiler, namer, generateSourceMap);
builder = new SsaBuilderTask(this);
- fromIrBuilder = new SsaFromIrBuilderTask(this);
optimizer = new SsaOptimizerTask(this);
generator = new SsaCodeGeneratorTask(this);
typeVariableHandler = new TypeVariableHandler(this);
@@ -1162,9 +1160,7 @@
compiler.enqueuer.codegen.registerStaticUse(getCyclicThrowHelper());
}
}
- HGraph graph = compiler.irBuilder.hasIr(element)
- ? fromIrBuilder.build(work)
- : builder.build(work);
+ HGraph graph = builder.build(work);
optimizer.optimize(work, graph);
jsAst.Expression code = generator.generateCode(work, graph);
generatedCode[element] = code;
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 1b79342..e148cee 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -958,18 +958,6 @@
return '${operatorAsPrefix()}${getNameForRti(element)}';
}
- String signatureLocation(FunctionType type) {
- ClassElement classElement = Types.getClassContext(type);
- return (classElement != null)
- ? '${isolateAccess(classElement)}'
- : currentIsolate;
- }
-
- String signatureName(FunctionType type) {
- String signature = '${operatorSignature()}_${getFunctionTypeName(type)}';
- return '${signatureLocation(type)}.$signature';
- }
-
String safeName(String name) => _safeName(name, jsReserved);
String safeVariableName(String name) => _safeName(name, jsVariableReserved);
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
index 10bcf7b..d7eea27 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
@@ -1253,7 +1253,6 @@
..write('["${library.getLibraryName()}",$_')
..write('"${uri}",$_')
..write(metadata == null ? "" : jsAst.prettyPrint(metadata, compiler))
- ..write(isDeferred ? '[]' : '')
..write(',$_')
..write(namer.globalObjectFor(library))
..write(',$_')
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
index dc4e201..836bc58 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
@@ -15,6 +15,9 @@
/// instance methods.
final Map<String, Element> methodClosures = <String, Element>{};
+ bool needsSuperGetter(FunctionElement element) =>
+ compiler.codegenWorld.methodsNeedingSuperGetter.contains(element);
+
/**
* Generate stubs to handle invocation of methods with optional
* arguments.
@@ -119,8 +122,21 @@
parametersBuffer, argumentsBuffer,
indexOfLastOptionalArgumentInParameters);
} else if (member.isInstanceMember()) {
- body = [js.return_(
- js('this')[namer.getNameOfInstanceMember(member)](argumentsBuffer))];
+ if (needsSuperGetter(member)) {
+ ClassElement superClass = member.getEnclosingClass();
+ String methodName = namer.getNameOfInstanceMember(member);
+ // When redirecting, we must ensure that we don't end up in a subclass.
+ // We thus can't just invoke `this.foo$1.call(filledInArguments)`.
+ // Instead we need to call the statically resolved target.
+ // `<class>.prototype.bar$1.call(this, argument0, ...)`.
+ body = [js.return_(
+ backend.namer.elementAccess(superClass)['prototype'][methodName]
+ ["call"](["this"]..addAll(argumentsBuffer)))];
+ } else {
+ body = [js.return_(
+ js('this')
+ [namer.getNameOfInstanceMember(member)](argumentsBuffer))];
+ }
} else {
body = [js.return_(namer.elementAccess(member)(argumentsBuffer))];
}
@@ -166,6 +182,13 @@
// (3) foo$3$d(a, b, d) => foo$4$c$d(a, b, null, d);
// (4) No stub generated, call is direct.
// (5) No stub generated, call is direct.
+ //
+ // We need to pay attention if this stub is for a function that has been
+ // invoked from a subclass. Then we cannot just redirect, since that
+ // would invoke the methods of the subclass. We have to compile to:
+ // (1) foo$2(a, b) => MyClass.foo$4$c$d.call(this, a, b, null, null)
+ // (2) foo$3$c(a, b, c) => MyClass.foo$4$c$d(this, a, b, c, null);
+ // (3) foo$3$d(a, b, d) => MyClass.foo$4$c$d(this, a, b, null, d);
Set<Selector> selectors = member.isInstanceMember()
? compiler.codegenWorld.invokedNames[member.name]
@@ -342,6 +365,7 @@
} else {
// Careful with operators.
canTearOff = compiler.codegenWorld.hasInvokedGetter(member, compiler);
+ assert(!needsSuperGetter(member) || canTearOff);
tearOffName = namer.getterName(member);
}
} else {
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
index 87a5036..f1a67f0 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
@@ -56,14 +56,9 @@
void generateFunctionTypeSignature(Element method, FunctionType type) {
assert(method.isImplementation);
jsAst.Expression thisAccess = new jsAst.This();
- ClosureClassMap closureData;
- // TODO(lry): Once the IR can express methods containing closures, find
- // a way to get the [:thisName:]. The solution to this problem depends on
- // how closures are represented in the IR, which is not yet decided.
- if (!compiler.irBuilder.hasIr(method)) {
- Node node = method.parseNode(compiler);
- closureData = compiler.closureToClassMapper.closureMappingCache[node];
- }
+ Node node = method.parseNode(compiler);
+ ClosureClassMap closureData =
+ compiler.closureToClassMapper.closureMappingCache[node];
if (closureData != null) {
Element thisElement =
closureData.freeVariableMapping[closureData.thisElement];
@@ -304,27 +299,6 @@
}
};
}
-
- void addSignature(FunctionType type) {
- jsAst.Expression encoding = rti.getTypeEncoding(type);
- buffer.add('${namer.signatureName(type)}$_=${_}');
- buffer.write(jsAst.prettyPrint(encoding, compiler));
- buffer.add('$N');
- }
- if (outputUnit == compiler.deferredLoadTask.mainOutputUnit) {
- // TODO(sigurdm): These should also be possibly deferred.
- // They should be handled similarly to constants.
- // They have 3 dependencies:
- // 1. The libraries containing the check.
- // 2. The typedef defining it.
- // 3. The types involved in the typedef.
- // TODO(sigurdm): Actually these seems to never be used. Remove them.
- checkedNonGenericFunctionTypes.forEach(addSignature);
- checkedGenericFunctionTypes.forEach((_, Set<FunctionType> functionTypes) {
- functionTypes.forEach(addSignature);
- });
- }
-
}
/**
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart
index 3dffd96..3d3b668 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart
@@ -33,6 +33,10 @@
return mirrorSystem._getLibrary(_type.element.getLibrary());
}
+ bool get hasReflectedType => throw new UnimplementedError();
+
+ Type get reflectedType => throw new UnimplementedError();
+
bool get isOriginalDeclaration => true;
TypeMirror get originalDeclaration => this;
@@ -193,6 +197,14 @@
return null;
}
+ bool isSubclassOf(Mirror other) {
+ if (other is Dart2JsTypeMirror) {
+ return _element.isSubclassOf(other._type.element);
+ } else {
+ throw new ArgumentError(other);
+ }
+ }
+
ClassMirror get mixin {
if (_element.isMixinApplication) {
MixinApplicationElement mixinApplication = _element;
@@ -239,12 +251,12 @@
: super(system, type);
bool isSubclassOf(ClassMirror other) {
- if (other is Dart2JsFunctionTypeMirror) {
- return false;
- } else if (other is Dart2JsClassDeclarationMirror) {
+ if (other is Dart2JsClassDeclarationMirror) {
Dart2JsClassDeclarationMirror otherDeclaration =
other.originalDeclaration;
return _element.isSubclassOf(otherDeclaration._element);
+ } else if (other is TypeMirror) {
+ return false;
}
throw new ArgumentError(other);
}
@@ -318,6 +330,8 @@
return _owner;
}
+ bool get isStatic => false;
+
TypeMirror get upperBound => owner._getTypeMirror(_type.element.bound);
bool operator ==(var other) {
@@ -407,6 +421,8 @@
}
String toString() => 'Mirror on function type $_type';
+
+ bool isSubclassOf(ClassMirror other) => false;
}
class Dart2JsVoidMirror extends Dart2JsTypeMirror {
diff --git a/sdk/lib/_internal/compiler/implementation/native_handler.dart b/sdk/lib/_internal/compiler/implementation/native_handler.dart
index 8118fd2..12563b5 100644
--- a/sdk/lib/_internal/compiler/implementation/native_handler.dart
+++ b/sdk/lib/_internal/compiler/implementation/native_handler.dart
@@ -1047,7 +1047,7 @@
final RegExp nativeRedirectionRegExp = new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
-void handleSsaNative(SsaFromAstBuilder builder, Expression nativeBody) {
+void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
Compiler compiler = builder.compiler;
FunctionElement element = builder.work.element;
NativeEmitter nativeEmitter = builder.nativeEmitter;
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 69e3b45..e5b2b8b 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -3098,11 +3098,32 @@
return null;
}
+ void checkConstMapKeysDontOverrideEquals(Spannable spannable,
+ MapConstant map) {
+ for (Constant key in map.keys.entries) {
+ if (!key.isObject()) continue;
+ ObjectConstant objectConstant = key;
+ DartType keyType = objectConstant.type;
+ ClassElement cls = keyType.element;
+ if (cls == compiler.stringClass) continue;
+ Element equals = cls.lookupMember('==');
+ if (equals.getEnclosingClass() != compiler.objectClass) {
+ compiler.reportError(spannable,
+ MessageKind.CONST_MAP_KEY_OVERRIDES_EQUALS,
+ {'type': keyType});
+ }
+ }
+ }
+
void analyzeConstant(Node node, {bool isConst: true}) {
addDeferredAction(enclosingElement, () {
Constant constant = compiler.constantHandler.compileNodeWithDefinitions(
node, mapping, isConst: isConst);
+ if (isConst && constant != null && constant.isMap()) {
+ checkConstMapKeysDontOverrideEquals(node, constant);
+ }
+
// The type constant that is an argument to JS_INTERCEPTOR_CONSTANT names
// a class that will be instantiated outside the program by attaching a
// native class dispatch record referencing the interceptor.
@@ -3444,6 +3465,91 @@
visit(node.expression);
}
+ DartType typeOfConstant(Constant constant) {
+ if (constant.isInt()) return compiler.intClass.rawType;
+ if (constant.isBool()) return compiler.boolClass.rawType;
+ if (constant.isDouble()) return compiler.doubleClass.rawType;
+ if (constant.isString()) return compiler.stringClass.rawType;
+ if (constant.isNull()) return compiler.nullClass.rawType;
+ if (constant.isFunction()) return compiler.functionClass.rawType;
+ assert(constant.isObject());
+ ObjectConstant objectConstant = constant;
+ return objectConstant.type;
+ }
+
+ bool overridesEquals(DartType type) {
+ ClassElement cls = type.element;
+ Element equals = cls.lookupMember('==');
+ return equals.getEnclosingClass() != compiler.objectClass;
+ }
+
+ void checkCaseExpressions(SwitchStatement node) {
+ TargetElement breakElement = getOrCreateTargetElement(node);
+ Map<String, LabelElement> continueLabels = <String, LabelElement>{};
+
+ Link<Node> cases = node.cases.nodes;
+ SwitchCase switchCase = cases.head;
+ CaseMatch firstCase = null;
+ DartType firstCaseType = null;
+ bool hasReportedProblem = false;
+
+ for (Link<Node> cases = node.cases.nodes;
+ !cases.isEmpty;
+ cases = cases.tail) {
+ SwitchCase switchCase = cases.head;
+
+ for (Node labelOrCase in switchCase.labelsAndCases) {
+ CaseMatch caseMatch = labelOrCase.asCaseMatch();
+ if (caseMatch == null) continue;
+
+ // Analyze the constant.
+ Constant constant = mapping.getConstant(caseMatch.expression);
+ assert(invariant(node, constant != null,
+ message: 'No constant computed for $node'));
+
+ DartType caseType = typeOfConstant(constant);
+
+ if (firstCaseType == null) {
+ firstCase = caseMatch;
+ firstCaseType = caseType;
+
+ // We only report the bad type on the first class element. All others
+ // get a "type differs" error.
+ if (caseType.element == compiler.doubleClass) {
+ compiler.reportError(node,
+ MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
+ {'type': "double"});
+ } else if (caseType.element == compiler.functionClass) {
+ compiler.reportError(node, MessageKind.SWITCH_CASE_FORBIDDEN,
+ {'type': "Function"});
+ } else if (constant.isObject() && overridesEquals(caseType)) {
+ compiler.reportError(firstCase.expression,
+ MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
+ {'type': caseType});
+ }
+ } else {
+ if (caseType != firstCaseType) {
+ if (!hasReportedProblem) {
+ compiler.reportError(
+ node,
+ MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
+ {'type': firstCaseType});
+ compiler.reportInfo(
+ firstCase.expression,
+ MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
+ {'type': firstCaseType});
+ hasReportedProblem = true;
+ }
+ compiler.reportInfo(
+ caseMatch.expression,
+ MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
+ {'type': caseType});
+ }
+ }
+ }
+ }
+ }
+
visitSwitchStatement(SwitchStatement node) {
node.expression.accept(this);
@@ -3495,6 +3601,10 @@
}
}
+ addDeferredAction(enclosingElement, () {
+ checkCaseExpressions(node);
+ });
+
statementScope.enterSwitch(breakElement, continueLabels);
node.cases.accept(this);
statementScope.exitSwitch();
diff --git a/sdk/lib/_internal/compiler/implementation/source_file.dart b/sdk/lib/_internal/compiler/implementation/source_file.dart
index 45636ea..af1a2be 100644
--- a/sdk/lib/_internal/compiler/implementation/source_file.dart
+++ b/sdk/lib/_internal/compiler/implementation/source_file.dart
@@ -118,10 +118,14 @@
var line = getLine(start);
var column = getColumn(line, start);
- var buf = new StringBuffer(
- '${filename}:${line + 1}:${column + 1}: $message');
- if (includeText) {
- buf.write('\n');
+ var buf = new StringBuffer('${filename}:');
+ if (start != end || start != 0) {
+ // Line/column info is relevant.
+ buf.write('${line + 1}:${column + 1}:');
+ }
+ buf.write('\n$message\n');
+
+ if (start != end && includeText) {
String textLine;
// +1 for 0-indexing, +1 again to avoid the last line of the file
if ((line + 2) < lineStarts.length) {
diff --git a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
index c97cebe..861bc2e 100644
--- a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
+++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
@@ -151,14 +151,14 @@
color = (x) => x;
}
if (uri == null) {
- assert(fatal);
- print(color(message));
+ print('${color(message)}');
} else {
SourceFile file = provider.sourceFiles[uri.toString()];
- if (file == null) {
+ if (file != null) {
+ print(file.getLocationMessage(color(message), begin, end, true, color));
+ } else {
throw '$uri: file is null';
}
- print(file.getLocationMessage(color(message), begin, end, true, color));
}
if (fatal && throwOnError) {
isAborting = true;
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 17c9706..85ac0e1 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -35,8 +35,8 @@
Element element = work.element.implementation;
return compiler.withCurrentElement(element, () {
HInstruction.idCounter = 0;
- SsaFromAstBuilder builder =
- new SsaFromAstBuilder(backend, work, emitter.nativeEmitter);
+ SsaBuilder builder =
+ new SsaBuilder(backend, work, emitter.nativeEmitter);
HGraph graph;
ElementKind kind = element.kind;
if (kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
@@ -91,7 +91,7 @@
});
}
- HGraph compileConstructor(SsaFromAstBuilder builder, CodegenWorkItem work) {
+ HGraph compileConstructor(SsaBuilder builder, CodegenWorkItem work) {
return builder.buildFactory(work.element);
}
}
@@ -114,7 +114,7 @@
*/
Map<Element, HInstruction> directLocals;
Map<Element, Element> redirectionMapping;
- SsaFromAstMixin builder;
+ SsaBuilder builder;
ClosureClassMap closureData;
LocalsHandler(this.builder)
@@ -672,7 +672,7 @@
abstract class JumpHandler {
- factory JumpHandler(SsaFromAstMixin builder, TargetElement target) {
+ factory JumpHandler(SsaBuilder builder, TargetElement target) {
return new TargetJumpHandler(builder, target);
}
void generateBreak([LabelElement label]);
@@ -718,11 +718,11 @@
// Continues in loops are implemented as breaks of the body.
// Continues in switches is currently not handled.
class TargetJumpHandler implements JumpHandler {
- final SsaFromAstMixin builder;
+ final SsaBuilder builder;
final TargetElement target;
final List<JumpHandlerEntry> jumps;
- TargetJumpHandler(SsaFromAstMixin builder, this.target)
+ TargetJumpHandler(SsaBuilder builder, this.target)
: this.builder = builder,
jumps = <JumpHandlerEntry>[] {
assert(builder.jumpTargets[target] == null);
@@ -804,7 +804,7 @@
/// switch case loop.
final Map<TargetElement, int> targetIndexMap = new Map<TargetElement, int>();
- SwitchCaseJumpHandler(SsaFromAstMixin builder,
+ SwitchCaseJumpHandler(SsaBuilder builder,
TargetElement target,
ast.SwitchStatement node)
: super(builder, target) {
@@ -882,82 +882,39 @@
}
/**
- * This mixin implements functionality that is shared between [SsaFromIrBuilder]
- * and [SsaFromAstBuilder].
- *
- * The type parameter [N] represents the node type from which the SSA form is
- * built, either [ir.Node] or [ast.Node].
- *
- * The following diagram shows the mixin structure of the AST and IR builders
- * and inliners, which is explained in the text below.
- *
- * SsaBuilderMixin
- * ___________/ | | \_________
- * / | | \
- * SsaBuilderDelegate / \ SsaBuilderFields
- * | | / \ / |
- * | | SsaFromAstMixin SsaFromIrMixin / |
- * | \ _____/ | _____________|____\_____/ |
- * | \__/__________|______/______ | \______ |
- * | / | / \ | \ |
- * SsaFromAstInliner SsaFromAstBuilder SsaFromIrInliner SsaFromIrBuilder
- *
- * The entry point to building an SSA graph is either an [SsaFromAstBuilder] or
- * an [SsaFromIrBuilder]. These builder classes hold the [HGraph] data structure
- * (inherited from [SsaBuilderFields]) into which blocks and instructions are
- * inserted. The visitor methods for IR / AST nodes are defined in the
- * [SsaFromIrMixin] / [SsaFromAstMixin] mixins.
- *
- * When inlining a function invocation of the same kind (SSA function in SSA
- * builder, for example), the state of the builder pushed on the [inliningStack]
- * and the same builder instance continues visiting the inlined function's body.
- *
- * When inlining a function of the other kind, the builder state is also pushed
- * on the inlining stack, and an inliner instance is created.
- *
- * We consider inlining an IR function into an AST builder, which creates an
- * [SsaFromIrInliner]. The IR inliner implements an IR visitor (defined in the
- * [SsaFromIrMixin]) and inserts SSA instructions into the [HGraph] of the
- * AST builder by delegation (inherited from the [SsaBuilderDelegate] mixin).
- * When encountering the [:return:] instruction (inlining is only performed if
- * there is exactly one), the IR inliner updates the [returnElement] field of
- * the AST builder.
- *
- * In the opposite case (inlining an AST function into an IR builder), the AST
- * inliner updates the [emitted] map of the IR builder with the return value.
- *
- * Finally, inlining can be nested. For example, we might start with an AST
- * builder and inline an invocation of an IR function. The IR inliner will
- * then again inline invocations of functions that are in either IR or AST.
- *
- * Note that [SsaBuilderMixin] does not define any fields because the inliner
- * subclasses are implemented using delegation ([SsaBuilderDelegate]). The
- * builder subclasses implement most of the properties as fields by extending
- * [SsaBuilderFields].
+ * This class builds SSA nodes for functions represented in AST.
*/
-abstract class SsaBuilderMixin<N> {
- Compiler get compiler;
+class SsaBuilder extends ResolvedVisitor {
+ final Compiler compiler;
+ final JavaScriptBackend backend;
+ final ConstantSystem constantSystem;
+ final CodegenWorkItem work;
+ final RuntimeTypes rti;
- JavaScriptBackend get backend;
+ /* This field is used by the native handler. */
+ final NativeEmitter nativeEmitter;
- HGraph get graph;
+ final HGraph graph = new HGraph();
/**
* The current block to add instructions to. Might be null, if we are
* visiting dead code, but see [isReachable].
*/
- HBasicBlock get current;
+ HBasicBlock _current;
- void set current(HBasicBlock block);
+ HBasicBlock get current => _current;
+
+ void set current(c) {
+ isReachable = c != null;
+ _current = c;
+ }
/**
* The most recently opened block. Has the same value as [current] while
* the block is open, but unlike [current], it isn't cleared when the
* current block is closed.
*/
- HBasicBlock get lastOpenedBlock;
-
- void set lastOpenedBlock(HBasicBlock block);
+ HBasicBlock lastOpenedBlock;
/**
* Indicates whether the current block is dead (because it has a throw or a
@@ -966,33 +923,58 @@
* abort on statement boundaries, not in the middle of expressions. See
* isAborted.
*/
- bool get isReachable;
-
- void set isReachable(bool value);
+ bool isReachable = true;
/**
* True if we are visiting the expression of a throw statement.
*/
- bool get inThrowExpression;
-
- void set inThrowExpression(bool value);
+ bool inThrowExpression = false;
/**
* The loop nesting is consulted when inlining a function invocation in
* [tryInlineMethod]. The inlining heuristics take this information into
* account.
*/
- int get loopNesting;
-
- void set loopNesting(int value);
-
- List<InliningState> get inliningStack;
+ int loopNesting = 0;
/**
* This stack contains declaration elements of the functions being built
* or inlined by this builder.
*/
- List<Element> get sourceElementStack;
+ final List<Element> sourceElementStack = <Element>[];
+
+ LocalsHandler localsHandler;
+
+ HInstruction rethrowableException;
+
+ HParameterValue lastAddedParameter;
+
+ Map<Element, HInstruction> parameters = <Element, HInstruction>{};
+
+ Map<TargetElement, JumpHandler> jumpTargets = <TargetElement, JumpHandler>{};
+
+ /**
+ * Variables stored in the current activation. These variables are
+ * being updated in try/catch blocks, and should be
+ * accessed indirectly through [HLocalGet] and [HLocalSet].
+ */
+ Map<Element, HLocalValue> activationVariables = <Element, HLocalValue>{};
+
+ // We build the Ssa graph by simulating a stack machine.
+ List<HInstruction> stack = <HInstruction>[];
+
+ SsaBuilder(JavaScriptBackend backend,
+ CodegenWorkItem work,
+ this.nativeEmitter)
+ : this.backend = backend,
+ this.compiler = backend.compiler,
+ this.constantSystem = backend.constantSystem,
+ this.work = work,
+ this.rti = backend.rti,
+ super(work.resolutionTree, backend.compiler) {
+ localsHandler = new LocalsHandler(this);
+ sourceElementStack.add(work.element);
+ }
Element get sourceElement => sourceElementStack.last;
@@ -1048,12 +1030,10 @@
current.add(instruction);
}
- void addWithPosition(HInstruction instruction, N node) {
+ void addWithPosition(HInstruction instruction, ast.Node node) {
add(attachPosition(instruction, node));
}
- HInstruction attachPosition(HInstruction instruction, N node);
-
SourceFile currentSourceFile() {
Element element = sourceElement;
// TODO(johnniwinther): remove the 'element.patch' hack.
@@ -1082,7 +1062,7 @@
FunctionElement function,
Selector selector,
List<HInstruction> providedArguments,
- N currentNode) {
+ ast.Node currentNode) {
assert(invariant(function, function.isImplementation));
assert(providedArguments != null);
@@ -1172,29 +1152,18 @@
}
/**
- * Prepares the state of the builder for inlining an invocaiton of [function].
- */
- void enterInlinedMethod(FunctionElement function,
- N currentNode,
- List<HInstruction> compiledArguments);
-
- void leaveInlinedMethod();
-
- /**
* Try to inline [element] within the currect context of the builder. The
* insertion point is the state of the builder.
*/
bool tryInlineMethod(Element element,
Selector selector,
List<HInstruction> providedArguments,
- N currentNode) {
+ ast.Node currentNode) {
backend.registerStaticUse(element, compiler.enqueuer.codegen);
// Ensure that [element] is an implementation element.
element = element.implementation;
FunctionElement function = element;
- bool hasIr = compiler.irBuilder.hasIr(function);
-
bool insideLoop = loopNesting > 0 || graph.calledInLoop;
// Bail out early if the inlining decision is in the cache and we can't
@@ -1286,15 +1255,9 @@
useMaxInliningNodes = false;
}
bool canInline;
- if (hasIr) {
- ir.Function irFunction = compiler.irBuilder.getIr(function);
- canInline = IrInlineWeeder.canBeInlined(
- irFunction, maxInliningNodes, useMaxInliningNodes);
- } else {
- ast.FunctionExpression functionNode = function.parseNode(compiler);
- canInline = InlineWeeder.canBeInlined(
- functionNode, maxInliningNodes, useMaxInliningNodes);
- }
+ ast.FunctionExpression functionNode = function.parseNode(compiler);
+ canInline = InlineWeeder.canBeInlined(
+ functionNode, maxInliningNodes, useMaxInliningNodes);
if (canInline) {
backend.inlineCache.markAsInlinable(element, insideLoop: insideLoop);
} else {
@@ -1336,10 +1299,6 @@
return false;
}
- void emitReturn(HInstruction value, N node);
-
- void doInline(FunctionElement function);
-
inlinedFrom(Element element, f()) {
assert(element is FunctionElement || element is VariableElement);
return compiler.withCurrentElement(element, () {
@@ -1359,127 +1318,6 @@
return graph.addConstant(constant, compiler);
}
- /**
- * In checked mode, generate type tests for the parameters of the inlined
- * function.
- */
- void potentiallyCheckInlinedParameterTypes(FunctionElement function);
-
- /**
- * Some dynamic invocations are known to not use default arguments.
- */
- bool providedArgumentsKnownToBeComplete(N currentNode);
-}
-
-/**
- * This class defines the abstract properties of [SsaBuilderMixin] as fields.
- * It is mixed into [SsaFromAstBuilder] and [SsaFromIrBuilder].
- */
-abstract class SsaBuilderFields<N> implements SsaBuilderMixin<N> {
- final HGraph graph = new HGraph();
-
- HBasicBlock _current;
-
- HBasicBlock get current => _current;
-
- void set current(c) {
- isReachable = c != null;
- _current = c;
- }
-
- HBasicBlock lastOpenedBlock;
-
- bool isReachable = true;
-
- bool inThrowExpression = false;
-
- int loopNesting = 0;
-
- final List<Element> sourceElementStack = <Element>[];
-}
-
-/**
- * This class defines the abstract properties of [SsaBuilderMixin] by
- * delegation to the [builder], which is either an [SsaFromAstBuilder] or an
- * [SsaFromIrBuilder].
- * It is mixed into [SsaFromAstInliner] and [SsaFromIrInliner].
- */
-abstract class SsaBuilderDelegate<N, M> implements SsaBuilderMixin<N> {
- SsaBuilderFields<M> get builder;
-
- Compiler get compiler => builder.compiler;
-
- JavaScriptBackend get backend => builder.backend;
-
- Element get sourceElement => builder.sourceElementStack.last;
-
- HGraph get graph => builder.graph;
-
- HBasicBlock get current => builder.current;
-
- void set current(HBasicBlock block) {
- builder.current = block;
- }
-
- HBasicBlock get lastOpenedBlock => builder.lastOpenedBlock;
-
- void set lastOpenedBlock(HBasicBlock block) {
- builder.lastOpenedBlock = block;
- }
-
- bool get isReachable => builder.isReachable;
-
- void set isReachable(bool value) {
- builder.isReachable = value;
- }
-
- bool get inThrowExpression => builder.inThrowExpression;
-
- void set inThrowExpression(bool value) {
- builder.inThrowExpression = value;
- }
-
- int get loopNesting => builder.loopNesting;
-
- void set loopNesting(int value) {
- builder.loopNesting = value;
- }
-
- List<InliningState> get inliningStack => builder.inliningStack;
-
- List<Element> get sourceElementStack => builder.sourceElementStack;
-}
-
-/**
- * This class is a tree visitor which builds SSA nodes. It is mixed into
- * [SsaFromAstBuilder] and [SsaFromAstInliner].
- */
-abstract class SsaFromAstMixin
- implements ResolvedVisitor, SsaBuilderMixin<ast.Node> {
- CodegenWorkItem get work;
- ConstantSystem get constantSystem;
- RuntimeTypes get rti;
-
- LocalsHandler localsHandler;
-
- HInstruction rethrowableException;
-
- HParameterValue lastAddedParameter;
-
- Map<Element, HInstruction> parameters = <Element, HInstruction>{};
-
- Map<TargetElement, JumpHandler> jumpTargets = <TargetElement, JumpHandler>{};
-
- /**
- * Variables stored in the current activation. These variables are
- * being updated in try/catch blocks, and should be
- * accessed indirectly through [HLocalGet] and [HLocalSet].
- */
- Map<Element, HLocalValue> activationVariables = <Element, HLocalValue>{};
-
- // We build the Ssa graph by simulating a stack machine.
- List<HInstruction> stack = <HInstruction>[];
-
Element get currentNonClosureClass {
ClassElement cls = sourceElement.getEnclosingClass();
if (cls != null && cls.isClosure()) {
@@ -1690,80 +1528,60 @@
*/
void setupStateForInlining(FunctionElement function,
List<HInstruction> compiledArguments) {
- bool hasIr = compiler.irBuilder.hasIr(function);
localsHandler = new LocalsHandler(this);
- if (hasIr) {
- // If the inlined function is in IR, the inliner will not use the locals
- // handler of this class. However, it will use the [returnElement].
- // When creating the [returnElement] (see below), the invocation of
- // [updateLocal] requires [closureData] to be non-null.
- localsHandler.closureData =
- new ClosureClassMap(null, null, null, new ThisElement(function));
- } else {
- localsHandler.closureData =
- compiler.closureToClassMapper.computeClosureToClassMapping(
- function, function.parseNode(compiler), elements);
- }
+ localsHandler.closureData =
+ compiler.closureToClassMapper.computeClosureToClassMapping(
+ function, function.parseNode(compiler), elements);
// TODO(kasperl): Bad smell. We shouldn't be constructing elements here.
returnElement = new VariableElementX.synthetic("result",
ElementKind.VARIABLE, function);
localsHandler.updateLocal(returnElement,
graph.addConstantNull(compiler));
- // If the inlined function is in IR, the [SsaFromIrInliner] will use the
- // the [returnElement]. The remaining state of this AST builder is not used
- // and does need to be set up.
- if (!hasIr) {
- inTryStatement = false; // TODO(lry): why? Document.
+ inTryStatement = false; // TODO(lry): why? Document.
- int argumentIndex = 0;
- if (function.isInstanceMember()) {
- localsHandler.updateLocal(localsHandler.closureData.thisElement,
- compiledArguments[argumentIndex++]);
- }
-
- FunctionSignature signature = function.computeSignature(compiler);
- signature.orderedForEachParameter((Element parameter) {
- HInstruction argument = compiledArguments[argumentIndex++];
- localsHandler.updateLocal(parameter, argument);
- });
-
- ClassElement enclosing = function.getEnclosingClass();
- if ((function.isConstructor() || function.isGenerativeConstructorBody())
- && backend.classNeedsRti(enclosing)) {
- enclosing.typeVariables.forEach((TypeVariableType typeVariable) {
- HInstruction argument = compiledArguments[argumentIndex++];
- localsHandler.updateLocal(typeVariable.element, argument);
- });
- }
- assert(argumentIndex == compiledArguments.length);
-
- elements = compiler.enqueuer.resolution.getCachedElements(function);
- assert(elements != null);
- returnType = signature.returnType;
- stack = <HInstruction>[];
+ int argumentIndex = 0;
+ if (function.isInstanceMember()) {
+ localsHandler.updateLocal(localsHandler.closureData.thisElement,
+ compiledArguments[argumentIndex++]);
}
+
+ FunctionSignature signature = function.computeSignature(compiler);
+ signature.orderedForEachParameter((Element parameter) {
+ HInstruction argument = compiledArguments[argumentIndex++];
+ localsHandler.updateLocal(parameter, argument);
+ });
+
+ ClassElement enclosing = function.getEnclosingClass();
+ if ((function.isConstructor() || function.isGenerativeConstructorBody())
+ && backend.classNeedsRti(enclosing)) {
+ enclosing.typeVariables.forEach((TypeVariableType typeVariable) {
+ HInstruction argument = compiledArguments[argumentIndex++];
+ localsHandler.updateLocal(typeVariable.element, argument);
+ });
+ }
+ assert(argumentIndex == compiledArguments.length);
+
+ elements = compiler.enqueuer.resolution.getCachedElements(function);
+ assert(elements != null);
+ returnType = signature.returnType;
+ stack = <HInstruction>[];
}
void restoreState(AstInliningState state) {
localsHandler = state.oldLocalsHandler;
returnElement = state.oldReturnElement;
- if (state.irInliner == null) {
- // These fields only need to be restored if the function that was inlined
- // is in AST form, see [setupStateForInlining] above.
- inTryStatement = state.inTryStatement;
- elements = state.oldElements;
- returnType = state.oldReturnType;
- assert(stack.isEmpty);
- stack = state.oldStack;
- }
+ inTryStatement = state.inTryStatement;
+ elements = state.oldElements;
+ returnType = state.oldReturnType;
+ assert(stack.isEmpty);
+ stack = state.oldStack;
}
/**
* Run this builder on the body of the [function] to be inlined.
*/
void visitInlinedFunction(FunctionElement function) {
- assert(!compiler.irBuilder.hasIr(function));
potentiallyCheckInlinedParameterTypes(function);
if (function.isGenerativeConstructor()) {
buildFactory(function);
@@ -1796,6 +1614,10 @@
return currentNode.asForIn() != null;
}
+ /**
+ * In checked mode, generate type tests for the parameters of the inlined
+ * function.
+ */
void potentiallyCheckInlinedParameterTypes(FunctionElement function) {
FunctionSignature signature = function.computeSignature(compiler);
signature.orderedForEachParameter((Element parameter) {
@@ -5732,55 +5554,17 @@
visitTypeVariable(ast.TypeVariable node) {
compiler.internalError('SsaFromAstMixin.visitTypeVariable');
}
-}
-
-/**
- * This class builds SSA nodes for functions represented in AST.
- */
-class SsaFromAstBuilder extends ResolvedVisitor with
- SsaBuilderMixin<ast.Node>,
- SsaFromAstMixin,
- SsaBuilderFields<ast.Node> {
- final Compiler compiler;
- final JavaScriptBackend backend;
- final ConstantSystem constantSystem;
- final CodegenWorkItem work;
- final RuntimeTypes rti;
-
- /* This field is used by the native handler. */
- final NativeEmitter nativeEmitter;
-
- SsaFromAstBuilder(JavaScriptBackend backend,
- CodegenWorkItem work,
- this.nativeEmitter)
- : this.backend = backend,
- this.compiler = backend.compiler,
- this.constantSystem = backend.constantSystem,
- this.work = work,
- this.rti = backend.rti,
- super(work.resolutionTree, backend.compiler) {
- localsHandler = new LocalsHandler(this);
- sourceElementStack.add(work.element);
- }
/**
* This method is invoked before inlining the body of [function] into this
- * [SsaFromAstBuilder]. The inlined function can be either in AST or IR.
- *
- * The method is also invoked from the [SsaFromIrInliner], that is, if we
- * are currently inlining an IR function and encounter a function invocation
- * that should be inlined.
+ * [SsaBuilder].
*/
void enterInlinedMethod(FunctionElement function,
ast.Node _,
List<HInstruction> compiledArguments) {
- SsaFromIrInliner irInliner;
- if (compiler.irBuilder.hasIr(function)) {
- irInliner = new SsaFromIrInliner(this, function, compiledArguments);
- }
AstInliningState state = new AstInliningState(
function, returnElement, returnType, elements, stack, localsHandler,
- inTryStatement, irInliner);
+ inTryStatement);
inliningStack.add(state);
// Setting up the state of the (AST) builder is performed even when the
@@ -5797,12 +5581,7 @@
}
void doInline(FunctionElement function) {
- if (compiler.irBuilder.hasIr(function)) {
- AstInliningState state = inliningStack.last;
- state.irInliner.visitInlinedFunction(function);
- } else {
- visitInlinedFunction(function);
- }
+ visitInlinedFunction(function);
}
void emitReturn(HInstruction value, ast.Node node) {
@@ -5815,72 +5594,6 @@
}
/**
- * This class inlines an AST function into an [SsaFromIrBuilder].
- */
-class SsaFromAstInliner extends ResolvedVisitor with
- SsaBuilderMixin<ast.Node>,
- SsaFromAstMixin,
- SsaBuilderDelegate<ast.Node, ir.Node> {
- final SsaFromIrBuilder builder;
-
- SsaFromAstInliner.internal(SsaFromIrBuilder builder)
- : this.builder = builder,
- super(builder.work.resolutionTree, builder.compiler);
-
- factory SsaFromAstInliner(SsaFromIrBuilder builder,
- FunctionElement function,
- List<HInstruction> compiledArguments) {
- SsaFromAstInliner result = new SsaFromAstInliner.internal(builder);
- result.setupStateForInlining(function, compiledArguments);
- return result;
- }
-
- ConstantSystem get constantSystem => builder.backend.constantSystem;
- RuntimeTypes get rti => builder.backend.rti;
- CodegenWorkItem get work => builder.work;
-
- void emitReturn(HInstruction value, ast.Node node) {
- IrInliningState state = inliningStack.last;
- builder.emitted[state.invokeNode] = value;
- }
-
- void enterInlinedMethod(FunctionElement function,
- ast.Node currentNode,
- List<HInstruction> compiledArguments) {
- // At this point we are inside the [SsaFromAstInliner] (inlining an AST
- // function into an IR builder), and we encounter a function invocation that
- // should be inlined.
- // When inlining into an IR builder (which is what we are doing here), the
- // returned value is stored in the builder's [emitted] map using the
- // function invocation's IrNode as key.
- // Since we are currently inlining an AST function, the invocation node is
- // an AST node. A synthetic [IrInlinedInvocationDummy] is added to the
- // [emitted] map to hold the result of the inlined function.
- ir.Node invokeNode = new ir.InlinedInvocationDummy();
- builder.enterInlinedMethod(function, invokeNode, compiledArguments);
- }
-
- void leaveInlinedMethod() {
- IrInliningState state = inliningStack.last;
- assert(state.invokeNode is ir.InlinedInvocationDummy);
- HInstruction result = builder.emitted.remove(state.invokeNode);
- if (result == null) {
- // When the inlined function is in AST form, it might not have an explicit
- // [:return:] statement, and the result value might be undefined.
- assert(!compiler.irBuilder.hasIr(state.function));
- result = graph.addConstantNull(compiler);
- }
- assert(result != null);
- stack.add(result);
- builder.leaveInlinedMethod();
- }
-
- void doInline(FunctionElement function) {
- builder.doInline(function);
- }
-}
-
-/**
* Visitor that handles generation of string literals (LiteralString,
* StringInterpolation), and otherwise delegates to the given visitor for
* non-literal subexpressions.
@@ -5888,7 +5601,7 @@
* expressions as well.
*/
class StringBuilderVisitor extends ast.Visitor {
- final SsaFromAstMixin builder;
+ final SsaBuilder builder;
final ast.Node diagnosticNode;
/**
@@ -6063,7 +5776,6 @@
final List<HInstruction> oldStack;
final LocalsHandler oldLocalsHandler;
final bool inTryStatement;
- final SsaFromIrInliner irInliner;
AstInliningState(FunctionElement function,
this.oldReturnElement,
@@ -6071,16 +5783,7 @@
this.oldElements,
this.oldStack,
this.oldLocalsHandler,
- this.inTryStatement,
- this.irInliner): super(function);
-}
-
-class IrInliningState extends InliningState {
- final ir.Node invokeNode;
- final SsaFromAstInliner astInliner;
-
- IrInliningState(FunctionElement function, this.invokeNode, this.astInliner)
- : super(function);
+ this.inTryStatement): super(function);
}
class SsaBranch {
@@ -6094,7 +5797,7 @@
}
class SsaBranchBuilder {
- final SsaFromAstMixin builder;
+ final SsaBuilder builder;
final ast.Node diagnosticNode;
SsaBranchBuilder(this.builder, [this.diagnosticNode]);
@@ -6322,18 +6025,18 @@
}
}
-class TypeBuilder implements DartTypeVisitor<dynamic, SsaFromAstMixin> {
+class TypeBuilder implements DartTypeVisitor<dynamic, SsaBuilder> {
void visitType(DartType type, _) {
throw 'Internal error $type';
}
- void visitVoidType(VoidType type, SsaFromAstMixin builder) {
+ void visitVoidType(VoidType type, SsaBuilder builder) {
ClassElement cls = builder.compiler.findHelper('VoidRuntimeType');
builder.push(new HVoidType(type, new TypeMask.exact(cls)));
}
void visitTypeVariableType(TypeVariableType type,
- SsaFromAstMixin builder) {
+ SsaBuilder builder) {
ClassElement cls = builder.compiler.findHelper('RuntimeType');
TypeMask instructionType = new TypeMask.subclass(cls);
if (!builder.sourceElement.enclosingElement.isClosure() &&
@@ -6347,7 +6050,7 @@
}
}
- void visitFunctionType(FunctionType type, SsaFromAstMixin builder) {
+ void visitFunctionType(FunctionType type, SsaBuilder builder) {
type.returnType.accept(this, builder);
HInstruction returnType = builder.pop();
List<HInstruction> inputs = <HInstruction>[returnType];
@@ -6376,19 +6079,19 @@
builder.push(new HFunctionType(inputs, type, new TypeMask.exact(cls)));
}
- void visitMalformedType(MalformedType type, SsaFromAstMixin builder) {
+ void visitMalformedType(MalformedType type, SsaBuilder builder) {
visitDynamicType(builder.compiler.types.dynamicType, builder);
}
- void visitStatementType(StatementType type, SsaFromAstMixin builder) {
+ void visitStatementType(StatementType type, SsaBuilder builder) {
throw 'not implemented visitStatementType($type)';
}
- void visitGenericType(GenericType type, SsaFromAstMixin builder) {
+ void visitGenericType(GenericType type, SsaBuilder builder) {
throw 'not implemented visitGenericType($type)';
}
- void visitInterfaceType(InterfaceType type, SsaFromAstMixin builder) {
+ void visitInterfaceType(InterfaceType type, SsaBuilder builder) {
List<HInstruction> inputs = <HInstruction>[];
for (DartType typeArgument in type.typeArguments) {
typeArgument.accept(this, builder);
@@ -6403,13 +6106,13 @@
builder.push(new HInterfaceType(inputs, type, new TypeMask.exact(cls)));
}
- void visitTypedefType(TypedefType type, SsaFromAstMixin builder) {
+ void visitTypedefType(TypedefType type, SsaBuilder builder) {
DartType unaliased = type.unalias(builder.compiler);
if (unaliased is TypedefType) throw 'unable to unalias $type';
unaliased.accept(this, builder);
}
- void visitDynamicType(DynamicType type, SsaFromAstMixin builder) {
+ void visitDynamicType(DynamicType type, SsaBuilder builder) {
ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType');
builder.push(new HDynamicType(type, new TypeMask.exact(cls)));
}
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index c0835f7..6d22105 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -19,33 +19,25 @@
// TODO(sra): Attaching positions might be cleaner if the source position
// was on a wrapping node.
SourceFile sourceFile = sourceFileOfElement(element);
- if (compiler.irBuilder.hasIr(element)) {
- ir.Function function = compiler.irBuilder.getIr(element);
- node.sourcePosition = new OffsetSourceFileLocation(
- sourceFile, function.offset, function.sourceName);
- node.endSourcePosition = new OffsetSourceFileLocation(
- sourceFile, function.endOffset);
+ ast.Node expression = element.implementation.parseNode(backend.compiler);
+ Token beginToken;
+ Token endToken;
+ if (expression == null) {
+ // Synthesized node. Use the enclosing element for the location.
+ beginToken = endToken = element.position();
} else {
- ast.Node expression = element.implementation.parseNode(backend.compiler);
- Token beginToken;
- Token endToken;
- if (expression == null) {
- // Synthesized node. Use the enclosing element for the location.
- beginToken = endToken = element.position();
- } else {
- beginToken = expression.getBeginToken();
- endToken = expression.getEndToken();
- }
- // TODO(podivilov): find the right sourceFile here and remove offset
- // checks below.
- if (beginToken.charOffset < sourceFile.length) {
- node.sourcePosition =
- new TokenSourceFileLocation(sourceFile, beginToken);
- }
- if (endToken.charOffset < sourceFile.length) {
- node.endSourcePosition =
- new TokenSourceFileLocation(sourceFile, endToken);
- }
+ beginToken = expression.getBeginToken();
+ endToken = expression.getEndToken();
+ }
+ // TODO(podivilov): find the right sourceFile here and remove offset
+ // checks below.
+ if (beginToken.charOffset < sourceFile.length) {
+ node.sourcePosition =
+ new TokenSourceFileLocation(sourceFile, beginToken);
+ }
+ if (endToken.charOffset < sourceFile.length) {
+ node.endSourcePosition =
+ new TokenSourceFileLocation(sourceFile, endToken);
}
return node;
}
@@ -1637,7 +1629,10 @@
// bound closure for a method.
TypeMask receiverType = new TypeMask.nonNullExact(superClass);
selector = new TypedSelector(receiverType, selector);
+ // TODO(floitsch): we know the target. We shouldn't register a
+ // dynamic getter.
world.registerDynamicGetter(selector);
+ world.registerGetterForSuperMethod(node.element);
methodName = backend.namer.invocationName(selector);
} else {
methodName = backend.namer.getNameOfInstanceMember(superMethod);
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/from_ir_builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/from_ir_builder.dart
deleted file mode 100644
index 85f2ce5..0000000
--- a/sdk/lib/_internal/compiler/implementation/ssa/from_ir_builder.dart
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of ssa;
-
-class SsaFromIrBuilderTask extends CompilerTask {
- final JavaScriptBackend backend;
-
- SsaFromIrBuilderTask(JavaScriptBackend backend)
- : this.backend = backend,
- super(backend.compiler);
-
- HGraph build(CodegenWorkItem work) {
- return measure(() {
- Element element = work.element.implementation;
- return compiler.withCurrentElement(element, () {
- HInstruction.idCounter = 0;
- SsaFromIrBuilder builder =
- new SsaFromIrBuilder(backend, work, backend.emitter.nativeEmitter);
- HGraph graph;
- ElementKind kind = element.kind;
- if (kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
- throw "Build HGraph for constructor from IR";
-// graph = compileConstructor(builder, work);
- } else if (kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY ||
- kind == ElementKind.FUNCTION ||
- kind == ElementKind.GETTER ||
- kind == ElementKind.SETTER) {
- graph = builder.buildMethod();
- } else if (kind == ElementKind.FIELD) {
- throw "Build HGraph for field from IR";
-// assert(!element.isInstanceMember());
-// graph = builder.buildLazyInitializer(element);
- } else {
- compiler.internalErrorOnElement(element,
- 'unexpected element kind $kind');
- }
- assert(graph.isValid());
- // TODO(lry): for default arguments, register constants in backend.
- // TODO(lry): tracing (factor out code in SsaBuilderTask).
- return graph;
- });
- });
- }
-}
-
-/**
- * This class contains code that is shared between [SsaFromIrBuilder] and
- * [SsaFromIrInliner].
- */
-abstract class SsaFromIrMixin
- implements ir.NodesVisitor, SsaBuilderMixin<ir.Node> {
- /**
- * Maps IR expressions to the generated [HInstruction]. Because the IR is
- * in an SSA form, the arguments of an [ir.Node] have already been visited
- * prior to the node. This map is used to obtain the corresponding generated
- * SSA node.
- */
- final Map<ir.Expression, HInstruction> emitted =
- new Map<ir.Expression, HInstruction>();
-
- /**
- * This method sets up the state of the IR visitor for inlining an invocation
- * of [function].
- */
- void setupStateForInlining(FunctionElement function,
- List<HInstruction> compiledArguments) {
- // TODO(lry): once the IR supports functions with parameters or dynamic
- // invocations, map the parameters (and [:this:]) to the argument
- // instructions by extending the [emitted] mapping.
- assert(function.computeSignature(compiler).parameterCount == 0);
- }
-
- /**
- * Run this builder on the body of the [function] to be inlined.
- */
- void visitInlinedFunction(FunctionElement function) {
- assert(compiler.irBuilder.hasIr(function));
- potentiallyCheckInlinedParameterTypes(function);
- ir.Function functionNode = compiler.irBuilder.getIr(function);
- visitAll(functionNode.statements);
- }
-
- void addExpression(ir.Expression irNode, HInstruction ssaNode) {
- current.add(emitted[irNode] = ssaNode);
- }
-
- HInstruction attachPosition(HInstruction target, ir.Node node) {
- target.sourcePosition = sourceFileLocation(node);
- return target;
- }
-
- SourceFileLocation sourceFileLocation(ir.Node node) {
- SourceFile sourceFile = currentSourceFile();
- SourceFileLocation location =
- new OffsetSourceFileLocation(sourceFile, node.offset, node.sourceName);
- checkValidSourceFileLocation(location, sourceFile, node.offset);
- return location;
- }
-
- void potentiallyCheckInlinedParameterTypes(FunctionElement function) {
- // TODO(lry): in checked mode, generate code for parameter type checks.
- assert(!compiler.enableTypeAssertions);
- }
-
- bool providedArgumentsKnownToBeComplete(ir.Node currentNode) {
- // See comment in [SsaFromAstBuilder.providedArgumentsKnownToBeComplete].
- return false;
- }
-
- List<HInstruction> toInstructionList(List<ir.Node> nodes) {
- return nodes.map((e) => emitted[e]).toList(growable: false);
- }
-
- void addInvokeStatic(ir.InvokeStatic node,
- FunctionElement function,
- List<HInstruction> arguments,
- [TypeMask type]) {
- if (tryInlineMethod(function, null, arguments, node)) {
- // When encountering a [:return:] instruction in the inlined function,
- // the value in the [emitted] map is updated. This is performed either
- // by [SsaFromIrBuilder.emitReturn] (if this is an [SsaFromIrBuilder] or
- // and [SsaFromAstInliner]), or by [SsaFromAstInliner.leaveInlinedMethod]
- // if this is an [SsaFromIrInliner].
- // If the inlined function is in AST form, it might not have an explicit
- // [:return:] statement and therefore the return value can be [:null:].
- if (emitted[node] == null) {
- // IR functions should always have an explicit [:return:].
- assert(!compiler.irBuilder.hasIr(function.implementation));
- emitted[node] = graph.addConstantNull(compiler);
- }
- return;
- }
- if (type == null) {
- type = TypeMaskFactory.inferredReturnTypeForElement(function, compiler);
- }
- bool targetCanThrow = !compiler.world.getCannotThrow(function);
- HInvokeStatic instruction = new HInvokeStatic(
- function.declaration, arguments, type, targetCanThrow: targetCanThrow);
- instruction.sideEffects = compiler.world.getSideEffectsOfElement(function);
- addExpression(node, attachPosition(instruction, node));
- }
-
- void visitConstant(ir.Constant node) {
- emitted[node] = graph.addConstant(node.value, compiler);
- }
-
- void visitInvokeStatic(ir.InvokeStatic node) {
- FunctionElement function = node.target;
- List<HInstruction> arguments = toInstructionList(node.arguments);
- addInvokeStatic(node, function, arguments);
- }
-
- void visitNode(ir.Node node) {
- compiler.internalError('Cannot build SSA from IR for $node');
- }
-
- void visitReturn(ir.Return node) {
- HInstruction value = emitted[node.value];
- // TODO(lry): add code for dynamic type check.
- // value = potentiallyCheckType(value, returnType);
- emitReturn(value, node);
- }
-}
-
-/**
- * This builder generates SSA nodes for IR functions. It mixes in
- * [SsaBuilderMixin] to share functionality with the [SsaFromAstBuilder] that
- * creates SSA nodes from trees.
- */
-class SsaFromIrBuilder extends ir.NodesVisitor with
- SsaBuilderMixin<ir.Node>,
- SsaFromIrMixin,
- SsaBuilderFields<ir.Node> {
- final Compiler compiler;
- final JavaScriptBackend backend;
- final CodegenWorkItem work;
-
- /* See comment on [SsaFromAstBuilder.nativeEmitter]. */
- final NativeEmitter nativeEmitter;
-
- SsaFromIrBuilder(JavaScriptBackend backend,
- CodegenWorkItem work,
- this.nativeEmitter)
- : this.backend = backend,
- this.compiler = backend.compiler,
- this.work = work {
- sourceElementStack.add(work.element);
- }
-
- final List<IrInliningState> inliningStack = <IrInliningState>[];
-
- HGraph buildMethod() {
- FunctionElement functionElement = sourceElement.implementation;
- graph.calledInLoop = compiler.world.isCalledInLoop(functionElement);
-
- open(graph.entry);
- HBasicBlock block = graph.addNewBlock();
- close(new HGoto()).addSuccessor(block);
- open(block);
-
- ir.Function function = compiler.irBuilder.getIr(functionElement);
- visitAll(function.statements);
- if (!isAborted()) closeAndGotoExit(new HGoto());
- graph.finalize();
- return graph;
- }
-
- void emitReturn(HInstruction value, ir.Return node) {
- if (inliningStack.isEmpty) {
- closeAndGotoExit(attachPosition(new HReturn(value), node));
- } else {
- IrInliningState state = inliningStack.last;
- emitted[state.invokeNode] = value;
- }
- }
-
- /**
- * This method is invoked before inlining the body of [function] into this
- * [SsaFromIrBuilder]. The inlined function can be either in AST or IR.
- *
- * The method is also invoked from the [SsaFromAstInliner], that is, if we
- * are currently inlining an AST function and encounter a function invocation
- * that should be inlined.
- */
- void enterInlinedMethod(FunctionElement function,
- ir.Node callNode,
- List<HInstruction> compiledArguments) {
- bool hasIr = compiler.irBuilder.hasIr(function);
-
- SsaFromAstInliner astInliner;
- if (!hasIr) {
- astInliner = new SsaFromAstInliner(this, function, compiledArguments);
- }
-
- IrInliningState state = new IrInliningState(function, callNode, astInliner);
- inliningStack.add(state);
- if (hasIr) {
- setupStateForInlining(function, compiledArguments);
- }
- }
-
- void leaveInlinedMethod() {
- inliningStack.removeLast();
- }
-
- void doInline(FunctionElement function) {
- if (compiler.irBuilder.hasIr(function)) {
- visitInlinedFunction(function);
- } else {
- IrInliningState state = inliningStack.last;
- state.astInliner.visitInlinedFunction(function);
- }
- }
-}
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/from_ir_inliner.dart b/sdk/lib/_internal/compiler/implementation/ssa/from_ir_inliner.dart
deleted file mode 100644
index ff7ba5b..0000000
--- a/sdk/lib/_internal/compiler/implementation/ssa/from_ir_inliner.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of ssa;
-
-/**
- * This class implements an [ir.NodesVisitor] that inlines a function represented
- * as IR into an [SsaFromAstBuilder].
- */
-class SsaFromIrInliner extends ir.NodesVisitor with
- SsaBuilderMixin<ir.Node>,
- SsaFromIrMixin,
- SsaBuilderDelegate<ir.Node, ast.Node> {
- final SsaFromAstBuilder builder;
-
- SsaFromIrInliner.internal(this.builder);
-
- factory SsaFromIrInliner(SsaFromAstBuilder builder,
- FunctionElement function,
- List<HInstruction> compiledArguments) {
- SsaFromIrInliner irInliner = new SsaFromIrInliner.internal(builder);
- irInliner.setupStateForInlining(function, compiledArguments);
- return irInliner;
- }
-
- final List<ir.Expression> inlinedCalls = <ir.Expression>[];
-
- /**
- * This function is invoked when we are currently inlining an IR function
- * into an AST builder, and we encounter an infocation that is inlined.
- */
- void enterInlinedMethod(FunctionElement function,
- ir.Node callNode,
- List<HInstruction> compiledArguments) {
- assert(callNode != null);
- inlinedCalls.add(callNode);
- builder.enterInlinedMethod(function, null, compiledArguments);
- }
-
- void leaveInlinedMethod() {
- builder.leaveInlinedMethod();
- // [leaveInlinedMethod] pushes the returned value on the builder's stack,
- // no matter if the inlined function is represented in AST or IR.
- emitted[inlinedCalls.removeLast()] = builder.pop();
- }
-
- void doInline(FunctionElement function) {
- builder.doInline(function);
- }
-
- void emitReturn(HInstruction value, ir.Return node) {
- builder.localsHandler.updateLocal(builder.returnElement, value);
- }
-}
-
-class IrInlineWeeder extends ir.NodesVisitor {
- static bool canBeInlined(ir.Function irFunction,
- int maxInliningNodes,
- bool useMaxInliningNodes) {
- IrInlineWeeder weeder =
- new IrInlineWeeder(maxInliningNodes, useMaxInliningNodes);
- weeder.visitAll(irFunction.statements);
- return !weeder.tooDifficult;
- }
-
- final int maxInliningNodes;
- final bool useMaxInliningNodes;
-
- IrInlineWeeder(this.maxInliningNodes, this.useMaxInliningNodes);
-
- bool seenReturn = false;
- bool tooDifficult = false;
- int nodeCount = 0;
-
- bool registerNode() {
- if (!useMaxInliningNodes) return true;
- if (nodeCount++ > maxInliningNodes) {
- tooDifficult = true;
- return false;
- } else {
- return true;
- }
- }
-
- void visitNode(ir.Node node) {
- if (!registerNode()) return;
- if (seenReturn) {
- tooDifficult = true;
- }
- }
-
- void visitReturn(ir.Return node) {
- visitNode(node);
- seenReturn = true;
- }
-
- void visitFunction(ir.Function node) {
- tooDifficult = true;
- }
-}
\ No newline at end of file
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart b/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart
index 41034258..6d3a236 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart
@@ -16,7 +16,6 @@
import '../js_backend/js_backend.dart';
import '../native_handler.dart' as native;
import '../tree/tree.dart' as ast;
-import '../ir/ir_nodes.dart' as ir;
import '../types/types.dart';
import '../universe/universe.dart';
import '../util/util.dart';
@@ -35,8 +34,6 @@
import '../js_emitter/js_emitter.dart' show CodeEmitterTask;
part 'builder.dart';
-part 'from_ir_builder.dart';
-part 'from_ir_inliner.dart';
part 'codegen.dart';
part 'codegen_helpers.dart';
part 'interceptor_simplifier.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
index 716fb51..705f219 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
@@ -11,6 +11,7 @@
new Map<HInstruction, Function>();
final Compiler compiler;
+ JavaScriptBackend get backend => compiler.backend;
String get name => 'type propagator';
SsaTypePropagator(this.compiler);
@@ -99,7 +100,6 @@
TypeMask visitBinaryArithmetic(HBinaryArithmetic instruction) {
HInstruction left = instruction.left;
HInstruction right = instruction.right;
- JavaScriptBackend backend = compiler.backend;
if (left.isInteger(compiler) && right.isInteger(compiler)) {
return backend.intType;
}
@@ -110,7 +110,6 @@
TypeMask checkPositiveInteger(HBinaryArithmetic instruction) {
HInstruction left = instruction.left;
HInstruction right = instruction.right;
- JavaScriptBackend backend = compiler.backend;
if (left.isPositiveInteger(compiler) && right.isPositiveInteger(compiler)) {
return backend.positiveIntType;
}
@@ -129,10 +128,7 @@
HInstruction operand = instruction.operand;
// We have integer subclasses that represent ranges, so widen any int
// subclass to full integer.
- if (operand.isInteger(compiler)) {
- JavaScriptBackend backend = compiler.backend;
- return backend.intType;
- }
+ if (operand.isInteger(compiler)) return backend.intType;
return instruction.operand.instructionType;
}
@@ -142,7 +138,6 @@
}
TypeMask visitPhi(HPhi phi) {
- JavaScriptBackend backend = compiler.backend;
TypeMask candidateType = backend.emptyType;
for (int i = 0, length = phi.inputs.length; i < length; i++) {
TypeMask inputType = phi.inputs[i].instructionType;
@@ -155,7 +150,6 @@
HInstruction input = instruction.checkedInput;
TypeMask inputType = input.instructionType;
TypeMask checkedType = instruction.checkedType;
- JavaScriptBackend backend = compiler.backend;
if (instruction.isArgumentTypeCheck || instruction.isReceiverTypeCheck) {
// We must make sure a type conversion for receiver or argument check
// does not try to do an int check, because an int check is not enough.
@@ -242,7 +236,6 @@
TypeMask type = new TypeMask.nonNullSubclass(cls.declaration);
// TODO(ngeoffray): We currently only optimize on primitive
// types.
- JavaScriptBackend backend = compiler.backend;
if (!type.satisfies(backend.jsIndexableClass, compiler)
&& !type.containsOnlyNum(compiler)
&& !type.containsOnlyBool(compiler)) {
@@ -272,7 +265,6 @@
Selector selector = instruction.selector;
if (selector.isOperator() && left.isNumber(compiler)) {
if (right.isNumber(compiler)) return false;
- JavaScriptBackend backend = compiler.backend;
TypeMask type = right.isIntegerOrNull(compiler)
? right.instructionType.nonNullable()
: backend.numType;
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
index 1e43997..ed6852e 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
@@ -669,8 +669,9 @@
Range visitConstant(HConstant constant) {
if (!constant.isInteger(compiler)) return info.newUnboundRange();
- IntConstant constantInt = constant.constant;
- Value value = info.newIntValue(constantInt.value);
+ NumConstant constantNum = constant.constant;
+ if (constantNum.isMinusZero()) constantNum = new IntConstant(0);
+ Value value = info.newIntValue(constantNum.value);
return info.newNormalizedRange(value, value);
}
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
index fd5c3f5..048c1a8 100644
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
@@ -1701,71 +1701,25 @@
return analyze(node.expression);
}
- bool invalidSwitchExpressionType(Node diagnosticNode, DartType type) {
- if (type.kind == TypeKind.FUNCTION) return true;
- assert(invariant(diagnosticNode, type.kind == TypeKind.INTERFACE,
- message: "Expected interface type"));
- ClassElement cls = type.element;
- if (cls == compiler.doubleClass) return true;
- if (cls == compiler.intClass || cls == compiler.stringClass) return false;
- if (cls == compiler.typeClass) return true;
- Element equals = cls.lookupMember('==');
- return equals.getEnclosingClass() != compiler.objectClass;
- }
-
visitSwitchStatement(SwitchStatement node) {
// TODO(johnniwinther): Handle reachability based on reachability of
// switch cases.
+
DartType expressionType = analyze(node.expression);
- Map<CaseMatch, DartType> caseTypeMap = new Map<CaseMatch, DartType>();
+
+ // Check that all the case expressions are assignable to the expression.
for (SwitchCase switchCase in node.cases) {
for (Node labelOrCase in switchCase.labelsAndCases) {
CaseMatch caseMatch = labelOrCase.asCaseMatch();
if (caseMatch == null) continue;
DartType caseType = analyze(caseMatch.expression);
- caseTypeMap[caseMatch] = caseType;
checkAssignable(caseMatch, expressionType, caseType);
}
analyze(switchCase);
}
- // Check that all the case expressions have the same type.
- CaseMatch firstCase = null;
- DartType firstCaseType = null;
- bool hasReportedProblem = false;
- caseTypeMap.forEach((CaseMatch caseMatch, DartType caseType) {
- if (firstCaseType == null) {
- firstCase = caseMatch;
- firstCaseType = caseType;
- } else {
- if (caseType != firstCaseType) {
- if (!hasReportedProblem) {
- compiler.reportError(
- node,
- MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
- {'type': firstCaseType});
- compiler.reportInfo(
- firstCase.expression,
- MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
- {'type': firstCaseType});
- hasReportedProblem = true;
- }
- compiler.reportInfo(
- caseMatch.expression,
- MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
- {'type': caseType});
- }
- }
- });
- // Check that the type is either [int], [String], or a class that does not
- // implement `operator ==`.
- if (firstCaseType != null &&
- invalidSwitchExpressionType(firstCase, firstCaseType)) {
- compiler.reportError(firstCase.expression,
- MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
- {'type': firstCaseType});
- }
+
return StatementType.NOT_RETURNING;
}
diff --git a/sdk/lib/_internal/compiler/implementation/types/container_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/container_type_mask.dart
index 2b426cf..b1a09fb 100644
--- a/sdk/lib/_internal/compiler/implementation/types/container_type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/container_type_mask.dart
@@ -49,7 +49,6 @@
}
bool get isContainer => true;
- bool get isMap => false;
bool get isExact => true;
bool equalsDisregardNull(other) {
@@ -88,14 +87,7 @@
}
}
- bool operator==(other) {
- if (other is! ContainerTypeMask) return false;
- return allocationNode == other.allocationNode
- && isNullable == other.isNullable
- && elementType == other.elementType
- && length == other.length
- && forwardTo == other.forwardTo;
- }
+ bool operator==(other) => super == other;
int get hashCode {
return computeHashCode(
diff --git a/sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart
new file mode 100644
index 0000000..72d73e2
--- /dev/null
+++ b/sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart
@@ -0,0 +1,118 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of types;
+
+/**
+ * A [DictionaryTypeMask] is a [TypeMask] for a specific allocation
+ * site of a map (currently only internal Map class) that is used as
+ * a dictionary, i.e. a mapping from a set of statically known strings
+ * to values. These typemasks only come into existence after the
+ * [TypeGraphInferrer] has successfully identified such a usage. Otherwise,
+ * the more general [MapTypeMask] is used.
+ */
+class DictionaryTypeMask extends MapTypeMask {
+ // The underlying key/value map of this dictionary.
+ final Map<String, TypeMask> typeMap;
+
+ DictionaryTypeMask(forwardTo,
+ allocationNode,
+ allocationElement,
+ keyType, valueType,
+ this.typeMap) :
+ super(forwardTo, allocationNode, allocationElement, keyType, valueType);
+
+ TypeMask nullable() {
+ return isNullable
+ ? this
+ : new DictionaryTypeMask(forwardTo.nullable(),
+ allocationNode,
+ allocationElement,
+ keyType, valueType,
+ typeMap);
+ }
+
+ TypeMask nonNullable() {
+ return isNullable
+ ? new DictionaryTypeMask(forwardTo.nonNullable(),
+ allocationNode,
+ allocationElement,
+ keyType, valueType,
+ typeMap)
+ : this;
+ }
+
+ bool get isDictionary => true;
+ bool get isExact => true;
+
+ bool equalsDisregardNull(other) {
+ if (other is! DictionaryTypeMask) return false;
+ return allocationNode == other.allocationNode &&
+ keyType == other.keyType &&
+ valueType == other.valueType &&
+ typeMap.keys.every((k) => other.typeMap.containsKey(k)) &&
+ other.typeMap.keys.every((k) => typeMap.containsKey(k) &&
+ typeMap[k] == other.typeMap[k]);
+
+ }
+
+ TypeMask intersection(TypeMask other, Compiler compiler) {
+ TypeMask forwardIntersection = forwardTo.intersection(other, compiler);
+ if (forwardIntersection.isEmpty) return forwardIntersection;
+ return forwardIntersection.isNullable
+ ? nullable()
+ : nonNullable();
+ }
+
+ TypeMask union(other, Compiler compiler) {
+ if (this == other) {
+ return this;
+ } else if (equalsDisregardNull(other)) {
+ return other.isNullable ? other : this;
+ } else if (other.isEmpty) {
+ return other.isNullable ? this.nullable() : this;
+ } else if (other.isDictionary) {
+ TypeMask newForwardTo = forwardTo.union(other.forwardTo, compiler);
+ TypeMask newKeyType = keyType.union(other.keyType, compiler);
+ TypeMask newValueType = valueType.union(other.valueType, compiler);
+ Map<String, TypeMask> mappings = <String, TypeMask>{};
+ typeMap.forEach((k,v) {
+ if (!other.typeMap.containsKey(k)) {
+ mappings[k] = v.nullable();
+ }
+ });
+ other.typeMap.forEach((k,v) {
+ if (typeMap.containsKey(k)) {
+ mappings[k] = v.union(typeMap[k], compiler);
+ } else {
+ mappings[k] = v.nullable();
+ }
+ });
+ return new DictionaryTypeMask(newForwardTo, null, null,
+ keyType, valueType, mappings);
+ } else if (other.isMap &&
+ (other.keyType != null) &&
+ (other.valueType != null)) {
+ TypeMask newForwardTo = forwardTo.union(other.forwardTo, compiler);
+ TypeMask newKeyType = keyType.union(other.keyType, compiler);
+ TypeMask newValueType = valueType.union(other.valueType, compiler);
+ return new MapTypeMask(newForwardTo, null, null,
+ newKeyType, newValueType);
+ } else {
+ return forwardTo.union(other, compiler);
+ }
+ }
+
+ bool operator==(other) => super == other;
+
+ int get hashCode {
+ return computeHashCode(
+ allocationNode, isNullable, typeMap, forwardTo);
+ }
+
+ String toString() {
+ return
+ 'Dictionary mask: [$keyType/$valueType with $typeMap] type: $forwardTo';
+ }
+}
\ No newline at end of file
diff --git a/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart
index dd25e09..4a7a509 100644
--- a/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart
@@ -49,7 +49,9 @@
bool get isUnion => false;
bool get isContainer => false;
bool get isMap => false;
+ bool get isDictionary => false;
bool get isForwarding => false;
+ bool get isValue => false;
// TODO(kasperl): Get rid of these. They should not be a visible
// part of the implementation because they make it hard to add
diff --git a/sdk/lib/_internal/compiler/implementation/types/forwarding_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/forwarding_type_mask.dart
index 145a066..2d71c7d 100644
--- a/sdk/lib/_internal/compiler/implementation/types/forwarding_type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/forwarding_type_mask.dart
@@ -20,6 +20,9 @@
bool get isUnion => false;
bool get isContainer => false;
+ bool get isMap => false;
+ bool get isDictionary => false;
+ bool get isValue => false;
bool get isForwarding => true;
bool isInMask(TypeMask other, Compiler compiler) {
@@ -98,4 +101,12 @@
}
bool equalsDisregardNull(other);
+
+ bool operator==(other) {
+ return equalsDisregardNull(other) &&
+ isNullable == other.isNullable &&
+ forwardTo == other.forwardTo;
+ }
+
+ int get hashCode => throw "Subclass should implement hashCode getter";
}
diff --git a/sdk/lib/_internal/compiler/implementation/types/map_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/map_type_mask.dart
index 266eede..8673d59 100644
--- a/sdk/lib/_internal/compiler/implementation/types/map_type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/map_type_mask.dart
@@ -1,12 +1,14 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of types;
-/// A [MapTypeMask] is a [TypeMask] for a specific allocation
-/// site of a map (currently only internal Map class) that will get specialized
-/// once the [TypeGraphInferrer] phase finds a key and/or value type for it.
+/**
+ * A [MapTypeMask] is a [TypeMask] for a specific allocation
+ * site of a map (currently only internal Map class) that will get specialized
+ * once the [TypeGraphInferrer] phase finds a key and/or value type for it.
+ */
class MapTypeMask extends ForwardingTypeMask {
final TypeMask forwardTo;
@@ -54,9 +56,9 @@
bool equalsDisregardNull(other) {
if (other is! MapTypeMask) return false;
- return allocationNode == other.allocationNode
- && keyType == other.keyType
- && valueType == other.valueType;
+ return allocationNode == other.allocationNode &&
+ keyType == other.keyType &&
+ valueType == other.valueType;
}
TypeMask intersection(TypeMask other, Compiler compiler) {
@@ -74,11 +76,11 @@
return other.isNullable ? other : this;
} else if (other.isEmpty) {
return other.isNullable ? this.nullable() : this;
- } else if (other.isMap
- && keyType != null
- && other.keyType != null
- && valueType != null
- && other.valueType != null) {
+ } else if (other.isMap &&
+ keyType != null &&
+ other.keyType != null &&
+ valueType != null &&
+ other.valueType != null) {
TypeMask newKeyType =
keyType.union(other.keyType, compiler);
TypeMask newValueType =
@@ -86,19 +88,21 @@
TypeMask newForwardTo = forwardTo.union(other.forwardTo, compiler);
return new MapTypeMask(
newForwardTo, null, null, newKeyType, newValueType);
+ } else if (other.isDictionary) {
+ TypeMask newKeyType =
+ keyType.union(compiler.typesTask.stringType, compiler);
+ TypeMask newValueType =
+ other.typeMap.values.fold(keyType, (p,n) => p.union(n, compiler));
+ TypeMask newForwardTo = forwardTo.union(other.forwardTo, compiler);
+ MapTypeMask newMapTypeMask = new MapTypeMask(
+ newForwardTo, null, null, newKeyType, newValueType);
+ return newMapTypeMask;
} else {
return forwardTo.union(other, compiler);
}
}
- bool operator==(other) {
- if (other is! MapTypeMask) return false;
- return allocationNode == other.allocationNode
- && isNullable == other.isNullable
- && keyType == other.keyType
- && valueType == other.valueType
- && forwardTo == other.forwardTo;
- }
+ bool operator==(other) => super == other;
int get hashCode {
return computeHashCode(
diff --git a/sdk/lib/_internal/compiler/implementation/types/type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/type_mask.dart
index 9e02183..520f084 100644
--- a/sdk/lib/_internal/compiler/implementation/types/type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/type_mask.dart
@@ -51,7 +51,9 @@
bool get isUnion;
bool get isContainer;
bool get isMap;
+ bool get isDictionary;
bool get isForwarding;
+ bool get isValue;
bool containsOnlyInt(Compiler compiler);
bool containsOnlyDouble(Compiler compiler);
diff --git a/sdk/lib/_internal/compiler/implementation/types/types.dart b/sdk/lib/_internal/compiler/implementation/types/types.dart
index cb8d83d..3185550 100644
--- a/sdk/lib/_internal/compiler/implementation/types/types.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/types.dart
@@ -13,11 +13,13 @@
import '../inferrer/concrete_types_inferrer.dart' show ConcreteTypesInferrer;
part 'container_type_mask.dart';
-part 'map_type_mask.dart';
+part 'dictionary_type_mask.dart';
part 'flat_type_mask.dart';
part 'forwarding_type_mask.dart';
+part 'map_type_mask.dart';
part 'type_mask.dart';
part 'union_type_mask.dart';
+part 'value_type_mask.dart';
/**
* Common super class for our type inferrers.
diff --git a/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart
index cf1951a..e782f10 100644
--- a/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart
@@ -194,7 +194,9 @@
bool get isUnion => true;
bool get isContainer => false;
bool get isMap => false;
+ bool get isDictionary => false;
bool get isForwarding => false;
+ bool get isValue => false;
bool isInMask(TypeMask other, Compiler compiler) {
return disjointMasks.every((mask) => mask.isInMask(other, compiler));
diff --git a/sdk/lib/_internal/compiler/implementation/types/value_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/value_type_mask.dart
new file mode 100644
index 0000000..b12b1b4
--- /dev/null
+++ b/sdk/lib/_internal/compiler/implementation/types/value_type_mask.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of types;
+
+class ValueTypeMask extends ForwardingTypeMask {
+ final TypeMask forwardTo;
+ final value;
+
+ ValueTypeMask(this.forwardTo, this.value);
+
+ TypeMask nullable() {
+ return isNullable
+ ? this
+ : new ValueTypeMask(forwardTo.nullable(), value);
+ }
+
+ TypeMask nonNullable() {
+ return isNullable
+ ? new ValueTypeMask(forwardTo.nonNullable(), value)
+ : this;
+ }
+
+ bool get isValue => true;
+
+ bool equalsDisregardNull(other) {
+ if (other is! ValueTypeMask) return false;
+ return value == other.value;
+ }
+
+ TypeMask intersection(TypeMask other, Compiler compiler) {
+ TypeMask forwardIntersection = forwardTo.intersection(other, compiler);
+ if (forwardIntersection.isEmpty) return forwardIntersection;
+ return forwardIntersection.isNullable
+ ? nullable()
+ : nonNullable();
+ }
+
+ bool operator==(other) => super == other;
+
+ int get hashCode {
+ return computeHashCode(value, isNullable, forwardTo);
+ }
+
+ String toString() {
+ return 'Value mask: [$value] type: $forwardTo';
+ }
+}
\ No newline at end of file
diff --git a/sdk/lib/_internal/compiler/implementation/universe/universe.dart b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
index 36181ce..fe81a31 100644
--- a/sdk/lib/_internal/compiler/implementation/universe/universe.dart
+++ b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
@@ -31,6 +31,8 @@
*/
final Set<FunctionElement> staticFunctionsNeedingGetter =
new Set<FunctionElement>();
+ final Set<FunctionElement> methodsNeedingSuperGetter =
+ new Set<FunctionElement>();
final Map<String, Set<Selector>> invokedNames =
new Map<String, Set<Selector>>();
final Map<String, Set<Selector>> invokedGetters =
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 8cef76f..9b923d1 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -540,6 +540,9 @@
static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind(
"'case' expression of type '#{type}'.");
+ static const MessageKind SWITCH_CASE_FORBIDDEN = const MessageKind(
+ "'case' expression may not be of type '#{type}'.");
+
static const MessageKind SWITCH_CASE_VALUE_OVERRIDES_EQUALS =
const MessageKind(
"'case' expression type '#{type}' overrides 'operator =='.");
@@ -556,8 +559,9 @@
static const MessageKind CONSTRUCTOR_IS_NOT_CONST = const MessageKind(
"Constructor is not a 'const' constructor.");
- static const MessageKind KEY_NOT_A_STRING_LITERAL = const MessageKind(
- "Map-literal key not a string literal.");
+ static const MessageKind CONST_MAP_KEY_OVERRIDES_EQUALS =
+ const MessageKind(
+ "Const-map key type '#{type}' overrides 'operator =='.");
static const MessageKind NO_SUCH_LIBRARY_MEMBER = const MessageKind(
"'#{libraryName}' has no member named '#{memberName}'.");
@@ -1747,6 +1751,15 @@
"known type '#{knownType}' of '#{variableName}'.",
howToFix: "Try replacing '#{shownType}' with '#{shownTypeSuggestion}'.");
+ static const MessageKind HIDDEN_WARNINGS_HINTS = const MessageKind(
+ "#{warnings} warning(s) and #{hints} hint(s) suppressed in #{uri}.");
+
+ static const MessageKind HIDDEN_WARNINGS = const MessageKind(
+ "#{warnings} warning(s) suppressed in #{uri}.");
+
+ static const MessageKind HIDDEN_HINTS = const MessageKind(
+ "#{hints} hint(s) suppressed in #{uri}.");
+
//////////////////////////////////////////////////////////////////////////////
// Patch errors start.
//////////////////////////////////////////////////////////////////////////////
diff --git a/sdk/lib/_internal/lib/constant_map.dart b/sdk/lib/_internal/lib/constant_map.dart
index f13f309..22b513c 100644
--- a/sdk/lib/_internal/lib/constant_map.dart
+++ b/sdk/lib/_internal/lib/constant_map.dart
@@ -28,7 +28,8 @@
// This constructor is not used. The instantiation is shortcut by the
// compiler. It is here to make the uninitialized final fields legal.
- const ConstantStringMap._(this.length, this._jsObject, this._keys) : super._();
+ const ConstantStringMap._(this.length, this._jsObject, this._keys)
+ : super._();
final int length;
// A constant map is backed by a JavaScript object.
@@ -41,18 +42,27 @@
bool containsKey(Object key) {
if (key is! String) return false;
- if (key == '__proto__') return false;
+ if ('__proto__' == key) return false;
return jsHasOwnProperty(_jsObject, key);
}
V operator [](Object key) {
- if (key is! String) return null;
if (!containsKey(key)) return null;
- return jsPropertyAccess(_jsObject, key);
+ return _fetch(key);
}
+ // [_fetch] is the indexer for keys for which `containsKey(key)` is true.
+ _fetch(key) => jsPropertyAccess(_jsObject, key);
+
void forEach(void f(K key, V value)) {
- _keys.forEach((key) => f(key, this[key]));
+ // Use a JS 'cast' to get efficient loop. Type inferrence doesn't get this
+ // since constant map representation is chosen after type inferrence and the
+ // instantiation is shortcut by the compiler.
+ var keys = JS('JSArray', '#', _keys);
+ for (int i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ f(key, _fetch(key));
+ }
}
Iterable<K> get keys {
@@ -60,28 +70,26 @@
}
Iterable<V> get values {
- return new MappedIterable<K, V>(_keys, (key) => this[key]);
+ return new MappedIterable<K, V>(_keys, (key) => _fetch(key));
}
}
-// This class has no constructor. This is on purpose since the instantiation
-// is shortcut by the compiler.
class ConstantProtoMap<K, V> extends ConstantStringMap<K, V> {
// This constructor is not used. The instantiation is shortcut by the
// compiler. It is here to make the uninitialized final fields legal.
- ConstantProtoMap._(length, jsObject, keys, this._protoValue) : super._(length, jsObject, keys);
+ ConstantProtoMap._(length, jsObject, keys, this._protoValue)
+ : super._(length, jsObject, keys);
final V _protoValue;
bool containsKey(Object key) {
- if (key == '__proto__') return true;
- return super.containsKey(key);
+ if (key is! String) return false;
+ if ('__proto__' == key) return true;
+ return jsHasOwnProperty(_jsObject, key);
}
- V operator [](Object key) {
- if (key == '__proto__') return _protoValue;
- return super[key];
- }
+ _fetch(key) =>
+ '__proto__' == key ? _protoValue : jsPropertyAccess(_jsObject, key);
}
class _ConstantMapKeyIterable<K> extends IterableBase<K> {
@@ -103,8 +111,7 @@
// have not been defined when constants are created.
Map<K, V> _getMap() {
if (JS('bool', r'!this.$map')) {
- Map backingMap =
- new LinkedHashMap<K, V>(equals: identical, hashCode: objectHashCode);
+ Map backingMap = new LinkedHashMap<K, V>();
JS('', r'this.$map = #', fillLiteralMap(_jsData, backingMap));
}
return JS('Map', r'this.$map');
diff --git a/sdk/lib/_internal/lib/io_patch.dart b/sdk/lib/_internal/lib/io_patch.dart
index 4dbab8c..b9bb8f0 100644
--- a/sdk/lib/_internal/lib/io_patch.dart
+++ b/sdk/lib/_internal/lib/io_patch.dart
@@ -340,10 +340,14 @@
}
patch class _Filter {
- patch static _Filter newZLibDeflateFilter(bool gzip, int level) {
+ patch static _Filter newZLibDeflateFilter(bool gzip, int level,
+ int windowBits, int memLevel,
+ int strategy,
+ List<int> dictionary, bool raw) {
throw new UnsupportedError("newZLibDeflateFilter");
}
- patch static _Filter newZLibInflateFilter() {
+ patch static _Filter newZLibInflateFilter(int windowBits,
+ List<int> dictionary, bool raw) {
throw new UnsupportedError("newZLibInflateFilter");
}
}
diff --git a/sdk/lib/_internal/lib/isolate_helper.dart b/sdk/lib/_internal/lib/isolate_helper.dart
index 691cfe2..ffea511 100644
--- a/sdk/lib/_internal/lib/isolate_helper.dart
+++ b/sdk/lib/_internal/lib/isolate_helper.dart
@@ -32,7 +32,6 @@
return result;
}
-/// Marks entering a javascript async operation to keep the worker alive.
/// Marks entering a JavaScript async operation to keep the worker alive.
///
/// To be called by library code before starting an async operation controlled
@@ -277,6 +276,9 @@
List<_IsolateEvent> delayedEvents = [];
Set<Capability> pauseTokens = new Set();
+ // Container with the "on exit" handler send-ports.
+ var doneHandlers;
+
_IsolateContext() {
this.registerWeak(controlPort._id, controlPort);
}
@@ -302,6 +304,21 @@
_updateGlobalState();
}
+ void addDoneListener(SendPort responsePort) {
+ if (doneHandlers == null) {
+ doneHandlers = [];
+ }
+ // If necessary, we can switch doneHandlers to a Set if it gets larger.
+ // That is not expected to happen in practice.
+ if (doneHandlers.contains(responsePort)) return;
+ doneHandlers.add(responsePort);
+ }
+
+ void removeDoneListener(SendPort responsePort) {
+ if (doneHandlers == null) return;
+ doneHandlers.remove(responsePort);
+ }
+
/**
* Run [code] in the context of the isolate represented by [this].
*/
@@ -331,8 +348,14 @@
case "resume":
removePause(message[1]);
break;
+ case 'add-ondone':
+ addDoneListener(message[1]);
+ break;
+ case 'remove-ondone':
+ removeDoneListener(message[1]);
+ break;
default:
- print("UNKOWN MESSAGE: $message");
+ print("UNKNOWN MESSAGE: $message");
}
}
@@ -362,11 +385,22 @@
_addRegistration(portId, port);
}
- _updateGlobalState() {
+ void _updateGlobalState() {
if (ports.length - weakPorts.length > 0 || isPaused) {
_globalState.isolates[id] = this; // indicate this isolate is active
} else {
- _globalState.isolates.remove(id); // indicate this isolate is not active
+ _shutdown();
+ }
+ }
+
+ void _shutdown() {
+ _globalState.isolates.remove(id); // indicate this isolate is not active
+ // Send "done" event to all listeners. This must be done after deactivating
+ // the current isolate, or it may get events if listening to itself.
+ if (doneHandlers != null) {
+ for (SendPort port in doneHandlers) {
+ port.send(null);
+ }
}
}
@@ -520,7 +554,7 @@
static final Expando<int> workerIds = new Expando<int>();
/**
- * The src url for the script tag that loaded this code. Used to create
+ * The src url for the script tag that loaded this Used to create
* JavaScript workers.
*/
static String computeThisScript() {
diff --git a/sdk/lib/_internal/lib/js_mirrors.dart b/sdk/lib/_internal/lib/js_mirrors.dart
index efe9dce..2f2069b 100644
--- a/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/sdk/lib/_internal/lib/js_mirrors.dart
@@ -220,6 +220,7 @@
String get _prettyName => 'TypeVariableMirror';
bool get isTopLevel => false;
+ bool get isStatic => false;
TypeMirror get upperBound {
if (_cachedUpperBound != null) return _cachedUpperBound;
@@ -485,10 +486,6 @@
DeclarationMirror get owner => null;
// TODO(ahe): Implement this.
- Map<Symbol, MethodMirror> get topLevelMembers
- => throw new UnimplementedError();
-
- // TODO(ahe): Implement this.
Function operator [](Symbol name)
=> throw new UnimplementedError();
}
@@ -796,8 +793,12 @@
bool get isAbstract => throw new UnimplementedError();
- bool isSubclassOf(ClassMirror other) => throw new UnimplementedError();
+ bool isSubclassOf(ClassMirror other) {
+ superclass.isSubclassOf(other) || mixin.isSubclassOf(other);
+ }
+
bool isSubtypeOf(TypeMirror other) => throw new UnimplementedError();
+
bool isAssignableTo(TypeMirror other) => throw new UnimplementedError();
}
@@ -1148,6 +1149,15 @@
super(originalDeclaration.simpleName);
String get _prettyName => 'ClassMirror';
+
+ String toString() {
+ String result = '$_prettyName on ${n(simpleName)}';
+ if (typeArguments != null) {
+ result = "$result<${typeArguments.join(', ')}>";
+ }
+ return result;
+ }
+
String get _mangledName {
for (TypeMirror typeArgument in typeArguments) {
if (typeArgument != JsMirrorSystem._dynamicType) {
@@ -1394,6 +1404,7 @@
Function operator [](Symbol name) => throw new UnimplementedError();
bool isSubtypeOf(TypeMirror other) => throw new UnimplementedError();
+
bool isAssignableTo(TypeMirror other) => throw new UnimplementedError();
}
@@ -1906,7 +1917,21 @@
bool get isAbstract => throw new UnimplementedError();
- bool isSubclassOf(ClassMirror other) => throw new UnimplementedError();
+ bool isSubclassOf(ClassMirror other) {
+ if (other is! ClassMirror) {
+ throw new ArgumentError(other);
+ }
+ if (other is JsFunctionTypeMirror) {
+ return false;
+ } if (other is JsClassMirror &&
+ JS('bool', '# == #', other._jsConstructor, _jsConstructor)) {
+ return true;
+ } else if (superclass == null) {
+ return false;
+ } else {
+ return superclass.isSubclassOf(other);
+ }
+ }
}
class JsVariableMirror extends JsDeclarationMirror implements VariableMirror {
@@ -2342,6 +2367,10 @@
String get _prettyName => 'TypedefMirror';
+ bool get hasReflectedType => throw new UnimplementedError();
+
+ Type get reflectedType => throw new UnimplementedError();
+
// TODO(ahe): Implement this method.
List<TypeVariableMirror> get typeVariables => throw new UnimplementedError();
@@ -2503,8 +2532,10 @@
return _cachedToString = "$s'";
}
- bool isSubclassOf(ClassMirror other) => throw new UnimplementedError();
+ bool isSubclassOf(ClassMirror other) => false;
+
bool isSubtypeOf(TypeMirror other) => throw new UnimplementedError();
+
bool isAssignableTo(TypeMirror other) => throw new UnimplementedError();
// TODO(ahe): Implement this method.
@@ -2767,3 +2798,31 @@
void clear() => _throw();
}
+
+Symbol getSymbol(String name, LibraryMirror library) {
+ if (_isPublicSymbol(name)) {
+ return new _symbol_dev.Symbol.validated(name);
+ }
+ if (library == null) {
+ throw new ArgumentError(
+ "Library required for private symbol name: $name");
+ }
+ if (!_symbol_dev.Symbol.isValidSymbol(name)) {
+ throw new ArgumentError("Not a valid symbol name: $name");
+ }
+ throw new UnimplementedError(
+ "MirrorSystem.getSymbol not implemented for private names");
+}
+
+bool _isPublicSymbol(String name) {
+ // A symbol is public if it doesn't start with '_' and it doesn't
+ // have a part (following a '.') that starts with '_'.
+ const int UNDERSCORE = 0x5f;
+ if (name.isEmpty) return true;
+ int index = -1;
+ do {
+ if (name.codeUnitAt(index + 1) == UNDERSCORE) return false;
+ index = name.indexOf('.', index + 1);
+ } while (index >= 0 && index + 1 < name.length);
+ return true;
+}
diff --git a/sdk/lib/_internal/lib/mirrors_patch.dart b/sdk/lib/_internal/lib/mirrors_patch.dart
index 71c1e68..5d4a5fa 100644
--- a/sdk/lib/_internal/lib/mirrors_patch.dart
+++ b/sdk/lib/_internal/lib/mirrors_patch.dart
@@ -10,7 +10,7 @@
patch static String getName(Symbol symbol) => js.getName(symbol);
patch static Symbol getSymbol(String name, [LibraryMirror library]) {
- throw new UnimplementedError("MirrorSystem.getSymbol not implemented");
+ return js.getSymbol(name, library);
}
}
diff --git a/sdk/lib/_internal/pub/lib/src/barback.dart b/sdk/lib/_internal/pub/lib/src/barback.dart
index b0a5581..1c70356 100644
--- a/sdk/lib/_internal/pub/lib/src/barback.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback.dart
@@ -57,7 +57,9 @@
/// The configuration to pass to the transformer.
///
- /// This will be an empty map if no configuration was provided.
+ /// Any pub-specific configuration (i.e. keys starting with "$") will have
+ /// been stripped out of this and handled separately. This will be an empty
+ /// map if no configuration was provided.
final Map configuration;
/// The primary input inclusions.
@@ -249,66 +251,3 @@
var assetPath = path.url.join("lib", path.url.joinAll(parts.skip(index + 2)));
return new AssetId(package, assetPath);
}
-
-/// Converts [id] to a "servable path" for that asset.
-///
-/// This is the root relative URL that could be used to request that asset from
-/// pub serve. It's also the relative path that the asset will be output to by
-/// pub build (except this always returns a path using URL separators).
-///
-/// [entrypoint] is the name of the entrypoint package.
-///
-/// Examples (where [entrypoint] is "myapp"):
-///
-/// myapp|web/index.html -> /index.html
-/// myapp|lib/lib.dart -> /packages/myapp/lib.dart
-/// foo|lib/foo.dart -> /packages/foo/foo.dart
-/// foo|asset/foo.png -> /assets/foo/foo.png
-/// myapp|test/main.dart -> ERROR
-/// foo|web/
-///
-/// Throws a [FormatException] if [id] is not a valid public asset.
-// TODO(rnystrom): Get rid of [useWebAsRoot] once pub serve also serves out of
-// the package root directory.
-String idtoUrlPath(String entrypoint, AssetId id, {bool useWebAsRoot: true}) {
- var parts = path.url.split(id.path);
-
- if (parts.length < 2) {
- throw new FormatException(
- "Can not serve assets from top-level directory.");
- }
-
- // Map "asset" and "lib" to their shared directories.
- var dir = parts[0];
- var rest = parts.skip(1);
-
- if (dir == "asset") {
- return path.url.join("/", "assets", id.package, path.url.joinAll(rest));
- }
-
- if (dir == "lib") {
- return path.url.join("/", "packages", id.package, path.url.joinAll(rest));
- }
-
- if (useWebAsRoot) {
- if (dir != "web") {
- throw new FormatException('Cannot access assets from "$dir".');
- }
-
- if (id.package != entrypoint) {
- throw new FormatException(
- 'Cannot access "web" directory of non-root packages.');
- }
-
- return path.url.join("/", path.url.joinAll(rest));
- }
-
- if (id.package != entrypoint) {
- throw new FormatException(
- 'Can only access "lib" and "asset" directories of non-entrypoint '
- 'packages.');
- }
-
- // Allow any path in the entrypoint package.
- return path.url.join("/", path.url.joinAll(parts));
-}
diff --git a/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart b/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart
index 47c242d..012e07c 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart
@@ -58,11 +58,9 @@
var barback = new Barback(new PubPackageProvider(graph));
barback.log.listen(_log);
- return _startServers(hostname, basePort, mode, graph, barback,
- rootDirectories).then((servers) {
- var environment = new BuildEnvironment._(graph, servers, mode,
- watcherType, rootDirectories);
-
+ var environment = new BuildEnvironment._(graph, barback, mode,
+ watcherType, rootDirectories);
+ return environment._startServers(hostname, basePort).then((_) {
// If the entrypoint package manually configures the dart2js
// transformer, don't include it in the built-in transformer list.
//
@@ -85,16 +83,13 @@
}
/// Start the [BarbackServer]s that will serve [rootDirectories].
- static Future<List<BarbackServer>> _startServers(String hostname,
- int basePort, BarbackMode mode, PackageGraph graph, Barback barback,
- Iterable<String> rootDirectories) {
+ Future<List<BarbackServer>> _startServers(String hostname, int basePort) {
_bind(port, rootDirectory) {
if (basePort == 0) port = 0;
- return BarbackServer.bind(hostname, port, barback,
- graph.entrypoint.root.name, rootDirectory);
+ return BarbackServer.bind(this, hostname, port, rootDirectory);
}
- var rootDirectoryList = rootDirectories.toList();
+ var rootDirectoryList = _rootDirectories.toList();
// For consistency, "web/" should always have the first available port and
// "test/" should always have the second. Other directories are assigned
@@ -113,14 +108,16 @@
i += 1;
}
- return Future.wait(serverFutures);
+ return Future.wait(serverFutures).then((boundServers) {
+ servers.addAll(boundServers);
+ });
}
/// The servers serving this environment's assets.
- final List<BarbackServer> servers;
+ final servers = <BarbackServer>[];
/// The [Barback] instance used to process assets in this environment.
- Barback get barback => servers.first.barback;
+ final Barback barback;
/// The root package being built.
Package get rootPackage => graph.entrypoint.root;
@@ -142,7 +139,7 @@
/// exposed.
final Set<String> _rootDirectories;
- BuildEnvironment._(this.graph, this.servers, this.mode, this._watcherType,
+ BuildEnvironment._(this.graph, this.barback, this.mode, this._watcherType,
Iterable<String> rootDirectories)
: _rootDirectories = rootDirectories.toSet();
diff --git a/sdk/lib/_internal/pub/lib/src/barback/rewrite_import_transformer.dart b/sdk/lib/_internal/pub/lib/src/barback/rewrite_import_transformer.dart
index bcaf500..6f454b6 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/rewrite_import_transformer.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/rewrite_import_transformer.dart
@@ -40,7 +40,7 @@
}
/// A simple visitor that collects import and export nodes.
-class _DirectiveCollector extends GeneralizingASTVisitor {
+class _DirectiveCollector extends GeneralizingAstVisitor {
final directives = <UriBasedDirective>[];
visitUriBasedDirective(UriBasedDirective node) => directives.add(node);
diff --git a/sdk/lib/_internal/pub/lib/src/barback/server.dart b/sdk/lib/_internal/pub/lib/src/barback/server.dart
index a324ecb..983e0c9 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/server.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/server.dart
@@ -5,7 +5,6 @@
library pub.barback.server;
import 'dart:async';
-import 'dart:convert';
import 'dart:io';
import 'package:barback/barback.dart';
@@ -16,25 +15,29 @@
import '../barback.dart';
import '../log.dart' as log;
import '../utils.dart';
+import 'build_environment.dart';
+import 'web_socket_api.dart';
/// Callback for determining if an asset with [id] should be served or not.
typedef bool AllowAsset(AssetId id);
/// A server that serves assets transformed by barback.
class BarbackServer {
+ /// The [BuildEnvironment] being served.
+ final BuildEnvironment _environment;
+
/// The underlying HTTP server.
final HttpServer _server;
- /// The name of the root package, from whose [rootDirectory] assets will be
- /// served.
- final String _rootPackage;
+ /// All currently open [WebSocket] connections.
+ final _webSockets = new Set<WebSocket>();
- /// The directory in [_rootPackage] which will serve as the root of this
- /// server.
+ /// The directory in the root which will serve as the root of this server as
+ /// a native platform path.
final String rootDirectory;
- /// The barback instance from which this serves assets.
- final Barback barback;
+ /// The root directory as an asset-style ("/") path.
+ String get rootAssetPath => path.url.joinAll(path.split(rootDirectory));
/// The server's port.
final int port;
@@ -62,17 +65,16 @@
/// Creates a new server and binds it to [port] of [host].
///
- /// This server will serve assets from [barback], and use [rootPackage] as
- /// the root package.
- static Future<BarbackServer> bind(String host, int port,
- Barback barback, String rootPackage, String rootDirectory) {
+ /// This server will serve assets from [barback], and use [rootDirectory] as
+ /// the root directory.
+ static Future<BarbackServer> bind(BuildEnvironment environment,
+ String host, int port, String rootDirectory) {
return Chain.track(HttpServer.bind(host, port)).then((server) {
- return new BarbackServer._(server, barback, rootPackage, rootDirectory);
+ return new BarbackServer._(environment, server, rootDirectory);
});
}
- BarbackServer._(HttpServer server, this.barback, this._rootPackage,
- this.rootDirectory)
+ BarbackServer._(this._environment, HttpServer server, this.rootDirectory)
: _server = server,
port = server.port,
address = server.address {
@@ -84,8 +86,26 @@
/// Closes this server.
Future close() {
- _server.close();
- _resultsController.close();
+ var futures = [_server.close(), _resultsController.close()];
+ futures.addAll(_webSockets);
+ return Future.wait(futures);
+ }
+
+ /// Converts a [url] served by this server into an [AssetId] that can be
+ /// requested from barback.
+ AssetId urlToId(Uri url) {
+ // See if it's a URL to a public directory in a dependency.
+ var id = specialUrlToId(url);
+ if (id != null) return id;
+
+ // Otherwise, it's a path in current package's [rootDirectory].
+ var parts = path.url.split(url.path);
+
+ // Strip the leading "/" from the URL.
+ if (parts.isNotEmpty && parts.first == "/") parts = parts.skip(1);
+
+ var relativePath = path.url.join(rootDirectory, path.url.joinAll(parts));
+ return new AssetId(_environment.rootPackage.name, relativePath);
}
/// Handles an HTTP request.
@@ -102,7 +122,7 @@
var id;
try {
- id = _urlToId(request.uri);
+ id = urlToId(request.uri);
} on FormatException catch (ex) {
// If we got here, we had a path like "/packages" which is a special
// directory, but not a valid path since it lacks a following package name.
@@ -117,11 +137,12 @@
}
_logRequest(request, "Loading $id");
- barback.getAssetById(id)
+ _environment.barback.getAssetById(id)
.then((asset) => _serveAsset(request, asset))
.catchError((error, trace) {
if (error is! AssetNotFoundException) throw error;
- return barback.getAssetById(id.addExtension("/index.html")).then((asset) {
+ return _environment.barback.getAssetById(id.addExtension("/index.html"))
+ .then((asset) {
if (request.uri.path.endsWith('/')) return _serveAsset(request, asset);
// We only want to serve index.html if the URL explicitly ends in a
@@ -198,90 +219,15 @@
/// Creates a web socket for [request] which should be an upgrade request.
void _handleWebSocket(HttpRequest request) {
Chain.track(WebSocketTransformer.upgrade(request)).then((socket) {
- socket.listen((data) {
- var command;
- try {
- command = JSON.decode(data);
- } on FormatException catch (ex) {
- _webSocketError(socket, '"$data" is not valid JSON: ${ex.message}');
- return;
- }
+ _webSockets.add(socket);
+ var api = new WebSocketApi(socket, _environment);
- if (command is! Map) {
- _webSocketError(socket, "Command must be a JSON map. Got: $data.");
- return;
- }
-
- if (!command.containsKey("command")) {
- _webSocketError(socket, "Missing command name. Got: $data.");
- return;
- }
-
- switch (command["command"]) {
- case "urlToAsset":
- var urlPath = command["path"];
- if (urlPath is! String) {
- _webSocketError(socket, '"path" must be a string. Got: '
- '${JSON.encode(urlPath)}.');
- return;
- }
-
- var url = new Uri(path: urlPath);
- var id = _urlToId(url);
- socket.add(JSON.encode({
- "package": id.package,
- "path": id.path
- }));
- break;
-
- case "assetToUrl":
- var packageName = command["package"];
- if (packageName is! String) {
- _webSocketError(socket, '"package" must be a string. Got: '
- '${JSON.encode(packageName)}.');
- return;
- }
-
- var packagePath = command["path"];
- if (packagePath is! String) {
- _webSocketError(socket, '"path" must be a string. Got: '
- '${JSON.encode(packagePath)}.');
- return;
- }
-
- var id = new AssetId(packageName, packagePath);
- try {
- var urlPath = idtoUrlPath(_rootPackage, id);
- socket.add(JSON.encode({"path": urlPath}));
- } on FormatException catch (ex) {
- _webSocketError(socket, ex.message);
- }
- break;
-
- default:
- _webSocketError(socket, 'Unknown command "${command["command"]}".');
- break;
- }
- }, onError: _resultsController.addError, cancelOnError: true);
+ return api.listen().whenComplete(() {
+ _webSockets.remove(api);
+ });
}).catchError(_resultsController.addError);
}
- /// Converts a [url] served by pub serve into an [AssetId] that can be
- /// requested from barback.
- AssetId _urlToId(Uri url) {
- var id = specialUrlToId(url);
- if (id != null) return id;
-
- // Otherwise, it's a path in current package's [rootDirectory].
- var parts = path.url.split(url.path);
-
- // Strip the leading "/" from the URL.
- if (parts.isNotEmpty && parts.first == "/") parts = parts.skip(1);
-
- var relativePath = path.url.join(rootDirectory, path.url.joinAll(parts));
- return new AssetId(_rootPackage, relativePath);
- }
-
/// Responds to [request] with a 405 response and closes it.
void _methodNotAllowed(HttpRequest request) {
_logRequest(request, "405 Method Not Allowed");
@@ -311,10 +257,6 @@
/// Log [message] at [log.Level.FINE] with metadata about [request].
void _logRequest(HttpRequest request, String message) =>
log.fine("BarbackServer ${request.method} ${request.uri}\n$message");
-
- void _webSocketError(WebSocket socket, String message) {
- socket.add(JSON.encode({"error": message}));
- }
}
/// The result of the server handling a URL.
diff --git a/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart b/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
new file mode 100644
index 0000000..47ab14f
--- /dev/null
+++ b/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
@@ -0,0 +1,336 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub.barback.web_socket_api;
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:path/path.dart' as path;
+import 'package:stack_trace/stack_trace.dart';
+
+import 'build_environment.dart';
+
+/// Implements the [WebSocket] API for communicating with a running pub serve
+/// process, mainly for use by the Editor.
+///
+/// Requests must be string-encoded JSON maps. Each request is a command, and
+/// the map must have a command key:
+///
+/// {
+/// "command": "name"
+/// }
+///
+/// The request may also have an "id" key with any value. If present in the
+/// request, the response will include an "id" key with the same value. This
+/// can be used by the client to match requests to responses when multiple
+/// concurrent requests may be in flight.
+///
+/// {
+/// "command": "name",
+/// "id": "anything you want"
+/// }
+///
+/// The request may have other keys for parameters to the command. It's an
+/// error to invoke an unknown command.
+///
+/// All responses sent on the socket are string-encoded JSON maps. If an error
+/// occurs while processing the request, an error response will be sent like:
+///
+/// {
+/// "error": "Human-friendly error message."
+/// "code": "UNIQUE_IDENTIFIER"
+/// }
+///
+/// The code will be a short string that can be used to uniquely identify the
+/// category of error.
+///
+/// No successful response map will contain a key named "error".
+class WebSocketApi {
+ final WebSocket _socket;
+ final BuildEnvironment _environment;
+
+ Map<String, _CommandHandler> _commands;
+
+ WebSocketApi(this._socket, this._environment) {
+ _commands = {
+ "urlToAssetId": _urlToAssetId,
+ "assetIdToUrls": _assetIdToUrls
+ };
+ }
+
+ /// Listens on the socket.
+ ///
+ /// Returns a future that completes when the socket has closed. It will
+ /// complete with an error if the socket had an error, otherwise it will
+ /// complete to `null`.
+ Future listen() {
+ return _socket.listen((data) {
+ try {
+ var command;
+ try {
+ command = JSON.decode(data);
+ } on FormatException catch (ex) {
+ throw new _WebSocketException(_ErrorCode.BAD_COMMAND,
+ '"$data" is not valid JSON: ${ex.message}');
+ }
+
+ if (command is! Map) {
+ throw new _WebSocketException(_ErrorCode.BAD_COMMAND,
+ 'Command must be a JSON map. Got $data.');
+ }
+
+ if (!command.containsKey("command")) {
+ throw new _WebSocketException(_ErrorCode.BAD_COMMAND,
+ 'Missing command name. Got $data.');
+ }
+
+ var handler = _commands[command["command"]];
+ if (handler == null) {
+ throw new _WebSocketException(_ErrorCode.BAD_COMMAND,
+ 'Unknown command "${command["command"]}".');
+ }
+
+ var response = handler(command);
+
+ // If the command has an ID, include it in the response.
+ if (command.containsKey("id")) {
+ response["id"] = command["id"];
+ }
+
+ _socket.add(JSON.encode(response));
+ } on _WebSocketException catch(ex) {
+ _socket.add(JSON.encode({"code": ex.code, "error": ex.message}));
+ } catch (ex, stack) {
+ // Catch any other errors and pipe them through the web socket.
+ _socket.add(JSON.encode({
+ "code": _ErrorCode.UNEXPECTED_ERROR,
+ "error": ex.toString(),
+ "stackTrace": new Chain.forTrace(stack).toString()
+ }));
+ }
+ }, cancelOnError: true).asFuture();
+ }
+
+ /// Given a URL to an asset that is served by pub, returns the ID of the
+ /// asset that would be accessed by that URL.
+ ///
+ /// The command name is "urlToAssetId" and it takes a "url" key for the URL
+ /// being mapped:
+ ///
+ /// {
+ /// "command": "urlToAssetId",
+ /// "url": "http://localhost:8080/index.html"
+ /// }
+ ///
+ /// If successful, it returns a map containing the asset ID's package and
+ /// path:
+ ///
+ /// {
+ /// "package": "myapp",
+ /// "path": "web/index.html"
+ /// }
+ ///
+ /// An optional "line" key may be provided whose value must be an integer. If
+ /// given, the result will also include a "line" key that maps the line in
+ /// the served final file back to the corresponding source line in the asset
+ /// that was used to generate that file.
+ ///
+ /// Examples (where "myapp" is the root package and pub serve is being run
+ /// normally with "web" bound to port 8080 and "test" to 8081):
+ ///
+ /// http://localhost:8080/index.html -> myapp|web/index.html
+ /// http://localhost:8081/sub/main.dart -> myapp|test/sub/main.dart
+ ///
+ /// If the URL is not a domain being served by pub, this returns an error:
+ ///
+ /// http://localhost:1234/index.html -> NOT_SERVED error
+ ///
+ /// This does *not* currently support the implicit index.html behavior that
+ /// pub serve provides for user-friendliness:
+ ///
+ /// http://localhost:1234 -> NOT_SERVED error
+ ///
+ /// This does *not* currently check to ensure the asset actually exists. It
+ /// only maps what the corresponding asset *should* be for that URL.
+ Map _urlToAssetId(Map command) {
+ var urlString = _validateString(command, "url");
+ var url;
+ try {
+ url = Uri.parse(urlString);
+ } on FormatException catch(ex) {
+ print(ex);
+ throw new _WebSocketException(_ErrorCode.BAD_ARGUMENT,
+ '"$urlString" is not a valid URL.');
+ }
+
+ // If a line number was given, map it to the output line.
+ var line = _validateOptionalInt(command, "line");
+
+ // Find the server.
+ var server = _environment.servers.firstWhere(
+ (server) => server.address.host == url.host && server.port == url.port,
+ orElse: () => throw new _WebSocketException(_ErrorCode.NOT_SERVED,
+ '"${url.host}:${url.port}" is not being served by pub.'));
+
+ var id = server.urlToId(url);
+
+ // TODO(rnystrom): When this is hooked up to actually talk to barback to
+ // see if assets exist, consider supporting implicit index.html at that
+ // point.
+
+ var result = {"package": id.package, "path": id.path};
+
+ // Map the line.
+ // TODO(rnystrom): Right now, source maps are not supported and it just
+ // passes through the original line. This lets the editor start using this
+ // API before we've fully implemented it. See #12339 and #16061.
+ if (line != null) result["line"] = line;
+
+ return result;
+ }
+
+ /// Given an asset ID in the root package, returns the URLs served by pub
+ /// that can be used to access that asset.
+ ///
+ /// The command name is "assetIdToUrl" and it takes a "path" key for the
+ /// asset path being mapped:
+ ///
+ /// {
+ /// "command": "assetIdToUrl",
+ /// "path": "web/index.html"
+ /// }
+ ///
+ /// If successful, it returns a map containing the list of URLs that can be
+ /// used to access that asset.
+ ///
+ /// {
+ /// "urls": ["http://localhost:8080/index.html"]
+ /// }
+ ///
+ /// An optional "line" key may be provided whose value must be an integer. If
+ /// given, the result will also include a "line" key that maps the line in
+ /// the source file to the corresponding output line in the resulting asset
+ /// served at the URL.
+ ///
+ /// Examples (where "myapp" is the root package and pub serve is being run
+ /// normally with "web" bound to port 8080 and "test" to 8081):
+ ///
+ /// web/index.html -> http://localhost:8080/index.html
+ /// test/sub/main.dart -> http://localhost:8081/sub/main.dart
+ ///
+ /// If the asset is not in a directory being served by pub, returns an error:
+ ///
+ /// example/index.html -> NOT_SERVED error
+ ///
+ /// This cannot currently be used to access assets in other packages aside
+ /// from the root. Nor can it be used to access assets in the root package's
+ /// "lib" or "asset" directories.
+ ///
+ /// lib/myapp.dart -> BAD_ARGUMENT error
+ Map _assetIdToUrls(Map command) {
+ // TODO(rnystrom): Support assets in other packages. See #17146.
+ var assetPath = _validateString(command, "path");
+
+ if (!path.url.isRelative(assetPath)) {
+ throw new _WebSocketException(_ErrorCode.BAD_ARGUMENT,
+ '"path" must be a relative path. Got "$assetPath".');
+ }
+
+ if (!path.url.isWithin(".", assetPath)) {
+ throw new _WebSocketException(_ErrorCode.BAD_ARGUMENT,
+ '"path" cannot reach out of its containing directory. '
+ 'Got "$assetPath".');
+ }
+
+ var line = _validateOptionalInt(command, "line");
+
+ // Find all of the servers whose root directories contain the asset and
+ // generate appropriate URLs for each.
+ var urls = _environment.servers
+ .where((server) => path.url.isWithin(server.rootAssetPath, assetPath))
+ .map((server) =>
+ "http://${server.address.host}:${server.port}/" +
+ path.url.relative(assetPath, from: server.rootAssetPath))
+ .toList();
+
+ if (urls.isEmpty) {
+ throw new _WebSocketException(_ErrorCode.NOT_SERVED,
+ 'Asset path "$assetPath" is not currently being served.');
+ }
+
+ var result = {"urls": urls};
+
+ // Map the line.
+ // TODO(rnystrom): Right now, source maps are not supported and it just
+ // passes through the original line. This lets the editor start using this
+ // API before we've fully implemented it. See #12339 and #16061.
+ if (line != null) result["line"] = line;
+
+ return result;
+ }
+
+ /// Validates that [command] has a field named [key] whose value is a string.
+ ///
+ /// Returns the string if found, or throws a [_WebSocketException] if
+ /// validation failed.
+ String _validateString(Map command, String key) {
+ if (!command.containsKey(key)) {
+ throw new _WebSocketException(_ErrorCode.BAD_ARGUMENT,
+ 'Missing "$key" argument.');
+ }
+
+ var field = command[key];
+ if (field is String) return field;
+
+ throw new _WebSocketException(_ErrorCode.BAD_ARGUMENT,
+ '"$key" must be a string. Got ${JSON.encode(field)}.');
+ }
+
+ /// Validates that if [command] has a field named [key], then its value is a
+ /// number.
+ ///
+ /// Returns the number if found or `null` if not present. Throws an
+ /// [_WebSocketException] if the key is there but the field is the wrong type.
+ int _validateOptionalInt(Map command, String key) {
+ if (!command.containsKey(key)) return null;
+
+ var field = command[key];
+ if (field is int) return field;
+
+ throw new _WebSocketException(_ErrorCode.BAD_ARGUMENT,
+ '"$key" must be an integer. Got ${JSON.encode(field)}.');
+ }
+}
+
+/// Function for processing a single web socket command.
+typedef Map _CommandHandler(Map command);
+
+/// Web socket API error codenames.
+class _ErrorCode {
+ /// An error of an unknown type has occurred.
+ static const UNEXPECTED_ERROR = "UNEXPECTED_ERROR";
+
+ /// The format or name of the command is not valid.
+ static const BAD_COMMAND = "BAD_COMMAND";
+
+ /// An argument to the commant is the wrong type or has an invalid value.
+ static const BAD_ARGUMENT = "BAD_ARGUMENT";
+
+ /// The path or URL requested is not currently covered by any of the running
+ /// servers.
+ static const NOT_SERVED = "NOT_SERVED";
+}
+
+/// Exception thrown when an error occurs while processing a WebSocket command.
+///
+/// The top-level WebSocket API code will catch this and translate it to an
+/// appropriate error response.
+class _WebSocketException implements Exception {
+ final String code;
+ final String message;
+
+ _WebSocketException(this.code, this.message);
+}
diff --git a/sdk/lib/_internal/pub/lib/src/command.dart b/sdk/lib/_internal/pub/lib/src/command.dart
index 92cafec..6907646 100644
--- a/sdk/lib/_internal/pub/lib/src/command.dart
+++ b/sdk/lib/_internal/pub/lib/src/command.dart
@@ -178,6 +178,7 @@
// Leaf commands should override this and non-leaf commands should never
// call it.
assert(false);
+ return null;
}
/// Displays usage information for this command.
diff --git a/sdk/lib/_internal/pub/lib/src/command/build.dart b/sdk/lib/_internal/pub/lib/src/command/build.dart
index aee823a..53bb5c8 100644
--- a/sdk/lib/_internal/pub/lib/src/command/build.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/build.dart
@@ -10,7 +10,6 @@
import 'package:path/path.dart' as path;
import '../barback/build_environment.dart';
-import '../barback.dart' as barback;
import '../command.dart';
import '../exit_codes.dart' as exit_codes;
import '../io.dart';
@@ -177,34 +176,67 @@
return new Future.value();
}
- // Figure out the output directory for the asset, which is the same as the
- // path pub serve would use to serve it.
- var relativeUrl = barback.idtoUrlPath(entrypoint.root.name, asset.id,
- useWebAsRoot: false);
-
- // Remove the leading "/".
- relativeUrl = relativeUrl.substring(1);
+ var destPath = _idtoPath(asset.id);
// If the asset is from a public directory, copy it into all of the
// top-level build directories.
- if (relativeUrl.startsWith("assets/") ||
- relativeUrl.startsWith("packages/")) {
+ if (path.isWithin("assets", destPath) ||
+ path.isWithin("packages", destPath)) {
builtFiles += buildDirectories.length;
- return Future.wait(buildDirectories.map(
- (buildDir) => _writeOutputFile(asset,
- path.url.join(buildDir, relativeUrl))));
+ return Future.wait(buildDirectories.map((buildDir) =>
+ _writeOutputFile(asset, path.join(buildDir, destPath))));
}
builtFiles++;
- return _writeOutputFile(asset, relativeUrl);
+ return _writeOutputFile(asset, destPath);
}
- /// Writes the contents of [asset] to [relativeUrl] within the build
- /// directory.
- Future _writeOutputFile(Asset asset, String relativeUrl) {
- var relativePath = path.fromUri(new Uri(path: relativeUrl));
- var destPath = path.join(target, relativePath);
+ /// Converts [id] to a relative path in the output directory for that asset.
+ ///
+ /// This corresponds to the URL that could be used to request that asset from
+ /// pub serve.
+ ///
+ /// Examples (where entrypoint is "myapp"):
+ ///
+ /// myapp|web/index.html -> web/index.html
+ /// myapp|lib/lib.dart -> packages/myapp/lib.dart
+ /// foo|lib/foo.dart -> packages/foo/foo.dart
+ /// foo|asset/foo.png -> assets/foo/foo.png
+ /// myapp|test/main.dart -> test/main.dart
+ /// foo|test/main.dart -> ERROR
+ ///
+ /// Throws a [FormatException] if [id] is not a valid public asset.
+ String _idtoPath(AssetId id) {
+ var parts = path.url.split(id.path);
+ if (parts.length < 2) {
+ throw new FormatException(
+ "Can not build assets from top-level directory.");
+ }
+
+ // Map "asset" and "lib" to their shared directories.
+ var dir = parts[0];
+ var rest = parts.skip(1);
+
+ if (dir == "asset") {
+ return path.join("assets", id.package, path.joinAll(rest));
+ }
+
+ if (dir == "lib") {
+ return path.join("packages", id.package, path.joinAll(rest));
+ }
+
+ // Shouldn't be trying to access non-public directories of other packages.
+ assert(id.package == entrypoint.root.name);
+
+ // Allow any path in the entrypoint package.
+ return path.joinAll(parts);
+ }
+
+ /// Writes the contents of [asset] to [relativePath] within the build
+ /// directory.
+ Future _writeOutputFile(Asset asset, String relativePath) {
+ var destPath = path.join(target, relativePath);
ensureDir(path.dirname(destPath));
return createFileFromStream(asset.read(), destPath);
}
diff --git a/sdk/lib/_internal/pub/lib/src/command/cache_add.dart b/sdk/lib/_internal/pub/lib/src/command/cache_add.dart
index 7cf0be4..fac394a 100644
--- a/sdk/lib/_internal/pub/lib/src/command/cache_add.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/cache_add.dart
@@ -7,8 +7,6 @@
import 'dart:async';
import '../command.dart';
-import '../exit_codes.dart' as exit_codes;
-import '../io.dart';
import '../log.dart' as log;
import '../package.dart';
import '../utils.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/command/cache_list.dart b/sdk/lib/_internal/pub/lib/src/command/cache_list.dart
index d774a6b..18408e5 100644
--- a/sdk/lib/_internal/pub/lib/src/command/cache_list.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/cache_list.dart
@@ -29,5 +29,6 @@
// TODO(keertip): Add support for non-JSON format and check for --format
// flag.
log.message(JSON.encode({'packages': packagesObj}));
+ return null;
}
}
diff --git a/sdk/lib/_internal/pub/lib/src/command/help.dart b/sdk/lib/_internal/pub/lib/src/command/help.dart
index c1889ff..1959b93 100644
--- a/sdk/lib/_internal/pub/lib/src/command/help.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/help.dart
@@ -50,5 +50,6 @@
}
command.printUsage();
+ return null;
}
}
diff --git a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
index a14ab6f..64a5b15 100644
--- a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
@@ -7,7 +7,6 @@
import 'dart:async';
import '../command.dart';
-import '../entrypoint.dart';
import '../log.dart' as log;
/// Handles the `upgrade` pub command.
diff --git a/sdk/lib/_internal/pub/lib/src/command/version.dart b/sdk/lib/_internal/pub/lib/src/command/version.dart
index 4855361..de90f5f 100644
--- a/sdk/lib/_internal/pub/lib/src/command/version.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/version.dart
@@ -18,5 +18,6 @@
Future onRun() {
log.message("Pub ${sdk.version}");
+ return null;
}
}
diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart
index 612e267..cc9146f 100644
--- a/sdk/lib/_internal/pub/lib/src/dart.dart
+++ b/sdk/lib/_internal/pub/lib/src/dart.dart
@@ -70,7 +70,7 @@
if (analyzeAll) options.add('--analyze-all');
if (suppressWarnings) options.add('--suppress-warnings');
if (suppressHints) options.add('--suppress-hints');
- if (suppressPackageWarnings) options.add('--hide-package-warnings');
+ if (!suppressPackageWarnings) options.add('--show-package-warnings');
if (terse) options.add('--terse');
if (toDart) options.add('--output-type=dart');
diff --git a/sdk/lib/_internal/pub/lib/src/git.dart b/sdk/lib/_internal/pub/lib/src/git.dart
index 4e92a69..3f61dc1 100644
--- a/sdk/lib/_internal/pub/lib/src/git.dart
+++ b/sdk/lib/_internal/pub/lib/src/git.dart
@@ -11,8 +11,6 @@
import 'io.dart';
import 'log.dart' as log;
-import 'package:stack_trace/stack_trace.dart';
-
/// Tests whether or not the git command-line app is available for use.
Future<bool> get isInstalled {
if (_isGitInstalledCache != null) {
diff --git a/sdk/lib/_internal/pub/lib/src/package.dart b/sdk/lib/_internal/pub/lib/src/package.dart
index e783221..7d25a2e 100644
--- a/sdk/lib/_internal/pub/lib/src/package.dart
+++ b/sdk/lib/_internal/pub/lib/src/package.dart
@@ -90,10 +90,6 @@
Package.inMemory(this.pubspec)
: dir = null;
- /// Constructs a package. This should not be called directly. Instead, acquire
- /// packages from [load()].
- Package._(this.dir, this.pubspec);
-
/// Returns a debug string for the package.
String toString() => '$name $version ($dir)';
}
diff --git a/sdk/lib/_internal/pub/lib/src/pubspec.dart b/sdk/lib/_internal/pub/lib/src/pubspec.dart
index 2748061..ac8e6cd 100644
--- a/sdk/lib/_internal/pub/lib/src/pubspec.dart
+++ b/sdk/lib/_internal/pub/lib/src/pubspec.dart
@@ -10,7 +10,6 @@
import 'barback.dart';
import 'io.dart';
import 'package.dart';
-import 'source.dart';
import 'source_registry.dart';
import 'utils.dart';
import 'version.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/source.dart b/sdk/lib/_internal/pub/lib/src/source.dart
index 4e9fac6..2927cc4 100644
--- a/sdk/lib/_internal/pub/lib/src/source.dart
+++ b/sdk/lib/_internal/pub/lib/src/source.dart
@@ -292,6 +292,8 @@
if (shouldCache) {
throw new UnimplementedError("Source $name must implement this.");
}
+ throw new UnsupportedError("Cannot call getCachedPackages() on an "
+ "uncached source.");
}
/// Returns the source's name.
diff --git a/sdk/lib/_internal/pub/lib/src/version.dart b/sdk/lib/_internal/pub/lib/src/version.dart
index 7577f9f..a726fd0 100644
--- a/sdk/lib/_internal/pub/lib/src/version.dart
+++ b/sdk/lib/_internal/pub/lib/src/version.dart
@@ -203,7 +203,7 @@
}
/// Gets the next patch version number that follows this one.
- ///
+ ///bed8b33fda6ec81c3ba52274d189bc0661ed12bf
/// If this version is a pre-release, then it just strips the pre-release
/// suffix. Otherwise, it increments the patch version.
Version get nextPatch {
@@ -363,6 +363,7 @@
case '>':
return new VersionRange(min: version, includeMin: false);
}
+ throw "Unreachable.";
}
while (true) {
diff --git a/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart b/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart
index e005f30..43e779c 100644
--- a/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart
+++ b/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'dart:convert';
-
import 'package:scheduled_test/scheduled_test.dart';
import '../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart b/sdk/lib/_internal/pub/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
index 8f092d1..a96f273 100644
--- a/sdk/lib/_internal/pub/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
+++ b/sdk/lib/_internal/pub/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
@@ -4,7 +4,6 @@
import 'dart:convert';
-import 'package:scheduled_test/scheduled_test.dart';
import 'package:scheduled_test/scheduled_server.dart';
import '../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/serve/roots/serves_urls_from_custom_roots_test.dart b/sdk/lib/_internal/pub/test/serve/roots/serves_urls_from_custom_roots_test.dart
index 221b53a..885d3e6 100644
--- a/sdk/lib/_internal/pub/test/serve/roots/serves_urls_from_custom_roots_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/roots/serves_urls_from_custom_roots_test.dart
@@ -5,7 +5,6 @@
library pub_tests;
import 'package:path/path.dart' as p;
-import 'package:scheduled_test/scheduled_test.dart';
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
diff --git a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_by_default_if_web_and_test_dont_exist_test.dart b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_by_default_if_web_and_test_dont_exist_test.dart
index 11de9cd..dfea16b 100644
--- a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_by_default_if_web_and_test_dont_exist_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_by_default_if_web_and_test_dont_exist_test.dart
@@ -4,9 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_stream.dart';
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../../lib/src/exit_codes.dart' as exit_codes;
import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_are_outside_package_test.dart b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_are_outside_package_test.dart
index 37dd269..d628af8 100644
--- a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_are_outside_package_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_are_outside_package_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../../lib/src/exit_codes.dart' as exit_codes;
import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
index c2275bb..fac152f 100644
--- a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../../lib/src/exit_codes.dart' as exit_codes;
import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/serve/serves_index_html_for_directories_test.dart b/sdk/lib/_internal/pub/test/serve/serves_index_html_for_directories_test.dart
index 10f8afc..0974381 100644
--- a/sdk/lib/_internal/pub/test/serve/serves_index_html_for_directories_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/serves_index_html_for_directories_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../descriptor.dart' as d;
import '../test_pub.dart';
import 'utils.dart';
diff --git a/sdk/lib/_internal/pub/test/serve/utils.dart b/sdk/lib/_internal/pub/test/serve/utils.dart
index 0f04f3f..9de35b3 100644
--- a/sdk/lib/_internal/pub/test/serve/utils.dart
+++ b/sdk/lib/_internal/pub/test/serve/utils.dart
@@ -9,11 +9,11 @@
import 'dart:io';
import 'package:http/http.dart' as http;
-import 'package:path/path.dart' as p;
import 'package:scheduled_test/scheduled_process.dart';
import 'package:scheduled_test/scheduled_stream.dart';
import 'package:scheduled_test/scheduled_test.dart';
+import '../../lib/src/utils.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
@@ -24,6 +24,10 @@
/// directories they're serving.
final _ports = new Map<String, int>();
+/// A completer that completes when the server has been started and the served
+/// ports are known.
+Completer _portsCompleter;
+
/// The web socket connection to the running pub process, or `null` if no
/// connection has been made.
WebSocket _webSocket;
@@ -129,8 +133,10 @@
ScheduledProcess pubServe({bool shouldGetFirst: false, bool createWebDir: true,
Iterable<String> args}) {
_pubServer = startPubServe(args: args, createWebDir: createWebDir);
+ _portsCompleter = new Completer();
currentSchedule.onComplete.schedule(() {
+ _portsCompleter = null;
_ports.clear();
if (_webSocket != null) {
@@ -147,7 +153,10 @@
// The server should emit one or more ports.
_pubServer.stdout.expect(
consumeWhile(predicate(_parsePort, 'emits server url')));
- schedule(() => expect(_ports, isNot(isEmpty)));
+ schedule(() {
+ expect(_ports, isNot(isEmpty));
+ _portsCompleter.complete();
+ });
return _pubServer;
}
@@ -177,7 +186,7 @@
/// [headers] may be either a [Matcher] or a map to match an exact headers map.
void requestShouldSucceed(String urlPath, expectation, {String root, headers}) {
schedule(() {
- return http.get("${_serverUrl(root)}/$urlPath").then((response) {
+ return http.get(_getServerUrlSync(root, urlPath)).then((response) {
if (expectation != null) expect(response.body, expectation);
if (headers != null) expect(response.headers, headers);
});
@@ -190,7 +199,7 @@
/// [root] indicates which server should be accessed, and defaults to "web".
void requestShould404(String urlPath, {String root}) {
schedule(() {
- return http.get("${_serverUrl(root)}/$urlPath").then((response) {
+ return http.get(_getServerUrlSync(root, urlPath)).then((response) {
expect(response.statusCode, equals(404));
});
}, "request $urlPath");
@@ -205,7 +214,7 @@
void requestShouldRedirect(String urlPath, redirectTarget, {String root}) {
schedule(() {
var request = new http.Request("GET",
- Uri.parse("${_serverUrl(root)}/$urlPath"));
+ Uri.parse(_getServerUrlSync(root, urlPath)));
request.followRedirects = false;
return request.send().then((response) {
expect(response.statusCode ~/ 100, equals(3));
@@ -221,7 +230,7 @@
/// [root] indicates which server should be accessed, and defaults to "web".
void postShould405(String urlPath, {String root}) {
schedule(() {
- return http.post("${_serverUrl(root)}/$urlPath").then((response) {
+ return http.post(_getServerUrlSync(root, urlPath)).then((response) {
expect(response.statusCode, equals(405));
});
}, "request $urlPath");
@@ -256,24 +265,60 @@
}
/// Sends [request] (an arbitrary JSON object) to the running pub serve's web
-/// socket connection, waits for a reply, then verifies that the reply matches
-/// [expectation].
+/// socket connection, waits for a reply, then verifies that the reply is
+/// either equal to [replyEquals] or matches [replyMatches].
+///
+/// Only one of [replyEquals] or [replyMatches] may be provided.
+///
+/// [request] and [replyMatches] may contain futures, in which case this will
+/// wait until they've completed before matching.
///
/// If [encodeRequest] is `false`, then [request] will be sent as-is over the
/// socket. It omitted, request is JSON encoded to a string first.
-void webSocketShouldReply(request, expectation, {bool encodeRequest: true}) {
+void expectWebSocketCall(request, {Map replyEquals, replyMatches,
+ bool encodeRequest: true}) {
+ assert((replyEquals == null) != (replyMatches == null));
+
schedule(() => _ensureWebSocket().then((_) {
- if (encodeRequest) request = JSON.encode(request);
- _webSocket.add(request);
- return _webSocketBroadcastStream.first.then((value) {
- expect(JSON.decode(value), expectation);
+ var matcherFuture;
+ if (replyMatches != null) {
+ matcherFuture = new Future.value(replyMatches);
+ } else {
+ matcherFuture = awaitObject(replyEquals).then((reply) => equals(reply));
+ }
+
+ return matcherFuture.then((matcher) {
+ return awaitObject(request).then((completeRequest) {
+ if (encodeRequest) completeRequest = JSON.encode(completeRequest);
+ _webSocket.add(completeRequest);
+
+ return _webSocketBroadcastStream.first.then((value) {
+ expect(JSON.decode(value), matcher);
+ });
+ });
});
- }), "send $request to web socket and expect reply that $expectation");
+ }), "send $request to web socket and expect reply $replyEquals");
}
-/// Returns the URL for the server serving from [root].
-String _serverUrl([String root]) {
+/// Returns a [Future] that completes to a URL string for the server serving
+/// [path] from [root].
+///
+/// If [root] is omitted, defaults to "web". If [path] is omitted, no path is
+/// included. The Future will complete once the server is up and running and
+/// the bound ports are known.
+Future<String> getServerUrl([String root, String path]) =>
+ _portsCompleter.future.then((_) => _getServerUrlSync(root, path));
+
+/// Returns a URL string for the server serving [path] from [root].
+///
+/// If [root] is omitted, defaults to "web". If [path] is omitted, no path is
+/// included. Unlike [getServerUrl], this should only be called after the ports
+/// are known.
+String _getServerUrlSync([String root, String path]) {
if (root == null) root = 'web';
expect(_ports, contains(root));
- return "http://127.0.0.1:${_ports[root]}";
-}
\ No newline at end of file
+ var url = "http://127.0.0.1:${_ports[root]}";
+ if (path != null) url = "$url/$path";
+ return url;
+}
+
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_errors_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_errors_test.dart
new file mode 100644
index 0000000..f438c78
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_errors_test.dart
@@ -0,0 +1,109 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ // TODO(rnystrom): Split into independent tests.
+ initConfig();
+ integration("assetIdToUrls errors on bad inputs", () {
+ d.dir(appPath, [
+ d.appPubspec(),
+ d.file("top-level.txt", "top-level"),
+ d.dir("asset", [
+ d.file("foo.txt", "foo"),
+ ]),
+ d.dir("bin", [
+ d.file("foo.txt", "foo"),
+ ]),
+ d.dir("lib", [
+ d.file("myapp.dart", "myapp"),
+ ])
+ ]).create();
+
+ pubServe();
+
+ // Bad arguments.
+ expectWebSocketCall({
+ "command": "assetIdToUrls"
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": 'Missing "path" argument.'
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": 123
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": '"path" must be a string. Got 123.'
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "/absolute.txt"
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": '"path" must be a relative path. Got "/absolute.txt".'
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "a/../../bad.txt"
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error":
+ '"path" cannot reach out of its containing directory. '
+ 'Got "a/../../bad.txt".'
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "main.dart",
+ "line": 12.34
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": '"line" must be an integer. Got 12.34.'
+ });
+
+ // Unserved directories.
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "bin/foo.txt"
+ }, replyEquals: {
+ "code": "NOT_SERVED",
+ "error": 'Asset path "bin/foo.txt" is not currently being served.'
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "lib/myapp.dart"
+ }, replyEquals: {
+ "code": "NOT_SERVED",
+ "error": 'Asset path "lib/myapp.dart" is not currently being served.'
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "asset/myapp.dart"
+ }, replyEquals: {
+ "code": "NOT_SERVED",
+ "error": 'Asset path "asset/myapp.dart" is not currently being served.'
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "nope/foo.txt"
+ }, replyEquals: {
+ "code": "NOT_SERVED",
+ "error": 'Asset path "nope/foo.txt" is not currently being served.'
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_multiple_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_multiple_test.dart
new file mode 100644
index 0000000..c5e35df
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_multiple_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:path/path.dart' as path;
+import 'package:scheduled_test/scheduled_test.dart';
+
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ // TODO(rnystrom): Split into independent tests.
+ initConfig();
+ integration("assetIdToUrls returns multiple urls if servers overlap", () {
+ d.dir(appPath, [
+ d.appPubspec(),
+ d.dir("test", [
+ d.file("index.html", "<body>")
+ ]),
+ d.dir("web", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ])
+ ]).create();
+
+ pubServe(args: ["web", path.join("web", "sub"), "test"]);
+
+ schedule(() {
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "web/index.html"
+ }, replyEquals: {
+ "urls": [
+ getServerUrl("web", "index.html")
+ ]
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "web/sub/bar.html"
+ }, replyEquals: {
+ "urls": [
+ getServerUrl("web", "sub/bar.html"),
+ getServerUrl(path.join("web", "sub"), "bar.html")
+ ]
+ });
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_root_directory_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_root_directory_test.dart
new file mode 100644
index 0000000..4913344
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_root_directory_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:path/path.dart' as path;
+import 'package:scheduled_test/scheduled_test.dart';
+
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ // TODO(rnystrom): Split into independent tests.
+ initConfig();
+ integration("assetIdToUrls handles files in the top-level directory", () {
+ d.dir(appPath, [
+ d.appPubspec(),
+ d.file("top.txt", "top"),
+ d.dir("web", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ])
+ ]).create();
+
+ pubServe(args: [".", "web", path.join("web", "sub")]);
+
+ schedule(() {
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "top.txt"
+ }, replyEquals: {
+ "urls": [
+ getServerUrl(".", "top.txt")
+ ]
+ });
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "web/sub/bar.html"
+ }, replyEquals: {
+ "urls": [
+ getServerUrl("web", "sub/bar.html"),
+ getServerUrl(".", "web/sub/bar.html"),
+ getServerUrl(path.join("web", "sub"), "bar.html")
+ ]
+ });
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_test.dart
new file mode 100644
index 0000000..6b02fb0
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_test.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ // TODO(rnystrom): Split into independent tests.
+ initConfig();
+ integration("assetIdToUrls converts asset ids to matching URL paths", () {
+ d.dir(appPath, [
+ d.appPubspec(),
+ d.dir("test", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ]),
+ d.dir("web", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ]),
+ d.dir("randomdir", [
+ d.file("index.html", "<body>")
+ ])
+ ]).create();
+
+ pubServe(args: ["test", "web", "randomdir"]);
+
+ schedule(() {
+ // Paths in web/.
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "web/index.html"
+ }, replyEquals: {"urls": [getServerUrl("web", "index.html")]});
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "web/sub/bar.html"
+ }, replyEquals: {"urls": [getServerUrl("web", "sub/bar.html")]});
+
+ // Paths in test/.
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "test/index.html"
+ }, replyEquals: {"urls": [getServerUrl("test", "index.html")]});
+
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "test/sub/bar.html"
+ }, replyEquals: {"urls": [getServerUrl("test", "sub/bar.html")]});
+
+ // A non-default directory.
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "randomdir/index.html"
+ }, replyEquals: {"urls": [getServerUrl("randomdir", "index.html")]});
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_with_line_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_with_line_test.dart
new file mode 100644
index 0000000..12bc06f
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_with_line_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ initConfig();
+ integration("assetIdToUrls provides output line if given source", () {
+ d.dir(appPath, [
+ d.appPubspec(),
+ d.dir("web", [
+ d.file("main.dart", "main"),
+ ])
+ ]).create();
+
+ pubServe();
+
+ schedule(() {
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "web/main.dart",
+ "line": 12345
+ }, replyEquals: {
+ "urls": [getServerUrl("web", "main.dart")],
+ "line": 12345
+ });
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/bad_commands_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/bad_commands_test.dart
new file mode 100644
index 0000000..c32e74d
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/bad_commands_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ // TODO(rnystrom): Split into independent tests.
+ initConfig();
+ integration("handles bad commands", () {
+ d.dir(appPath, [
+ d.appPubspec()
+ ]).create();
+
+ pubServe();
+
+ expectWebSocketCall("not even valid json", replyMatches: allOf([
+ containsPair("code", "BAD_COMMAND"),
+ containsPair("error",
+ startsWith('"not even valid json" is not valid JSON:'))
+ ]), encodeRequest: false);
+
+ expectWebSocketCall({"command": "wat"}, replyEquals: {
+ "code": "BAD_COMMAND",
+ "error": 'Unknown command "wat".'
+ });
+
+ expectWebSocketCall(["not", "a", "map"], replyEquals: {
+ "code": "BAD_COMMAND",
+ "error": 'Command must be a JSON map. Got ["not","a","map"].'
+ });
+
+ expectWebSocketCall({"wat": "there's no command"}, replyEquals: {
+ "code": "BAD_COMMAND",
+ "error": 'Missing command name. Got {"wat":"there\'s no command"}.'
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/converts_asset_ids_to_urls_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/converts_asset_ids_to_urls_test.dart
deleted file mode 100644
index bd2f0e1..0000000
--- a/sdk/lib/_internal/pub/test/serve/web_socket/converts_asset_ids_to_urls_test.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library pub_tests;
-
-import 'package:scheduled_test/scheduled_test.dart';
-import '../../descriptor.dart' as d;
-import '../../test_pub.dart';
-import '../utils.dart';
-
-main() {
- initConfig();
- integration("converts asset ids to matching URL paths", () {
- d.dir("foo", [
- d.libPubspec("foo", "0.0.1"),
- d.dir("asset", [
- d.file("foo.txt", "foo"),
- d.dir("sub", [
- d.file("bar.txt", "bar"),
- ])
- ]),
- d.dir("lib", [
- d.file("foo.dart", "foo")
- ])
- ]).create();
-
- d.dir(appPath, [
- d.appPubspec({
- "foo": {"path": "../foo"}
- }),
- d.dir("lib", [
- d.file("myapp.dart", "myapp"),
- ]),
- d.dir("web", [
- d.file("index.html", "<body>"),
- d.dir("sub", [
- d.file("bar.html", "bar"),
- ])
- ])
- ]).create();
-
- pubServe(shouldGetFirst: true);
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "myapp", "path": "web/sub/bar.html"
- }, equals({"path": "/sub/bar.html"}));
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "myapp", "path": "lib/myapp.dart"
- }, equals({"path": "/packages/myapp/myapp.dart"}));
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "myapp", "path": "web/index.html"
- }, equals({"path": "/index.html"}));
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "foo",
- "path": "lib/foo.dart"
- }, equals({"path": "/packages/foo/foo.dart"}));
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "foo",
- "path": "asset/foo.txt"
- }, equals({"path": "/assets/foo/foo.txt"}));
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "foo",
- "path": "asset/sub/bar.txt"
- }, equals({"path": "/assets/foo/sub/bar.txt"}));
-
- endPubServe();
- });
-}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/converts_urls_to_asset_ids_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/converts_urls_to_asset_ids_test.dart
deleted file mode 100644
index 2f9c205..0000000
--- a/sdk/lib/_internal/pub/test/serve/web_socket/converts_urls_to_asset_ids_test.dart
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library pub_tests;
-
-import 'package:scheduled_test/scheduled_test.dart';
-import '../../descriptor.dart' as d;
-import '../../test_pub.dart';
-import '../utils.dart';
-
-main() {
- initConfig();
- integration("converts URLs to matching asset ids", () {
- d.dir("foo", [
- d.libPubspec("foo", "0.0.1"),
- d.dir("asset", [
- d.file("foo.txt", "foo"),
- d.dir("sub", [
- d.file("bar.txt", "bar"),
- ])
- ]),
- d.dir("lib", [
- d.file("foo.dart", "foo")
- ])
- ]).create();
-
- d.dir(appPath, [
- d.appPubspec({
- "foo": {"path": "../foo"}
- }),
- d.dir("lib", [
- d.file("myapp.dart", "myapp"),
- ]),
- d.dir("web", [
- d.file("index.html", "<body>"),
- d.dir("sub", [
- d.file("bar.html", "bar"),
- ])
- ])
- ]).create();
-
- pubServe(shouldGetFirst: true);
-
- webSocketShouldReply(
- {"command": "urlToAsset", "path": "sub/bar.html"},
- equals({"package": "myapp", "path": "web/sub/bar.html"}));
-
- webSocketShouldReply(
- {"command": "urlToAsset", "path": "packages/myapp/myapp.dart"},
- equals({"package": "myapp", "path": "lib/myapp.dart"}));
-
- webSocketShouldReply(
- {"command": "urlToAsset", "path": "index.html"},
- equals({"package": "myapp", "path": "web/index.html"}));
-
- webSocketShouldReply(
- {"command": "urlToAsset", "path": "packages/foo/foo.dart"},
- equals({"package": "foo", "path": "lib/foo.dart"}));
-
- webSocketShouldReply(
- {"command": "urlToAsset", "path": "assets/foo/foo.txt"},
- equals({"package": "foo", "path": "asset/foo.txt"}));
-
- webSocketShouldReply(
- {"command": "urlToAsset", "path": "assets/foo/sub/bar.txt"},
- equals({"package": "foo", "path": "asset/sub/bar.txt"}));
-
- endPubServe();
- });
-}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/responds_with_id_if_given_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/responds_with_id_if_given_test.dart
new file mode 100644
index 0000000..2061748
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/responds_with_id_if_given_test.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ initConfig();
+ integration("includes id in response if given with command", () {
+ d.dir(appPath, [
+ d.appPubspec(),
+ d.dir("test", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ]),
+ d.dir("web", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ]),
+ d.dir("randomdir", [
+ d.file("index.html", "<body>")
+ ])
+ ]).create();
+
+ pubServe(args: ["test", "web", "randomdir"]);
+
+ schedule(() {
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "id": "some id",
+ "path": "web/index.html"
+ }, replyMatches: containsPair("id", "some id"));
+
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "id": 12345,
+ "url": getServerUrl("web", "index.html")
+ }, replyMatches: containsPair("id", 12345));
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart
deleted file mode 100644
index 7bae48e..0000000
--- a/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library pub_tests;
-
-import 'package:scheduled_test/scheduled_test.dart';
-import '../../descriptor.dart' as d;
-import '../../test_pub.dart';
-import '../utils.dart';
-
-main() {
- initConfig();
- integration("handles bad commands", () {
- d.dir(appPath, [
- d.appPubspec()
- ]).create();
-
- pubServe();
-
- webSocketShouldReply(
- "not even valid json",
- equals({"error": '"not even valid json" is not valid JSON: '
- 'Unexpected character at 0: \'not even valid json\''}),
- encodeRequest: false);
-
- webSocketShouldReply(
- {"command": "wat"},
- equals({"error": 'Unknown command "wat".'}));
-
- webSocketShouldReply(
- ["not", "a", "map"],
- equals({"error": 'Command must be a JSON map. '
- 'Got: ["not","a","map"].'}));
-
- webSocketShouldReply(
- {"wat": "there's no command"},
- equals({"error": 'Missing command name. '
- 'Got: {"wat":"there\'s no command"}.'}));
-
- webSocketShouldReply(
- {"command": "urlToAsset", "path": 123},
- equals({"error": '"path" must be a string. Got: 123.'}));
-
- webSocketShouldReply(
- {"command": "assetToUrl", "package": 123, "path": "index.html"},
- equals({"error": '"package" must be a string. Got: 123.'}));
-
- webSocketShouldReply(
- {"command": "assetToUrl", "package": "foo", "path": 123},
- equals({"error": '"path" must be a string. Got: 123.'}));
-
- endPubServe();
- });
-}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_invalid_assets_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_invalid_assets_test.dart
deleted file mode 100644
index 3434f63..0000000
--- a/sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_invalid_assets_test.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library pub_tests;
-
-import 'package:scheduled_test/scheduled_test.dart';
-import '../../descriptor.dart' as d;
-import '../../test_pub.dart';
-import '../utils.dart';
-
-main() {
- initConfig();
- integration("returns errors on invalid assets", () {
- d.dir("foo", [
- d.libPubspec("foo", "0.0.1"),
- d.dir("asset", [
- d.file("foo.txt", "foo"),
- d.dir("sub", [
- d.file("bar.txt", "bar"),
- ])
- ]),
- d.dir("lib", [
- d.file("foo.dart", "foo")
- ])
- ]).create();
-
- d.dir(appPath, [
- d.appPubspec({
- "foo": {"path": "../foo"}
- }),
- d.dir("lib", [
- d.file("myapp.dart", "myapp"),
- ]),
- d.dir("web", [
- d.file("index.html", "<body>"),
- d.dir("sub", [
- d.file("bar.html", "bar"),
- ])
- ])
- ]).create();
-
- pubServe(shouldGetFirst: true);
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "myapp", "path": "top.txt"
- }, equals({"error": "Can not serve assets from top-level directory."}));
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "foo", "path": "web/foo.dart"
- }, equals({
- "error": 'Cannot access "web" directory of non-root packages.'
- }));
-
- webSocketShouldReply({
- "command": "assetToUrl",
- "package": "myapp", "path": "blah/index.html"
- }, equals({"error": 'Cannot access assets from "blah".'}));
-
- endPubServe();
- });
-}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_errors_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_errors_test.dart
new file mode 100644
index 0000000..b9ad2e4
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_errors_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ // TODO(rnystrom): Split into independent tests.
+ initConfig();
+ integration("urlToAssetId errors on bad inputs", () {
+ d.dir(appPath, [
+ d.appPubspec()
+ ]).create();
+
+ pubServe();
+
+ // Bad arguments.
+ expectWebSocketCall({
+ "command": "urlToAssetId"
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": 'Missing "url" argument.'
+ });
+
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": 123
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": '"url" must be a string. Got 123.'
+ });
+
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": "http://localhost:notnum/"
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": '"http://localhost:notnum/" is not a valid URL.'
+ });
+
+ // Unknown domain.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": "http://example.com:80/index.html"
+ }, replyEquals: {
+ "code": "NOT_SERVED",
+ "error": '"example.com:80" is not being served by pub.'
+ });
+
+ // Unknown port.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": "http://localhost:80/index.html"
+ }, replyEquals: {
+ "code": "NOT_SERVED",
+ "error": '"localhost:80" is not being served by pub.'
+ });
+
+ schedule(() {
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "index.html"),
+ "line": 12.34
+ }, replyEquals: {
+ "code": "BAD_ARGUMENT",
+ "error": '"line" must be an integer. Got 12.34.'
+ });
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_test.dart
new file mode 100644
index 0000000..a38f00e
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_test.dart
@@ -0,0 +1,101 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ // TODO(rnystrom): Split into independent tests.
+ initConfig();
+ integration("converts URLs to matching asset ids", () {
+ d.dir("foo", [
+ d.libPubspec("foo", "0.0.1"),
+ d.dir("asset", [
+ d.file("foo.txt", "foo"),
+ d.dir("sub", [
+ d.file("bar.txt", "bar"),
+ ])
+ ]),
+ d.dir("lib", [
+ d.file("foo.dart", "foo")
+ ])
+ ]).create();
+
+ d.dir(appPath, [
+ d.appPubspec({
+ "foo": {"path": "../foo"}
+ }),
+ d.dir("lib", [
+ d.file("myapp.dart", "myapp"),
+ ]),
+ d.dir("test", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ]),
+ d.dir("web", [
+ d.file("index.html", "<body>"),
+ d.dir("sub", [
+ d.file("bar.html", "bar"),
+ ])
+ ])
+ ]).create();
+
+ pubServe(shouldGetFirst: true);
+
+ schedule(() {
+ // Paths in web/.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "sub/bar.html")
+ }, replyEquals: {"package": "myapp", "path": "web/sub/bar.html"});
+
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "index.html")
+ }, replyEquals: {"package": "myapp", "path": "web/index.html"});
+
+ // Paths in test/.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("test", "sub/bar.html")
+ }, replyEquals: {"package": "myapp", "path": "test/sub/bar.html"});
+
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("test", "index.html")
+ }, replyEquals: {"package": "myapp", "path": "test/index.html"});
+
+ // Path in root package's lib/.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "packages/myapp/myapp.dart")
+ }, replyEquals: {"package": "myapp", "path": "lib/myapp.dart"});
+
+ // Path in lib/.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "packages/foo/foo.dart")
+ }, replyEquals: {"package": "foo", "path": "lib/foo.dart"});
+
+ // Paths in asset/.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "assets/foo/foo.txt")
+ }, replyEquals: {"package": "foo", "path": "asset/foo.txt"});
+
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "assets/foo/sub/bar.txt")
+ }, replyEquals: {"package": "foo", "path": "asset/sub/bar.txt"});
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_with_line_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_with_line_test.dart
new file mode 100644
index 0000000..de9ea5c
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_with_line_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ initConfig();
+ integration("provides output line number if given source one", () {
+ d.dir(appPath, [
+ d.appPubspec(),
+ d.dir("web", [
+ d.file("main.dart", "main")
+ ])
+ ]).create();
+
+ pubServe();
+
+ schedule(() {
+ // Paths in web/.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "main.dart"),
+ "line": 12345
+ }, replyEquals: {
+ "package": "myapp",
+ "path": "web/main.dart",
+ "line": 12345
+ });
+ });
+
+ endPubServe();
+ });
+}
diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart
index 0dcbb49..ac4bbb8 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -864,7 +864,7 @@
}
Description describe(Description description) {
- description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]);
+ return description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]);
}
}
diff --git a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_compile_until_its_output_is_requested_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_compile_until_its_output_is_requested_test.dart
index e25a368..ba124f4 100644
--- a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_compile_until_its_output_is_requested_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_compile_until_its_output_is_requested_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import '../../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_command_line_options_type_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_command_line_options_type_test.dart
index d8e56aa..833e961 100644
--- a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_command_line_options_type_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_command_line_options_type_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import '../../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_environment_type_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_environment_type_test.dart
index 586c290..c79af33 100644
--- a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_environment_type_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_environment_type_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import '../../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_option_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_option_test.dart
index a29489e..2c3afa2 100644
--- a/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_option_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/dart2js/does_not_support_invalid_option_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import '../../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/dart2js/doesnt_support_invalid_type_for_boolean_option_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/doesnt_support_invalid_type_for_boolean_option_test.dart
index c9bd7bc..71aabca 100644
--- a/sdk/lib/_internal/pub/test/transformer/dart2js/doesnt_support_invalid_type_for_boolean_option_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/dart2js/doesnt_support_invalid_type_for_boolean_option_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import '../../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/detects_a_transformer_cycle_test.dart b/sdk/lib/_internal/pub/test/transformer/detects_a_transformer_cycle_test.dart
index 5b89cf8..9916f81 100644
--- a/sdk/lib/_internal/pub/test/transformer/detects_a_transformer_cycle_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/detects_a_transformer_cycle_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../descriptor.dart' as d;
import '../test_pub.dart';
import '../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/detects_an_ordering_dependency_cycle_test.dart b/sdk/lib/_internal/pub/test/transformer/detects_an_ordering_dependency_cycle_test.dart
index 0a3f056..15d8382 100644
--- a/sdk/lib/_internal/pub/test/transformer/detects_an_ordering_dependency_cycle_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/detects_an_ordering_dependency_cycle_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../descriptor.dart' as d;
import '../test_pub.dart';
import '../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/exclusion/works_on_transformer_group_test.dart b/sdk/lib/_internal/pub/test/transformer/exclusion/works_on_transformer_group_test.dart
index d4164bd..d18fd56 100644
--- a/sdk/lib/_internal/pub/test/transformer/exclusion/works_on_transformer_group_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/exclusion/works_on_transformer_group_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import '../../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_non_existent_transform_test.dart b/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_non_existent_transform_test.dart
index 44dd846..e78b8ba 100644
--- a/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_non_existent_transform_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_non_existent_transform_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../descriptor.dart' as d;
import '../test_pub.dart';
import '../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart b/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart
index 0b00b03..2e44077 100644
--- a/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../descriptor.dart' as d;
import '../test_pub.dart';
import '../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/prints_a_transform_error_in_apply_test.dart b/sdk/lib/_internal/pub/test/transformer/prints_a_transform_error_in_apply_test.dart
index 0222067..319d0c3 100644
--- a/sdk/lib/_internal/pub/test/transformer/prints_a_transform_error_in_apply_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/prints_a_transform_error_in_apply_test.dart
@@ -4,8 +4,6 @@
library pub_tests;
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../descriptor.dart' as d;
import '../test_pub.dart';
import '../serve/utils.dart';
diff --git a/sdk/lib/_internal/pub/test/transformer/prints_a_transform_interface_error_test.dart b/sdk/lib/_internal/pub/test/transformer/prints_a_transform_interface_error_test.dart
index bdfa67f..e0cb517 100644
--- a/sdk/lib/_internal/pub/test/transformer/prints_a_transform_interface_error_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/prints_a_transform_interface_error_test.dart
@@ -8,8 +8,6 @@
import '../test_pub.dart';
import '../serve/utils.dart';
-import 'package:scheduled_test/scheduled_test.dart';
-
final transformer = """
import 'dart:async';
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 8b380e2..499386c 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -289,7 +289,7 @@
Stream asyncMap(convert(T event)) {
StreamController controller;
StreamSubscription subscription;
- controller = new StreamController(sync: true,
+ controller = new StreamController(
onListen: () {
var add = controller.add;
var addError = controller.addError;
@@ -316,7 +316,8 @@
},
onPause: () { subscription.pause(); },
onResume: () { subscription.resume(); },
- onCancel: () { subscription.cancel(); }
+ onCancel: () { subscription.cancel(); },
+ sync: true
);
return controller.stream;
}
@@ -335,7 +336,7 @@
Stream asyncExpand(Stream convert(T event)) {
StreamController controller;
StreamSubscription subscription;
- controller = new StreamController(sync: true,
+ controller = new StreamController(
onListen: () {
subscription = this.listen(
(T event) {
@@ -358,7 +359,8 @@
},
onPause: () { subscription.pause(); },
onResume: () { subscription.resume(); },
- onCancel: () { subscription.cancel(); }
+ onCancel: () { subscription.cancel(); },
+ sync: true
);
return controller.stream;
}
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
index 2b26b6d..7787a1f 100644
--- a/sdk/lib/core/uri.dart
+++ b/sdk/lib/core/uri.dart
@@ -1140,10 +1140,6 @@
throw new UnsupportedError(
"Cannot extract a file path from a $scheme URI");
}
- if (scheme != "" && scheme != "file") {
- throw new UnsupportedError(
- "Cannot extract a file path from a $scheme URI");
- }
if (query != "") {
throw new UnsupportedError(
"Cannot extract a file path from a URI with a query component");
diff --git a/sdk/lib/internal/symbol.dart b/sdk/lib/internal/symbol.dart
index 338b06b..21d976b 100644
--- a/sdk/lib/internal/symbol.dart
+++ b/sdk/lib/internal/symbol.dart
@@ -15,20 +15,44 @@
class Symbol implements core.Symbol {
final String _name;
- // Reserved words are not allowed as identifiers.
+ /**
+ * Source of RegExp matching Dart reserved words.
+ *
+ * Reserved words are not allowed as identifiers.
+ */
static const String reservedWordRE =
r'(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|'
r'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|'
r'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|'
r'v(?:ar|oid)|w(?:hile|ith))';
- // Mathces a public identifier (identifier not starting with '_').
+ /**
+ * Source of RegExp matching any public identifier.
+ *
+ * A public identifier is a valid identifier (not a reserved word)
+ * that doesn't start with '_'.
+ */
static const String publicIdentifierRE =
r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$][\w$]*';
- // Matches the names of declarable operators.
+ /**
+ * Source of RegExp matching any identifier.
+ *
+ * It matches identifiers but not reserved words. The identifiers
+ * may start with '_'.
+ */
+ static const String identifierRE =
+ r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$_][\w$]*';
+ /**
+ * Source of RegExp matching a declarable operator names.
+ *
+ * The operators that can be declared using `operator` declarations are
+ * also the only ones allowed as symbols. The name of the oeprators is
+ * the same as the operator itself except for unary minus, where the name
+ * is "unary-".
+ */
static const String operatorRE =
r'(?:[\-+*/%&|^]|\[\]=?|==|~/?|<[<=]?|>[>=]?|unary-)';
- // Grammar:
+ // Grammar if symbols:
// symbol ::= qualifiedName | <empty>
// qualifiedName ::= publicIdentifier '.' qualifiedName | name
// name ::= publicIdentifier
@@ -50,10 +74,30 @@
// \------------/
//
- // Validates non-empty symbol (empty symbol is handled before using this).
- static final RegExp validationPattern = new RegExp(
+ /**
+ * RegExp that validates a non-empty non-private symbol.
+ *
+ * The empty symbol is handled before this regexp is used, and is not
+ * accepted.
+ */
+ static final RegExp publicSymbolPattern = new RegExp(
'^(?:$operatorRE\$|$publicIdentifierRE(?:=?\$|[.](?!\$)))+?\$');
+ // The grammar of symbols that may be private is the same as for public
+ // symbols, except that "publicIdentifier" is replaced by "identifier",
+ // which matches any identifier.
+
+ /**
+ * RegExp that validates a non-empty symbol.
+ *
+ * Private symbols are accepted.
+ *
+ * The empty symbol is handled before this regexp is used, and is not
+ * accepted.
+ */
+ static final RegExp symbolPattern = new RegExp(
+ '^(?:$operatorRE\$|$identifierRE(?:=?\$|[.](?!\$)))+?\$');
+
external const Symbol(String name);
/**
@@ -64,7 +108,7 @@
// This is called by dart2js.
Symbol.validated(String name)
- : this._name = validate(name);
+ : this._name = validatePublicSymbol(name);
bool operator ==(other) => other is Symbol && _name == other._name;
@@ -78,8 +122,8 @@
/// Platform-private accessor which cannot be called from user libraries.
static String getName(Symbol symbol) => symbol._name;
- static String validate(String name) {
- if (name.isEmpty || validationPattern.hasMatch(name)) return name;
+ static String validatePublicSymbol(String name) {
+ if (name.isEmpty || publicSymbolPattern.hasMatch(name)) return name;
if (name.startsWith('_')) {
// There may be other private parts in a qualified name than the first
// one, but this is a common case that deserves a specific error
@@ -89,4 +133,13 @@
throw new ArgumentError(
'"$name" is not a valid (qualified) symbol name');
}
+
+ /**
+ * Checks whether name is a valid symbol name.
+ *
+ * This test allows both private and non-private symbols.
+ */
+ static bool isValidSymbol(String name) {
+ return (name.isEmpty || symbolPattern.hasMatch(name));
+ }
}
diff --git a/sdk/lib/io/data_transformer.dart b/sdk/lib/io/data_transformer.dart
index dec5c5d..9bb5071 100644
--- a/sdk/lib/io/data_transformer.dart
+++ b/sdk/lib/io/data_transformer.dart
@@ -4,12 +4,60 @@
part of dart.io;
+/**
+ * Exposes ZLib options for input parameters.
+ *
+ * See http://www.zlib.net/manual.html for more documentation.
+ */
+abstract class ZLibOption {
+ /// Minimal value for [ZLibCodec.windowBits], [ZLibEncoder.windowBits]
+ /// and [ZLibDecoder.windowBits].
+ static const int MIN_WINDOW_BITS = 8;
+ /// Maximal value for [ZLibCodec.windowBits], [ZLibEncoder.windowBits]
+ /// and [ZLibDecoder.windowBits].
+ static const int MAX_WINDOW_BITS = 15;
+ /// Default value for [ZLibCodec.windowBits], [ZLibEncoder.windowBits]
+ /// and [ZLibDecoder.windowBits].
+ static const int DEFAULT_WINDOW_BITS = 15;
+
+ /// Minimal value for [ZLibCodec.level], [ZLibEncoder.level]
+ /// and [ZLibDecoder.level].
+ static const int MIN_LEVEL = -1;
+ /// Maximal value for [ZLibCodec.level], [ZLibEncoder.level]
+ /// and [ZLibDecoder.level].
+ static const int MAX_LEVEL = 9;
+ /// Default value for [ZLibCodec.level], [ZLibEncoder.level]
+ /// and [ZLibDecoder.level].
+ static const int DEFAULT_LEVEL = 6;
+
+ /// Minimal value for [ZLibCodec.memLevel], [ZLibEncoder.memLevel]
+ /// and [ZLibDecoder.memLevel].
+ static const int MIN_MEM_LEVEL = 1;
+ /// Maximal value for [ZLibCodec.memLevel], [ZLibEncoder.memLevel]
+ /// and [ZLibDecoder.memLevel].
+ static const int MAX_MEM_LEVEL = 9;
+ /// Default value for [ZLibCodec.memLevel], [ZLibEncoder.memLevel]
+ /// and [ZLibDecoder.memLevel].
+ static const int DEFAULT_MEM_LEVEL = 8;
+
+
+ /// Recommended strategy for data produced by a filter (or predictor)
+ static const int STRATEGY_FILTERED = 1;
+ /// Use this strategy to force Huffman encoding only (no string match)
+ static const int STRATEGY_HUFFMAN_ONLY = 2;
+ /// Use this strategy to limit match distances to one (run-length encoding)
+ static const int STRATEGY_RLE = 3;
+ /// This strategy prevents the use of dynamic Huffman codes, allowing for a
+ /// simpler decoder
+ static const int STRATEGY_FIXED = 4;
+ /// Recommended strategy for normal data
+ static const int STRATEGY_DEFAULT = 0;
+}
/**
* An instance of the default implementation of the [ZLibCodec].
*/
-const ZLibCodec ZLIB = const ZLibCodec();
-
+const ZLibCodec ZLIB = const ZLibCodec._default();
/**
* The [ZLibCodec] encodes raw bytes to ZLib compressed bytes and decodes ZLib
@@ -17,35 +65,105 @@
*/
class ZLibCodec extends Codec<List<int>, List<int>> {
/**
- * The compression level of the [ZLibCodec].
+ * When true, `GZip` frames will be added to the compressed data.
+ */
+ final bool gzip;
+
+ /**
+ * The compression-[level] can be set in the range of `-1..9`, with `6` being
+ * the default compression level. Levels above `6` will have higher
+ * compression rates at the cost of more CPU and memory usage. Levels below
+ * `6` will use less CPU and memory at the cost of lower compression rates.
*/
final int level;
/**
- * Get a [Converter] for encoding to `ZLib` compressed data.
+ * Specifies how much memory should be allocated for the internal compression
+ * state. `1` uses minimum memory but is slow and reduces compression ratio;
+ * `9` uses maximum memory for optimal speed. The default value is `8`.
+ *
+ * The memory requirements for deflate are (in bytes):
+ *
+ * (1 << (windowBits + 2)) + (1 << (memLevel + 9))
+ * that is: 128K for windowBits = 15 + 128K for memLevel = 8 (default values)
+ */
+ final int memLevel;
+
+ /**
+ * Tunes the compression algorithm. Use the value STRATEGY_DEFAULT for normal
+ * data, STRATEGY_FILTERED for data produced by a filter (or predictor),
+ * STRATEGY_HUFFMAN_ONLY to force Huffman encoding only (no string match), or
+ * STRATEGY_RLE to limit match distances to one (run-length encoding).
+ */
+ final int strategy;
+
+ /**
+ * Base two logarithm of the window size (the size of the history buffer). It
+ * should be in the range 8..15. Larger values result in better compression at
+ * the expense of memory usage. The default value is 15
+ */
+ final int windowBits;
+
+ /**
+ * When true, deflate generates raw data with no zlib header or trailer, and
+ * will not compute an adler32 check value
+ */
+ final bool raw;
+
+ /**
+ * Initial compression dictionary.
+ *
+ * It should consist of strings (byte sequences) that are likely to be
+ * encountered later in the data to be compressed, with the most commonly used
+ * strings preferably put towards the end of the dictionary. Using a
+ * dictionary is most useful when the data to be compressed is short and can
+ * be predicted with good accuracy; the data can then be compressed better
+ * than with the default empty dictionary.
+ */
+ final List<int> dictionary;
+
+ ZLibCodec({this.level: ZLibOption.DEFAULT_LEVEL,
+ this.windowBits: ZLibOption.DEFAULT_WINDOW_BITS,
+ this.memLevel: ZLibOption.DEFAULT_MEM_LEVEL,
+ this.strategy: ZLibOption.STRATEGY_DEFAULT,
+ this.dictionary: null,
+ this.raw: false,
+ this.gzip: false}) {
+ _validateZLibeLevel(level);
+ _validateZLibMemLevel(memLevel);
+ _validateZLibStrategy(strategy);
+ _validateZLibWindowBits(windowBits);
+ }
+
+ const ZLibCodec._default()
+ : level = ZLibOption.DEFAULT_LEVEL,
+ windowBits = ZLibOption.DEFAULT_WINDOW_BITS,
+ memLevel = ZLibOption.DEFAULT_MEM_LEVEL,
+ strategy = ZLibOption.STRATEGY_DEFAULT,
+ raw = false,
+ gzip = false,
+ dictionary = null;
+
+ /**
+ * Get a [ZLibEncoder] for encoding to `ZLib` compressed data.
*/
Converter<List<int>, List<int>> get encoder =>
- new ZLibEncoder(gzip: false, level: level);
+ new ZLibEncoder(gzip: false, level: level, windowBits: windowBits,
+ memLevel: memLevel, strategy: strategy,
+ dictionary: dictionary, raw: raw);
/**
- * Get a [Converter] for decoding `ZLib` compressed data.
+ * Get a [ZLibDecoder] for decoding `ZLib` compressed data.
*/
- Converter<List<int>, List<int>> get decoder => const ZLibDecoder();
-
- /**
- * The compression-[level] can be set in the range of `1..10`, with `6` being
- * the default compression level. Levels above 6 will have higher compression
- * rates at the cost of more CPU and memory usage. Levels below 6 will use
- * less CPU and memory, but at the cost of lower compression rates.
- */
- const ZLibCodec({this.level: 6});
+ Converter<List<int>, List<int>> get decoder =>
+ new ZLibDecoder(windowBits: windowBits, dictionary: dictionary, raw: raw);
}
/**
* An instance of the default implementation of the [GZipCodec].
*/
-const GZipCodec GZIP = const GZipCodec();
+const GZipCodec GZIP = const GZipCodec._default();
/**
@@ -57,62 +175,190 @@
*/
class GZipCodec extends Codec<List<int>, List<int>> {
/**
- * The compression level of the [ZLibCodec].
- */
- final int level;
-
- /**
- * Get a [Converter] for encoding to `GZip` compressed data.
- */
- Converter<List<int>, List<int>> get encoder =>
- new ZLibEncoder(gzip: true, level: level);
-
- /**
- * Get a [Converter] for decoding `GZip` compressed data.
- */
- Converter<List<int>, List<int>> get decoder => const ZLibDecoder();
-
- /**
- * The compression-[level] can be set in the range of `1..10`, with `6` being
- * the default compression level. Levels above 6 will have higher compression
- * rates at the cost of more CPU and memory usage. Levels below 6 will use
- * less CPU and memory, but at the cost of lower compression rates.
- */
- const GZipCodec({this.level: 6});
-}
-
-
-/**
- * The [ZLibEncoder] is the encoder used by [ZLibCodec] and [GZipCodec] to
- * compress data.
- */
-class ZLibEncoder extends Converter<List<int>, List<int>> {
- /**
- * If [gzip] is true, `GZip` frames will be added to the compressed data.
+ * When true, `GZip` frames will be added to the compressed data.
*/
final bool gzip;
/**
- * The compression level used by the encoder.
+ * The compression-[level] can be set in the range of `-1..9`, with `6` being
+ * the default compression level. Levels above `6` will have higher
+ * compression rates at the cost of more CPU and memory usage. Levels below
+ * `6` will use less CPU and memory at the cost of lower compression rates.
*/
final int level;
/**
- * Create a new [ZLibEncoder] converter. If the [gzip] flag is set, the
- * encoder will wrap the encoded ZLib data in GZip frames.
+ * Specifies how much memory should be allocated for the internal compression
+ * state. `1` uses minimum memory but is slow and reduces compression ratio;
+ * `9` uses maximum memory for optimal speed. The default value is `8`.
+ *
+ * The memory requirements for deflate are (in bytes):
+ *
+ * (1 << (windowBits + 2)) + (1 << (memLevel + 9))
+ * that is: 128K for windowBits = 15 + 128K for memLevel = 8 (default values)
*/
- const ZLibEncoder({this.gzip: false, this.level: 6});
+ final int memLevel;
+
+ /**
+ * Tunes the compression algorithm. Use the value
+ * [ZlibConstant.STRATEGY_DEFAULT] for normal data,
+ * [ZlibConstant.STRATEGY_FILTERED] for data produced by a filter
+ * (or predictor),
+ * [ZlibConstant.STRATEGY_HUFFMAN_ONLY] to force Huffman encoding only (no
+ * string match), or [ZlibConstant.STRATEGY_RLE] to limit match distances to
+ * one (run-length encoding).
+ */
+ final int strategy;
+
+ /**
+ * Base two logarithm of the window size (the size of the history buffer). It
+ * should be in the range 8..15. Larger values result in better compression at
+ * the expense of memory usage. The default value is 15
+ */
+ final int windowBits;
+
+ /**
+ * Initial compression dictionary.
+ *
+ * It should consist of strings (byte sequences) that are likely to be
+ * encountered later in the data to be compressed, with the most commonly used
+ * strings preferably put towards the end of the dictionary. Using a
+ * dictionary is most useful when the data to be compressed is short and can
+ * be predicted with good accuracy; the data can then be compressed better
+ * than with the default empty dictionary.
+ */
+ final List<int> dictionary;
+
+ /**
+ * When true, deflate generates raw data with no zlib header or trailer, and
+ * will not compute an adler32 check value
+ */
+ final bool raw;
+
+ GZipCodec({this.level: ZLibOption.DEFAULT_LEVEL,
+ this.windowBits: ZLibOption.DEFAULT_WINDOW_BITS,
+ this.memLevel: ZLibOption.DEFAULT_MEM_LEVEL,
+ this.strategy: ZLibOption.STRATEGY_DEFAULT,
+ this.dictionary: null,
+ this.raw: false,
+ this.gzip: true}) {
+ _validateZLibeLevel(level);
+ _validateZLibMemLevel(memLevel);
+ _validateZLibStrategy(strategy);
+ _validateZLibWindowBits(windowBits);
+ }
+
+ const GZipCodec._default()
+ : level = ZLibOption.DEFAULT_LEVEL,
+ windowBits = ZLibOption.DEFAULT_WINDOW_BITS,
+ memLevel = ZLibOption.DEFAULT_MEM_LEVEL,
+ strategy = ZLibOption.STRATEGY_DEFAULT,
+ raw = false,
+ gzip = true,
+ dictionary = null;
+
+ /**
+ * Get a [ZLibEncoder] for encoding to `GZip` compressed data.
+ */
+ Converter<List<int>, List<int>> get encoder =>
+ new ZLibEncoder(gzip: true, level: level, windowBits: windowBits,
+ memLevel: memLevel, strategy: strategy,
+ dictionary: dictionary, raw: raw);
+
+ /**
+ * Get a [ZLibDecoder] for decoding `GZip` compressed data.
+ */
+ Converter<List<int>, List<int>> get decoder =>
+ new ZLibDecoder(windowBits: windowBits, dictionary: dictionary, raw: raw);
+}
+
+/**
+ * The [ZLibEncoder] encoder is used by [ZLibCodec] and [GZipCodec] to compress
+ * data.
+ */
+class ZLibEncoder extends Converter<List<int>, List<int>> {
+ /**
+ * When true, `GZip` frames will be added to the compressed data.
+ */
+ final bool gzip;
+
+ /**
+ * The compression-[level] can be set in the range of `-1..9`, with `6` being
+ * the default compression level. Levels above `6` will have higher
+ * compression rates at the cost of more CPU and memory usage. Levels below
+ * `6` will use less CPU and memory at the cost of lower compression rates.
+ */
+ final int level;
+
+ /**
+ * Specifies how much memory should be allocated for the internal compression
+ * state. `1` uses minimum memory but is slow and reduces compression ratio;
+ * `9` uses maximum memory for optimal speed. The default value is `8`.
+ *
+ * The memory requirements for deflate are (in bytes):
+ *
+ * (1 << (windowBits + 2)) + (1 << (memLevel + 9))
+ * that is: 128K for windowBits = 15 + 128K for memLevel = 8 (default values)
+ */
+ final int memLevel;
+
+ /**
+ * Tunes the compression algorithm. Use the value
+ * [ZlibConstant.STRATEGY_DEFAULT] for normal data,
+ * [ZlibConstant.STRATEGY_FILTERED] for data produced by a filter
+ * (or predictor),
+ * [ZlibConstant.STRATEGY_HUFFMAN_ONLY] to force Huffman encoding only (no
+ * string match), or [ZlibConstant.STRATEGY_RLE] to limit match distances to
+ * one (run-length encoding).
+ */
+ final int strategy;
+
+ /**
+ * Base two logarithm of the window size (the size of the history buffer). It
+ * should be in the range 8..15. Larger values result in better compression at
+ * the expense of memory usage. The default value is 15
+ */
+ final int windowBits;
+
+ /**
+ * Initial compression dictionary.
+ *
+ * It should consist of strings (byte sequences) that are likely to be
+ * encountered later in the data to be compressed, with the most commonly used
+ * strings preferably put towards the end of the dictionary. Using a
+ * dictionary is most useful when the data to be compressed is short and can
+ * be predicted with good accuracy; the data can then be compressed better
+ * than with the default empty dictionary.
+ */
+ final List<int> dictionary;
/**
- * Convert a list of bytes using the options given to the [ZLibEncoder]
+ * When true, deflate generates raw data with no zlib header or trailer, and
+ * will not compute an adler32 check value
+ */
+ final bool raw;
+
+ ZLibEncoder({this.gzip: false,
+ this.level: ZLibOption.DEFAULT_LEVEL,
+ this.windowBits: ZLibOption.DEFAULT_WINDOW_BITS,
+ this.memLevel: ZLibOption.DEFAULT_MEM_LEVEL,
+ this.strategy: ZLibOption.STRATEGY_DEFAULT,
+ this.dictionary: null,
+ this.raw: false}) {
+ _validateZLibeLevel(level);
+ _validateZLibMemLevel(memLevel);
+ _validateZLibStrategy(strategy);
+ _validateZLibWindowBits(windowBits);
+ }
+
+ /**
+ * Convert a list of bytes using the options given to the ZLibEncoder
* constructor.
*/
List<int> convert(List<int> bytes) {
_BufferSink sink = new _BufferSink();
- startChunkedConversion(sink)
- ..add(bytes)
- ..close();
+ startChunkedConversion(sink)..add(bytes)..close();
return sink.builder.takeBytes();
}
@@ -127,21 +373,46 @@
if (sink is! ByteConversionSink) {
sink = new ByteConversionSink.from(sink);
}
- return new _ZLibEncoderSink(sink, gzip, level);
+
+ return new _ZLibEncoderSink(sink, gzip, level, windowBits, memLevel,
+ strategy, dictionary, raw);
}
}
/**
- * The [ZLibDecoder] is the decoder used by [ZLibCodec] and [GZipCodec] to
- * decompress data.
+ * The [ZLibDecoder] is used by [ZLibCodec] and [GZipCodec] to decompress data.
*/
class ZLibDecoder extends Converter<List<int>, List<int>> {
+ /**
+ * Base two logarithm of the window size (the size of the history buffer). It
+ * should be in the range 8..15. Larger values result in better compression at
+ * the expense of memory usage. The default value is 15
+ */
+ final int windowBits;
/**
- * Create a new [ZLibEncoder] converter.
+ * Initial compression dictionary.
+ *
+ * It should consist of strings (byte sequences) that are likely to be
+ * encountered later in the data to be compressed, with the most commonly used
+ * strings preferably put towards the end of the dictionary. Using a
+ * dictionary is most useful when the data to be compressed is short and can
+ * be predicted with good accuracy; the data can then be compressed better
+ * than with the default empty dictionary.
*/
- const ZLibDecoder();
+ final List<int> dictionary;
+
+ /**
+ * When true, deflate generates raw data with no zlib header or trailer, and
+ * will not compute an adler32 check value
+ */
+ final bool raw;
+
+ ZLibDecoder({this.windowBits: ZLibOption.DEFAULT_WINDOW_BITS,
+ this.dictionary: null, this.raw: false}) {
+ _validateZLibWindowBits(windowBits);
+ }
/**
* Convert a list of bytes using the options given to the [ZLibDecoder]
@@ -149,9 +420,7 @@
*/
List<int> convert(List<int> bytes) {
_BufferSink sink = new _BufferSink();
- startChunkedConversion(sink)
- ..add(bytes)
- ..close();
+ startChunkedConversion(sink)..add(bytes)..close();
return sink.builder.takeBytes();
}
@@ -165,7 +434,7 @@
if (sink is! ByteConversionSink) {
sink = new ByteConversionSink.from(sink);
}
- return new _ZLibDecoderSink(sink);
+ return new _ZLibDecoderSink(sink, windowBits, dictionary, raw);
}
}
@@ -191,14 +460,18 @@
class _ZLibEncoderSink extends _FilterSink {
- _ZLibEncoderSink(ByteConversionSink sink, bool gzip, int level)
- : super(sink, _Filter.newZLibDeflateFilter(gzip, level));
+ _ZLibEncoderSink(ByteConversionSink sink, bool gzip, int level,
+ int windowBits, int memLevel, int strategy,
+ List<int> dictionary, bool raw)
+ : super(sink, _Filter.newZLibDeflateFilter(gzip, level, windowBits,
+ memLevel, strategy,
+ dictionary, raw));
}
-
class _ZLibDecoderSink extends _FilterSink {
- _ZLibDecoderSink(ByteConversionSink sink)
- : super(sink, _Filter.newZLibInflateFilter());
+ _ZLibDecoderSink(ByteConversionSink sink, int windowBits,
+ List<int> dictionary, bool raw)
+ : super(sink, _Filter.newZLibInflateFilter(windowBits, dictionary, raw));
}
@@ -208,7 +481,7 @@
bool _closed = false;
bool _empty = true;
- _FilterSink(ByteConversionSink this._sink, _Filter this._filter);
+ _FilterSink(this._sink, this._filter);
void add(List<int> data) {
addSlice(data, 0, data.length, false);
@@ -258,7 +531,6 @@
}
-
/**
* Private helper-class to handle native filters.
*/
@@ -274,8 +546,8 @@
* [processed] will return [:null:]. Set [flush] to [:false:] for non-final
* calls to improve performance of some filters.
*
- * The last call to [processed] should have [end] set to [:true:]. This will make
- * sure a 'end' packet is written on the stream.
+ * The last call to [processed] should have [end] set to [:true:]. This will
+ * make sure an 'end' packet is written on the stream.
*/
List<int> processed({bool flush: true, bool end: false});
@@ -286,6 +558,44 @@
*/
void end();
- external static _Filter newZLibDeflateFilter(bool gzip, int level);
- external static _Filter newZLibInflateFilter();
+ external static _Filter newZLibDeflateFilter(bool gzip, int level,
+ int windowBits, int memLevel,
+ int strategy,
+ List<int> dictionary, bool raw);
+
+ external static _Filter newZLibInflateFilter(int windowBits,
+ List<int> dictionary, bool raw);
+}
+
+void _validateZLibWindowBits(int windowBits) {
+ if (ZLibOption.MIN_WINDOW_BITS > windowBits ||
+ ZLibOption.MAX_WINDOW_BITS < windowBits) {
+ throw new RangeError.range(windowBits, ZLibOption.MIN_WINDOW_BITS,
+ ZLibOption.MAX_WINDOW_BITS);
+ }
+}
+
+void _validateZLibeLevel(int level) {
+ if (ZLibOption.MIN_LEVEL > level ||
+ ZLibOption.MAX_LEVEL < level) {
+ throw new RangeError.range(level, ZLibOption.MIN_LEVEL,
+ ZLibOption.MAX_LEVEL);
+ }
+}
+
+void _validateZLibMemLevel(int memLevel) {
+ if (ZLibOption.MIN_MEM_LEVEL > memLevel ||
+ ZLibOption.MAX_MEM_LEVEL < memLevel) {
+ throw new RangeError.range(memLevel, ZLibOption.MIN_MEM_LEVEL,
+ ZLibOption.MAX_MEM_LEVEL);
+ }
+}
+
+void _validateZLibStrategy(int strategy) {
+ const strategies = const <int>[ZLibOption.STRATEGY_FILTERED,
+ ZLibOption.STRATEGY_HUFFMAN_ONLY, ZLibOption.STRATEGY_RLE,
+ ZLibOption.STRATEGY_FIXED, ZLibOption.STRATEGY_DEFAULT];
+ if (strategies.indexOf(strategy) == -1) {
+ throw new ArgumentError("Unsupported 'strategy'");
+ }
}
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 818a37a..acc5db1 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -771,7 +771,7 @@
*/
abstract class HttpRequest implements Stream<List<int>> {
/**
- * The content length of the request body (read-only).
+ * The content length of the request body.
*
* If the size of the request body is not known in advance,
* this value is -1.
@@ -779,12 +779,12 @@
int get contentLength;
/**
- * The method, such as 'GET' or 'POST', for the request (read-only).
+ * The method, such as 'GET' or 'POST', for the request.
*/
String get method;
/**
- * The URI for the request (read-only).
+ * The URI for the request.
*
* This provides access to the
* path, query string, and fragment identifier for the request.
@@ -792,7 +792,7 @@
Uri get uri;
/**
- * The requested URI for the request (read-only).
+ * The requested URI for the request.
*
* The returend URI is reconstructed by using http-header fields, to access
* otherwise lost information, e.g. host and scheme.
@@ -806,22 +806,22 @@
Uri get requestedUri;
/**
- * The request headers (read-only).
+ * The request headers.
*/
HttpHeaders get headers;
/**
- * The cookies in the request, from the Cookie headers (read-only).
+ * The cookies in the request, from the Cookie headers.
*/
List<Cookie> get cookies;
/**
- * The persistent connection state signaled by the client (read-only).
+ * The persistent connection state signaled by the client.
*/
bool get persistentConnection;
/**
- * The client certificate of the client making the request (read-only).
+ * The client certificate of the client making the request.
*
* This value is null if the connection is not a secure TLS or SSL connection,
* or if the server does not request a client certificate, or if the client
@@ -830,7 +830,7 @@
X509Certificate get certificate;
/**
- * The session for the given request (read-only).
+ * The session for the given request.
*
* If the session is
* being initialized by this call, [:isNew:] is true for the returned
@@ -841,12 +841,12 @@
/**
* The HTTP protocol version used in the request,
- * either "1.0" or "1.1" (read-only).
+ * either "1.0" or "1.1".
*/
String get protocolVersion;
/**
- * Information about the client connection (read-only).
+ * Information about the client connection.
*
* Returns [:null:] if the socket is not available.
*/
@@ -854,7 +854,7 @@
/**
* The [HttpResponse] object, used for sending back the response to the
- * client (read-only).
+ * client.
*
* If the [contentLength] of the body isn't 0, and the body isn't being read,
* any write calls on the [HttpResponse] automatically drain the request
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 5bc5b97..c7517a4 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -4,7 +4,7 @@
part of dart.io;
-const int _HEADERS_BUFFER_SIZE = 8 * 1024;
+const int _OUTGOING_BUFFER_SIZE = 8 * 1024;
class _HttpIncoming extends Stream<List<int>> {
final int _transferLength;
@@ -406,28 +406,26 @@
}
-abstract class _HttpOutboundMessage<T> implements IOSink {
+abstract class _HttpOutboundMessage<T> extends _IOSinkImpl {
// Used to mark when the body should be written. This is used for HEAD
// requests and in error handling.
bool _ignoreBody = false;
bool _headersWritten = false;
- bool _asGZip = false;
+ bool _encodingSet = false;
- IOSink _headersSink;
- IOSink _dataSink;
-
- final _HttpOutgoing _outgoing;
final Uri _uri;
+ final _HttpOutgoing _outgoing;
final _HttpHeaders headers;
_HttpOutboundMessage(this._uri,
String protocolVersion,
- _HttpOutgoing outgoing)
- : _outgoing = outgoing,
- _headersSink = new IOSink(outgoing, encoding: ASCII),
+ this._outgoing)
+ : super(new _HttpOutboundConsumer(), null),
headers = new _HttpHeaders(protocolVersion) {
- _dataSink = new IOSink(new _HttpOutboundConsumer(this));
+ _outgoing.outbound = this;
+ (_target as _HttpOutboundConsumer).outbound = this;
+ _encodingMutable = false;
}
int get contentLength => headers.contentLength;
@@ -441,6 +439,9 @@
}
Encoding get encoding {
+ if (_encodingSet && _headersWritten) {
+ return _encoding;
+ }
var charset;
if (headers.contentType != null && headers.contentType.charset != null) {
charset = headers.contentType.charset;
@@ -450,60 +451,38 @@
return Encoding.getByName(charset);
}
- void set encoding(Encoding value) {
- throw new StateError("IOSink encoding is not mutable");
+ void add(List<int> data) {
+ if (data.length == 0) return;
+ super.add(data);
}
void write(Object obj) {
- if (!_headersWritten) _dataSink.encoding = encoding;
- _dataSink.write(obj);
+ if (!_encodingSet) {
+ _encoding = encoding;
+ _encodingSet = true;
+ }
+ super.write(obj);
}
- void writeAll(Iterable objects, [String separator = ""]) {
- if (!_headersWritten) _dataSink.encoding = encoding;
- _dataSink.writeAll(objects, separator);
- }
-
- void writeln([Object obj = ""]) {
- if (!_headersWritten) _dataSink.encoding = encoding;
- _dataSink.writeln(obj);
- }
-
- void writeCharCode(int charCode) {
- if (!_headersWritten) _dataSink.encoding = encoding;
- _dataSink.writeCharCode(charCode);
- }
-
- void add(List<int> data) {
- if (data.length == 0) return;
- _dataSink.add(data);
- }
-
- void addError(error, [StackTrace stackTrace]) =>
- _dataSink.addError(error, stackTrace);
-
- Future<T> addStream(Stream<List<int>> stream) => _dataSink.addStream(stream);
-
- Future flush() => _dataSink.flush();
-
- Future close() => _dataSink.close();
-
- Future<T> get done => _dataSink.done;
-
- Future _writeHeaders({bool drainRequest: true}) {
- void write() {
+ Future _writeHeaders({bool drainRequest: true,
+ bool setOutgoing: true}) {
+ // TODO(ajohnsen): Avoid excessive futures in this method.
+ write() {
try {
_writeHeader();
- } catch (error) {
+ } catch (_) {
// Headers too large.
throw new HttpException(
- "Headers size exceeded the of '$_HEADERS_BUFFER_SIZE' bytes");
+ "Headers size exceeded the of '$_OUTGOING_BUFFER_SIZE'"
+ " bytes");
}
+ return this;
}
- if (_headersWritten) return new Future.value();
+ if (_headersWritten) return new Future.value(this);
_headersWritten = true;
- _dataSink.encoding = encoding;
+ Future drainFuture;
bool isServerSide = this is _HttpResponse;
+ bool gzip = false;
if (isServerSide) {
var response = this;
if (headers.chunkedTransferEncoding) {
@@ -516,42 +495,51 @@
.any((encoding) => encoding.trim().toLowerCase() == "gzip") &&
contentEncoding == null) {
headers.set(HttpHeaders.CONTENT_ENCODING, "gzip");
- _asGZip = true;
+ gzip = true;
}
}
if (drainRequest && !response._httpRequest._incoming.hasSubscriber) {
- return response._httpRequest.drain()
- // TODO(ajohnsen): Timeout on drain?
- .catchError((_) {}) // Ignore errors.
- .then((_) => write());
+ drainFuture = response._httpRequest.drain().catchError((_) {});
}
+ } else {
+ drainRequest = false;
+ }
+ if (_ignoreBody) {
+ return new Future.sync(write).then((_) => _outgoing.close());
+ }
+ if (setOutgoing) {
+ int contentLength = headers.contentLength;
+ if (headers.chunkedTransferEncoding) {
+ _outgoing.chunked = true;
+ if (gzip) _outgoing.gzip = true;
+ } else if (contentLength >= 0) {
+ _outgoing.contentLength = contentLength;
+ }
+ }
+ if (drainFuture != null) {
+ return drainFuture.then((_) => write());
}
return new Future.sync(write);
}
Future _addStream(Stream<List<int>> stream) {
- return _writeHeaders()
- .then((_) {
- int contentLength = headers.contentLength;
- if (_ignoreBody) {
- stream.drain().catchError((_) {});
- return _headersSink.close();
- }
- stream = stream.transform(const _BufferTransformer());
- if (headers.chunkedTransferEncoding) {
- if (_asGZip) {
- stream = stream.transform(GZIP.encoder);
- }
- stream = stream.transform(const _ChunkedTransformer());
- } else if (contentLength >= 0) {
- stream = stream.transform(
- new _ContentLengthValidator(contentLength, _uri));
- }
- return _headersSink.addStream(stream);
- });
+ // TODO(ajohnsen): Merge into _HttpOutgoing.
+ if (_ignoreBody) {
+ stream.drain().catchError((_) {});
+ return _writeHeaders();
+ }
+ if (_headersWritten) {
+ return _outgoing.addStream(stream);
+ } else {
+ var completer = new Completer.sync();
+ var future = _outgoing.addStream(stream, completer.future);
+ _writeHeaders().then(completer.complete);
+ return future;
+ }
}
Future _close() {
+ // TODO(ajohnsen): Merge into _HttpOutgoing.
if (!_headersWritten) {
if (!_ignoreBody && headers.contentLength == -1) {
// If no body was written, _ignoreBody is false (it's not a HEAD
@@ -560,14 +548,14 @@
headers.chunkedTransferEncoding = false;
headers.contentLength = 0;
} else if (!_ignoreBody && headers.contentLength > 0) {
- _headersSink.addError(new HttpException(
- "No content while contentLength was specified to be greater "
- "than 0: ${headers.contentLength}.",
- uri: _uri));
- return _headersSink.done;
+ return _outgoing.addStream(
+ new Stream.fromFuture(new Future.error(new HttpException(
+ "No content even though contentLength was specified to be "
+ "greater than 0: ${headers.contentLength}.",
+ uri: _uri))));
}
}
- return _writeHeaders().whenComplete(_headersSink.close);
+ return _writeHeaders().whenComplete(_outgoing.close);
}
void _writeHeader();
@@ -575,146 +563,13 @@
class _HttpOutboundConsumer implements StreamConsumer {
- final _HttpOutboundMessage _outbound;
- StreamController _controller;
- StreamSubscription _subscription;
- Completer _closeCompleter = new Completer();
- Completer _completer;
- bool _socketError = false;
+ // TODO(ajohnsen): Once _addStream and _close is merged into _HttpOutgoing,
+ // this class can be removed.
+ _HttpOutboundMessage outbound;
+ _HttpOutboundConsumer();
- _HttpOutboundConsumer(this._outbound);
-
- void _cancel() {
- if (_subscription != null) {
- StreamSubscription subscription = _subscription;
- _subscription = null;
- subscription.cancel();
- }
- }
-
- bool _ignoreError(error)
- => (error is SocketException || error is TlsException) &&
- _outbound is HttpResponse;
-
- _ensureController() {
- if (_controller != null) return;
- _controller = new StreamController(sync: true,
- onPause: () => _subscription.pause(),
- onResume: () => _subscription.resume(),
- onListen: () => _subscription.resume(),
- onCancel: _cancel);
- _outbound._addStream(_controller.stream)
- .then((_) {
- _cancel();
- _done();
- _closeCompleter.complete(_outbound);
- },
- onError: (error, [StackTrace stackTrace]) {
- _socketError = true;
- if (_ignoreError(error)) {
- _cancel();
- _done();
- _closeCompleter.complete(_outbound);
- } else {
- if (!_done(error)) {
- _closeCompleter.completeError(error, stackTrace);
- }
- }
- });
- }
-
- bool _done([error, StackTrace stackTrace]) {
- if (_completer == null) return false;
- if (error != null) {
- _completer.completeError(error, stackTrace);
- } else {
- _completer.complete(_outbound);
- }
- _completer = null;
- return true;
- }
-
- Future addStream(var stream) {
- // If we saw a socket error subscribe and then cancel, to ignore any data
- // on the stream.
- if (_socketError) {
- stream.listen(null).cancel();
- return new Future.value(_outbound);
- }
- _completer = new Completer();
- _subscription = stream.listen(
- (data) => _controller.add(data),
- onDone: _done,
- onError: (e, s) => _controller.addError(e, s),
- cancelOnError: true);
- // Pause the first request.
- if (_controller == null) _subscription.pause();
- _ensureController();
- return _completer.future;
- }
-
- Future close() {
- Future closeOutbound() {
- if (_socketError) return new Future.value(_outbound);
- return _outbound._close()
- .catchError((_) {}, test: _ignoreError)
- .then((_) => _outbound);
- }
- if (_controller == null) return closeOutbound();
- _controller.close();
- return _closeCompleter.future.then((_) => closeOutbound());
- }
-}
-
-
-class _BufferTransformerSink implements EventSink<List<int>> {
- static const int MIN_CHUNK_SIZE = 4 * 1024;
- static const int MAX_BUFFER_SIZE = 16 * 1024;
-
- final BytesBuilder _builder = new BytesBuilder();
- final EventSink<List<int>> _outSink;
-
- _BufferTransformerSink(this._outSink);
-
- void add(List<int> data) {
- // TODO(ajohnsen): Use timeout?
- if (data.length == 0) return;
- if (data.length >= MIN_CHUNK_SIZE) {
- flush();
- _outSink.add(data);
- } else {
- _builder.add(data);
- if (_builder.length >= MAX_BUFFER_SIZE) {
- flush();
- }
- }
- }
-
- void addError(Object error, [StackTrace stackTrace]) {
- _outSink.addError(error, stackTrace);
- }
-
- void close() {
- flush();
- _outSink.close();
- }
-
- void flush() {
- if (_builder.length > 0) {
- // takeBytes will clear the BytesBuilder.
- _outSink.add(_builder.takeBytes());
- }
- }
-}
-
-class _BufferTransformer implements StreamTransformer<List<int>, List<int>> {
- const _BufferTransformer();
-
- Stream<List<int>> bind(Stream<List<int>> stream) {
- return new Stream<List<int>>.eventTransformed(
- stream,
- (EventSink outSink) => new _BufferTransformerSink(outSink));
- }
+ Future addStream(var stream) => outbound._addStream(stream);
+ Future close() => outbound._close();
}
@@ -763,7 +618,8 @@
if (_headersWritten) throw new StateError("Headers already sent");
deadline = null; // Be sure to stop any deadline.
var future = _httpRequest._httpConnection.detachSocket();
- _writeHeaders(drainRequest: false).then((_) => close());
+ _writeHeaders(drainRequest: false,
+ setOutgoing: false).then((_) => close());
// Close connection so the socket is 'free'.
close();
done.catchError((_) {
@@ -783,12 +639,13 @@
if (_deadline == null) return;
_deadlineTimer = new Timer(_deadline, () {
+ _outgoing._socketError = true;
_outgoing.socket.destroy();
});
}
void _writeHeader() {
- Uint8List buffer = _httpRequest._httpConnection._headersBuffer;
+ Uint8List buffer = new Uint8List(_OUTGOING_BUFFER_SIZE);
int offset = 0;
void write(List<int> bytes) {
@@ -847,7 +704,7 @@
offset = headers._write(buffer, offset);
buffer[offset++] = _CharCode.CR;
buffer[offset++] = _CharCode.LF;
- _headersSink.add(new Uint8List.view(buffer.buffer, 0, offset));
+ _outgoing.setHeader(buffer, offset);
}
String _findReasonPhrase(int statusCode) {
@@ -1036,7 +893,7 @@
}
void _writeHeader() {
- Uint8List buffer = _httpClientConnection._headersBuffer;
+ Uint8List buffer = new Uint8List(_OUTGOING_BUFFER_SIZE);
int offset = 0;
void write(List<int> bytes) {
@@ -1074,41 +931,268 @@
offset = headers._write(buffer, offset);
buffer[offset++] = _CharCode.CR;
buffer[offset++] = _CharCode.LF;
- _headersSink.add(new Uint8List.view(buffer.buffer, 0, offset));
+ _outgoing.setHeader(buffer, offset);
}
}
+// Used by _HttpOutgoing as a target of a chunked converter for gzip
+// compression.
+class _HttpGZipSink extends ByteConversionSink {
+ final Function _consume;
+ _HttpGZipSink(this._consume);
-class _ChunkedTransformerSink implements EventSink<List<int>> {
-
- int _pendingFooter = 0;
- final EventSink<List<int>> _outSink;
-
- _ChunkedTransformerSink(this._outSink);
-
- void add(List<int> data) {
- _outSink.add(_chunkHeader(data.length));
- if (data.length > 0) _outSink.add(data);
- _pendingFooter = 2;
+ void add(List<int> chunk) {
+ _consume(chunk);
}
- void addError(Object error, [StackTrace stackTrace]) {
- _outSink.addError(error, stackTrace);
+ void addSlice(Uint8List chunk, int start, int end, bool isLast) {
+ _consume(new Uint8List.view(chunk.buffer, start, end - start));
}
- void close() {
- add(const []);
- _outSink.close();
+ void close() {}
+}
+
+
+// The _HttpOutgoing handles all of the following:
+// - Buffering
+// - GZip compressionm
+// - Content-Length validation.
+// - Errors.
+//
+// Most notable is the GZip compression, that uses a double-buffering system,
+// one before gzip (_gzipBuffer) and one after (_buffer).
+class _HttpOutgoing
+ implements StreamConsumer<List<int>> {
+ static const List<int> _footerAndChunk0Length =
+ const [_CharCode.CR, _CharCode.LF, 0x30, _CharCode.CR, _CharCode.LF,
+ _CharCode.CR, _CharCode.LF];
+
+ static const List<int> _chunk0Length =
+ const [0x30, _CharCode.CR, _CharCode.LF, _CharCode.CR, _CharCode.LF];
+
+ final Completer _doneCompleter = new Completer();
+ final Socket socket;
+
+ Uint8List _buffer;
+ int _length = 0;
+
+ Future _closeFuture;
+
+ bool chunked = false;
+ int _pendingChunkedFooter = 0;
+
+ int contentLength;
+ int _bytesWritten = 0;
+
+ bool _gzip = false;
+ ByteConversionSink _gzipSink;
+ // _gzipAdd is set iff the sink is being added to. It's used to specify where
+ // gzipped data should be taken (sometimes a controller, sometimes a socket).
+ Function _gzipAdd;
+ Uint8List _gzipBuffer;
+ int _gzipBufferLength = 0;
+
+ bool _socketError = false;
+
+ _HttpOutboundMessage outbound;
+
+ bool _ignoreError(error)
+ => (error is SocketException || error is TlsException) &&
+ outbound is HttpResponse;
+
+ _HttpOutgoing(this.socket);
+
+ Future addStream(Stream<List<int>> stream, [Future pauseFuture]) {
+ if (_socketError) {
+ stream.listen(null).cancel();
+ return new Future.value(outbound);
+ }
+ var sub;
+ var controller;
+ // Use new stream so we are able to pause (see below listen). The
+ // alternative is to use stream.extand, but that won't give us a way of
+ // pausing.
+ controller = new StreamController(
+ onPause: () => sub.pause(),
+ onResume: () => sub.resume(),
+ sync: true);
+
+ void onData(data) {
+ if (_socketError) return;
+ if (data.length == 0) return;
+ if (chunked) {
+ if (_gzip) {
+ _gzipAdd = controller.add;
+ _addGZipChunk(data, _gzipSink.add);
+ _gzipAdd = null;
+ return;
+ }
+ _addChunk(_chunkHeader(data.length), controller.add);
+ _pendingChunkedFooter = 2;
+ } else {
+ if (contentLength != null) {
+ _bytesWritten += data.length;
+ if (_bytesWritten > contentLength) {
+ controller.addError(new HttpException(
+ "Content size exceeds specified contentLength. "
+ "$_bytesWritten bytes written while expected "
+ "$contentLength. "
+ "[${new String.fromCharCodes(data)}]"));
+ return;
+ }
+ }
+ }
+ _addChunk(data, controller.add);
+ }
+
+ sub = stream.listen(
+ onData,
+ onError: controller.addError,
+ onDone: controller.close,
+ cancelOnError: true);
+
+ // While incoming is being drained, the pauseFuture is non-null. Pause
+ // output until it's drained.
+ if (pauseFuture != null) {
+ sub.pause(pauseFuture);
+ }
+
+ return socket.addStream(controller.stream)
+ .then((_) {
+ return outbound;
+ }, onError: (error) {
+ // Be sure to close it in case of an error.
+ if (_gzip) _gzipSink.close();
+ _socketError = true;
+ _doneCompleter.completeError(error);
+ if (_ignoreError(error)) {
+ return outbound;
+ } else {
+ throw error;
+ }
+ });
+ }
+
+ Future close() {
+ // If we are already closed, return that future.
+ if (_closeFuture != null) return _closeFuture;
+ // If we earlier saw an error, return immidiate. The notification to
+ // _Http*Connection is already done.
+ if (_socketError) return new Future.value(outbound);
+ // If contentLength was specified, validate it.
+ if (contentLength != null) {
+ if (_bytesWritten < contentLength) {
+ var error = new HttpException(
+ "Content size below specified contentLength. "
+ " $_bytesWritten bytes written but expected "
+ "$contentLength.");
+ _doneCompleter.completeError(error);
+ return _closeFuture = new Future.error(error);
+ }
+ }
+ // In case of chunked encoding (and gzip), handle remaining gzip data and
+ // append the 'footer' for chunked encoding.
+ if (chunked) {
+ if (_gzip) {
+ _gzipAdd = socket.add;
+ if (_gzipBufferLength > 0) {
+ _gzipSink.add(new Uint8List.view(
+ _gzipBuffer.buffer, 0, _gzipBufferLength));
+ }
+ _gzipBuffer = null;
+ _gzipSink.close();
+ _gzipAdd = null;
+ }
+ _addChunk(_chunkHeader(0), socket.add);
+ }
+ // Add any remaining data in the buffer.
+ if (_length > 0) {
+ socket.add(new Uint8List.view(_buffer.buffer, 0, _length));
+ }
+ // Clear references, for better GC.
+ _buffer = null;
+ // And finally flush it. As we support keep-alive, never close it from here.
+ // Once the socket is flushed, we'll be able to reuse it (signaled by the
+ // 'done' future).
+ return _closeFuture = socket.flush()
+ .then((_) {
+ _doneCompleter.complete(socket);
+ return outbound;
+ }, onError: (error) {
+ _doneCompleter.completeError(error);
+ if (_ignoreError(error)) {
+ return outbound;
+ } else {
+ throw error;
+ }
+ });
+ }
+
+ Future get done => _doneCompleter.future;
+
+ void setHeader(List<int> data, int length) {
+ assert(_length == 0);
+ assert(data.length == _OUTGOING_BUFFER_SIZE);
+ _buffer = data;
+ _length = length;
+ }
+
+ void set gzip(bool value) {
+ _gzip = value;
+ if (_gzip) {
+ _gzipBuffer = new Uint8List(_OUTGOING_BUFFER_SIZE);
+ assert(_gzipSink == null);
+ _gzipSink = new ZLibEncoder(gzip: true)
+ .startChunkedConversion(
+ new _HttpGZipSink((data) {
+ // We are closing down prematurely, due to an error. Discard.
+ if (_gzipAdd == null) return;
+ _addChunk(_chunkHeader(data.length), _gzipAdd);
+ _pendingChunkedFooter = 2;
+ _addChunk(data, _gzipAdd);
+ }));
+ }
+ }
+
+ void _addGZipChunk(chunk, void add(List<int> data)) {
+ if (chunk.length > _gzipBuffer.length - _gzipBufferLength) {
+ add(new Uint8List.view(
+ _gzipBuffer.buffer, 0, _gzipBufferLength));
+ _gzipBuffer = new Uint8List(_OUTGOING_BUFFER_SIZE);
+ _gzipBufferLength = 0;
+ }
+ if (chunk.length > _OUTGOING_BUFFER_SIZE) {
+ add(chunk);
+ } else {
+ _gzipBuffer.setRange(_gzipBufferLength,
+ _gzipBufferLength + chunk.length,
+ chunk);
+ _gzipBufferLength += chunk.length;
+ }
+ }
+
+ void _addChunk(chunk, void add(List<int> data)) {
+ if (chunk.length > _buffer.length - _length) {
+ add(new Uint8List.view(_buffer.buffer, 0, _length));
+ _buffer = new Uint8List(_OUTGOING_BUFFER_SIZE);
+ _length = 0;
+ }
+ if (chunk.length > _OUTGOING_BUFFER_SIZE) {
+ add(chunk);
+ } else {
+ _buffer.setRange(_length, _length + chunk.length, chunk);
+ _length += chunk.length;
+ }
}
List<int> _chunkHeader(int length) {
const hexDigits = const [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46];
if (length == 0) {
- if (_pendingFooter == 2) return _footerAndChunk0Length;
+ if (_pendingChunkedFooter == 2) return _footerAndChunk0Length;
return _chunk0Length;
}
- int size = _pendingFooter;
+ int size = _pendingChunkedFooter;
int len = length;
// Compute a fast integer version of (log(length + 1) / log(16)).ceil().
while (len > 0) {
@@ -1116,12 +1200,12 @@
len >>= 4;
}
var footerAndHeader = new Uint8List(size + 2);
- if (_pendingFooter == 2) {
+ if (_pendingChunkedFooter == 2) {
footerAndHeader[0] = _CharCode.CR;
footerAndHeader[1] = _CharCode.LF;
}
int index = size;
- while (index > _pendingFooter) {
+ while (index > _pendingChunkedFooter) {
footerAndHeader[--index] = hexDigits[length & 15];
length = length >> 4;
}
@@ -1129,102 +1213,6 @@
footerAndHeader[size + 1] = _CharCode.LF;
return footerAndHeader;
}
-
- static List<int> get _footerAndChunk0Length => new Uint8List.fromList(
- const [_CharCode.CR, _CharCode.LF, 0x30, _CharCode.CR, _CharCode.LF,
- _CharCode.CR, _CharCode.LF]);
-
- static List<int> get _chunk0Length => new Uint8List.fromList(
- const [0x30, _CharCode.CR, _CharCode.LF, _CharCode.CR, _CharCode.LF]);
-}
-
-// Transformer that transforms data to HTTP Chunked Encoding.
-class _ChunkedTransformer implements StreamTransformer<List<int>, List<int>> {
- const _ChunkedTransformer();
-
- Stream<List<int>> bind(Stream<List<int>> stream) {
- return new Stream<List<int>>.eventTransformed(
- stream,
- (EventSink<List<int>> sink) => new _ChunkedTransformerSink(sink));
- }
-}
-
-// Transformer that validates the content length.
-class _ContentLengthValidator
- implements StreamTransformer<List<int>, List<int>>, EventSink<List<int>> {
- final int expectedContentLength;
- final Uri uri;
- int _bytesWritten = 0;
-
- EventSink<List<int>> _outSink;
-
- _ContentLengthValidator(this.expectedContentLength, this.uri);
-
- Stream<List<int>> bind(Stream<List<int>> stream) {
- return new Stream.eventTransformed(
- stream,
- (EventSink sink) {
- if (_outSink != null) {
- throw new StateError("Validator transformer already used");
- }
- _outSink = sink;
- return this;
- });
- }
-
- void add(List<int> data) {
- _bytesWritten += data.length;
- if (_bytesWritten > expectedContentLength) {
- _outSink.addError(new HttpException(
- "Content size exceeds specified contentLength. "
- "$_bytesWritten bytes written while expected "
- "$expectedContentLength. "
- "[${new String.fromCharCodes(data)}]",
- uri: uri));
- _outSink.close();
- } else {
- _outSink.add(data);
- }
- }
-
- void addError(Object error, [StackTrace stackTrace]) {
- _outSink.addError(error, stackTrace);
- }
-
- void close() {
- if (_bytesWritten < expectedContentLength) {
- _outSink.addError(new HttpException(
- "Content size below specified contentLength. "
- " $_bytesWritten bytes written while expected "
- "$expectedContentLength.",
- uri: uri));
- }
- _outSink.close();
- }
-}
-
-
-// Extends StreamConsumer as this is an internal type, only used to pipe to.
-class _HttpOutgoing implements StreamConsumer<List<int>> {
- final Completer _doneCompleter = new Completer();
- final Socket socket;
-
- _HttpOutgoing(this.socket);
-
- Future addStream(Stream<List<int>> stream) {
- return socket.addStream(stream)
- .catchError((error) {
- _doneCompleter.completeError(error);
- throw error;
- });
- }
-
- Future close() {
- _doneCompleter.complete(socket);
- return new Future.value();
- }
-
- Future get done => _doneCompleter.future;
}
class _HttpClientConnection {
@@ -1238,7 +1226,6 @@
Timer _idleTimer;
bool closed = false;
Uri _currentUri;
- final Uint8List _headersBuffer = new Uint8List(_HEADERS_BUFFER_SIZE);
Completer<_HttpIncoming> _nextResponseCompleter;
Future _streamFuture;
@@ -1901,7 +1888,6 @@
int _state = _IDLE;
StreamSubscription _subscription;
Timer _idleTimer;
- final Uint8List _headersBuffer = new Uint8List(_HEADERS_BUFFER_SIZE);
bool _idleMark = false;
Future _streamFuture;
diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart
index e2ea2bd..a6d9f53 100644
--- a/sdk/lib/io/io_sink.dart
+++ b/sdk/lib/io/io_sink.dart
@@ -110,10 +110,18 @@
}
Future flush() {
+ if (_isBound) {
+ throw new StateError("StreamSink is bound to a stream");
+ }
+ if (_controllerInstance == null) return new Future.value(this);
// Adding an empty stream-controller will return a future that will complete
// when all data is done.
- var controller = new StreamController()..close();
- return addStream(controller.stream).then((_) => this);
+ _isBound = true;
+ var future = _controllerCompleter.future;
+ _controllerInstance.close();
+ return future.whenComplete(() {
+ _isBound = false;
+ });
}
Future close() {
@@ -165,7 +173,7 @@
(_) {
if (_isBound) {
// A new stream takes over - forward values to that stream.
- _controllerCompleter.complete();
+ _controllerCompleter.complete(this);
_controllerCompleter = null;
_controllerInstance = null;
} else {
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index 932fb97..f8d8543 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -90,6 +90,13 @@
String get host;
/**
+ * Get the raw address of this [InternetAddress]. The result is either a
+ * 4 or 16 byte long list. The returned list is a copy, making it possible
+ * to change the list without modifying the [InternetAddress].
+ */
+ List<int> get rawAddress;
+
+ /**
* Returns true if the [InternetAddress] is a loopback address.
*/
bool get isLoopback;
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index a8063a0..4de80c7 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -36,6 +36,9 @@
* to the control port.
*/
final SendPort controlPort;
+ /**
+ * Capability granting the ability to pause the isolate.
+ */
final Capability pauseCapability;
Isolate._fromControlPort(this.controlPort, [this.pauseCapability]);
@@ -87,24 +90,27 @@
/**
* Requests the isolate to pause.
*
+ * WARNING: This method is experimental and not handled on every platform yet.
+ *
* The isolate should stop handling events by pausing its event queue.
* The request will eventually make the isolate stop doing anything.
- * It will be handled before any other messages sent to the isolate from
- * the current isolate, but no other guarantees are provided.
+ * It will be handled before any other messages that are later sent to the
+ * isolate from the current isolate, but no other guarantees are provided.
+ *
+ * The event loop may be paused before previously sent, but not yet exeuted,
+ * messages have been reached.
*
* If [resumeCapability] is provided, it is used to identity the pause,
* and must be used again to end the pause using [resume].
- * Otherwise a new capability is created and returned.
+ * Otherwise a new resume capability is created and returned.
*
- * If an isolate is paused more than once using the same capabilty,
+ * If an isolate is paused more than once using the same capability,
* only one resume with that capability is needed to end the pause.
*
* If an isolate is paused using more than one capability,
* they must all be individully ended before the isolate resumes.
*
* Returns the capability that must be used to resume end the pause.
- *
- * WARNING: This method is not handled on any platform yet.
*/
Capability pause([Capability resumeCapability]) {
if (resumeCapability == null) resumeCapability = new Capability();
@@ -119,13 +125,16 @@
/**
* Resumes a paused isolate.
*
+ * WARNING: This method is experimental and not handled on every platform yet.
+ *
* Sends a message to an isolate requesting that it ends a pause
* that was requested using the [resumeCapability].
*
+ * When all active pause requests have been cancelled, the isolate
+ * will continue handling normal messages.
+ *
* The capability must be one returned by a call to [pause] on this
* isolate, otherwise the resume call does nothing.
- *
- * WARNING: This method is not handled on any platform yet.
*/
void resume(Capability resumeCapability) {
var message = new List(2)
@@ -133,6 +142,46 @@
..[1] = resumeCapability;
controlPort.send(message);
}
+
+ /**
+ * Asks the isolate to send a message on [responsePort] when it terminates.
+ *
+ * WARNING: This method is experimental and not handled on every platform yet.
+ *
+ * The isolate will send a `null` message on [responsePort] as the last
+ * thing before it terminates. It will run no further code after the message
+ * has been sent.
+ *
+ * If the isolate is already dead, no message will be sent.
+ * TODO(lrn): Can we do better? Can the system recognize this message and
+ * send a reply if the receiving isolate is dead?
+ */
+ void addOnExitListener(SendPort responsePort) {
+ // TODO(lrn): Can we have an internal method that checks if the receiving
+ // isolate of a SendPort is still alive?
+ var message = new List(2)
+ ..[0] = "add-ondone"
+ ..[1] = responsePort;
+ controlPort.send(message);
+ }
+
+ /**
+ * Stop listening on exit messages from the isolate.
+ *
+ * WARNING: This method is experimental and not handled on every platform yet.
+ *
+ * If a call has previously been made to [addOnExitListener] with the same
+ * send-port, this will unregister the port, and it will no longer receive
+ * a message when the isolate terminates.
+ * A response may still be sent until this operation is fully processed by
+ * the isolate.
+ */
+ void removeOnExitListener(SendPort responsePort) {
+ var message = new List(2)
+ ..[0] = "remove-ondone"
+ ..[1] = responsePort;
+ controlPort.send(message);
+ }
}
/**
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index 31e4cd3..0c29931 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -573,18 +573,6 @@
Map<Symbol, DeclarationMirror> get declarations;
/**
- * Returns a map of the top-level methods, getters and setters of the library.
- *
- * The intent is to capture those members that constitute the API of a
- * library. Hence fields are not included, but the getters and setters
- * implicitly introduced by fields are included. Synthetic getters for the
- * types exported by the library are also included.
- *
- * The map is keyed by the simple names of the members.
- */
- Map<Symbol, MethodMirror> get topLevelMembers;
-
- /**
* Returns [:true:] if this mirror is equal to [other].
* Otherwise returns [:false:].
*
@@ -627,6 +615,19 @@
*/
abstract class TypeMirror implements DeclarationMirror {
/**
+ * Returns true if this mirror reflects dynamic, a non-generic class or
+ * typedef, or an instantiated generic class or typedef in the current
+ * isolate. Otherwise, returns false.
+ */
+ bool get hasReflectedType;
+
+ /**
+ * If [:hasReflectedType:] returns true, returns the corresponding [Type].
+ * Otherwise, an [UnsupportedError] is thrown.
+ */
+ Type get reflectedType;
+
+ /**
* An immutable list with mirrors for all type variables for this type.
*
* If this type is a generic declaration or an invocation of a generic
@@ -695,18 +696,6 @@
*/
abstract class ClassMirror implements TypeMirror, ObjectMirror {
/**
- * Returns true if this mirror reflects a non-generic class or an instantiated
- * generic class in the current isolate. Otherwise, returns false.
- */
- bool get hasReflectedType;
-
- /**
- * If [:hasReflectedType:] returns true, returns the corresponding [Type].
- * Otherwise, an [UnsupportedError] is thrown.
- */
- Type get reflectedType;
-
- /**
* A mirror on the superclass on the reflectee.
*
* If this type is [:Object:], the superclass will be null.
@@ -885,6 +874,14 @@
TypeMirror get upperBound;
/**
+ * Is the reflectee static?
+ *
+ * For the purposes of the mirrors library, type variables are considered
+ * non-static.
+ */
+ bool get isStatic;
+
+ /**
* Returns [:true:] if this mirror is equal to [other].
* Otherwise returns [:false:].
*
diff --git a/tests/co19/co19-analyzer.status b/tests/co19/co19-analyzer.status
index 43ff3a5..f953d50 100644
--- a/tests/co19/co19-analyzer.status
+++ b/tests/co19/co19-analyzer.status
@@ -116,7 +116,6 @@
Language/13_Statements/06_For/1_For_Loop_A01_t08: MissingStaticWarning
Language/13_Statements/09_Switch_A10_t03: MissingStaticWarning
Language/13_Statements/15_Assert_A04_t04: MissingStaticWarning
-LibTest/collection/IterableMixin/IterableMixin_class_A01_t01: MissingStaticWarning
Language/05_Variables/05_Variables_A05_t04: MissingCompileTimeError # co19-roll r651: Please triage this failure
Language/05_Variables/05_Variables_A05_t05: MissingCompileTimeError # co19-roll r651: Please triage this failure
diff --git a/tests/co19/co19-analyzer2.status b/tests/co19/co19-analyzer2.status
index 53a5aea..6076680 100644
--- a/tests/co19/co19-analyzer2.status
+++ b/tests/co19/co19-analyzer2.status
@@ -116,7 +116,6 @@
Language/13_Statements/06_For/1_For_Loop_A01_t08: MissingStaticWarning
Language/13_Statements/09_Switch_A10_t03: MissingStaticWarning
Language/13_Statements/15_Assert_A04_t04: MissingStaticWarning
-LibTest/collection/IterableMixin/IterableMixin_class_A01_t01: MissingStaticWarning
Language/05_Variables/05_Variables_A05_t04: MissingCompileTimeError # co19-roll r651: Please triage this failure
Language/05_Variables/05_Variables_A05_t05: MissingCompileTimeError # co19-roll r651: Please triage this failure
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index b7c55d5..df91bfe 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -151,6 +151,7 @@
LibTest/core/int/operator_OR_A01_t01: RuntimeError, OK # Requires bigints.
LibTest/core/int/operator_remainder_A01_t01: RuntimeError, OK # Requires bigints.
+Language/13_Statements/09_Switch_A03_t03: MissingCompileTimeError # Issue 17235
LibTest/core/RegExp/Pattern_semantics/firstMatch_Term_A04_t01: RuntimeError, OK # co19 issue 212
@@ -260,6 +261,7 @@
[ $compiler == dart2js ]
Language/07_Classes/6_Constructors/1_Generative_Constructors_A13_t01: RuntimeError # compiler cancelled: cannot resolve type T
Language/07_Classes/3_Setters_A04_t03: RuntimeError # http://dartbug.com/5023
+Language/12_Expressions/07_Maps_A11_t01: CompileTimeError # Maybe ok. Issue 17207
[ $compiler == dart2js && $jscl ]
LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterEscape_A06_t02: RuntimeError # IllegalJSRegExpException: '\c(' 'SyntaxError: Invalid regular expression: /\c(/: Unterminated group'
@@ -638,7 +640,6 @@
Language/07_Classes/6_Constructors/2_Factories_A10_t03: fail # co19-roll r587: Please triage this failure
Language/10_Generics/09_Generics_A01_t17: fail # co19-roll r587: Please triage this failure
Language/12_Expressions/06_Symbols_A01_t02: CompileTimeError # co19-roll r623: Please triage this failure
-Language/12_Expressions/07_Maps_A13_t01: MissingCompileTimeError # co19-roll r607: Please triage this failure
Language/12_Expressions/12_Instance_Creation/1_New_A06_t15: CompileTimeError # co19-roll r651: Please triage this failure
Language/12_Expressions/14_Function_Invocation/3_Unqualified_Invocation_A01_t17: MissingCompileTimeError # co19-roll r651: Please triage this failure
Language/12_Expressions/14_Function_Invocation/3_Unqualified_Invocation_A01_t18: MissingCompileTimeError # co19-roll r651: Please triage this failure
diff --git a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
index 26309d0..3c842af 100644
--- a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
+++ b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
@@ -10,10 +10,12 @@
import 'analyze_helper.dart';
-const String SIMPLIFY_NEVER_CALLED = "The method 'simplify' is never called";
+const Map<String, List<String>> WHITE_LIST = const {
+ "ir_builder.dart": const ["The method 'getIr' is never called."],
+};
void main() {
var uri = currentDirectory.resolve(
'sdk/lib/_internal/compiler/implementation/use_unused_api.dart');
- asyncTest(() => analyze([uri], {}, analyzeAll: false));
+ asyncTest(() => analyze([uri], WHITE_LIST, analyzeAll: false));
}
diff --git a/tests/compiler/dart2js/concrete_type_inference_test.dart b/tests/compiler/dart2js/concrete_type_inference_test.dart
index eddfdc2..d0cd86d 100644
--- a/tests/compiler/dart2js/concrete_type_inference_test.dart
+++ b/tests/compiler/dart2js/concrete_type_inference_test.dart
@@ -74,7 +74,7 @@
});
checkPrintType('"foo"', (compiler, type) {
var inferrer = compiler.typesTask.typesInferrer;
- Expect.identical(compiler.typesTask.stringType, type);
+ Expect.isTrue(compiler.typesTask.stringType.containsOnlyString(compiler));
});
}
diff --git a/tests/compiler/dart2js/dictionary_types_test.dart b/tests/compiler/dart2js/dictionary_types_test.dart
new file mode 100644
index 0000000..78a59aa
--- /dev/null
+++ b/tests/compiler/dart2js/dictionary_types_test.dart
@@ -0,0 +1,129 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+import "package:async_helper/async_helper.dart";
+import 'memory_compiler.dart';
+import 'compiler_helper.dart' show findElement;
+
+var SOURCES = const {
+'testAddAll.dart': """
+ var dictionaryA = {'string': "aString", 'int': 42, 'double': 21.5,
+ 'list': []};
+ var dictionaryB = {'string': "aString", 'int': 42, 'double': 21.5,
+ 'list': []};
+ var otherDict = {'stringTwo' : "anotherString", 'intTwo' : 84};
+ var int = 0;
+ var anotherInt = 0;
+ var nullOrInt = 0;
+ var dynamic = 0;
+
+ main() {
+ dictionaryA.addAll(otherDict);
+ dictionaryB.addAll({'stringTwo' : "anotherString", 'intTwo' : 84});
+ int = dictionaryB['int'];
+ anotherInt = otherDict['intTwo'];
+ dynamic = dictionaryA['int'];
+ nullOrInt = dictionaryB['intTwo'];
+ }
+""",
+'testUnion.dart': """
+ var dictionaryA = {'string': "aString", 'int': 42, 'double': 21.5,
+ 'list': []};
+ var dictionaryB = {'string': "aString", 'intTwo': 42, 'list': []};
+ var nullOrInt = 0;
+ var aString = "";
+ var doubleOrNull = 22.2;
+ var key = "string";
+
+ main() {
+ var union = dictionaryA['foo'] ? dictionaryA : dictionaryB;
+ nullOrInt = union['intTwo'];
+ aString = union['string'];
+ doubleOrNull = union['double'];
+ }
+""",
+'testValueType.dart': """
+ var dictionary = {'string': "aString", 'int': 42, 'double': 21.5, 'list': []};
+ var keyD = 'double';
+ var keyI = 'int';
+ var keyN = 'notFoundInMap';
+ var knownDouble = 42.2;
+ var intOrNull = dictionary[keyI];
+ var justNull = dictionary[keyN];
+
+ main() {
+ knownDouble = dictionary[keyD];
+ var x = [intOrNull, justNull];
+ }
+""",
+'testPropagation.dart': """
+ class A {
+ A();
+ foo(value) {
+ return value['anInt'];
+ }
+ }
+
+ class B {
+ B();
+ foo(value) {
+ return 0;
+ }
+ }
+
+ main() {
+ var dictionary = {'anInt': 42, 'aString': "theString"};
+ var it;
+ if ([true, false][0]) {
+ it = new A();
+ } else {
+ it = new B();
+ }
+ print(it.foo(dictionary) + 2);
+ }
+"""};
+
+void main() {
+ asyncTest(() =>
+ compileAndTest("testAddAll.dart", (types, getType, compiler) {
+ Expect.equals(getType('int'), types.uint31Type);
+ Expect.equals(getType('anotherInt'), types.uint31Type);
+ Expect.equals(getType('dynamic'), types.dynamicType);
+ Expect.equals(getType('nullOrInt'), types.uint31Type.nullable());
+ }).then((_) => compileAndTest("testUnion.dart", (types, getType, compiler) {
+ Expect.equals(getType('nullOrInt'), types.uint31Type.nullable());
+ Expect.isTrue(getType('aString').containsOnlyString(compiler));
+ Expect.equals(getType('doubleOrNull'), types.doubleType.nullable());
+ })).then((_) => compileAndTest("testValueType.dart",
+ (types, getType, compiler) {
+ Expect.equals(getType('knownDouble'), types.doubleType);
+ Expect.equals(getType('intOrNull'), types.uint31Type.nullable());
+ Expect.equals(getType('justNull'), types.nullType);
+ })).then((_) => compileAndTest("testPropagation.dart", (code) {
+ Expect.isFalse(code.contains("J.\$add\$ns"));
+ }, createCode: true))
+ );
+}
+
+compileAndTest(source, checker, {createCode: false}) {
+ var compiler = compilerFor(SOURCES);
+ compiler.stopAfterTypeInference = !createCode;
+ var uri = Uri.parse('memory:'+source);
+ return compiler.runCompiler(uri).then((_) {
+ var typesTask = compiler.typesTask;
+ var typesInferrer = typesTask.typesInferrer;
+ getType(String name) {
+ var element = findElement(compiler, name);
+ return typesInferrer.getTypeOfElement(element);
+ }
+ if (!createCode) {
+ checker(typesTask, getType, compiler);
+ } else {
+ var element = compiler.mainApp.findExported('main');
+ var code = compiler.backend.assembleCode(element);
+ checker(code);
+ }
+ });
+}
diff --git a/tests/compiler/dart2js/map_tracer_test.dart b/tests/compiler/dart2js/map_tracer_test.dart
index fe0767a..a3f10a1 100644
--- a/tests/compiler/dart2js/map_tracer_test.dart
+++ b/tests/compiler/dart2js/map_tracer_test.dart
@@ -22,7 +22,7 @@
String presetKey = 'presetKey';
class A {
- var field;
+ final field;
var nonFinalField;
A(this.field);
@@ -215,21 +215,21 @@
String valueElement]) {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(generateTest(allocation), uri,
- expectedErrors: 0, expectedWarnings: 0);
+ expectedErrors: 0, expectedWarnings: 1);
asyncTest(() => compiler.runCompiler(uri).then((_) {
var keyType, valueType;
var typesTask = compiler.typesTask;
var typesInferrer = typesTask.typesInferrer;
var emptyType = new TypeMask.nonNullEmpty();
- var aKeyType
- = typesInferrer.getTypeOfElement(findElement(compiler, 'aKey'));
+ var aKeyType =
+ typesInferrer.getTypeOfElement(findElement(compiler, 'aKey'));
if (keyElement != null) {
- keyType
- = typesInferrer.getTypeOfElement(findElement(compiler, keyElement));
+ keyType =
+ typesInferrer.getTypeOfElement(findElement(compiler, keyElement));
}
if (valueElement != null) {
- valueType
- = typesInferrer.getTypeOfElement(findElement(compiler, valueElement));
+ valueType =
+ typesInferrer.getTypeOfElement(findElement(compiler, valueElement));
}
if (keyType == null) keyType = emptyType;
if (valueType == null) valueType = emptyType;
@@ -242,7 +242,8 @@
}
K(TypeMask other) => simplify(keyType.union(other, compiler), compiler);
- V(TypeMask other) => simplify(valueType.union(other, compiler), compiler);
+ V(TypeMask other) =>
+ simplify(valueType.union(other, compiler), compiler).nullable();
checkType('mapInField', K(aKeyType), V(typesTask.numType));
checkType('mapPassedToMethod', K(aKeyType), V(typesTask.numType));
diff --git a/tests/compiler/dart2js/mirrors_used_test.dart b/tests/compiler/dart2js/mirrors_used_test.dart
index 6d11ba0..dec6f63 100644
--- a/tests/compiler/dart2js/mirrors_used_test.dart
+++ b/tests/compiler/dart2js/mirrors_used_test.dart
@@ -58,7 +58,7 @@
// 2. Some code was refactored, and there are more methods.
// Either situation could be problematic, but in situation 2, it is often
// acceptable to increase [expectedMethodCount] a little.
- int expectedMethodCount = 355;
+ int expectedMethodCount = 375;
Expect.isTrue(
generatedCode.length <= expectedMethodCount,
'Too many compiled methods: '
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 3800f22..472c1f9 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -273,7 +273,8 @@
analyzeAllFlag: analyzeAll,
analyzeOnly: analyzeOnly,
emitJavaScript: emitJavaScript,
- preserveComments: preserveComments) {
+ preserveComments: preserveComments,
+ showPackageWarnings: true) {
clearMessages();
coreLibrary = createLibrary("core", coreSource);
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 5673e4a..5d448c8d9 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -72,6 +72,7 @@
testInitializers();
testThis();
testSuperCalls();
+ testSwitch();
testTypeVariables();
testToString();
testIndexedOperator();
@@ -203,6 +204,25 @@
Expect.equals(fooA, called);
}
+testSwitch() {
+ MockCompiler compiler = new MockCompiler();
+ compiler.parseScript("class Foo { foo() {"
+ "switch (null) { case '': break; case 2: break; } } }");
+ compiler.resolveStatement("Foo foo;");
+ ClassElement fooElement = compiler.mainApp.find("Foo");
+ FunctionElement funElement = fooElement.lookupLocalMember("foo");
+ compiler.processQueue(compiler.enqueuer.resolution, funElement);
+ Expect.equals(0, compiler.warnings.length);
+ Expect.equals(1, compiler.errors.length);
+ Expect.equals(MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
+ compiler.errors[0].message.kind);
+ Expect.equals(2, compiler.infos.length);
+ Expect.equals(MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
+ compiler.infos[0].message.kind);
+ Expect.equals(MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
+ compiler.infos[1].message.kind);
+}
+
testThis() {
MockCompiler compiler = new MockCompiler();
compiler.parseScript("class Foo { foo() { return this; } }");
diff --git a/tests/compiler/dart2js/hide_package_warnings_test.dart b/tests/compiler/dart2js/show_package_warnings_test.dart
similarity index 83%
rename from tests/compiler/dart2js/hide_package_warnings_test.dart
rename to tests/compiler/dart2js/show_package_warnings_test.dart
index 639eef8..eb9a441 100644
--- a/tests/compiler/dart2js/hide_package_warnings_test.dart
+++ b/tests/compiler/dart2js/show_package_warnings_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Test that the '--hide-package-warnings' option works as intended.
+// Test that the '--show-package-warnings' option works as intended.
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';
@@ -22,7 +22,7 @@
import 'package:pkg_error1/pkg_error1.dart';
import 'package:pkg_error2/pkg_error2.dart';
import 'package:pkg_noerror/pkg_noerror.dart';
-import 'error.dart';
+import 'error.dart';
""",
'error.dart': ERROR_CODE,
@@ -43,13 +43,13 @@
"""};
void test(List<Uri> entryPoints,
- {bool hidePackageWarnings: false,
+ {bool showPackageWarnings: false,
int warnings: 0,
int hints: 0,
int infos: 0}) {
var options = ['--analyze-only', '--analyze-all'];
- if (hidePackageWarnings) {
- options.add('--hide-package-warnings');
+ if (showPackageWarnings) {
+ options.add('--show-package-warnings');
}
var collector = new DiagnosticCollector();
var compiler = compilerFor(SOURCE,
@@ -64,7 +64,7 @@
}
asyncTest(() => compiler.run(mainUri).then((_) {
print('==================================================================');
- print('test: $entryPoints hidePackageWarnings=$hidePackageWarnings');
+ print('test: $entryPoints showPackageWarnings=$showPackageWarnings');
Expect.equals(0, collector.errors.length,
'Unexpected errors: ${collector.errors}');
Expect.equals(warnings, collector.warnings.length,
@@ -79,26 +79,27 @@
void main() {
test([Uri.parse('memory:main.dart')],
- hidePackageWarnings: false,
+ showPackageWarnings: true,
// From error.dart, package:pkg_error1 and package:pkg_error2:
warnings: 3, hints: 3, infos: 3);
test([Uri.parse('memory:main.dart')],
- hidePackageWarnings: true,
+ showPackageWarnings: false,
// From error.dart only:
- warnings: 1, hints: 1, infos: 1);
+ warnings: 1, hints: 1 + 2 /* from summary */, infos: 1);
test([Uri.parse('package:pkg_error1/pkg_error1.dart')],
- hidePackageWarnings: false,
+ showPackageWarnings: true,
// From package:pkg_error1 and package:pkg_error2:
warnings: 2, hints: 2, infos: 2);
test([Uri.parse('package:pkg_error1/pkg_error1.dart')],
- hidePackageWarnings: true,
+ showPackageWarnings: false,
// From package:pkg_error1/pkg_error1.dart only:
- warnings: 1, hints: 1, infos: 1);
+ warnings: 1, hints: 1 + 1 /* from summary */, infos: 1);
test([Uri.parse('package:pkg_noerror/pkg_noerror.dart')],
- hidePackageWarnings: false,
+ showPackageWarnings: true,
// From package:pkg_error1 and package:pkg_error2:
warnings: 2, hints: 2, infos: 2);
test([Uri.parse('package:pkg_noerror/pkg_noerror.dart')],
- hidePackageWarnings: true);
+ showPackageWarnings: false,
+ hints: 2 /* from summary */);
}
diff --git a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart
index 9447cfb..30181fe 100644
--- a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart
@@ -16,7 +16,7 @@
final intField;
final stringField;
A() : intField = 42, stringField = 'foo';
- A.bar() : intField = 54, stringField = 42;
+ A.bar() : intField = 'bar', stringField = 42;
}
main() {
@@ -33,10 +33,10 @@
checkFieldTypeInClass(String className, String fieldName, type) {
var cls = findElement(compiler, className);
var element = cls.lookupLocalMember(fieldName);
- Expect.equals(type, typesInferrer.getTypeOfElement(element));
+ Expect.isTrue(typesInferrer.getTypeOfElement(element).containsOnly(type));
}
- checkFieldTypeInClass('A', 'intField', compiler.typesTask.uint31Type);
- checkFieldTypeInClass('A', 'stringField', compiler.typesTask.stringType);
+ checkFieldTypeInClass('A', 'intField', compiler.backend.uint31Implementation);
+ checkFieldTypeInClass('A', 'stringField', compiler.backend.stringImplementation);
}));
}
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index 88e1ce7..59cd008 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -151,11 +151,6 @@
warnings: [NOT_ASSIGNABLE, NOT_ASSIGNABLE]);
analyze("switch (1.5) { case 1: break; case 2: break; }",
warnings: [NOT_ASSIGNABLE, NOT_ASSIGNABLE]);
-
- analyze("switch (null) { case '': break; case 2: break; }",
- infos: [MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
- MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE],
- errors: [MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL]);
}
testOperators() {
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index c737446..f31fe96 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -18,9 +18,6 @@
variable_type_test/03: Fail, OK
variable_type_test/01: Fail, OK
-[ $compiler == dart2js && ($runtime == d8 || $runtime == chrome || $runtime == drt) ]
-bound_closure_interceptor_type_test: Fail, Pass # v8 issue 3084. https://code.google.com/p/v8/issues/detail?id=3084
-
[ $compiler == dart2js && $host_checked && $checked == false ]
# Test that @IrRepresentation yields compile-time errors in host-checked mode.
# The condition "$checked == false" is to be removed once we build IR in
diff --git a/tests/compiler/dart2js_extra/minus_zero2_test.dart b/tests/compiler/dart2js_extra/minus_zero2_test.dart
new file mode 100644
index 0000000..622678a
--- /dev/null
+++ b/tests/compiler/dart2js_extra/minus_zero2_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for issue 17210.
+
+import "package:expect/expect.dart";
+
+void main() {
+ // Dart2js must use "-0.0" as if it was 0. In particular, it must do its
+ // range-analysis correctly.
+ var list = [1, 2, 3];
+ if (new DateTime.now().millisecondsSinceEpoch == 42) list[1] = 4;
+ int sum = 0;
+ for (int i = -0.0; i < list.length; i++) {
+ sum += list[i];
+ }
+ Expect.equals(6, sum);
+}
diff --git a/tests/compiler/dart2js_extra/minus_zero_test.dart b/tests/compiler/dart2js_extra/minus_zero_test.dart
new file mode 100644
index 0000000..a9d4722
--- /dev/null
+++ b/tests/compiler/dart2js_extra/minus_zero_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for issue 17210.
+
+import "package:expect/expect.dart";
+
+const double MINUS_ZERO = -0;
+
+void main() {
+ // Dart2js must not infer that the type-intersection of int and -0.0 is empty.
+ // It must get an interceptor for the addition (`i += 3`), or use the native
+ // JS + operation.
+ int i = MINUS_ZERO;
+ i += 3;
+ Expect.equals(3, i);
+}
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 6fce1d2..42709dc 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -42,6 +42,10 @@
string_from_environment3_test/03: Fail
string_from_environment3_test/04: Fail
+[ $compiler == dartanalyzer ]
+string_from_environment_test: Crash # http://dartbug.com/17234
+int_from_environment2_test: Crash # http://dartbug.com/17234
+
[ $compiler == none ]
unicode_test: Fail # Bug 6706
compare_to2_test: Fail # Bug 4018
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index 319fe98..a3eb24d 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -13,6 +13,7 @@
capability_test: Fail # Not implemented yet
pause_test: Fail # Not implemented yet
start_paused_test: Fail # Not implemented yet
+ondone_test: Skip # Not implemented yet, hangs.
[ $compiler == dart2js && $jscl ]
browser/*: SkipByDesign # Browser specific tests
diff --git a/tests/isolate/ondone_test.dart b/tests/isolate/ondone_test.dart
new file mode 100644
index 0000000..af990ad
--- /dev/null
+++ b/tests/isolate/ondone_test.dart
@@ -0,0 +1,94 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:isolate";
+import "dart:async";
+import "package:async_helper/async_helper.dart";
+
+void isomain(SendPort replyPort) {
+ RawReceivePort port = new RawReceivePort();
+ port.handler = (v) {
+ if (v == 0) {
+ // Shut down when receiving the 0 message.
+ port.close();
+ } else {
+ replyPort.send(v);
+ }
+ };
+ replyPort.send(port.sendPort);
+}
+
+
+void main() {
+ testExit();
+ testCancelExit();
+}
+
+void testExit() {
+ bool mayComplete = false;
+ asyncStart();
+ var completer = new Completer(); // Completed by first reply from isolate.
+ RawReceivePort reply = new RawReceivePort(completer.complete);
+ RawReceivePort onExitPort;
+ onExitPort = new RawReceivePort((_) {
+ reply.close();
+ onExitPort.close();
+ if (!mayComplete) throw "COMPLETED EARLY";
+ asyncEnd();
+ });
+ Isolate.spawn(isomain, reply.sendPort).then((Isolate isolate) {
+ isolate.addOnExitListener(onExitPort.sendPort);
+ return completer.future;
+ }).then((echoPort) {
+ int counter = 4;
+ reply.handler = (v) {
+ if (v != counter) throw "WRONG REPLY";
+ if (v == 0) throw "REPLY INSTEAD OF SHUTDOWN";
+ counter--;
+ mayComplete = (counter == 0);
+ echoPort.send(counter);
+ };
+ echoPort.send(counter);
+ });
+}
+
+
+void testCancelExit() {
+ bool mayComplete = false;
+ asyncStart();
+ var completer = new Completer(); // Completed by first reply from isolate.
+ RawReceivePort reply = new RawReceivePort(completer.complete);
+ RawReceivePort onExitPort2 = new RawReceivePort((_) {
+ throw "RECEIVED EXIT MESSAGE";
+ });
+ RawReceivePort onExitPort1;
+ onExitPort1 = new RawReceivePort((_) {
+ reply.close();
+ onExitPort1.close();
+ if (!mayComplete) throw "COMPLETED EARLY";
+ new Timer(const Duration(milliseconds: 0), () {
+ onExitPort2.close();
+ asyncEnd();
+ });
+ });
+ Isolate.spawn(isomain, reply.sendPort).then((Isolate isolate) {
+ isolate.addOnExitListener(onExitPort2.sendPort);
+ isolate.addOnExitListener(onExitPort1.sendPort);
+ return completer.future.then((echoPort) {
+ int counter = 4;
+ reply.handler = (v) {
+ if (v != counter) throw "WRONG REPLY";
+ if (v == 0) throw "REPLY INSTEAD OF SHUTDOWN";
+ counter--;
+ mayComplete = (counter == 0);
+ if (counter == 1) {
+ // Remove listener 2, keep listener 1.
+ isolate.removeOnExitListener(onExitPort2.sendPort);
+ }
+ echoPort.send(counter);
+ };
+ echoPort.send(counter);
+ });
+ });
+}
diff --git a/tests/language/const_map2_test.dart b/tests/language/const_map2_test.dart
new file mode 100644
index 0000000..6b599f7
--- /dev/null
+++ b/tests/language/const_map2_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {
+ const factory A() = B;
+}
+
+class B implements A {
+ const B();
+
+ operator ==(o) => true; /// 00: compile-time error
+}
+
+confuse(x) {
+ if (new DateTime.now() == 42) return confuse(2);
+ return x;
+}
+
+main() {
+ // It is a compile-time error if the key type overrides operator ==.
+ var m = const { const A(): 42 };
+ Expect.equals(42, m[confuse(const B())]);
+
+ m = const { "foo": 99, const A(): 499 };
+ Expect.equals(499, m[confuse(const B())]);
+}
diff --git a/tests/language/const_map_test.dart b/tests/language/const_map_test.dart
new file mode 100644
index 0000000..96db1d6
--- /dev/null
+++ b/tests/language/const_map_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+/// Returns its argument.
+///
+/// Prevents static optimizations and inlining.
+confuse(x) {
+ // DateTime.now() cannot be predicted statically.
+ if (new DateTime.now() == 42) return confuse(2);
+ return x;
+}
+
+main() {
+ // Make sure that const maps use the == operator and not identical. The
+ // specification does not explicitly require it, but otherwise ints and
+ // Strings wouldn't make much sense as keys.
+ var m = const { 1: 42, "foo": 499 };
+ Expect.equals(42, m[confuse(1.0)]);
+ Expect.equals(499, m[confuse(new String.fromCharCodes("foo".runes))]);
+}
diff --git a/tests/language/is_malformed_type_test.dart b/tests/language/is_malformed_type_test.dart
new file mode 100644
index 0000000..b5afacc
--- /dev/null
+++ b/tests/language/is_malformed_type_test.dart
@@ -0,0 +1,94 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Dart test program for the "is" and "as" operator with malformed type.
+
+import "package:expect/expect.dart";
+
+var evalCount = 0;
+testEval(x) { evalCount++; return x; }
+
+test99(e) {
+ // Test that a runtime error is thrown when the 'is' operator checks for a
+ // malformed type.
+ try {
+ if (e is Undefined) Expect.fail("unreachable");
+ Expect.fail("unreachable");
+ } catch(exc) {
+ Expect.isTrue(exc is TypeError);
+ }
+}
+
+test98(e) {
+ // Test that a runtime error is thrown when the 'as' operator checks for a
+ // malformed type.
+ try {
+ if (e as Undefined) Expect.fail("unreachable");
+ Expect.fail("unreachable");
+ } catch(exc) {
+ Expect.isTrue(exc is TypeError);
+ }
+}
+
+test97(e) {
+ try {
+ // Check that the remaining expression after the type test
+ // with malformed type is parsed, but not executed at runtime.
+ // Regression test for issue 16985.
+ evalCount = 0;
+ if (e is Undefined && testEval(e)) Expect.fail("unreachable");
+ Expect.fail("unreachable");
+ } catch(exc) {
+ Expect.isTrue(exc is TypeError);
+ Expect.equals(0, evalCount);
+ }
+}
+
+test96(e) {
+ try {
+ // Check that the remaining expression after the type test
+ // with malformed type is parsed, but not executed at runtime.
+ // Regression test for issue 16985.
+ evalCount = 0;
+ if (e as Undefined && testEval(e)) Expect.fail("unreachable");
+ Expect.fail("unreachable");
+ } catch(exc) {
+ Expect.isTrue(exc is TypeError);
+ Expect.equals(0, evalCount);
+ }
+}
+
+test95(e) {
+ // Check that the type-tested expression is evaluated before the
+ // runtime error is thrown.
+ try {
+ evalCount = 0;
+ if (testEval(e) is Undefined) Expect.fail("unreachable");
+ Expect.fail("unreachable");
+ } catch(exc) {
+ Expect.isTrue(exc is TypeError);
+ Expect.equals(1, evalCount);
+ }
+}
+
+test94(e) {
+ // Check that the type-tested expression is evaluated before the
+ // runtime error is thrown.
+ try {
+ evalCount = 0;
+ if (testEval(e) as Undefined) Expect.fail("unreachable");
+ Expect.fail("unreachable");
+ } catch(exc) {
+ Expect.isTrue(exc is TypeError);
+ Expect.equals(1, evalCount);
+ }
+}
+
+main() {
+ test99("99 bottles"); /// 99: ok
+ test98("98 bottles"); /// 98: ok
+ test97("97 bottles"); /// 97: ok
+ test96("96 bottles"); /// 96: ok
+ test95("95 bottles"); /// 95: ok
+ test94("94 bottles"); /// 94: ok
+}
diff --git a/tests/language/language_analyzer.status b/tests/language/language_analyzer.status
index 1c18d7b..319229e 100644
--- a/tests/language/language_analyzer.status
+++ b/tests/language/language_analyzer.status
@@ -5,6 +5,7 @@
[ $compiler == dartanalyzer ]
# Runtime negative test. No static errors or warnings.
closure_call_wrong_argument_count_negative_test: skip
+is_malformed_type_test/*: Fail # don't know how to tell analyzer to expect static warning
# Test issue 12694 (was analyzer issue), (1) when "abstract" is import prefix using it as type is warning; (2) currently analyzer resolves prefix as field (don't ask)
built_in_identifier_prefix_test: CompileTimeError # Issue 12694
@@ -24,6 +25,9 @@
type_check_const_function_typedef2_test/00: MissingCompileTimeError, Ok # Compile-time error in checked mode, because of constants.
+const_map2_test/00: MissingCompileTimeError # Issue 17209
+switch_case_test/none: CompileTimeError # Issue 17209
+
# Please add new failing tests before this line.
# Section below is for invalid tests.
#
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index cf3aeb9..8531ff2 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -5,6 +5,7 @@
[ $compiler == dart2analyzer ]
# Runtime negative test. No static errors or warnings.
closure_call_wrong_argument_count_negative_test: skip
+is_malformed_type_test/*: Fail # don't know how to tell analyzer to expect static warning
# Test issue 12694 (was analyzer issue), (1) when "abstract" is import prefix using it as type is warning; (2) currently analyzer resolves prefix as field (don't ask)
built_in_identifier_prefix_test: CompileTimeError # Issue 12694
@@ -20,16 +21,13 @@
override_field_test/03: fail
method_override7_test/03: Fail # Issue 11496
-assignable_expression_test/02: Fail # Issue 15471
-assignable_expression_test/12: Fail # Issue 15471
-assignable_expression_test/22: Fail # Issue 15471
-assignable_expression_test/32: Fail # Issue 15471
-assignable_expression_test/42: Fail # Issue 15471
-
-unicode_bom_test: Fail # Issue 16314
+#unicode_bom_test: Fail # Issue 16314
type_check_const_function_typedef2_test/00: MissingCompileTimeError, Ok # Compile-time error in checked mode, because of constants.
+const_map2_test/00: MissingCompileTimeError # Issue 17209
+switch_case_test/none: CompileTimeError # Issue 17209
+
# Please add new failing tests before this line.
# Section below is for invalid tests.
#
@@ -181,9 +179,6 @@
proxy_test/05: StaticWarning # Issue 15467
proxy_test/06: StaticWarning # Issue 15467
-# test issue 15714
-typevariable_substitution2_test/01: StaticWarning # Issue 15714
-
# analyzer does not handle @proxy and noSuchMethod correctly
override_inheritance_no_such_method_test/03: StaticWarning # Issue 16132
override_inheritance_no_such_method_test/04: StaticWarning # Issue 16132
@@ -198,7 +193,6 @@
override_inheritance_generic_test/03: StaticWarning # Issue 16134
# missing warning for override
-override_inheritance_field_test/10: MissingStaticWarning # Issue 16135
override_inheritance_generic_test/04: MissingStaticWarning # Issue 16135
override_inheritance_generic_test/06: MissingStaticWarning # Issue 16135
override_inheritance_generic_test/07: MissingStaticWarning # Issue 16135
@@ -342,14 +336,11 @@
method_override_test: StaticWarning
mixin_illegal_static_access_test: StaticWarning
mixin_illegal_syntax_test/13: CompileTimeError
-mixin_typedef_constructor_test: StaticWarning
-mixin_type_parameter2_test: StaticWarning
mixin_type_parameters_mixin_extends_test: StaticWarning
mixin_type_parameters_mixin_test: StaticWarning
mixin_type_parameters_super_extends_test: StaticWarning
mixin_type_parameters_super_test: StaticWarning
mixin_with_two_implicit_constructors_test: StaticWarning
-mixin_bound_test: StaticWarning
mixin_invalid_bound_test/none: StaticWarning # legitimate StaticWarning, cannot be annotated
mixin_invalid_bound2_test/none: StaticWarning # legitimate StaticWarning, cannot be annotated
named_constructor_test/01: StaticWarning
@@ -483,4 +474,3 @@
vm/type_cast_vm_test: StaticWarning
vm/type_vm_test: StaticWarning
void_type_test: StaticWarning
-
diff --git a/tests/language/map_literal11_test.dart b/tests/language/map_literal11_test.dart
deleted file mode 100644
index 7461b80..0000000
--- a/tests/language/map_literal11_test.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test the use of reliance on identity for keys in constant maps.
-
-library map_literal11_test;
-
-import "package:expect/expect.dart";
-
-
-class A {
- static int accessCount = 0;
-
- final int field;
-
- const A(this.field);
- int get hashCode => accessCount++;
-}
-
-void main() {
- // Non-constant map are not based on identity.
- var m1 = {const A(0): 0, const A(1): 1, null: 2, "3": 3, 4: 4};
- Expect.isFalse(m1.containsKey(const A(0)));
- Expect.isFalse(m1.containsKey(const A(1)));
- Expect.isTrue(m1.containsKey(null));
- Expect.isTrue(m1.containsKey("3"));
- Expect.isTrue(m1.containsKey(4));
- Expect.isNull(m1[const A(0)]);
- Expect.isNull(m1[const A(1)]);
- Expect.equals(2, m1[null]);
- Expect.equals(3, m1["3"]);
- Expect.equals(4, m1[4]);
-
- // Constant map are based on identity.
- var m2 = const {const A(0): 0, const A(1): 1, null: 2, "3": 3, 4: 4};
- Expect.isTrue(m2.containsKey(const A(0)));
- Expect.isTrue(m2.containsKey(const A(1)));
- Expect.isTrue(m2.containsKey(null));
- Expect.isTrue(m2.containsKey("3"));
- Expect.isTrue(m2.containsKey(4));
- Expect.equals(0, m2[const A(0)]);
- Expect.equals(1, m2[const A(1)]);
- Expect.equals(2, m2[null]);
- Expect.equals(3, m2["3"]);
- Expect.equals(4, m2[4]);
-}
diff --git a/tests/language/super_bound_closure_test.dart b/tests/language/super_bound_closure_test.dart
new file mode 100644
index 0000000..a85f30f
--- /dev/null
+++ b/tests/language/super_bound_closure_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {
+ bar([var optional = 1]) => 498 + optional;
+ bar2(x, { namedOptional: 2 }) => 40 + x + namedOptional;
+}
+
+class B extends A {
+ // The closure `super.bar` is invoked without the optional argument.
+ // Dart2js must not generate a `bar$0 => bar$1(null)` closure, since that
+ // would redirect to B's `bar$1`. Instead it must enforce that `bar$0` in
+ // `A` redirects to A's bar$1.
+ foo() => confuse(super.bar)();
+ foo2() => confuse(super.bar)(2);
+ foo3() => confuse(super.bar2)(0);
+ foo4() => confuse(super.bar2)(3, namedOptional: 77);
+
+ bar([var optional]) => -1;
+ bar2(x, { namedOptional }) => -1;
+}
+
+confuse(x) {
+ if (new DateTime.now().millisecondsSinceEpoch == 42) return confuse(x - 1);
+ return x;
+}
+
+main() {
+ var list = [new A(), new B() ];
+ var a = list[confuse(0)];
+ var b = list[confuse(1)];
+ Expect.equals(499, b.foo());
+ Expect.equals(500, b.foo2());
+ Expect.equals(42, b.foo3());
+ Expect.equals(120, b.foo4());
+}
diff --git a/tests/language/switch_case_test.dart b/tests/language/switch_case_test.dart
new file mode 100644
index 0000000..60c150e
--- /dev/null
+++ b/tests/language/switch_case_test.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {
+ const A();
+ const factory A.B() = B;
+ const factory A.C() = C;
+ const factory A.C2() = D;
+}
+
+class B implements A {
+ const B();
+
+ operator ==(o) => true; /// 00: compile-time error
+}
+
+class C implements A {
+ final int x;
+ const C() : x = 0;
+ const C.fromD() : x = 1;
+}
+
+class D implements C {
+ const factory D() = C.fromD;
+}
+
+main() {
+ switch (new B()) {
+ case const A.B(): Expect.fail("bad switch"); break; /// 00: continued
+ }
+
+ switch (new C()) {
+ case const C(): Expect.fail("bad switch"); break;
+ case const A.C(): Expect.fail("bad switch"); break;
+ case const A.C2(): Expect.fail("bad switch"); break;
+ case const A(): Expect.fail("bad switch"); break; /// 01: compile-time error
+ }
+
+ switch (new A()) {
+ case const A(): Expect.fail("bad switch"); break;
+ case const A.B(): Expect.fail("bad switch"); break; /// 02: compile-time error
+ }
+}
diff --git a/tests/lib/analyzer/analyze_library.status b/tests/lib/analyzer/analyze_library.status
index 3490ff7..19f070b 100644
--- a/tests/lib/analyzer/analyze_library.status
+++ b/tests/lib/analyzer/analyze_library.status
@@ -27,6 +27,6 @@
lib/web_gl/dartium/web_gl_dartium: CompileTimeError # Issue 16524
lib/web_sql/dart2js/web_sql_dart2js: CompileTimeError # Issue 16524
lib/web_sql/dartium/web_sql_dartium: CompileTimeError # Issue 16524
-lib/_internal/compiler/samples/jsonify/jsonify: CompileTimeError # issue 16466
-lib/_internal/compiler/implementation/mirrors/analyze: CompileTimeError # issue 16466
-lib/_internal/compiler/implementation/mirrors/dart2js_mirrors: CompileTimeError # issue 16466
+lib/_internal/compiler/samples/jsonify/jsonify: CompileTimeError # Issue 17264
+lib/_internal/compiler/implementation/mirrors/dart2js_mirrors: CompileTimeError # Issue 17264
+lib/_internal/compiler/implementation/mirrors/analyze: CompileTimeError # Issue 17264
diff --git a/tests/lib/async/stream_timeout_test.dart b/tests/lib/async/stream_timeout_test.dart
index 80fe811..e06ba67 100644
--- a/tests/lib/async/stream_timeout_test.dart
+++ b/tests/lib/async/stream_timeout_test.dart
@@ -7,7 +7,7 @@
main() {
const ms5 = const Duration(milliseconds: 5);
- const halfSec = const Duration(milliseconds: 500);
+ const twoSecs = const Duration(seconds: 2);
test("stream timeout", () {
StreamController c = new StreamController();
@@ -34,7 +34,7 @@
test("stream no timeout", () {
StreamController c = new StreamController();
- Stream tos = c.stream.timeout(halfSec);
+ Stream tos = c.stream.timeout(twoSecs);
int ctr = 0;
tos.listen((v) {
expect(v, 42);
@@ -50,7 +50,7 @@
test("stream timeout after events", () {
StreamController c = new StreamController();
- Stream tos = c.stream.timeout(halfSec);
+ Stream tos = c.stream.timeout(twoSecs);
expect(tos.isBroadcast, false);
int ctr = 0;
tos.listen((v) {
@@ -97,7 +97,7 @@
test("events prevent timeout", () {
Stopwatch sw = new Stopwatch();
StreamController c = new StreamController();
- Stream tos = c.stream.timeout(halfSec, onTimeout: (_) {
+ Stream tos = c.stream.timeout(twoSecs, onTimeout: (_) {
int elapsed = sw.elapsedMilliseconds;
if (elapsed > 250) {
// This should not happen, but it does occasionally.
@@ -108,7 +108,8 @@
fail("Timeout not prevented by events");
throw "ERROR";
});
- tos.listen((v) { expect(v, 42);}, onDone: expectAsync0((){}));
+ // Start the periodic timer before we start listening to the stream.
+ // This should reduce the flakiness of the test.
int ctr = 200; // send this many events at 5ms intervals. Then close.
new Timer.periodic(ms5, (timer) {
sw.reset();
@@ -119,12 +120,14 @@
}
});
sw.start();
+
+ tos.listen((v) { expect(v, 42);}, onDone: expectAsync0((){}));
});
test("errors prevent timeout", () {
Stopwatch sw = new Stopwatch();
StreamController c = new StreamController();
- Stream tos = c.stream.timeout(halfSec, onTimeout: (_) {
+ Stream tos = c.stream.timeout(twoSecs, onTimeout: (_) {
int elapsed = sw.elapsedMilliseconds;
if (elapsed > 250) {
// This should not happen, but it does occasionally.
@@ -134,11 +137,9 @@
}
fail("Timeout not prevented by errors");
});
- tos.listen((_) {},
- onError: (e, s) {
- expect(e, "ERROR");
- },
- onDone: expectAsync0((){}));
+
+ // Start the periodic timer before we start listening to the stream.
+ // This should reduce the flakiness of the test.
int ctr = 200; // send this many error events at 5ms intervals. Then close.
new Timer.periodic(ms5, (timer) {
sw.reset();
@@ -149,11 +150,17 @@
}
});
sw.start();
+
+ tos.listen((_) {},
+ onError: (e, s) {
+ expect(e, "ERROR");
+ },
+ onDone: expectAsync0((){}));
});
test("closing prevents timeout", () {
StreamController c = new StreamController();
- Stream tos = c.stream.timeout(halfSec, onTimeout: (_) {
+ Stream tos = c.stream.timeout(twoSecs, onTimeout: (_) {
fail("Timeout not prevented by close");
});
tos.listen((_) {}, onDone: expectAsync0((){}));
@@ -167,7 +174,7 @@
});
var subscription = tos.listen((_) {}, onDone: expectAsync0((){}));
subscription.pause();
- new Timer(halfSec, () {
+ new Timer(twoSecs, () {
c.close();
subscription.resume();
});
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 0db6864..da7a51c 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -17,7 +17,8 @@
[ $csp ]
mirrors/delegate_test: RuntimeError # Issue 13864
-async/deferred/deferred_in_isolate_test: RuntimeError # Issue 16898
+async/deferred/deferred_in_isolate_test: RuntimeError # Issue 16898
+mirrors/deferred_mirrors_metadata_test: Fail # Issue 16898
[ $compiler == dart2js && $checked && $runtime == drt && $nocsp ]
async/stream_transform_test: RuntimeError # Issue 16719
@@ -35,6 +36,7 @@
mirrors/constructor_kinds_test: RuntimeError # Issue 13799
mirrors/constructor_private_name_test: CompileTimeError # Issue 13597
mirrors/delegate_call_through_getter_test: RuntimeError # Issue 15138
+mirrors/delegate_function_invocation_test: RuntimeError # Issue 6490
mirrors/equality_test/02: RuntimeError # Issue 12785
mirrors/fake_function_with_call_test: RuntimeError # Issue 11612
mirrors/fake_function_without_call_test: RuntimeError # Issue 11612
@@ -84,17 +86,19 @@
mirrors/proxy_type_test: RuntimeError # Issue 13842
mirrors/redirecting_factory_test/none: RuntimeError # Issue 6490
mirrors/redirecting_factory_test/02: RuntimeError # Issue 6490
+mirrors/reflected_type_function_type_test: RuntimeError # Issue 12607
+mirrors/reflected_type_special_types_test: RuntimeError # Issue 12607
+mirrors/reflected_type_typedefs_test: RuntimeError # Issue 12607
+mirrors/reflected_type_typevars_test: RuntimeError # Issue 12607
mirrors/relation_assignable_test: RuntimeError # Issue 6490
mirrors/relation_subtype_test: RuntimeError # Issue 6490
-mirrors/relation_subclass_test: RuntimeError # Issue 6490
mirrors/repeated_private_anon_mixin_app_test: RuntimeError # Issue 14670
-mirrors/symbol_validation_test/none: RuntimeError # Issue 13597
+mirrors/symbol_validation_test/01: RuntimeError # Issue 13597
mirrors/static_members_test: RuntimeError # Issue 14633, Issue 12164
-mirrors/synthetic_accessor_properties_test: RuntimeError # Issue 14633
-mirrors/toplevel_members_test: RuntimeError # Issue 14633, Issue 12164
mirrors/typedef_test/none: RuntimeError # http://dartbug.com/6490
mirrors/typedef_metadata_test: RuntimeError # Issue 12785
mirrors/typevariable_mirror_metadata_test: CompileTimeError # Issue 10905
+mirrors/type_variable_is_static_test: RuntimeError # Issue 6335
mirrors/type_variable_owner_test/01: RuntimeError # Issue 12785
mirrors/variable_is_const_test/none: RuntimeError # Issue 14671
mirrors/variable_is_const_test/01: MissingCompileTimeError # Issue 5519
@@ -209,6 +213,7 @@
convert/chunked_conversion_utf88_test: Pass, Slow, Timeout # Issue 12029
convert/streamed_conversion_json_utf8_decode_test: Pass, Timeout # Issue 12029
async/deferred/*: Pass, Fail, Timeout # http://dartbug.com/12635
+mirrors/deferred*: Pass, Fail # http://dartbug.com/12635
convert/streamed_conversion_utf8_decode_test: Pass, Timeout # http://dartbug.com/12768
convert/utf85_test: Skip # Issue 12029.
convert/json_util_test: Fail # Issue 16109
@@ -237,8 +242,6 @@
mirrors/generic_local_function_test: RuntimeError # Issue 14913
mirrors/symbol_validation_test: RuntimeError # Issue 13596
-mirrors/synthetic_accessor_properties_test/none: RuntimeError # Issue 14632
-mirrors/toplevel_members_test/01: RuntimeError # Issue 14632
async/timer_not_available_test: SkipByDesign # only meant to test when there is no way to implement timer (currently only in d8)
diff --git a/tests/lib/mirrors/deferred_mirrors_metadata_lib.dart b/tests/lib/mirrors/deferred_mirrors_metadata_lib.dart
new file mode 100644
index 0000000..efa29d8
--- /dev/null
+++ b/tests/lib/mirrors/deferred_mirrors_metadata_lib.dart
@@ -0,0 +1,16 @@
+library lib;
+
+import "deferred_mirrors_metadata_test.dart";
+@MirrorsUsed(targets: const ["main", "main.A", "main.B", "main.C", "lib.D"])
+import "dart:mirrors";
+
+@C() class D {}
+
+String foo() {
+ String c = reflectClass(D).metadata[0].invoke(#toString, []).reflectee;
+ InstanceMirror i = currentMirrorSystem().findLibrary(#main).metadata[0];
+ String a = i.invoke(#toString, []).reflectee;
+ String b = i.getField(#b).invoke(#toString, []).reflectee;
+ return a + b + c;
+}
+
diff --git a/tests/lib/mirrors/deferred_mirrors_metadata_test.dart b/tests/lib/mirrors/deferred_mirrors_metadata_test.dart
new file mode 100644
index 0000000..6d3bbc6
--- /dev/null
+++ b/tests/lib/mirrors/deferred_mirrors_metadata_test.dart
@@ -0,0 +1,38 @@
+@A(const B())
+library main;
+
+@B()
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+
+import "dart:async";
+import "dart:math";
+
+@l import 'deferred_mirrors_metadata_lib.dart' as lib1;
+
+const l = const DeferredLibrary("lib1");
+
+
+class A {
+ final B b;
+ const A(this.b);
+ String toString() => "A";
+}
+
+class B {
+ const B();
+ String toString() => "B";
+}
+
+class C {
+ const C();
+ String toString() => "C";
+}
+
+void main() {
+ asyncStart();
+ l.load().then((_) {
+ Expect.equals("ABC", lib1.foo());
+ asyncEnd();
+ });
+}
diff --git a/tests/lib/mirrors/delegate_function_invocation_test.dart b/tests/lib/mirrors/delegate_function_invocation_test.dart
new file mode 100644
index 0000000..d7398ad
--- /dev/null
+++ b/tests/lib/mirrors/delegate_function_invocation_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.delgate_function_invocation;
+
+import 'dart:mirrors';
+
+import 'package:expect/expect.dart';
+
+class Proxy {
+ var targetMirror;
+ Proxy(target) : this.targetMirror = reflect(target);
+ noSuchMethod(invocation) => targetMirror.delegate(invocation);
+}
+
+testClosure() {
+ var proxy = new Proxy(() => 42);
+ Expect.equals(42, proxy());
+ Expect.equals(42, proxy.call());
+}
+
+class FakeFunction {
+ call() => 43;
+}
+
+testFakeFunction() {
+ var proxy = new Proxy(new FakeFunction());
+ Expect.equals(43, proxy());
+ Expect.equals(43, proxy.call());
+}
+
+topLevelFunction() => 44;
+
+testTopLevelTearOff() {
+ var proxy = new Proxy(topLevelFunction);
+ Expect.equals(44, proxy());
+ Expect.equals(44, proxy.call());
+}
+
+class C {
+ method() => 45;
+}
+
+testInstanceTearOff() {
+ var proxy = new Proxy(new C().method);
+ Expect.equals(45, proxy());
+ Expect.equals(45, proxy.call());
+}
+
+main() {
+ testClosure();
+ testFakeFunction();
+ testTopLevelTearOff();
+ testInstanceTearOff();
+}
diff --git a/tests/lib/mirrors/immutable_collections_test.dart b/tests/lib/mirrors/immutable_collections_test.dart
index 50fdd75..93eafbd 100644
--- a/tests/lib/mirrors/immutable_collections_test.dart
+++ b/tests/lib/mirrors/immutable_collections_test.dart
@@ -69,11 +69,9 @@
checkLibrary(LibraryMirror lm) {
checkMap(lm.declarations, 'LibraryMirror.declarations');
- checkMap(lm.topLevelMembers, 'LibraryMirror.topLevelMembers');
checkList(lm.metadata, 'LibraryMirror.metadata');
lm.declarations.values.forEach(checkDeclaration);
- lm.topLevelMembers.values.forEach(checkDeclaration);
}
main() {
diff --git a/tests/lib/mirrors/mirrors_reader.dart b/tests/lib/mirrors/mirrors_reader.dart
index 9b16f81..7b7bbc2 100644
--- a/tests/lib/mirrors/mirrors_reader.dart
+++ b/tests/lib/mirrors/mirrors_reader.dart
@@ -191,7 +191,6 @@
visitLibraryMirror(LibraryMirror mirror) {
super.visitLibraryMirror(mirror);
visit(mirror, 'declarations', () => mirror.declarations);
- visit(mirror, 'topLevelMembers', () => mirror.topLevelMembers);
visit(mirror, 'uri', () => mirror.uri);
}
@@ -251,6 +250,7 @@
visitTypeVariableMirror(TypeVariableMirror mirror) {
super.visitTypeVariableMirror(mirror);
visit(mirror, 'upperBound', () => mirror.upperBound);
+ visit(mirror, 'isStatic', () => mirror.isStatic);
}
visitVariableMirror(VariableMirror mirror) {
diff --git a/tests/lib/mirrors/reflected_type_classes_test.dart b/tests/lib/mirrors/reflected_type_classes_test.dart
new file mode 100644
index 0000000..4eeb3d8
--- /dev/null
+++ b/tests/lib/mirrors/reflected_type_classes_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.reflected_type_classes;
+
+import 'dart:mirrors';
+
+import 'reflected_type_helper.dart';
+
+class A<T> {}
+class B extends A {}
+class C extends A<num, int> {} /// 01: static type warning
+class D extends A<int> {}
+class E<S> extends A<S> {}
+class F<R> extends A<int> {}
+class G {}
+class H<A,B,C> {}
+
+main() {
+ // Declarations.
+ expectReflectedType(reflectClass(A), null);
+ expectReflectedType(reflectClass(B), B);
+ expectReflectedType(reflectClass(C), C); /// 01: continued
+ expectReflectedType(reflectClass(D), D);
+ expectReflectedType(reflectClass(E), null);
+ expectReflectedType(reflectClass(F), null);
+ expectReflectedType(reflectClass(G), G);
+ expectReflectedType(reflectClass(H), null);
+
+ // Instantiations.
+ expectReflectedType(reflect(new A()).type, new A().runtimeType);
+ expectReflectedType(reflect(new B()).type, new B().runtimeType);
+ expectReflectedType(reflect(new C()).type, new C().runtimeType); /// 01: continued
+ expectReflectedType(reflect(new D()).type, new D().runtimeType);
+ expectReflectedType(reflect(new E()).type, new E().runtimeType);
+ expectReflectedType(reflect(new F()).type, new F().runtimeType);
+ expectReflectedType(reflect(new G()).type, new G().runtimeType);
+ expectReflectedType(reflect(new H()).type, new H().runtimeType);
+
+ expectReflectedType(reflect(new A<num>()).type, new A<num>().runtimeType);
+ expectReflectedType(reflect(new B<num>()).type.superclass, /// 02: static type warning
+ new A<dynamic>().runtimeType); /// 02: continued
+ expectReflectedType(reflect(new C<num>()).type.superclass, /// 01: continued
+ new A<dynamic>().runtimeType); /// 01: continued
+ expectReflectedType(reflect(new D<num>()).type.superclass, /// 03: static type warning
+ new A<int>().runtimeType); /// 03: continued
+ expectReflectedType(reflect(new E<num>()).type, new E<num>().runtimeType);
+ expectReflectedType(reflect(new E<num>()).type.superclass,
+ new A<num>().runtimeType);
+ expectReflectedType(reflect(new F<num>()).type.superclass,
+ new A<int>().runtimeType);
+ expectReflectedType(reflect(new F<num>()).type, new F<num>().runtimeType);
+ expectReflectedType(reflect(new H<num, num, num>()).type,
+ new H<num, num, num>().runtimeType);
+}
diff --git a/tests/lib/mirrors/reflected_type_function_type_test.dart b/tests/lib/mirrors/reflected_type_function_type_test.dart
new file mode 100644
index 0000000..4b7cf03
--- /dev/null
+++ b/tests/lib/mirrors/reflected_type_function_type_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.reflected_type_function_types;
+
+import 'dart:mirrors';
+
+import 'reflected_type_helper.dart';
+
+typedef bool Predicate(num n);
+
+bool somePredicate(num n) => n < 0;
+
+main() {
+ FunctionTypeMirror numToBool1 = reflect(somePredicate).type;
+ FunctionTypeMirror numToBool2 =
+ (reflectType(Predicate) as TypedefMirror).referent;
+
+ expectReflectedType(numToBool1, somePredicate.runtimeType);
+ expectReflectedType(numToBool2, somePredicate.runtimeType);
+}
diff --git a/tests/lib/mirrors/reflected_type_helper.dart b/tests/lib/mirrors/reflected_type_helper.dart
new file mode 100644
index 0000000..e973854
--- /dev/null
+++ b/tests/lib/mirrors/reflected_type_helper.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.reflected_type_helper;
+
+import 'dart:mirrors';
+import 'package:expect/expect.dart';
+
+expectReflectedType(TypeMirror typeMirror, Type expectedType) {
+ if (expectedType == null) {
+ Expect.isFalse(typeMirror.hasReflectedType);
+ Expect.throws(() => typeMirror.reflectedType,
+ (e) => e is UnsupportedError,
+ "Should not have a reflected type");
+ } else {
+ Expect.isTrue(typeMirror.hasReflectedType);
+ Expect.equals(expectedType, typeMirror.reflectedType);
+ }
+}
diff --git a/tests/lib/mirrors/reflected_type_special_types_test.dart b/tests/lib/mirrors/reflected_type_special_types_test.dart
new file mode 100644
index 0000000..2ab98f1
--- /dev/null
+++ b/tests/lib/mirrors/reflected_type_special_types_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.reflected_type_special_types;
+
+import 'dart:mirrors';
+
+import 'reflected_type_helper.dart';
+
+main() {
+ TypeMirror dynamicMirror = currentMirrorSystem().dynamicType;
+ TypeMirror dynamicMirror2 = reflectType(dynamic);
+ TypeMirror voidMirror = currentMirrorSystem().voidType;
+
+ expectReflectedType(dynamicMirror, dynamic);
+ expectReflectedType(dynamicMirror2, dynamic);
+ expectReflectedType(voidMirror, null);
+}
diff --git a/tests/lib/mirrors/reflected_type_typedefs_test.dart b/tests/lib/mirrors/reflected_type_typedefs_test.dart
new file mode 100644
index 0000000..7f8aa99
--- /dev/null
+++ b/tests/lib/mirrors/reflected_type_typedefs_test.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.reflected_type_typedefs;
+
+import 'dart:mirrors';
+
+import 'reflected_type_helper.dart';
+
+typedef bool NonGenericPredicate(num n);
+typedef bool GenericPredicate<T>(T t);
+typedef S GenericTransform<S>(S s);
+
+main() {
+ TypedefMirror nonGenericPredicate = reflectType(NonGenericPredicate);
+ TypedefMirror predicateOfDynamic = reflectType(GenericPredicate);
+ TypedefMirror transformOfDynamic = reflectType(GenericTransform);
+
+ TypedefMirror predicateDecl = predicateOfDynamic.originalDeclaration;
+ TypedefMirror transformDecl = transformOfDynamic.originalDeclaration;
+
+ expectReflectedType(nonGenericPredicate, NonGenericPredicate);
+ expectReflectedType(predicateOfDynamic, GenericPredicate);
+ expectReflectedType(transformOfDynamic, GenericTransform);
+ expectReflectedType(predicateDecl, null);
+ expectReflectedType(transformDecl, null);
+}
diff --git a/tests/lib/mirrors/reflected_type_typevars_test.dart b/tests/lib/mirrors/reflected_type_typevars_test.dart
new file mode 100644
index 0000000..2172781
--- /dev/null
+++ b/tests/lib/mirrors/reflected_type_typevars_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.reflected_type_type_variables;
+
+import 'dart:mirrors';
+
+import 'reflected_type_helper.dart';
+
+class Class<T> {}
+typedef bool Predicate<S>(S t);
+
+main() {
+ TypeVariableMirror tFromClass = reflectClass(Class).typeVariables[0];
+ TypeVariableMirror sFromPredicate = reflectType(Predicate).typeVariables[0];
+
+ expectReflectedType(tFromClass, null);
+ expectReflectedType(sFromPredicate, null);
+}
diff --git a/tests/lib/mirrors/relation_subclass_test.dart b/tests/lib/mirrors/relation_subclass_test.dart
index 2e8bbc2..2c2c525 100644
--- a/tests/lib/mirrors/relation_subclass_test.dart
+++ b/tests/lib/mirrors/relation_subclass_test.dart
@@ -57,12 +57,13 @@
Expect.isFalse(Obj.isSubclassOf(Func));
// Function typedef.
- var NumPred = thisLibrary.declarations[#NumberPredicate];
- var IntPred = thisLibrary.declarations[#IntegerPredicate];
- var DubPred = thisLibrary.declarations[#DoublePredicate];
- var NumGen = thisLibrary.declarations[#NumberGenerator];
- var IntGen = thisLibrary.declarations[#IntegerGenerator];
- var DubGen = thisLibrary.declarations[#DoubleGenerator];
+ // TODO(16939): retrieve via declaration when dart2js supports it.
+ var NumPred = reflectType(NumberPredicate);
+ var IntPred = reflectType(IntegerPredicate);
+ var DubPred = reflectType(DoublePredicate);
+ var NumGen = reflectType(NumberGenerator);
+ var IntGen = reflectType(IntegerGenerator);
+ var DubGen = reflectType(DoubleGenerator);
isArgumentOrTypeError(e) => e is ArgumentError || e is TypeError;
Expect.throws(() => Func.isSubclassOf(NumPred), isArgumentOrTypeError);
diff --git a/tests/lib/mirrors/symbol_validation_test.dart b/tests/lib/mirrors/symbol_validation_test.dart
index b0f5ac5..1a38e79 100644
--- a/tests/lib/mirrors/symbol_validation_test.dart
+++ b/tests/lib/mirrors/symbol_validation_test.dart
@@ -11,7 +11,6 @@
Expect.equals(string,
MirrorSystem.getName(new Symbol(string)),
'Valid symbol "$string" should be invertable');
- return; /// 01: ok
Expect.equals(string,
MirrorSystem.getName(MirrorSystem.getSymbol(string)),
'Valid symbol "$string" should be invertable');
@@ -21,12 +20,19 @@
Expect.throws(() => new Symbol(string),
(e) => e is ArgumentError,
'Invalid symbol "$string" should be rejected');
- return; /// 01: continued
Expect.throws(() => MirrorSystem.getSymbol(string),
- (e) => e is ArgumentError,
+ (e) => e is ArgumentError,
'Invalid symbol "$string" should be rejected');
}
+validPrivateSymbol(String string) {
+ ClosureMirror closure = reflect(main);
+ LibraryMirror library = closure.function.owner;
+ Expect.equals(string,
+ MirrorSystem.getName(MirrorSystem.getSymbol(string, library)),
+ 'Valid private symbol "$string" should be invertable');
+}
+
main() {
// Operators that can be declared as class member operators.
// These are all valid as symbols.
@@ -43,7 +49,7 @@
var simpleSymbols = [
'foo', 'bar_', 'baz.quz', 'fisk1', 'hest2fisk', 'a.b.c.d.e',
r'$', r'foo$', r'bar$bar', r'$.$', r'x6$_', r'$6_', r'x.$$6_',
- 'x_', 'x_.x_',
+ 'x_', 'x_.x_', 'unary', 'x.unary'
];
simpleSymbols.expand((s) => [s, "s="]).forEach(validSymbol);
@@ -122,4 +128,10 @@
builtInIdentifiers.expand((w) => [w, "$w=", "x.$w" , "$w.x", "x.$w.x",
"$w=", "x.$w="])
.forEach(validSymbol);
+
+ var privateSymbols = [
+ '_', '_x', 'x._y', 'x._', 'x.y._', 'x._.y', '_true'
+ ];
+ privateSymbols.forEach(invalidSymbol);
+ privateSymbols.forEach(validPrivateSymbol); /// 01: ok
}
diff --git a/tests/lib/mirrors/synthetic_accessor_properties_test.dart b/tests/lib/mirrors/synthetic_accessor_properties_test.dart
index 215d3a3..b4fd4e2 100644
--- a/tests/lib/mirrors/synthetic_accessor_properties_test.dart
+++ b/tests/lib/mirrors/synthetic_accessor_properties_test.dart
@@ -67,39 +67,4 @@
mm = cm.staticMembers[const Symbol('finalStaticField=')];
Expect.isNull(mm);
-
-
- mm = lm.topLevelMembers[#topLevelField];
- expect('Method(s(topLevelField) in s(test.synthetic_accessor_properties),'
- ' top-level, synthetic, static, getter)', mm);
- Expect.equals(reflectClass(String), mm.returnType);
- Expect.listEquals([], mm.parameters);
-
- mm = lm.topLevelMembers[const Symbol('topLevelField=')];
- expect('Method(s(topLevelField=) in s(test.synthetic_accessor_properties),'
- ' top-level, synthetic, static, setter)', mm);
- Expect.equals(reflectClass(String), mm.returnType);
- pm = mm.parameters.single;
- expect('Parameter(s(topLevelField) in s(topLevelField=), final,'
- ' type = Class(s(String) in s(dart.core), top-level))', pm);
-
- mm = lm.topLevelMembers[#finalTopLevelField];
- expect('Method(s(finalTopLevelField) in s(test.synthetic_accessor_properties)'
- ', top-level, synthetic, static, getter)', mm);
- Expect.equals(reflectClass(double), mm.returnType);
- Expect.listEquals([], mm.parameters);
-
- mm = lm.topLevelMembers[const Symbol('finalTopLevelField=')];
- Expect.isNull(mm);
-
- return; /// 01: ok
-
- mm = lm.topLevelMembers[#C];
- expect('Method(s(C) in s(test.synthetic_accessor_properties),'
- ' top-level, synthetic, static, getter)', mm);
- Expect.equals(reflectClass(Type), mm.returnType);
- Expect.listEquals([], mm.parameters);
-
- mm = lm.topLevelMembers[const Symbol('C=')];
- Expect.isNull(mm);
}
diff --git a/tests/lib/mirrors/toplevel_members_test.dart b/tests/lib/mirrors/toplevel_members_test.dart
deleted file mode 100644
index 84839d8..0000000
--- a/tests/lib/mirrors/toplevel_members_test.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.toplevel_members;
-
-import 'dart:mirrors';
-import 'package:expect/expect.dart';
-
-import 'stringify.dart';
-import 'declarations_model.dart' as declarations_model;
-
-selectKeys(map, predicate) {
- return map.keys.where((key) => predicate(map[key]));
-}
-
-main() {
- LibraryMirror lm =
- currentMirrorSystem().findLibrary(#test.declarations_model);
-
- Expect.setEquals(
- [#libraryVariable,
- const Symbol('libraryVariable='),
- #libraryGetter,
- const Symbol('librarySetter='),
- #libraryMethod,
- MirrorSystem.getSymbol('_libraryVariable', lm),
- MirrorSystem.getSymbol('_libraryVariable=', lm),
- MirrorSystem.getSymbol('_libraryGetter', lm),
- MirrorSystem.getSymbol('_librarySetter=', lm),
- MirrorSystem.getSymbol('_libraryMethod', lm),
- #Predicate, /// 01: ok
- #Superclass, /// 01: continued
- #Interface, /// 01: continued
- #Mixin, /// 01: continued
- #Class, /// 01: continued
- MirrorSystem.getSymbol('_PrivateClass', lm), /// 01: continued
- #ConcreteClass /// 01: continued
- ],
- selectKeys(lm.topLevelMembers, (dm) => true));
-
- Expect.setEquals(
- [#libraryVariable,
- const Symbol('libraryVariable='),
- MirrorSystem.getSymbol('_libraryVariable', lm),
- MirrorSystem.getSymbol('_libraryVariable=', lm),
- #Predicate, /// 01: continued
- #Superclass, /// 01: continued
- #Interface, /// 01: continued
- #Mixin, /// 01: continued
- #Class, /// 01: continued
- MirrorSystem.getSymbol('_PrivateClass', lm), /// 01: continued
- #ConcreteClass /// 01: continued
- ],
- selectKeys(lm.topLevelMembers, (dm) => dm.isSynthetic));
-}
diff --git a/tests/lib/mirrors/type_variable_is_static_test.dart b/tests/lib/mirrors/type_variable_is_static_test.dart
new file mode 100644
index 0000000..ada920d4
--- /dev/null
+++ b/tests/lib/mirrors/type_variable_is_static_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.type_variable_owner;
+
+import "dart:mirrors";
+
+import "package:expect/expect.dart";
+
+class C<T> {}
+typedef bool Predicate<T>(T t);
+
+main() {
+ Expect.isFalse(reflectType(C).typeVariables.single.isStatic);
+ Expect.isFalse(reflectType(Predicate).typeVariables.single.isStatic);
+}
diff --git a/tests/standalone/io/http_10_test.dart b/tests/standalone/io/http_10_test.dart
index a82413e..3826a5e 100644
--- a/tests/standalone/io/http_10_test.dart
+++ b/tests/standalone/io/http_10_test.dart
@@ -50,7 +50,6 @@
count++;
socket.destroy();
String s = new String.fromCharCodes(response).toLowerCase();
- Expect.isTrue(s.indexOf("\r\ncontent-length: 1\r\n") > 0);
Expect.equals(-1, s.indexOf("keep-alive"));
if (count < 10) {
makeRequest();
diff --git a/tests/standalone/io/http_client_connect_test.dart b/tests/standalone/io/http_client_connect_test.dart
index b85896a..58835f4 100644
--- a/tests/standalone/io/http_client_connect_test.dart
+++ b/tests/standalone/io/http_client_connect_test.dart
@@ -169,6 +169,7 @@
testGetServerClose();
testGetServerCloseNoKeepAlive();
testGetServerForceClose();
- testGetDataServerForceClose();
+ // TODO(14953): This test can only run, when buffering is disabled.
+ // testGetDataServerForceClose();
testPostEmptyRequest();
}
diff --git a/tests/standalone/io/http_close_test.dart b/tests/standalone/io/http_close_test.dart
index 17b4e47..bd972c1 100644
--- a/tests/standalone/io/http_close_test.dart
+++ b/tests/standalone/io/http_close_test.dart
@@ -11,6 +11,7 @@
import "dart:async";
import "dart:io";
import "dart:typed_data";
+import "dart:math";
void testClientAndServerCloseNoListen(int connections) {
@@ -70,6 +71,11 @@
void testClientCloseSendingResponse(int connections) {
+ var buffer = new Uint8List(64 * 1024);
+ var rand = new Random();
+ for (int i = 0; i < buffer.length; i++) {
+ buffer[i] = rand.nextInt(256);
+ }
HttpServer.bind("127.0.0.1", 0).then((server) {
int closed = 0;
void check() {
@@ -83,8 +89,8 @@
}
}
server.listen((request) {
- var timer = new Timer.periodic(const Duration(milliseconds: 20), (_) {
- request.response.add(new Uint8List(16 * 1024));
+ var timer = new Timer.periodic(const Duration(milliseconds: 50), (_) {
+ request.response.add(buffer);
});
request.response.done
.catchError((_) {})
@@ -101,7 +107,7 @@
// Ensure we don't accept the response until we have send the entire
// request.
var subscription = response.listen((_) {});
- new Timer(const Duration(milliseconds: 200), () {
+ new Timer(const Duration(milliseconds: 20), () {
subscription.cancel();
check();
});
@@ -115,9 +121,10 @@
HttpServer.bind("127.0.0.1", 0).then((server) {
int errors = 0;
server.listen((request) {
- request.listen((_) {}, onError: (e) { errors++; });
+ request.listen((_) {});
});
var client = new HttpClient();
+ int closed = 0;
for (int i = 0; i < connections; i++) {
client.post("127.0.0.1", server.port, "/")
.then((request) {
@@ -125,14 +132,13 @@
request.write("0123456789");
return request.close();
})
- .catchError((_) {});
+ .catchError((_) {
+ closed++;
+ if (closed == connections) {
+ server.close();
+ }
+ });
}
- new Timer.periodic(const Duration(milliseconds: 100), (t) {
- if (errors == connections && server.connectionsInfo().total == 0) {
- t.cancel();
- server.close();
- }
- });
});
}
diff --git a/tests/standalone/io/http_content_length_test.dart b/tests/standalone/io/http_content_length_test.dart
index 627b28f..5094c43 100644
--- a/tests/standalone/io/http_content_length_test.dart
+++ b/tests/standalone/io/http_content_length_test.dart
@@ -63,9 +63,7 @@
response.drain();
})
.catchError((e, trace) {
- String msg = "Unexpected error $e";
- if (trace != null) msg += "\nStackTrace: $trace";
- Expect.fail(msg);
+ // It's also okay to fail, as headers may not be written.
});
}
});
@@ -142,6 +140,9 @@
onError: (error, trace) {
// Undefined what server response sends.
});
+ })
+ .catchError((error) {
+ // It's also okay to fail, as headers may not be written.
});
}
});
diff --git a/tests/standalone/io/http_outgoing_size_test.dart b/tests/standalone/io/http_outgoing_size_test.dart
new file mode 100644
index 0000000..406bcaf
--- /dev/null
+++ b/tests/standalone/io/http_outgoing_size_test.dart
@@ -0,0 +1,59 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=
+// VMOptions=--short_socket_read
+// VMOptions=--short_socket_write
+// VMOptions=--short_socket_read --short_socket_write
+
+import 'dart:io';
+import 'dart:typed_data';
+
+import 'package:expect/expect.dart';
+
+void testChunkedBufferSizeMsg() {
+ // Buffer of same size as our internal buffer, minus 4. Makes us hit the
+ // boundary.
+ var sendData = new Uint8List(8 * 1024 - 4);
+ for (int i = 0; i < sendData.length; i++) sendData[i] = i % 256;
+
+ HttpServer.bind('127.0.0.1', 0).then((server) {
+ server.listen((request) {
+ // Chunked is on by default. Be sure no data is lost when sending several
+ // chunks of data.
+ request.response.add(sendData);
+ request.response.add(sendData);
+ request.response.add(sendData);
+ request.response.add(sendData);
+ request.response.add(sendData);
+ request.response.add(sendData);
+ request.response.add(sendData);
+ request.response.add(sendData);
+ request.response.close();
+ });
+ var client = new HttpClient();
+ client.get('127.0.0.1', server.port, '/')
+ .then((request) {
+ request.headers.set(HttpHeaders.ACCEPT_ENCODING, "");
+ return request.close();
+ })
+ .then((response) {
+ var buffer = [];
+ response.listen(
+ (data) => buffer.addAll(data),
+ onDone: () {
+ Expect.equals(sendData.length * 8, buffer.length);
+ for (int i = 0; i < buffer.length; i++) {
+ Expect.equals(sendData[i % sendData.length], buffer[i]);
+ }
+ server.close();
+ });
+ });
+ });
+}
+
+
+void main() {
+ testChunkedBufferSizeMsg();
+}
diff --git a/tests/standalone/io/internet_address_test.dart b/tests/standalone/io/internet_address_test.dart
index d8a997f..ea6d0b1 100644
--- a/tests/standalone/io/internet_address_test.dart
+++ b/tests/standalone/io/internet_address_test.dart
@@ -12,12 +12,15 @@
Expect.equals(InternetAddressType.IP_V4, loopback4.type);
Expect.equals("127.0.0.1", loopback4.host);
Expect.equals("127.0.0.1", loopback4.address);
+ Expect.listEquals([127, 0, 0, 1], loopback4.rawAddress);
var loopback6 = InternetAddress.LOOPBACK_IP_V6;
Expect.isNotNull(loopback6);
Expect.equals(InternetAddressType.IP_V6, loopback6.type);
Expect.equals("::1", loopback6.host);
Expect.equals("::1", loopback6.address);
+ Expect.listEquals([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
+ loopback6.rawAddress);
var any4 = InternetAddress.ANY_IP_V4;
Expect.isNotNull(any4);
@@ -118,14 +121,17 @@
InternetAddress.lookup('localhost').then((addrs) {
addrs.first.reverse().then((addr) {
Expect.isNotNull(addr.host);
+ Expect.isNotNull(addr.rawAddress);
});
});
InternetAddress.lookup('127.0.0.1').then((addrs) {
Expect.equals('127.0.0.1', addrs.first.host);
+ Expect.listEquals([127, 0, 0, 1], addrs.first.rawAddress);
addrs.first.reverse().then((addr) {
Expect.isNotNull(addr.host);
Expect.notEquals('127.0.0.1', addr.host);
+ Expect.listEquals([127, 0, 0, 1], addr.rawAddress);
});
});
}
diff --git a/tests/standalone/io/test_harness_analyzer_test.dart b/tests/standalone/io/test_harness_analyzer_test.dart
index f2a2b40..82b289d 100644
--- a/tests/standalone/io/test_harness_analyzer_test.dart
+++ b/tests/standalone/io/test_harness_analyzer_test.dart
@@ -4,6 +4,7 @@
import '../../../tools/test.dart' as test_dart;
import '../../../tools/testing/dart/launch_browser.dart' as launch_browser;
+import '../../../tools/testing/dart/browser_perf_testing/lib/browser_perf_testing.dart' as browser_perf_testing;
// The purpose of this test is to run the analyzer on it and make sure our
// testing scripts are free of warnings/errors.
diff --git a/tests/standalone/io/zlib_test.dart b/tests/standalone/io/zlib_test.dart
index 5b0fc49..3392ffd 100644
--- a/tests/standalone/io/zlib_test.dart
+++ b/tests/standalone/io/zlib_test.dart
@@ -8,28 +8,6 @@
import "package:async_helper/async_helper.dart";
import "package:expect/expect.dart";
-void testZLibDeflate() {
- test(int level, List<int> expected) {
- asyncStart();
- var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
- var controller = new StreamController(sync: true);
- controller.stream.transform(new ZLibEncoder(gzip: false, level: level))
- .fold([], (buffer, data) {
- buffer.addAll(data);
- return buffer;
- })
- .then((data) {
- Expect.listEquals(expected, data);
- asyncEnd();
- });
- controller.add(data);
- controller.close();
- }
- test(6, [120, 156, 99, 96, 100, 98, 102, 97, 101, 99, 231, 224, 4, 0, 0, 175,
- 0, 46]);
-}
-
-
void testZLibDeflateEmpty() {
asyncStart();
var controller = new StreamController(sync: true);
@@ -45,6 +23,41 @@
controller.close();
}
+void testZLibDeflateEmptyGzip() {
+ asyncStart();
+ var controller = new StreamController(sync: true);
+ controller.stream.transform(new ZLibEncoder(gzip: true, level: 6))
+ .fold([], (buffer, data) {
+ buffer.addAll(data);
+ return buffer;
+ })
+ .then((data) {
+ Expect.isTrue(data.length > 0);
+ Expect.listEquals([], new ZLibDecoder().convert(data));
+ asyncEnd();
+ });
+ controller.close();
+}
+
+void testZLibDeflate() {
+ asyncStart();
+ var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+ var controller = new StreamController(sync: true);
+ controller.stream.transform(new ZLibEncoder(gzip: false, level: 6))
+ .fold([], (buffer, data) {
+ buffer.addAll(data);
+ return buffer;
+ })
+ .then((data) {
+ Expect.listEquals(
+ [120, 156, 99, 96, 100, 98, 102, 97, 101, 99, 231, 224, 4, 0, 0,
+ 175, 0, 46],
+ data);
+ asyncEnd();
+ });
+ controller.add(data);
+ controller.close();
+}
void testZLibDeflateGZip() {
asyncStart();
@@ -67,35 +80,76 @@
controller.close();
}
+void testZLibDeflateRaw() {
+ asyncStart();
+ var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+ var controller = new StreamController(sync: true);
+ controller.stream.transform(new ZLibEncoder(raw: true, level: 6))
+ .fold([], (buffer, data) {
+ buffer.addAll(data);
+ return buffer;
+ })
+ .then((data) {
+ Expect.listEquals([99, 96, 100, 98, 102, 97, 101, 99, 231, 224, 4, 0],
+ data);
+ asyncEnd();
+ });
+ controller.add(data);
+ controller.close();
+}
+
void testZLibDeflateInvalidLevel() {
test2(gzip, level) {
- try {
- new ZLibEncoder(gzip: gzip, level: level).startChunkedConversion(null);
- Expect.fail("No exception thrown");
- } catch (e) {
- }
- }
- test(level) {
- test2(false, level);
- test2(true, level);
- test2(9, level);
- }
- test(-2);
- test(-20);
- test(10);
- test(42);
- test(null);
- test("9");
+ [true, false].forEach((gzip) {
+ [-2, -20, 10, 42, null, "9"].forEach((level) {
+ Expect.throws(
+ () => new ZLibEncoder(gzip: gzip, level: level),
+ (e) => e is ArgumentError,
+ "'level' must be in range -1..9"
+ );
+ });
+ });
+ };
}
void testZLibInflate() {
- test2(bool gzip, int level) {
+ var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+
+ [true, false].forEach((gzip) {
+ [ZLibOption.STRATEGY_FILTERED, ZLibOption.STRATEGY_HUFFMAN_ONLY,
+ ZLibOption.STRATEGY_RLE, ZLibOption.STRATEGY_FIXED,
+ ZLibOption.STRATEGY_DEFAULT].forEach((strategy) {
+ [3, 6, 9].forEach((level) {
+ asyncStart();
+ var controller = new StreamController(sync: true);
+ controller.stream
+ .transform(new ZLibEncoder(gzip: gzip, level: level,
+ strategy: strategy))
+ .transform(new ZLibDecoder())
+ .fold([], (buffer, data) {
+ buffer.addAll(data);
+ return buffer;
+ })
+ .then((inflated) {
+ Expect.listEquals(data, inflated);
+ asyncEnd();
+ });
+ controller.add(data);
+ controller.close();
+ });
+ });
+ });
+}
+
+void testZLibInflateRaw() {
+ var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+
+ [3, 6, 9].forEach((level) {
asyncStart();
- var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var controller = new StreamController(sync: true);
controller.stream
- .transform(new ZLibEncoder(gzip: gzip, level: level))
- .transform(new ZLibDecoder())
+ .transform(new ZLibEncoder(raw: true, level: level))
+ .transform(new ZLibDecoder(raw: true))
.fold([], (buffer, data) {
buffer.addAll(data);
return buffer;
@@ -106,39 +160,78 @@
});
controller.add(data);
controller.close();
- }
- void test(int level) {
- test2(false, level);
- test2(true, level);
- }
- for (int i = -1; i < 10; i++) {
- test(i);
- }
+ });
}
void testZLibInflateSync() {
- test2(bool gzip, int level) {
- var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
- var encoded = new ZLibEncoder(gzip: gzip, level: level).convert(data);
- var decoded = new ZLibDecoder().convert(encoded);
+ var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+
+ [true, false].forEach((gzip) {
+ [3, 6, 9].forEach((level) {
+ var encoded = new ZLibEncoder(gzip: gzip, level: level).convert(data);
+ var decoded = new ZLibDecoder().convert(encoded);
+ Expect.listEquals(data, decoded);
+ });
+ });
+}
+
+void testZlibInflateThrowsWithSmallerWindow() {
+ var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+ var encoder = new ZLibEncoder(windowBits: 10);
+ var encodedData = encoder.convert(data);
+ var decoder = new ZLibDecoder(windowBits: 8);
+ Expect.throws(() => decoder.convert(encodedData));
+}
+
+void testZlibInflateWithLargerWindow() {
+ var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+
+ [true, false].forEach((gzip) {
+ [3, 6, 9].forEach((level) {
+ asyncStart();
+ var controller = new StreamController(sync: true);
+ controller.stream
+ .transform(new ZLibEncoder(gzip: gzip, level: level, windowBits: 8))
+ .transform(new ZLibDecoder(windowBits: 10))
+ .fold([], (buffer, data) {
+ buffer.addAll(data);
+ return buffer;
+ })
+ .then((inflated) {
+ Expect.listEquals(data, inflated);
+ asyncEnd();
+ });
+ controller.add(data);
+ controller.close();
+ });
+ });
+}
+
+void testZlibWithDictionary() {
+ var dict = [102, 111, 111, 98, 97, 114];
+ var data = [98, 97, 114, 102, 111, 111];
+
+ [3, 6, 9].forEach((level) {
+ var encoded = new ZLibEncoder(level: level, dictionary: dict)
+ .convert(data);
+ var decoded = new ZLibDecoder(dictionary: dict).convert(encoded);
Expect.listEquals(data, decoded);
- }
- void test(int level) {
- test2(false, level);
- test2(true, level);
- }
- for (int i = -1; i < 10; i++) {
- test(i);
- }
+ });
}
void main() {
asyncStart();
testZLibDeflate();
testZLibDeflateEmpty();
+ testZLibDeflateEmptyGzip();
testZLibDeflateGZip();
testZLibDeflateInvalidLevel();
testZLibInflate();
testZLibInflateSync();
+ testZlibInflateThrowsWithSmallerWindow();
+ testZlibInflateWithLargerWindow();
+ testZLibDeflateRaw();
+ testZLibInflateRaw();
+ testZlibWithDictionary();
asyncEnd();
}
diff --git a/tests/utils/utils.status b/tests/utils/utils.status
index 1d71869..23e361b 100644
--- a/tests/utils/utils.status
+++ b/tests/utils/utils.status
@@ -16,8 +16,5 @@
[ $compiler == none && $runtime == dartium ]
dart2js_test: Skip # Uses dart:io.
-[ $compiler == dartanalyzer ]
-source_mirrors_test: StaticWarning # issue 16466
-
-[ $compiler == dart2analyzer ]
-source_mirrors_test: StaticWarning # issue 16466
+[ $compiler == dartanalyzer || $compiler == dart2analyzer ]
+source_mirrors_test: StaticWarning # Issue 17264
\ No newline at end of file
diff --git a/tools/VERSION b/tools/VERSION
index b392055..6cbf9bf 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 1
MINOR 3
PATCH 0
-PRERELEASE 1
-PRERELEASE_PATCH 1
+PRERELEASE 2
+PRERELEASE_PATCH 0
diff --git a/tools/bots/cross-vm.py b/tools/bots/cross-vm.py
index 691544c..cb53e2f 100644
--- a/tools/bots/cross-vm.py
+++ b/tools/bots/cross-vm.py
@@ -47,8 +47,7 @@
with bot.BuildStep('Create build tarball'):
run(['tar', '-cjf', tarball, '--exclude=**/obj',
'--exclude=**/obj.host', '--exclude=**/obj.target',
- '--exclude=**/*analyzer*', '--exclude=**/run_vm_tests.host',
- 'out/'])
+ '--exclude=**/*analyzer*', 'out/'])
with bot.BuildStep('Upload build tarball'):
uri = "%s/%s" % (GCS_BUCKET, tarball)
diff --git a/tools/get_archive.py b/tools/get_archive.py
index 554b7f0..a7cf26d 100755
--- a/tools/get_archive.py
+++ b/tools/get_archive.py
@@ -43,22 +43,14 @@
DARTIUM_PERMANENT_PATTERN = ('gs://dartium-archive/dartium-%(osname)s-%(bot)s/'
'dartium-%(osname)s-%(bot)s-%(num1)s.%(num2)s.zip')
-CHROMEDRIVER_DIR = os.path.join('tools', 'testing', 'dartium-chromedriver')
-CHROMEDRIVER_VERSION = os.path.join(CHROMEDRIVER_DIR, 'LAST_VERSION')
-CHROMEDRIVER_LATEST_PATTERN = (
- 'gs://dartium-archive/latest/chromedriver-%(osname)s-%(bot)s-*.zip')
-CHROMEDRIVER_PERMANENT_PATTERN = ('gs://dartium-archive/chromedriver-%(osname)s'
- '-%(bot)s/chromedriver-%(osname)s-%(bot)s-%(num1)s.'
- '%(num2)s.zip')
-
SDK_DIR = os.path.join(utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32'),
'dart-sdk')
SDK_VERSION = os.path.join(SDK_DIR, 'LAST_VERSION')
-SDK_LATEST_PATTERN = 'gs://dart-editor-archive-continuous/latest/VERSION'
+SDK_LATEST_PATTERN = 'gs://dart-archive/channels/dev/raw/latest/VERSION'
# TODO(efortuna): Once the x64 VM also is optimized, select the version
# based on whether we are running on a 32-bit or 64-bit system.
-SDK_PERMANENT = ('gs://dart-editor-archive-continuous/%(version_num)s/' +
- 'dartsdk-%(osname)s-32.zip')
+SDK_PERMANENT = ('gs://dart-archive/channels/dev/raw/%(version_num)s/sdk/' +
+ 'dartsdk-%(osname)s-ia32-release.zip')
# Dictionary storing the earliest revision of each download we have stored.
LAST_VALID = {'dartium': 4285, 'chromedriver': 7823, 'sdk': 9761, 'drt': 5342}
@@ -348,10 +340,6 @@
GetDartiumRevision('Dartium', bot, DARTIUM_DIR, DARTIUM_VERSION,
DARTIUM_LATEST_PATTERN, DARTIUM_PERMANENT_PATTERN,
args.revision)
- elif positional[0] == 'chromedriver':
- GetDartiumRevision('chromedriver', bot, CHROMEDRIVER_DIR, CHROMEDRIVER_VERSION,
- CHROMEDRIVER_LATEST_PATTERN,
- CHROMEDRIVER_PERMANENT_PATTERN, args.revision)
elif positional[0] == 'sdk':
GetSdkRevision('sdk', SDK_DIR, SDK_VERSION, SDK_LATEST_PATTERN,
SDK_PERMANENT, args.revision)
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index 462563d..80b97d0 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -760,19 +760,27 @@
BrowserTestingServer testingServer;
+ /**
+ * The TestRunner takes the testingServer in as a constructor parameter in
+ * case we wish to have a testing server with different behavior (such as the
+ * case for performance testing.
+ */
BrowserTestRunner(this.globalConfiguration,
this.localIp,
this.browserName,
this.maxNumBrowsers,
- {bool this.checkedMode: false});
+ {bool this.checkedMode: false,
+ BrowserTestingServer this.testingServer});
Future<bool> start() {
// If [browserName] doesn't support opening new windows, we use new iframes
// instead.
bool useIframe =
!Browser.BROWSERS_WITH_WINDOW_SUPPORT.contains(browserName);
- testingServer = new BrowserTestingServer(
- globalConfiguration, localIp, useIframe);
+ if (testingServer == null) {
+ testingServer = new BrowserTestingServer(
+ globalConfiguration, localIp, useIframe);
+ }
return testingServer.start().then((_) {
testingServer.testDoneCallBack = handleResults;
testingServer.testStatusUpdateCallBack = handleStatusUpdate;
@@ -1159,7 +1167,7 @@
print("Textresponse $textResponse");
throw "Error returning content to browser: $error";
}
- });
+ });
}
void errorHandler(e) {
if (!underTermination) print("Error occured in httpserver: $e");
diff --git a/tools/testing/dart/browser_perf_testing/lib/browser_perf_testing.dart b/tools/testing/dart/browser_perf_testing/lib/browser_perf_testing.dart
new file mode 100644
index 0000000..2a79ab8
--- /dev/null
+++ b/tools/testing/dart/browser_perf_testing/lib/browser_perf_testing.dart
@@ -0,0 +1,146 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Dart script to launch performance tests without WebDriver/Selenium.
+///
+/// WARNING: Although this is laid out like a package, it is not really a
+/// package since it relies on test.dart files!
+library browser_perf_testing;
+
+import '../../browser_controller.dart';
+import '../../utils.dart';
+import '../../http_server.dart';
+import 'dart:async';
+import 'dart:io';
+import 'dart:convert';
+import 'package:path/path.dart' as path;
+import 'package:args/args.dart' as args_parser;
+
+final String ADDRESS = '127.0.0.1';
+
+/// A map that is passed to the testing framework to specify what ports the
+/// browser controller runs on.
+final Map SERVER_CONFIG = {
+ 'test_driver_port': 0,
+ 'test_driver_error_port': 0
+};
+
+void main (List<String> args) {
+ var options = _parseArguments(args);
+
+ // Start a server to serve the entire repo: the http server is available on
+ // window.location.port.
+ var servers = new TestingServers(
+ new Path('/Users/efortuna/dart-git2/dart/xcodebuild/ReleaseIA32'),
+ false, options['browser'], path.dirname(path.dirname(path.dirname(
+ path.dirname(path.dirname(path.dirname(Platform.script.path)))))));
+ servers.startServers(ADDRESS).then((_) {
+ _runPerfTests(options, servers);
+ });
+}
+
+/// Helper function to parse the arguments for this file.
+Map _parseArguments(List<String> args) {
+ var parser = new args_parser.ArgParser();
+ parser.addOption('browser', defaultsTo: 'chrome', help: 'Name of the browser'
+ ' to run this test with.');
+ parser.addOption('termination_test_file', defaultsTo:
+ '/root_dart/samples/third_party/dromaeo/dromaeo_end_condition.js',
+ help: 'Path to a javascript file that contains the function '
+ '"testIsComplete" tests whether the performance test has finished '
+ 'running. This is in a form that can be served up by '
+ 'http_server.dart, so it begins with /root_dart or some other server '
+ 'understood prefix.');
+ parser.addOption('test_path', defaultsTo:
+ '/root_dart/samples/third_party/dromaeo/index-js.html?jsANDqueryORjs'
+ 'ANDtraverseORjsANDattributes', help: 'Path to the performance test we '
+ 'wish to run. This is in a form that can be served up by '
+ 'http_server.dart, so it begins with /root_dart or some other server '
+ 'understood prefix.');
+ parser.addOption('checked', defaultsTo: false,
+ help: 'Run this test in checked mode.');
+ parser.addFlag('help', abbr: 'h', negatable: false, callback: (help) {
+ if (help) {
+ print(parser.getUsage());
+ exit(0);
+ };
+ });
+ parser.addOption('timeout', defaultsTo: 300,
+ help: 'Maximum amount of time to let a test run, in seconds.');
+ return parser.parse(args);
+}
+
+void _runPerfTests(Map options, TestingServers servers) {
+ var browserName = options['browser'];
+
+ var testRunner = new BrowserTestRunner(SERVER_CONFIG, ADDRESS, browserName, 1,
+ checkedMode: options['checked'],
+ testingServer: new BrowserPerfTestingServer(browserName,
+ options['termination_test_file'], servers.port));
+
+ var url = 'http://$ADDRESS:${servers.port}${options["test_path"]}';
+
+ BrowserTest browserTest = new BrowserTest(url,
+ (BrowserTestOutput output) {
+ var eventQueue = JSON.decode(output.lastKnownMessage);
+ var lastEvent = eventQueue.last;
+ var lines = lastEvent['value'].split('\n');
+ for (var line in lines) {
+ print(line);
+ }
+ testRunner.terminate();
+ servers.stopServers();
+ }, options['timeout']);
+
+ testRunner.start().then((started) {
+ if (started) {
+ testRunner.queueTest(browserTest);
+ } else {
+ print("Issue starting browser test runner $started");
+ exit(1);
+ }
+ });
+}
+
+/// Server for controlling and running performance tests. Note the tests
+/// themselves are served on the local file system (to eliminate any additional
+/// potential sources of lag), but we need a server to communicate when the test
+/// is done.
+class BrowserPerfTestingServer extends BrowserTestingServer {
+ // Path to the script containing the ending condition of the performance test,
+ // in the form of /root_dart, /root_build, or some other, as per the form of
+ // url expected from http_server.dart.
+ String endConditionScript;
+ /// Port number to access the server serving the whole Dart repository.
+ int repoPort;
+
+ BrowserPerfTestingServer(String browserName, this.endConditionScript,
+ this.repoPort) : super(SERVER_CONFIG, ADDRESS,
+ !Browser.BROWSERS_WITH_WINDOW_SUPPORT.contains(browserName));
+
+ /// We create a slightly modified version of the original browser_controller
+ /// driver page.
+ String getDriverPage(String browserId) {
+ var orig = super.getDriverPage(browserId);
+ //TODO(efortuna): Hacky!
+ var insertIndex = orig.indexOf('<script type');
+ var otherInsert = orig.indexOf('} else {',
+ orig.indexOf('if (isStatusUpdate)'));
+ var result = orig.substring(0, insertIndex) + """
+ <!-- To create a performance test, you must write a script that provides an
+ ending condition for the particular test, in the form /root_dart/foo (or
+ whatever base from http_server). // TODO not hard code.-->
+ <script src="http://$localIp:$repoPort$endConditionScript"></script>
+""" + orig.substring(insertIndex, otherInsert) + """
+ if (testIsComplete(msg)) {
+ var obj = new Object();
+ obj['message'] = msg;
+ obj['is_first_message'] = false;
+ obj['is_status_update'] = false;
+ obj['is_done'] = true;
+ window.postMessage(JSON.stringify(obj), '*');
+ }""" + orig.substring(otherInsert);
+ return result;
+ }
+}
diff --git a/tools/testing/dart/browser_perf_testing/pubspec.yaml b/tools/testing/dart/browser_perf_testing/pubspec.yaml
new file mode 100644
index 0000000..b033e13
--- /dev/null
+++ b/tools/testing/dart/browser_perf_testing/pubspec.yaml
@@ -0,0 +1,10 @@
+name: browser_perf_testing
+version: 0.0.1
+author: Dart Team <misc@dartlang.org>
+description: Framework for running performance benchmarks in the browser with our testing framework.
+homepage: http://www.dartlang.org
+dependencies:
+ path: any
+ args: any
+dev_dependencies:
+environment:
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
new file mode 100644
index 0000000..abe30ed
--- /dev/null
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -0,0 +1,376 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library compiler_configuration;
+
+import 'dart:io' show
+ Platform;
+
+import 'runtime_configuration.dart' show
+ RuntimeConfiguration;
+
+import 'test_runner.dart' show
+ Command,
+ CommandBuilder,
+ CompilationCommand;
+
+import 'test_suite.dart' show
+ TestInformation;
+
+/// Grouping of a command with its expected result.
+class CommandArtifact {
+ final List<Command> commands;
+
+ /// Expected result of running [command].
+ final String filename;
+
+ /// MIME type of [filename].
+ final String mimeType;
+
+ CommandArtifact(this.commands, this.filename, this.mimeType);
+}
+
+Uri nativeDirectoryToUri(String nativePath) {
+ Uri uri = new Uri.file(nativePath);
+ String path = uri.path;
+ return (path == '' || path.endsWith('/'))
+ ? uri
+ : Uri.parse('$uri/');
+}
+
+abstract class CompilerConfiguration {
+ final bool isDebug;
+ final bool isChecked;
+ final bool isHostChecked;
+ final bool useSdk;
+
+ // TODO(ahe): Remove this constructor and move the switch to
+ // test_options.dart. We probably want to store an instance of
+ // [CompilerConfiguration] in [configuration] there.
+ factory CompilerConfiguration(Map configuration) {
+ String compiler = configuration['compiler'];
+
+ // TODO(ahe): Move these booleans into a struction configuration object
+ // which can eventually completely replace the Map-based configuration
+ // object.
+ bool isDebug = configuration['mode'] == 'debug';
+ bool isChecked = configuration['checked'];
+ bool isHostChecked = configuration['host_checked'];
+ bool useSdk = configuration['use_sdk'];
+ bool isCsp = configuration['csp'];
+
+ switch (compiler) {
+ case 'dartanalyzer':
+ return new AnalyzerCompilerConfiguration(
+ 'dartanalyzer', isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+ case 'dart2analyzer':
+ return new DartBasedAnalyzerCompilerConfiguration(
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+ case 'dart2js':
+ return new Dart2jsCompilerConfiguration(
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk, isCsp: isCsp);
+ case 'dart2dart':
+ return new Dart2dartCompilerConfiguration(
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+ case 'none':
+ return new NoneCompilerConfiguration(
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+ default:
+ throw "Unknown compiler '$compiler'";
+ }
+ }
+
+ CompilerConfiguration._subclass({
+ this.isDebug: false,
+ this.isChecked: false,
+ this.isHostChecked: false,
+ this.useSdk: false});
+
+ /// Return a multiplier used to give tests longer time to run.
+ // TODO(ahe): Convert to getter!
+ int computeTimeoutMultiplier() {
+ return 1;
+ }
+
+ // TODO(ahe): It shouldn't be necessary to pass [buildDir] to any of these
+ // functions. It is fixed for a given configuration.
+ String computeCompilerPath(String buildDir) {
+ throw "Unknown compiler for: $runtimeType";
+ }
+
+ bool get hasCompiler => true;
+
+ String get executableScriptSuffix => Platform.isWindows ? '.bat' : '';
+
+ // TODO(ahe): Remove this.
+ bool get isCsp => false;
+
+ List<Uri> bootstrapDependencies(String buildDir) => const <Uri>[];
+
+ CommandArtifact computeCompilationArtifact(
+ String buildDir,
+ String tempDir,
+ CommandBuilder commandBuilder,
+ List arguments,
+ Map<String, String> environmentOverrides) {
+ return new CommandArtifact([], null, null);
+ }
+
+ List<String> computeRuntimeArguments(
+ RuntimeConfiguration runtimeConfiguration,
+ TestInformation info,
+ List<String> vmOptions,
+ List<String> sharedOptions,
+ List<String> originalArguments,
+ CommandArtifact artifact) {
+ return <String>[artifact.filename];
+ }
+}
+
+/// The "none" compiler.
+class NoneCompilerConfiguration extends CompilerConfiguration {
+ NoneCompilerConfiguration({
+ bool isDebug,
+ bool isChecked,
+ bool isHostChecked,
+ bool useSdk})
+ : super._subclass(
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+
+ bool get hasCompiler => false;
+
+ List<String> computeRuntimeArguments(
+ RuntimeConfiguration runtimeConfiguration,
+ TestInformation info,
+ List<String> vmOptions,
+ List<String> sharedOptions,
+ List<String> originalArguments,
+ CommandArtifact artifact) {
+ return <String>[]
+ ..addAll(vmOptions)
+ ..addAll(sharedOptions)
+ ..addAll(originalArguments);
+ }
+}
+
+/// Common configuration for dart2js-based tools, such as, dart2js and
+/// dart2dart.
+class Dart2xCompilerConfiguration extends CompilerConfiguration {
+ final String moniker;
+
+ Dart2xCompilerConfiguration(
+ this.moniker,
+ {bool isDebug,
+ bool isChecked,
+ bool isHostChecked,
+ bool useSdk})
+ : super._subclass(
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+
+ String computeCompilerPath(String buildDir) {
+ var prefix = 'sdk/bin/';
+ String suffix = executableScriptSuffix;
+ if (isHostChecked) {
+ // The script dart2js_developer is not included in the
+ // shipped SDK, that is the script is not installed in
+ // "$buildDir/dart-sdk/bin/"
+ return '$prefix/dart2js_developer$suffix';
+ } else {
+ if (useSdk) {
+ prefix = '$buildDir/dart-sdk/bin';
+ }
+ return '$prefix/dart2js$suffix';
+ }
+ }
+
+ CompilationCommand computeCompilationCommand(
+ String outputFileName,
+ String buildDir,
+ CommandBuilder commandBuilder,
+ List arguments,
+ Map<String, String> environmentOverrides) {
+ arguments = new List.from(arguments);
+ arguments.add('--out=$outputFileName');
+
+ return commandBuilder.getCompilationCommand(
+ moniker, outputFileName, !useSdk,
+ bootstrapDependencies(buildDir),
+ computeCompilerPath(buildDir),
+ arguments, environmentOverrides);
+ }
+
+ List<Uri> bootstrapDependencies(String buildDir) {
+ if (!useSdk) return const <Uri>[];
+
+ Uri absoluteBuildDir = Uri.base.resolveUri(nativeDirectoryToUri(buildDir));
+ return [absoluteBuildDir.resolve(
+ 'dart-sdk/bin/snapshots/dart2js.dart.snapshot')];
+ }
+}
+
+/// Configuration for dart2js compiler.
+class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
+ final bool isCsp;
+
+ Dart2jsCompilerConfiguration({
+ bool isDebug,
+ bool isChecked,
+ bool isHostChecked,
+ bool useSdk,
+ bool this.isCsp})
+ : super(
+ 'dart2js',
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+
+ int computeTimeoutMultiplier() {
+ int multiplier = 1;
+ if (isDebug) multiplier *= 4;
+ if (isChecked) multiplier *= 2;
+ if (isHostChecked) multiplier *= 16;
+ return multiplier;
+ }
+
+ CommandArtifact computeCompilationArtifact(
+ String buildDir,
+ String tempDir,
+ CommandBuilder commandBuilder,
+ List arguments,
+ Map<String, String> environmentOverrides) {
+ String normalOutput = '$tempDir/out.js';
+ String cspOutput = '$tempDir/out.precompiled.js';
+ return new CommandArtifact(
+ <Command>[
+ this.computeCompilationCommand(
+ normalOutput,
+ buildDir,
+ CommandBuilder.instance,
+ arguments,
+ environmentOverrides)],
+ // dart2js always produce both out.js and out.precompiled.js. To avoid
+ // recompiling the CSP version, we always tell the CompilationCommand
+ // to track the timestamp of out.js, but select which one to run based
+ // on CSP mode.
+ isCsp ? cspOutput : normalOutput,
+ 'application/javascript');
+ }
+}
+
+/// Configuration for dart2dart compiler.
+class Dart2dartCompilerConfiguration extends Dart2xCompilerConfiguration {
+ Dart2dartCompilerConfiguration({
+ bool isDebug,
+ bool isChecked,
+ bool isHostChecked,
+ bool useSdk})
+ : super(
+ 'dart2dart',
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+
+ CommandArtifact computeCompilationArtifact(
+ String buildDir,
+ String tempDir,
+ CommandBuilder commandBuilder,
+ List arguments,
+ Map<String, String> environmentOverrides) {
+ String outputFileName = '$tempDir/out.dart';
+ arguments = new List.from(arguments)..add('--output-type=dart');
+ return new CommandArtifact(
+ <Command>[
+ this.computeCompilationCommand(
+ outputFileName,
+ buildDir,
+ CommandBuilder.instance,
+ arguments,
+ environmentOverrides)],
+ outputFileName,
+ 'application/dart');
+ }
+
+ List<String> computeRuntimeArguments(
+ RuntimeConfiguration runtimeConfiguration,
+ TestInformation info,
+ List<String> vmOptions,
+ List<String> sharedOptions,
+ List<String> originalArguments,
+ CommandArtifact artifact) {
+ // TODO(antonm): support checked.
+ return <String>[]
+ ..addAll(vmOptions)
+ ..add('--ignore-unrecognized-flags')
+ ..add(artifact.filename);
+ }
+}
+
+/// Common configuration for analyzer-based tools, such as, dartanalyzer.
+class AnalyzerCompilerConfiguration extends CompilerConfiguration {
+ final String moniker;
+
+ AnalyzerCompilerConfiguration(
+ this.moniker,
+ {bool isDebug,
+ bool isChecked,
+ bool isHostChecked,
+ bool useSdk})
+ : super._subclass(
+ isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+
+ int computeTimeoutMultiplier() {
+ return 4;
+ }
+
+ String computeCompilerPath(String buildDir) {
+ String suffix = executableScriptSuffix;
+ return 'sdk/bin/dartanalyzer_developer$suffix';
+ }
+
+ CommandArtifact computeCompilationArtifact(
+ String buildDir,
+ String tempDir,
+ CommandBuilder commandBuilder,
+ List arguments,
+ Map<String, String> environmentOverrides) {
+ return new CommandArtifact(
+ <Command>[
+ commandBuilder.getAnalysisCommand(
+ moniker, computeCompilerPath(buildDir), arguments,
+ environmentOverrides,
+ flavor: moniker)],
+ null, null); // Since this is not a real compilation, no artifacts are
+ // produced.
+ }
+
+ List<String> computeRuntimeArguments(
+ RuntimeConfiguration runtimeConfiguration,
+ TestInformation info,
+ List<String> vmOptions,
+ List<String> sharedOptions,
+ List<String> originalArguments,
+ CommandArtifact artifact) {
+ return <String>[];
+ }
+}
+
+class DartBasedAnalyzerCompilerConfiguration
+ extends AnalyzerCompilerConfiguration {
+ DartBasedAnalyzerCompilerConfiguration({
+ bool isDebug,
+ bool isChecked,
+ bool isHostChecked,
+ bool useSdk})
+ : super(
+ 'dart2analyzer', isDebug: isDebug, isChecked: isChecked,
+ isHostChecked: isHostChecked, useSdk: useSdk);
+
+ String computeCompilerPath(String buildDir) => 'editor/tools/analyzer';
+}
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index 829e70c..4d676c0 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -101,13 +101,16 @@
List _serverList = [];
Path _buildDirectory = null;
+ Path _dartDirectory = null;
final bool useContentSecurityPolicy;
final String runtime;
TestingServers(Path buildDirectory,
this.useContentSecurityPolicy,
- [String this.runtime = 'none']) {
+ [String this.runtime = 'none', String dartDirectory]) {
_buildDirectory = TestUtils.absolutePath(buildDirectory);
+ _dartDirectory = dartDirectory == null ? TestUtils.dartDir()
+ : new Path(dartDirectory);
}
int get port => _serverList[0].port;
@@ -238,7 +241,7 @@
relativePath = new Path(
pathSegments.skip(1).join('/'));
} else if (pathSegments[0] == PREFIX_DARTDIR) {
- basePath = TestUtils.dartDir();
+ basePath = _dartDirectory;
relativePath = new Path(
pathSegments.skip(1).join('/'));
}
diff --git a/tools/testing/dart/perf_test_controller.js b/tools/testing/dart/perf_test_controller.js
new file mode 100644
index 0000000..f6990bb
--- /dev/null
+++ b/tools/testing/dart/perf_test_controller.js
@@ -0,0 +1,9 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Helper file to make performance tests run with the Dart browser controller
+/// in test.dart.
+
+// First import test_controller.js
+dartPrint('unittest-suite-wait-for-done');
diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
new file mode 100644
index 0000000..fd30dd9
--- /dev/null
+++ b/tools/testing/dart/runtime_configuration.dart
@@ -0,0 +1,218 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library runtime_configuration;
+
+import 'compiler_configuration.dart' show
+ CommandArtifact;
+
+// TODO(ahe): Remove this import, we can precompute all the values required
+// from TestSuite once the refactoring is complete.
+import 'test_suite.dart' show
+ TestSuite;
+
+import 'test_runner.dart' show
+ Command,
+ CommandBuilder;
+
+// TODO(ahe): I expect this class will become abstract very soon.
+class RuntimeConfiguration {
+ // TODO(ahe): Remove this constructor and move the switch to
+ // test_options.dart. We probably want to store an instance of
+ // [RuntimeConfiguration] in [configuration] there.
+ factory RuntimeConfiguration(Map configuration) {
+ String runtime = configuration['runtime'];
+ switch (runtime) {
+ case 'ContentShellOnAndroid':
+ case 'DartiumOnAndroid':
+ case 'chrome':
+ case 'chromeOnAndroid':
+ case 'dartium':
+ case 'ff':
+ case 'firefox':
+ case 'ie10':
+ case 'ie9':
+ case 'opera':
+ case 'safari':
+ // TODO(ahe): Replace this with one or more browser runtimes.
+ return new DummyRuntimeConfiguration();
+
+ case 'jsshell':
+ return new JsshellRuntimeConfiguration();
+
+ case 'd8':
+ return new D8RuntimeConfiguration();
+
+ case 'none':
+ return new NoneRuntimeConfiguration();
+
+ case 'vm':
+ return new StandaloneDartRuntimeConfiguration();
+
+ case 'drt':
+ return new DrtRuntimeConfiguration();
+
+ default:
+ throw "Unknown runtime '$runtime'";
+ }
+ }
+
+ RuntimeConfiguration._subclass();
+
+ int computeTimeoutMultiplier({
+ bool isDebug: false,
+ bool isChecked: false,
+ String arch}) {
+ return 1;
+ }
+
+ List<Command> computeRuntimeCommands(
+ TestSuite suite,
+ CommandBuilder commandBuilder,
+ CommandArtifact artifact,
+ List<String> arguments,
+ Map<String, String> environmentOverrides) {
+ // TODO(ahe): Make this method abstract.
+ throw "Unimplemented runtime '$runtimeType'";
+ }
+}
+
+/// The 'none' runtime configuration.
+class NoneRuntimeConfiguration extends RuntimeConfiguration {
+ NoneRuntimeConfiguration()
+ : super._subclass();
+
+ List<Command> computeRuntimeCommands(
+ TestSuite suite,
+ CommandBuilder commandBuilder,
+ CommandArtifact artifact,
+ List<String> arguments,
+ Map<String, String> environmentOverrides) {
+ return <Command>[];
+ }
+}
+
+class CommandLineJavaScriptRuntime extends RuntimeConfiguration {
+ final String moniker;
+
+ CommandLineJavaScriptRuntime(this.moniker)
+ : super._subclass();
+
+ void checkArtifact(CommandArtifact artifact) {
+ String type = artifact.mimeType;
+ if (type != 'application/javascript') {
+ throw "Runtime '$moniker' cannot run files of type '$type'.";
+ }
+ }
+}
+
+/// Chrome/V8-based development shell (d8).
+class D8RuntimeConfiguration extends CommandLineJavaScriptRuntime {
+ D8RuntimeConfiguration()
+ : super('d8');
+
+ List<Command> computeRuntimeCommands(
+ TestSuite suite,
+ CommandBuilder commandBuilder,
+ CommandArtifact artifact,
+ List<String> arguments,
+ Map<String, String> environmentOverrides) {
+ // TODO(ahe): Avoid duplication of this method between d8 and jsshell.
+ checkArtifact(artifact);
+ return <Command>[
+ commandBuilder.getJSCommandlineCommand(
+ moniker, suite.d8FileName, arguments, environmentOverrides)];
+ }
+}
+
+/// Firefox/SpiderMonkey-based development shell (jsshell).
+class JsshellRuntimeConfiguration extends CommandLineJavaScriptRuntime {
+ JsshellRuntimeConfiguration()
+ : super('jsshell');
+
+ List<Command> computeRuntimeCommands(
+ TestSuite suite,
+ CommandBuilder commandBuilder,
+ CommandArtifact artifact,
+ List<String> arguments,
+ Map<String, String> environmentOverrides) {
+ checkArtifact(artifact);
+ return <Command>[
+ commandBuilder.getJSCommandlineCommand(
+ moniker, suite.jsShellFileName, arguments, environmentOverrides)];
+ }
+}
+
+/// Common runtime configuration for runtimes based on the Dart VM.
+class DartVmRuntimeConfiguration extends RuntimeConfiguration {
+ DartVmRuntimeConfiguration()
+ : super._subclass();
+
+ int computeTimeoutMultiplier({
+ bool isDebug: false,
+ bool isChecked: false,
+ String arch}) {
+ int multiplier = 1;
+ switch (arch) {
+ case 'simarm':
+ case 'arm':
+ case 'simmips':
+ case 'mips':
+ multiplier *= 4;
+ break;
+ }
+ if (isDebug) {
+ multiplier *= 2;
+ }
+ return multiplier;
+ }
+}
+
+/// Runtime configuration for Content Shell. We previously used a similar
+/// program named Dump Render Tree, hence the name.
+class DrtRuntimeConfiguration extends DartVmRuntimeConfiguration {
+ int computeTimeoutMultiplier({
+ bool isDebug: false,
+ bool isChecked: false,
+ String arch}) {
+ return 4 // Allow additional time for browser testing to run.
+ // TODO(ahe): We might need to distinquish between DRT for running
+ // JavaScript and Dart code. I'm not convinced the inherited timeout
+ // multiplier is relevant for JavaScript.
+ * super.computeTimeoutMultiplier(
+ isDebug: isDebug, isChecked: isChecked);
+ }
+}
+
+/// The standalone Dart VM binary, "dart" or "dart.exe".
+class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
+ List<Command> computeRuntimeCommands(
+ TestSuite suite,
+ CommandBuilder commandBuilder,
+ CommandArtifact artifact,
+ List<String> arguments,
+ Map<String, String> environmentOverrides) {
+ String script = artifact.filename;
+ String type = artifact.mimeType;
+ if (script != null && type != 'application/dart') {
+ throw "Dart VM cannot run files of type '$type'.";
+ }
+ return <Command>[commandBuilder.getVmCommand(
+ suite.dartVmBinaryFileName, arguments, environmentOverrides)];
+ }
+}
+
+/// Temporary runtime configuration for browser runtimes that haven't been
+/// migrated yet.
+// TODO(ahe): Remove this class.
+class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
+ List<Command> computeRuntimeCommands(
+ TestSuite suite,
+ CommandBuilder commandBuilder,
+ CommandArtifact artifact,
+ List<String> arguments,
+ Map<String, String> environmentOverrides) {
+ throw "Unimplemented runtime '$runtimeType'";
+ }
+}
diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart
index 3274d57..0d3cbb7 100644
--- a/tools/testing/dart/test_options.dart
+++ b/tools/testing/dart/test_options.dart
@@ -7,6 +7,8 @@
import "dart:io";
import "drt_updater.dart";
import "test_suite.dart";
+import "compiler_configuration.dart" show CompilerConfiguration;
+import "runtime_configuration.dart" show RuntimeConfiguration;
List<String> defaultTestSelectors =
const ['samples', 'standalone', 'corelib', 'co19', 'language',
@@ -25,7 +27,7 @@
this.keys,
this.values,
this.defaultValue,
- [type = 'string']) : this.type = type;
+ {this.type : 'string'});
String name;
String description;
List<String> keys;
@@ -118,35 +120,35 @@
['--checked'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'host_checked',
'Run compiler in checked mode',
['--host-checked'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'minified',
'Enable minification in the compiler',
['--minified'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'csp',
'Run tests under Content Security Policy restrictions',
['--csp'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'timeout',
'Timeout in seconds',
['-t', '--timeout'],
[],
-1,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'progress',
'Progress indication mode',
@@ -160,7 +162,7 @@
['--failure-summary'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'step_name',
'Step name for use by -pbuildbot',
@@ -173,56 +175,56 @@
['--report'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'tasks',
'The number of parallel tasks to run',
['-j', '--tasks'],
[],
Platform.numberOfProcessors,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'shards',
'The number of instances that the tests will be sharded over',
['--shards'],
[],
1,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'shard',
'The index of this instance when running in sharded mode',
['--shard'],
[],
1,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'help',
'Print list of options',
['-h', '--help'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'verbose',
'Verbose output',
['-v', '--verbose'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'list',
'List tests only, do not run them',
['--list'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'time',
'Print timing information after running tests',
['--time'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'dart',
'Path to dart executable',
@@ -270,7 +272,7 @@
['--use-sdk'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'use_public_packages',
'For tests using packages: Use pub.dartlang.org packages '
@@ -278,16 +280,16 @@
['--use-public-packages'],
[],
false,
- 'bool'),
- new _TestOptionSpecification(
- 'use_repository_packages',
- 'For tests using packages: Use pub.dartlang.org packages '
- 'but use overrides for the packages available in the '
- 'repository.',
- ['--use-repository-packages'],
- [],
- false,
- 'bool'),
+ type: 'bool'),
+ new _TestOptionSpecification(
+ 'use_repository_packages',
+ 'For tests using packages: Use pub.dartlang.org packages '
+ 'but use overrides for the packages available in the '
+ 'repository.',
+ ['--use-repository-packages'],
+ [],
+ false,
+ type: 'bool'),
new _TestOptionSpecification(
'build_directory',
'The name of the build directory, where products are placed.',
@@ -300,23 +302,21 @@
['-n', '--nobatch'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'append_logs',
'Do not delete old logs but rather append to them.',
['--append_logs'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'write_debug_log',
'Don\'t write debug messages to stdout but rather to a logfile.',
['--write-debug-log'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'write_test_outcome_log',
'Write the outcome of all tests executed to a '
@@ -324,16 +324,14 @@
['--write-test-outcome-log'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'clear_safari_cache',
'Clear the safari cache (i.e., delete it).',
['--clear_safari_cache'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'copy_coredumps',
'If we see a crash that we did not expect, copy the core dumps. '
@@ -341,8 +339,7 @@
['--copy-coredumps'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'local_ip',
'IP address the http servers should listen on.'
@@ -356,28 +353,28 @@
['--test_server_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'test_server_cross_origin_port',
'Port for test http server cross origin.',
['--test_server_cross_origin_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'test_driver_port',
'Port for http test driver server.',
['--test_driver_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'test_driver_error_port',
'Port for http test driver server errors.',
['--test_driver_error_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'record_to_file',
'Records all the commands that need to be executed and writes it '
@@ -727,45 +724,14 @@
// Adjust default timeout based on mode, compiler, and sometimes runtime.
if (configuration['timeout'] == -1) {
- var timeout = 60;
- switch (configuration['compiler']) {
- case 'dartanalyzer':
- case 'dart2analyzer':
- timeout *= 4;
- break;
- case 'dart2js':
- // TODO(ahe): Restore the timeout of 30 seconds when dart2js
- // compile-time performance has improved.
- timeout = 60;
- if (configuration['mode'] == 'debug') {
- timeout *= 8;
- }
- if (configuration['host_checked']) {
- timeout *= 16;
- }
- if (configuration['checked']) {
- timeout *= 2;
- }
- break;
- default:
- if (configuration['arch'] == 'simarm') {
- timeout *= 4;
- } else if (configuration['arch'] == 'arm') {
- timeout *= 4;
- } else if (configuration['arch'] == 'simmips') {
- timeout *= 4;
- } else if (configuration['arch'] == 'mips') {
- timeout *= 4;
- }
- if (configuration['mode'] == 'debug') {
- timeout *= 2;
- }
- if (const ['drt'].contains(configuration['runtime'])) {
- timeout *= 4; // Allow additional time for browser testing to run.
- }
- break;
- }
- configuration['timeout'] = timeout;
+ int compilerMulitiplier =
+ new CompilerConfiguration(configuration).computeTimeoutMultiplier();
+ int runtimeMultiplier =
+ new RuntimeConfiguration(configuration).computeTimeoutMultiplier(
+ isDebug: configuration['mode'] == 'debug',
+ isChecked: configuration['checked'],
+ arch: configuration['arch']);
+ configuration['timeout'] = 60 * compilerMulitiplier * runtimeMultiplier;
}
return [configuration];
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index d296355..af7490b 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -23,6 +23,13 @@
import "utils.dart";
import "http_server.dart" show PREFIX_BUILDDIR, PREFIX_DARTDIR;
+import "compiler_configuration.dart" show
+ CommandArtifact,
+ CompilerConfiguration;
+
+import "runtime_configuration.dart" show
+ RuntimeConfiguration;
+
part "browser_test.dart";
@@ -130,6 +137,19 @@
// The pub suite always uses the SDK.
// TODO(rnystrom): Eventually, all test suites should run out of the SDK
// and this check should go away.
+ // TODO(ahe): This check is broken for several reasons:
+ // First, it is not true that all tests should be running out of the
+ // SDK. It is absolutely critical to VM development that you can test the
+ // VM without building the SDK.
+ // Second, it is convenient for dart2js developers to run tests without
+ // rebuilding the SDK, and similarly, it should be convenient for pub
+ // developers.
+ // Third, even if pub can only run from the SDK directory, this is the
+ // wrong place to work around that problem. Instead, test_options.dart
+ // should have been modified so that configuration['use_sdk'] is always
+ // true when testing pub. Attempting to override the value here is brittle
+ // because we read configuration['use_sdk'] directly in many places without
+ // using this getter.
if (suiteName == 'pub') return true;
return configuration['use_sdk'];
@@ -145,37 +165,11 @@
* no compiler should be used.
*/
String get compilerPath {
- if (configuration['compiler'] == 'none') {
- return null; // No separate compiler for dartium tests.
- }
- var name;
- switch (configuration['compiler']) {
- case 'dartanalyzer':
- case 'dart2analyzer':
- name = executablePath;
- break;
- case 'dart2js':
- case 'dart2dart':
- var prefix = 'sdk/bin/';
- String suffix = getExecutableSuffix(configuration['compiler']);
- if (configuration['host_checked']) {
- // The script dart2js_developer is not included in the
- // shipped SDK, that is the script is not installed in
- // "$buildDir/dart-sdk/bin/"
- name = '$prefix/dart2js_developer$suffix';
- } else {
- if (configuration['use_sdk']) {
- prefix = '$buildDir/dart-sdk/bin/';
- }
- name = '${prefix}dart2js$suffix';
- }
- break;
- default:
- throw "Unknown compiler for: ${configuration['compiler']}";
- }
- if (!(new File(name)).existsSync() && !configuration['list']) {
- throw "Executable '$name' does not exist";
- }
+ var compilerConfiguration = new CompilerConfiguration(configuration);
+ if (!compilerConfiguration.hasCompiler) return null;
+ String name = compilerConfiguration.computeCompilerPath(buildDir);
+ // TODO(ahe): Only validate this once, in test_options.dart.
+ TestUtils.ensureExists(name, configuration);
return name;
}
@@ -186,55 +180,26 @@
}
String suffix = getExecutableSuffix('pub');
var name = '${prefix}pub$suffix';
- if (!(new File(name)).existsSync() && !configuration['list']) {
- throw "Executable '$name' does not exist";
- }
- return name;
- }
-
- String get dartPath {
- var prefix = 'sdk/bin/';
- if (configuration['use_sdk']) {
- prefix = '$buildDir/dart-sdk/bin/';
- }
- String suffix = getExecutableSuffix('vm');
- var name = '${prefix}dart$suffix';
- if (!(new File(name)).existsSync() && !configuration['list']) {
- throw "Executable '$name' does not exist";
- }
- return name;
- }
-
- /**
- * The path to the executable used to run this suite's tests.
- */
- String get executablePath {
- var suffix = getExecutableSuffix(configuration['compiler']);
- switch (configuration['compiler']) {
- case 'none':
- if (useSdk) {
- return '$buildDir/dart-sdk/bin/dart$suffix';
- }
- return '$buildDir/dart$suffix';
- case 'dartanalyzer':
- return 'sdk/bin/dartanalyzer_developer$suffix';
- case 'dart2analyzer':
- return 'editor/tools/analyzer';
- default:
- throw "Unknown executable for: ${configuration['compiler']}";
- }
- }
-
- String get dartShellFileName {
- var name = configuration['dart'];
- if (name == '') {
- name = executablePath;
- }
-
TestUtils.ensureExists(name, configuration);
return name;
}
+ /// Returns the name of the Dart VM executable.
+ String get dartVmBinaryFileName {
+ // Controlled by user with the option "--dart".
+ String dartExecutable = configuration['dart'];
+
+ if (dartExecutable == '') {
+ String suffix = executableBinarySuffix;
+ dartExecutable = useSdk
+ ? '$buildDir/dart-sdk/bin/dart$suffix'
+ : '$buildDir/dart$suffix';
+ }
+
+ TestUtils.ensureExists(dartExecutable, configuration);
+ return dartExecutable;
+ }
+
String get d8FileName {
var suffix = getExecutableSuffix('d8');
var d8Dir = TestUtils.dartDir().append('third_party/d8');
@@ -252,19 +217,10 @@
}
/**
- * The file name of the Dart VM executable.
- */
- String get vmFileName {
- var suffix = getExecutableSuffix('vm');
- var vm = '$buildDir/dart$suffix';
- TestUtils.ensureExists(vm, configuration);
- return vm;
- }
-
- /**
* The file extension (if any) that should be added to the given executable
* name for the current platform.
*/
+ // TODO(ahe): Get rid of this. Use executableBinarySuffix instead.
String getExecutableSuffix(String executable) {
if (Platform.operatingSystem == 'windows') {
if (executable == 'd8' || executable == 'vm' || executable == 'none') {
@@ -276,6 +232,8 @@
return '';
}
+ String get executableBinarySuffix => Platform.isWindows ? '.exe' : '';
+
/**
* Call the callback function onTest with a [TestCase] argument for each
* test in the suite. When all tests have been processed, call [onDone].
@@ -323,7 +281,7 @@
if (testCase.info != null &&
testCase.info.hasCompileError &&
TestUtils.isBrowserRuntime(configuration['runtime']) &&
- configuration['compiler'] != 'none') {
+ new CompilerConfiguration(configuration).hasCompiler) {
SummaryReport.addCompileErrorSkipTest();
return;
}
@@ -934,7 +892,8 @@
multitestName: optionsFromFile['isMultitest'] ? info.multitestKey : "");
Set<Expectation> expectations = testExpectations.expectations(testName);
- if (configuration['compiler'] != 'none' && info.hasCompileError) {
+ if (new CompilerConfiguration(configuration).hasCompiler &&
+ info.hasCompileError) {
// If a compile-time error is expected, and we're testing a
// compiler, we never need to attempt to run the program (in a
// browser or otherwise).
@@ -1000,87 +959,53 @@
}
List<Command> makeCommands(TestInformation info, var vmOptions, var args) {
- var compiler = configuration['compiler'];
+ List<Command> commands = <Command>[];
+ CompilerConfiguration compilerConfiguration =
+ new CompilerConfiguration(configuration);
List<String> sharedOptions = info.optionsFromFile['sharedOptions'];
- switch (compiler) {
- case 'dart2js':
- args = new List.from(args);
- String tempDir = createCompilationOutputDirectory(info.filePath);
- args.addAll(sharedOptions);
- args.add('--out=$tempDir/out.js');
- var command = CommandBuilder.instance.getCompilationCommand(
- compiler, "$tempDir/out.js", !useSdk,
- dart2JsBootstrapDependencies, compilerPath, args,
- environmentOverrides);
-
- var javascriptFile = '$tempDir/out.js';
- if (configuration['csp']) {
- javascriptFile = '$tempDir/out.precompiled.js';
- }
-
- List<Command> commands = <Command>[command];
- if (info.hasCompileError) {
- // Do not attempt to run the compiled result. A compilation
- // error should be reported by the compilation command.
- } else if (configuration['runtime'] == 'd8') {
- commands.add(CommandBuilder.instance.getJSCommandlineCommand(
- "d8", d8FileName, [javascriptFile], environmentOverrides));
- } else if (configuration['runtime'] == 'jsshell') {
- commands.add(CommandBuilder.instance.getJSCommandlineCommand(
- "jsshell", jsShellFileName, [javascriptFile],
- environmentOverrides));
- }
- return commands;
- case 'dart2dart':
- args = new List.from(args);
- args.addAll(sharedOptions);
- args.add('--output-type=dart');
- String tempDir = createCompilationOutputDirectory(info.filePath);
- args.add('--out=$tempDir/out.dart');
-
- List<Command> commands =
- <Command>[CommandBuilder.instance.getCompilationCommand(
- compiler, "$tempDir/out.dart", !useSdk,
- dart2JsBootstrapDependencies, compilerPath, args,
- environmentOverrides)];
- if (info.hasCompileError) {
- // Do not attempt to run the compiled result. A compilation
- // error should be reported by the compilation command.
- } else if (configuration['runtime'] == 'vm') {
- // TODO(antonm): support checked.
- var vmArguments = new List.from(vmOptions);
- vmArguments.addAll([
- '--ignore-unrecognized-flags', '$tempDir/out.dart']);
- commands.add(CommandBuilder.instance.getVmCommand(
- vmFileName, vmArguments, environmentOverrides));
- } else {
- throw 'Unsupported runtime ${configuration["runtime"]} for dart2dart';
- }
- return commands;
-
- case 'none':
- var arguments = new List.from(vmOptions);
- arguments.addAll(sharedOptions);
- arguments.addAll(args);
- return <Command>[CommandBuilder.instance.getVmCommand(
- dartShellFileName, arguments, environmentOverrides)];
-
- case 'dartanalyzer':
- case 'dart2analyzer':
- return <Command>[makeAnalysisCommand(info, args)];
-
- default:
- throw 'Unknown compiler ${configuration["compiler"]}';
+ List<String> compileTimeArguments = <String>[];
+ String tempDir;
+ if (compilerConfiguration.hasCompiler) {
+ compileTimeArguments
+ ..addAll(args)
+ ..addAll(sharedOptions);
+ // Avoid doing this for analyzer.
+ tempDir = createCompilationOutputDirectory(info.filePath);
}
- }
- AnalysisCommand makeAnalysisCommand(TestInformation info,
- List<String> arguments) {
- return CommandBuilder.instance.getAnalysisCommand(
- configuration['compiler'], dartShellFileName, arguments,
- environmentOverrides,
- flavor: configuration['compiler']);
+ CommandArtifact compilationArtifact =
+ compilerConfiguration.computeCompilationArtifact(
+ buildDir,
+ tempDir,
+ CommandBuilder.instance,
+ compileTimeArguments,
+ environmentOverrides);
+ commands.addAll(compilationArtifact.commands);
+
+ if (info.hasCompileError && compilerConfiguration.hasCompiler) {
+ // Do not attempt to run the compiled result. A compilation
+ // error should be reported by the compilation command.
+ return commands;
+ }
+
+ RuntimeConfiguration runtimeConfiguration =
+ new RuntimeConfiguration(configuration);
+ List<String> runtimeArguments =
+ compilerConfiguration.computeRuntimeArguments(
+ runtimeConfiguration,
+ info,
+ vmOptions, sharedOptions, args,
+ compilationArtifact);
+
+ return commands
+ ..addAll(
+ runtimeConfiguration.computeRuntimeCommands(
+ this,
+ CommandBuilder.instance,
+ compilationArtifact,
+ runtimeArguments,
+ environmentOverrides));
}
CreateTest makeTestCaseCreator(Map optionsFromFile) {
@@ -1404,7 +1329,7 @@
if (executable.endsWith('.dart')) {
// Run the compiler script via the Dart VM.
args.insert(0, executable);
- executable = dartShellFileName;
+ executable = dartVmBinaryFileName;
}
return CommandBuilder.instance.getCompilationCommand(
compiler, outputFile, !useSdk,
@@ -1423,7 +1348,7 @@
if (configuration['csp']) args.add('--csp');
return CommandBuilder.instance.getProcessCommand(
- 'polymer_deploy', vmFileName, args, environmentOverrides);
+ 'polymer_deploy', dartVmBinaryFileName, args, environmentOverrides);
}
String createGeneratedTestDirectoryHelper(
@@ -1813,13 +1738,6 @@
!filename.contains("_internal/lib");
}
- AnalysisCommand makeAnalysisCommand(TestInformation info,
- List<String> arguments) {
- return CommandBuilder.instance.getAnalysisCommand(
- configuration['compiler'], dartShellFileName, arguments,
- environmentOverrides, flavor: configuration['compiler']);
- }
-
bool get listRecursively => true;
}
@@ -1884,7 +1802,7 @@
bool containsBuildDartFile =
fileExists(directoryPath.append('build.dart'));
if (containsBuildDartFile) {
- var dartBinary = new File(dartPath).absolute.path;
+ var dartBinary = new File(dartVmBinaryFileName).absolute.path;
commands.add(CommandBuilder.instance.getProcessCommand(
"custom_build", dartBinary, ['build.dart'], null,
@@ -2059,8 +1977,8 @@
}
static void ensureExists(String filename, Map configuration) {
- if (!configuration['list'] && !(new File(filename).existsSync())) {
- throw "Executable '$filename' does not exist";
+ if (!configuration['list'] && !existsCache.doesFileExist(filename)) {
+ throw "'$filename' does not exist";
}
}
diff --git a/tools/testing/perf_testing/run_perf_tests.py b/tools/testing/perf_testing/run_perf_tests.py
index 67f724a..8b790cb2 100755
--- a/tools/testing/perf_testing/run_perf_tests.py
+++ b/tools/testing/perf_testing/run_perf_tests.py
@@ -27,8 +27,7 @@
'dart_checkout_for_perf_testing',
'dart'))
# How far back in time we want to test.
-EARLIEST_REVISION = 6285
-FIRST_CHROMEDRIVER = 7823
+EARLIEST_REVISION = 33076
sys.path.append(TOOLS_PATH)
sys.path.append(os.path.join(TOP_LEVEL_DIR, 'internal', 'tests'))
import post_results
@@ -627,115 +626,6 @@
return browsers
-class CommonBrowserTest(RuntimePerformanceTest):
- """Runs this basic performance tests (Benchpress, some V8 benchmarks) in the
- browser."""
-
- def __init__(self, test_runner):
- """Args:
- test_runner: Reference to the object that notifies us when to run."""
- super(CommonBrowserTest, self).__init__(
- self.Name(), BrowserTester.GetBrowsers(False),
- 'browser', ['js', 'dart2js'],
- self.GetStandaloneBenchmarks(), test_runner,
- self.CommonBrowserTester(self),
- self.CommonBrowserFileProcessor(self))
-
- @staticmethod
- def Name():
- return 'browser-perf'
-
- @staticmethod
- def GetStandaloneBenchmarks():
- return ['Mandelbrot', 'DeltaBlue', 'Richards', 'NBody', 'BinaryTrees',
- 'Fannkuch', 'Meteor', 'BubbleSort', 'Fibonacci', 'Loop', 'Permute',
- 'Queens', 'QuickSort', 'Recurse', 'Sieve', 'Sum', 'Tak', 'Takl', 'Towers',
- 'TreeSort']
-
- class CommonBrowserTester(BrowserTester):
- def RunTests(self):
- """Run a performance test in the browser."""
- os.chdir(DART_REPO_LOC)
- self.test.test_runner.RunCmd([
- 'python', os.path.join('internal', 'browserBenchmarks',
- 'make_web_benchmarks.py')])
-
- for browser in self.test.platform_list:
- for version in self.test.versions:
- if not self.test.IsValidCombination(browser, version):
- continue
- self.test.trace_file = os.path.join(TOP_LEVEL_DIR,
- 'tools', 'testing', 'perf_testing', self.test.result_folder_name,
- 'perf-%s-%s-%s' % (self.test.cur_time, browser, version))
- self.AddSvnRevisionToTrace(self.test.trace_file, browser)
- file_path = os.path.join(
- os.getcwd(), 'internal', 'browserBenchmarks', 'V8vDart',
- 'V8vDart_page_%s.html' % version)
- self.test.test_runner.RunCmd(
- ['python', os.path.join('tools', 'testing', 'run_selenium.py'),
- '--out', '"file:///%s"' % file_path, '--browser', browser,
- '--timeout', '600', '--mode', 'perf'], self.test.trace_file,
- append=True)
-
- class CommonBrowserFileProcessor(Processor):
-
- def ProcessFile(self, afile, should_post_file):
- """Comb through the html to find the performance results.
- Returns: True if we successfully posted our data to storage and/or we can
- delete the trace file."""
- os.chdir(os.path.join(TOP_LEVEL_DIR, 'tools',
- 'testing', 'perf_testing'))
- parts = afile.split('-')
- browser = parts[2]
- version = parts[3]
- f = self.OpenTraceFile(afile, should_post_file)
- lines = f.readlines()
- line = ''
- i = 0
- revision_num = 0
- while '<div id="results">' not in line and i < len(lines):
- if 'Revision' in line:
- revision_num = int(line.split()[1].strip('"'))
- line = lines[i]
- i += 1
-
- if i >= len(lines) or revision_num == 0:
- # Then this run did not complete. Ignore this tracefile.
- return True
-
- line = lines[i]
- i += 1
- results = []
- if line.find('<br>') > -1:
- results = line.split('<br>')
- else:
- results = line.split('<br />')
- if results == []:
- return True
- upload_success = True
- for result in results:
- name_and_score = result.split(':')
- if len(name_and_score) < 2:
- break
- name = name_and_score[0].strip()
- score = name_and_score[1].strip()
- if version == 'js' or version == 'v8':
- version = 'js'
- bench_dict = self.test.values_dict[browser][version]
- bench_dict[name] += [float(score)]
- self.test.revision_dict[browser][version][name] += [revision_num]
- if not self.test.test_runner.no_upload and should_post_file:
- upload_success = upload_success and self.ReportResults(
- name, score, browser, version, revision_num,
- self.GetScoreType(name))
- else:
- upload_success = False
-
- f.close()
- self.CalculateGeometricMean(browser, version, revision_num)
- return upload_success
-
-
class DromaeoTester(Tester):
DROMAEO_BENCHMARKS = {
'attr': ('attributes', [
@@ -823,79 +713,6 @@
return 'dromaeo'
class DromaeoPerfTester(DromaeoTester):
- def MoveChromeDriverIfNeeded(self, browser):
- """Move the appropriate version of ChromeDriver onto the path.
- TODO(efortuna): This is a total hack because the latest version of Chrome
- (Dartium builds) requires a different version of ChromeDriver, that is
- incompatible with the release or beta Chrome and vice versa. Remove these
- shenanigans once we're back to both versions of Chrome using the same
- version of ChromeDriver. IMPORTANT NOTE: This assumes your chromedriver is
- in the default location (inside depot_tools).
-
- Returns: True if we were successfully able to download a new version of
- chromedriver and/or move the correct chromedriver into position.
- """
- current_dir = os.getcwd()
- self.test.test_runner.GetArchive('chromedriver')
- path = os.environ['PATH'].split(os.pathsep)
- orig_chromedriver_path = os.path.join(DART_REPO_LOC, 'tools', 'testing',
- 'orig-chromedriver')
- dartium_chromedriver_path = os.path.join(DART_REPO_LOC, 'tools',
- 'testing',
- 'dartium-chromedriver')
- extension = ''
- if platform.system() == 'Windows':
- extension = '.exe'
-
- def MoveChromedriver(depot_tools, copy_to_depot_tools_dir=True,
- from_path=None):
- if from_path:
- from_dir = from_path + extension
- else:
- from_dir = os.path.join(orig_chromedriver_path,
- 'chromedriver' + extension)
- to_dir = os.path.join(depot_tools, 'chromedriver' + extension)
- if not copy_to_depot_tools_dir:
- tmp = to_dir
- to_dir = from_dir
- from_dir = tmp
- print >> sys.stderr, from_dir
- print >> sys.stderr, to_dir
- if not os.path.exists(os.path.dirname(to_dir)):
- os.makedirs(os.path.dirname(to_dir))
- if not os.path.exists(os.path.dirname(from_dir)):
- os.makedirs(os.path.dirname(from_dir))
- shutil.copyfile(from_dir, to_dir)
-
- for loc in path:
- if 'depot_tools' in loc:
- if browser == 'chrome':
- if os.path.exists(orig_chromedriver_path):
- MoveChromedriver(loc)
- elif browser == 'dartium':
- if (int(self.test.test_runner.current_revision_num) <
- FIRST_CHROMEDRIVER):
- # If we don't have a stashed different chromedriver just use
- # the regular chromedriver.
- if not os.path.exists(os.path.dirname(orig_chromedriver_path)):
- os.makedirs(os.path.dirname(orig_chromedriver_path))
- self.test.test_runner.RunCmd([os.path.join(
- TOP_LEVEL_DIR, 'tools', 'testing', 'webdriver_test_setup.py'),
- '-f', '-p', '-s'])
- elif not os.path.exists(dartium_chromedriver_path):
- success, _, _ = self.test.test_runner.GetArchive('chromedriver')
- if not success:
- return False
- # Move original chromedriver for storage.
- if not os.path.exists(orig_chromedriver_path):
- MoveChromedriver(loc, copy_to_depot_tools_dir=False)
- if self.test.test_runner.current_revision_num >= FIRST_CHROMEDRIVER:
- # Copy Dartium chromedriver into depot_tools
- MoveChromedriver(loc, from_path=os.path.join(
- dartium_chromedriver_path, 'chromedriver'))
- os.chdir(current_dir)
- return True
-
def RunTests(self):
"""Run dromaeo in the browser."""
success, _, _ = self.test.test_runner.GetArchive('dartium')
@@ -907,21 +724,14 @@
dromaeo_path = os.path.join('samples', 'third_party', 'dromaeo')
current_path = os.getcwd()
os.chdir(dromaeo_path)
- if os.path.exists('generate_dart2js_tests.py'):
- stdout, _ = self.test.test_runner.RunCmd(
- ['python', 'generate_dart2js_tests.py'])
- else:
- stdout, _ = self.test.test_runner.RunCmd(
- ['python', 'generate_frog_tests.py'])
+ stdout, _ = self.test.test_runner.RunCmd(
+ ['python', 'generate_perf_and_dart2js_tests.py'])
os.chdir(current_path)
if 'Error: Compilation failed' in stdout:
return
versions = DromaeoTester.GetDromaeoVersions()
for browser in BrowserTester.GetBrowsers():
- success = self.MoveChromeDriverIfNeeded(browser)
- if not success:
- return
for version_name in versions:
if not self.test.IsValidCombination(browser, version_name):
continue
@@ -931,21 +741,33 @@
'tools', 'testing', 'perf_testing', self.test.result_folder_name,
'dromaeo-%s-%s-%s' % (self.test.cur_time, browser, version_name))
self.AddSvnRevisionToTrace(self.test.trace_file, browser)
- file_path = os.path.join(os.getcwd(), dromaeo_path,
- 'index%s.html?%s' % (
- '' if version_name == 'dart_html' else '-js', version))
+ url_path = '/'.join(['/root_dart', dromaeo_path, 'index%s.html?%s'% (
+ '-dart' if version_name == 'dart_html' else '-js',
+ version)])
+
+ # TODO(efortuna): Make this a separate function. We should do this
+ # once per cycle.
+ os.chdir(os.path.join(DART_REPO_LOC, 'tools', 'testing', 'dart',
+ 'browser_perf_testing'))
+ self.test.test_runner.RunCmd([os.path.join(DART_REPO_LOC,
+ utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32'),
+ 'dart-sdk', 'bin', 'pub'), 'install'])
+ os.chdir(current_path)
+
self.test.test_runner.RunCmd(
- ['python', os.path.join('tools', 'testing', 'run_selenium.py'),
- '--out', '"file:///%s"' % file_path, '--browser', browser,
- '--timeout', '900', '--mode', 'dromaeo'], self.test.trace_file,
+ [os.path.join(utils.GetBuildRoot(
+ utils.GuessOS(), 'release', 'ia32'), 'dart-sdk', 'bin', 'dart'),
+ '--package-root=%s' % os.path.join(DART_REPO_LOC, 'tools',
+ 'testing', 'dart', 'browser_perf_testing', 'packages'),
+ os.path.join('tools', 'testing', 'dart', 'browser_perf_testing',
+ 'lib', 'browser_perf_testing.dart'),
+ '--browser', browser, '--termination_test_file',
+ '/root_dart/samples/third_party/dromaeo/dromaeo_end_condition.'
+ 'js', '--test_path', url_path], self.test.trace_file,
append=True)
- # Put default Chromedriver back in.
- self.MoveChromeDriverIfNeeded('chrome')
@staticmethod
def GetDromaeoUrlQuery(browser, version):
- if browser == 'dartium':
- version = version.replace('frog', 'dart')
version = version.replace('_','AND')
tags = DromaeoTester.GetValidDromaeoTags()
return 'OR'.join([ '%sAND%s' % (version, tag) for tag in tags])
@@ -1002,7 +824,7 @@
class TestBuilder(object):
"""Construct the desired test object."""
available_suites = dict((suite.Name(), suite) for suite in [
- CommonBrowserTest, DromaeoTest])
+ DromaeoTest])
@staticmethod
def MakeTest(test_name, test_runner):