Version 2.0.0-dev.22.0
Merge commit '236aef873a3e5d2a00403207ab26b3829c86e47f' into dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a579da2..0fd7c1c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,21 @@
`ZERO` to `zero`.
* Added `Provisional` annotation to `dart:core`.
* Added static `escape` function to `RegExp` class.
+ * Added members `cast`, `followedBy`, `retype` and `whereType` to `Iterable`.
+ * Added `orElse` parameter to `Iterable.singleWhere`.
+ * Added `+` operator, `first` and `last` setters, and `indexWhere`
+ and `lastIndexWhere` methods to `List`.
+ * Added `addEntries`, `cast`, `entries`, `map`, `removeWhere`, `retype`,
+ `update` and `updateAll` members to `Map`.
+ * If a class extends `IterableBase`, `ListBase`, `SetBase` or `MapBase`
+ (or uses the corresponding mixins), the new members are implemented
+ automatically.
+ * Added constructor `Map.fromEntries`.
+ * Added `MapEntry` class used by, e.g., `Map.entries`.
+ * Changed `LinkedHashMap` to not implement `HashMap`, and `LinkedHashSet`
+ to not implement `HashSet`. The "unlinked" version is a different
+ implementation class than the linked version, not an abstract interface
+ that the two share.
* `dart:convert`
* `Utf8Decoder` when compiled with dart2js uses the browser's `TextDecoder` in
diff --git a/DEPS b/DEPS
index b14f921..79b32bc 100644
--- a/DEPS
+++ b/DEPS
@@ -99,12 +99,12 @@
"isolate_tag": "@1.1.0",
"jinja2_rev": "@2222b31554f03e62600cd7e383376a7c187967a1",
"json_rpc_2_tag": "@2.0.6",
- "linter_tag": "@0.1.42",
+ "linter_tag": "@0.1.43",
"logging_tag": "@0.11.3+1",
"markdown_tag": "@1.0.0",
"matcher_tag": "@0.12.1+4",
"mime_tag": "@0.9.6",
- "mockito_tag": "@2.0.2",
+ "mockito_tag": "@a92db054fba18bc2d605be7670aee74b7cadc00a",
"mustache4dart_tag" : "@v2.1.0",
"oauth2_tag": "@1.1.0",
"observatory_pub_packages_rev": "@4c282bb240b68f407c8c7779a65c68eeb0139dc6",
diff --git a/build/compiled_action.gni b/build/compiled_action.gni
index e332763..5b5afa7 100644
--- a/build/compiled_action.gni
+++ b/build/compiled_action.gni
@@ -74,7 +74,7 @@
_host_executable_suffix = ""
}
-_dart_root = rebase_path("..")
+_dart_root = get_path_info("..", "abspath")
template("compiled_action") {
assert(defined(invoker.tool), "tool must be defined for $target_name")
@@ -120,6 +120,10 @@
deps += invoker.deps
}
+ if (defined(invoker.depfile)) {
+ depfile = invoker.depfile
+ }
+
# The script takes as arguments the binary to run, and then the arguments
# to pass it.
args = [
@@ -173,6 +177,10 @@
deps += invoker.deps
}
+ if (defined(invoker.depfile)) {
+ depfile = invoker.depfile
+ }
+
# The script takes as arguments the binary to run, and then the arguments
# to pass it.
args = [
diff --git a/build/dart_action.gni b/build/dart_action.gni
new file mode 100644
index 0000000..81c147f
--- /dev/null
+++ b/build/dart_action.gni
@@ -0,0 +1,92 @@
+# Copyright (c) 2018, 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("compiled_action.gni")
+import("executable_suffix.gni")
+import("prebuilt_dart_sdk.gni")
+
+_dart_root = get_path_info("..", "abspath")
+
+# A template for running Dart scripts during the build. This should *not* be
+# used for generating snapshots. It uses the dart binary from the prebuilt
+# Dart SDK if one is available, and dart_bootstrap otherwise.
+#
+# Parameters:
+# script:
+# The un-rebased path to the Dart script.
+#
+# args:
+# The arguments to pass to the Dart script.
+
+# packages (optional):
+# The un-rebased path to the .packages file.
+#
+# Forwarded to action() with the usual meaning:
+# depfile
+# deps
+# inputs
+# outputs
+# visibility
+template("dart_action") {
+ assert(defined(invoker.script), "script must be defined for $target_name")
+ assert(defined(invoker.outputs), "outputs must be defined for $target_name")
+ assert(defined(invoker.args), "args must be defined for $target_name")
+ assert(!defined(invoker.sources),
+ "dart_action doesn't take a sources arg. Use inputs instead.")
+
+ if (prebuilt_dart_exe_works) {
+ action(target_name) {
+ forward_variables_from(invoker, [
+ "inputs",
+ "outputs",
+ "deps",
+ "visibility",
+ "depfile",
+ ])
+ script = "$_dart_root/build/gn_run_binary.py"
+ prebuilt_dart_binary =
+ "$_dart_root/tools/sdks/$host_os/dart-sdk/bin/dart$executable_suffix"
+
+ inputs += [ invoker.script ]
+ if (defined(invoker.packages)) {
+ inputs += [ invoker.packages ]
+ }
+
+ args = [
+ "compiled_action",
+ rebase_path(prebuilt_dart_binary),
+ ]
+ if (defined(invoker.packages)) {
+ args += [
+ "--packages=" + rebase_path(invoker.packages),
+ ]
+ }
+ args += [ rebase_path(invoker.script) ] + invoker.args
+ }
+ } else {
+ compiled_action(target_name) {
+ forward_variables_from(invoker, [
+ "inputs",
+ "outputs",
+ "deps",
+ "visibility",
+ "depfile",
+ ])
+
+ inputs += [ invoker.script ]
+ if (defined(invoker.packages)) {
+ inputs += [ invoker.packages ]
+ }
+
+ tool = "runtime/bin:dart_bootstrap"
+ args = []
+ if (defined(invoker.packages)) {
+ args += [
+ "--packages=" + rebase_path(invoker.packages),
+ ]
+ }
+ args += [ rebase_path(invoker.script) ] + invoker.args
+ }
+ }
+}
diff --git a/docs/language/informal/covariant-from-class.md b/docs/language/informal/covariant-from-class.md
index 7304c27..0b66edf 100644
--- a/docs/language/informal/covariant-from-class.md
+++ b/docs/language/informal/covariant-from-class.md
@@ -4,7 +4,7 @@
**Status**: Implemented.
-**Version**: 0.4 (2017-11-24)
+**Version**: 0.5 (2018-02-01)
## Summary
@@ -12,8 +12,8 @@
This document is an informal specification which specifies how to determine
the reified type of a tear-off where one or more parameters has a type
annotation in which a formal type parameter of the enclosing class occurs
-in a covariant position. This feature has no effect in Dart 1, it only
-affects strong mode and the upcoming Dart 2.
+in a covariant position. This feature has no effect in Dart 1, it is only
+concerned with Dart 2.
## Motivation
@@ -111,12 +111,12 @@
main() {
A a = new B();
- F myF = a.f; // Statically safe, yet fails at run time in strong mode and Dart 2!
+ F myF = a.f; // Statically safe, yet fails at run time!
}
```
-The problem is that `a.f` has static type `(num) -> void`, and if the
-reified type at run time is `(int) -> void` then `a.f` is an expression
+The problem is that `a.f` has static type `void Function(num)`, and if the
+reified type at run time is `void Function(int)` then `a.f` is an expression
whose value at run time does _not_ conform to the statically known type.
Even worse, there is no statically known type annotation that we can use in
@@ -126,17 +126,17 @@
the parameter type is a subtype of the actual parameter type at runtime (as
required for the initialization to succeed).
-*We could use the bottom type as the argument type, `(Null) -> void`, but
-that makes all invocations unsafe (except `myF(null)`). We believe that it
-is more useful to preserve the information that "it must be some kind of
-number", even though not all kinds of numbers will work. With `Null`, we
-just communicate that all invocations are unsafe, with no hints at all
-about which ones would be less unsafe than others.*
+*We could use the bottom type as the argument type, `void Function(Null)`, but
+that makes all invocations unsafe (except `myF(null)`). We believe that it is
+more useful to preserve the information that "it must be some kind of number",
+even though not all kinds of numbers will work. With `Null`, we just communicate
+that all invocations are unsafe, with no hints at all about which ones would be
+less unsafe than others.*
We do not want any such expressions where the value is not a subtype of the
-statically known type, and hence the reified type of `a.f` is `(Object) ->
-void`. In general, the type of each covariant parameter is reified as
-`Object`. In the example, this is how it works:
+statically known type, and hence the reified type of `a.f` is `void
+Function(Object)`. In general, the type of each covariant parameter is reified
+as `Object`. In the example, this is how it works:
```dart
typedef void F(num n);
@@ -177,9 +177,9 @@
// Here is the small part of the core List class that we need here.
abstract class List<E> ... {
- // The reified type is `(E) -> void` in all modes, as declared.
+ // The reified type is `void Function(E)` in all modes, as declared.
void add(E value);
- // The reified type is `(Iterable<E>) -> void` in all modes, as declared.
+ // The reified type is `void Function(Iterable<E>)` in all modes, as declared.
void addAll(Iterable<E> iterable);
...
}
@@ -212,9 +212,9 @@
```dart
abstract class List<E> ... {
- // The reified type is `(Object) -> void` in all modes.
+ // The reified type is `void Function(Object)` in all modes.
void add(E value);
- // The reified type is `(Object) -> void` in all modes.
+ // The reified type is `void Function(Object)` in all modes.
void addAll(Iterable<E> iterable);
...
}
@@ -230,7 +230,7 @@
```
-## Informal specification
+## Feature specification
### Syntax
@@ -238,40 +238,31 @@
The grammar remains unchanged.
-### Standard mode
-
-This feature does not give rise to any changes to the static analysis nor the
-dynamic semantics of standard mode, also known as Dart 1.x.
-
-
-### Strong mode
-
-In strong mode and Dart 2, this feature causes changes to the reified type
-of a function obtained by a closurizing property extraction in some cases,
-as specified below.
-
-
-#### Static types
+#### Static analysis
The static type of a property extraction remains unchanged.
*The static type of a torn-off method is taken directly from the statically
known declaration of that method, substituting actual type arguments for
formal type parameters as usual. For instance, the static type of
-`xs.addAll` is `(Iterable<num>) -> void` when the static type of `xs` is
-`List<num>`.*
+`xs.addAll` is `void Function (Iterable<num>)` when the static type of `xs` is
+`List<num>`. Note that this is significant because the reified types of some
+torn-off methods will indeed change with the introduction of this feature.*
+When we say that a parameter is **covariant by modifier**, we are referring
+to the definition of being a covariant parameter which is given in
+[covariant overrides](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/covariant-overrides.md).
-#### Reified types
+*When a parameter _p_ is covariant by modifier, there will necessarily be a
+declaration of a formal parameter _p1_ (which may be the same as _p_, or it
+may be different) which contains the built-in identifier `covariant`.*
*We need to introduce a new kind of covariant parameters, in addition to the
-notion of covariant parameters which is introduced in the informal
-specification of
-[covariant overrides](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/covariant-overrides.md).
-To do that, we also need to define the variance of each occurrence of a type
-variable in a type, which determines how variations of the value of that
-type variable affect the overall type in a specific direction. There are
-three kinds: covariant, contravariant, and invariant occurrences.*
+ones that are covariant by modifier. To do that, we also need to define the
+variance of each occurrence of a type variable in a type, which determines how
+variations of the value of that type variable affect the overall type in a
+specific direction. There are three kinds: covariant, contravariant, and
+invariant occurrences.*
We say that a type variable _X_ _occurs covariantly_ in a type _T_ if:
@@ -322,7 +313,7 @@
declaration of a method, setter, or operator `m` in _S_, that `X` is a
formal type parameter declared by _S_, and that said declaration of `m` has
a formal parameter `x` wherein `X` occurs covariantly or invariantly. In
-this situation we say that the parameter `x` is **covariant due to class
+this situation we say that the parameter `x` is **covariant by class
covariance**.
*This means that the type annotation of the given parameter may actually be
@@ -332,12 +323,48 @@
covariant is expected to be much more common than the situation where it
varies among unrelated types.*
-In the remainder of this section, a parameter which is covariant according
-to the definition given in
-[covariant overrides](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/covariant-overrides.md)
-is treated the same as a parameter which is covariant due to class
-covariance as defined in this document; in both cases we just refer to the
-parameter as a _covariant parameter_.
+When checking whether a given instance method declaration _D1_ is a correct
+override of another instance method declaration _D2_, it is ignored whether or
+not a formal parameter in _D1_ or _D2_ is covariant by class covariance.
+
+*This differs from the treatment of parameters which are covariant by modifier,
+where an overriding parameter type must be a subtype or a supertype of each
+overridden parameter type. In practice this means a parameter which is
+covariant by modifier may be specialized covariantly without limit, but a
+parameter which is covariant by class covariance must be overridden by a
+parameter with the same type or a supertype thereof, and it is only that type
+itself which "is covariant" (in the sense that clients know an upper bound
+_T_ statically, and for the actual type _S_ at run time it is only known that
+_S <: T_). Here is an example:*
+
+```dart
+abstract class C<X> {
+ void f1(X x);
+ void f2(X x);
+ void f3(covariant num x);
+ void f4(X x);
+ void f5(covariant X x);
+}
+
+abstract class D extends C<num> {
+ void f1(num n); // OK
+ void f2(int i); // Error: `num <: int` required, but not true.
+ void f3(int i); // OK: covariant by modifier (only).
+ void f4(covariant int i); // OK: covariant by modifier (and class).
+ void f5(int i); // OK: covariant by modifier (and class).
+}
+```
+
+
+#### Dynamic semantics
+
+In the following, the phrase _covariant parameter_ denotes either a parameter
+which is covariant by modifier, or a parameter which is covariant by class
+covariance.
+
+*We could have used 'covariant by class covariance' throughout, but for overall
+simplicity we make it explicit that the treatment of both kinds of covariant
+parameters is identical in the dynamic semantics.*
The reified type for a function _f_ obtained by a closurizing property
extraction on an instance method, setter, or operator is determined as
@@ -356,7 +383,7 @@
*The occurrences of type parameters in the types of non-covariant
parameters (note that those occurrences must be in a non-covariant position
in the parameter type) are used as-is. For instance, `<String>[].asMap()`
-will have the reified type `() -> Map<int, String>`.*
+will have the reified type `Map<int, String> Function()`.*
The dynamic checks associated with invocation of such a function are still
needed, and they are unchanged.
@@ -372,7 +399,7 @@
`Object` may seem aggressive.
In particular, it ignores upper bounds on the formal type parameter which gives
-rise to the covariance due to class covariance, and it ignores the structure of
+rise to the covariance by class covariance, and it ignores the structure of
the type where that formal type parameter is used. Here are two examples:
```dart
@@ -382,15 +409,16 @@
}
```
-With this declaration, the reified type of `new C<int>().foo` will be `(Object)
--> void`, even though it would have been possible to use the type `(num) ->
-void` based on the upper bound of `X`, and still preserve the earlier mentioned
-expression soundness. This is because all supertypes of the dynamic type of the
-receiver that declare `foo` have an argument type for it which is a subtype of
-`num`.
+With this declaration, the reified type of `new C<int>().foo` will be `void
+Function(Object)`, even though it would have been possible to use the type `void
+Function(num)` based on the upper bound of `X`, and still preserve the earlier
+mentioned expression soundness. This is because all supertypes of the dynamic
+type of the receiver that declare `foo` have an argument type for it which is a
+subtype of `num`.
-Similarly, the reified type of `new C<int>().bar` will be `(Object) -> void`,
-even though it would have been possible to use the type `(List<num>) -> void`.
+Similarly, the reified type of `new C<int>().bar` will be `void
+Function(Object)`, even though it would have been possible to use the type `void
+Function(List<num>)`.
Note that the reified type is independent of the static type of the receiver, so
it does not matter that we consider `new C<int>()` directly, rather than using
@@ -398,19 +426,20 @@
`C<num>`.
In the first example, `foo`, there is a loss of information because we are
-(dynamically) allowed to assign the function to a variable of type `(Object) ->
-void`. Even worse, we may assign it to a variable of type `(String) -> void`,
-because `(Object) -> void` (that is, the actual type that the function reports
-to have) is a subtype of `(String) -> void`. In that situation, every statically
-safe invocation will fail, because there are no values of type `String` which
-will satisfy the dynamic check in the function itself, which requires an
-argument of type `int` (except `null`, of course, but this is rarely sufficient
-to make the function useful).
+(dynamically) allowed to assign the function to a variable of type `void
+Function(Object)`. Even worse, we may assign it to a variable of type `void
+Function(String)`, because `void Function(Object)` (that is, the actual type
+that the function reports to have) is a subtype of `void Function(String)`. In
+that situation, every statically safe invocation will fail, because there are no
+values of type `String` which will satisfy the dynamic check in the function
+itself, which requires an argument of type `int` (except `null`, of course, but
+this is rarely sufficient to make the function useful).
In the second example, `bar`, the same phenomenon is extended a little, because
-we may assign the given torn-off function to a variable of type `(String) ->
-void`, in addition to more reasonable ones like `(Object) -> void`,
-`(Iterable<Object>) -> void`, and `(Iterable<int>) -> void`.
+we may assign the given torn-off function to a variable of type `void
+Function(String)`, in addition to more reasonable ones like `void
+Function(Object) `, `void Function(Iterable<Object>)`, and `void
+Function(Iterable<int>)`.
It is certainly possible to specify a more "tight" reified type like the ones
mentioned above. In order to do this, we would need the least upper bound of all
@@ -483,6 +512,9 @@
## Updates
+* Feb 1st 2018, version 0.5: Added specification of override checks for
+ parameters which are covariant from class.
+
* Nov 24th 2017, version 0.4: Modified the definition of what it takes to be
a covariant parameter: Some cases were previously incorrectly omitted.
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 5bb126d..e5f09b1 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -98,7 +98,11 @@
static const REPARENT_FLUTTER_WIDGET_CENTER =
const AssistKind("REPARENT_FLUTTER_WIDGET_CENTER", 29, "Center widget");
static const REPARENT_FLUTTER_WIDGET_PADDING = const AssistKind(
- "REPARENT_FLUTTER_WIDGET_CENTER", 29, "Add widget padding");
+ "REPARENT_FLUTTER_WIDGET_PADDING", 29, "Add widget padding");
+ static const REPARENT_FLUTTER_WIDGETS_COLUMN = const AssistKind(
+ "REPARENT_FLUTTER_WIDGETS_COLUMN", 29, "Wrap with Column");
+ static const REPARENT_FLUTTER_WIDGETS_ROW =
+ const AssistKind("REPARENT_FLUTTER_WIDGETS_ROW", 29, "Wrap with Row");
static const REMOVE_TYPE_ANNOTATION =
const AssistKind('REMOVE_TYPE_ANNOTATION', 29, "Remove type annotation");
static const REPLACE_CONDITIONAL_WITH_IF_ELSE = const AssistKind(
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index 1238735..415b0bc 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -9,6 +9,7 @@
import 'package:analysis_server/plugin/edit/assist/assist_dart.dart';
import 'package:analysis_server/src/services/correction/assist.dart';
import 'package:analysis_server/src/services/correction/name_suggestion.dart';
+import 'package:analysis_server/src/services/correction/selection_analyzer.dart';
import 'package:analysis_server/src/services/correction/statement_analyzer.dart';
import 'package:analysis_server/src/services/correction/util.dart';
import 'package:analysis_server/src/services/search/hierarchy.dart';
@@ -31,6 +32,7 @@
hide AssistContributor;
import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
import 'package:analyzer_plugin/utilities/range_factory.dart';
+import 'package:meta/meta.dart';
import 'package:path/path.dart';
typedef _SimpleIdentifierVisitor(SimpleIdentifier node);
@@ -68,6 +70,8 @@
TypeProvider _typeProvider;
+ final Map<String, LibraryElement> libraryCache = {};
+
AssistProcessor(DartAssistContext dartContext) {
driver = dartContext.analysisDriver;
// source
@@ -150,6 +154,7 @@
await _addProposal_removeTypeAnnotation();
await _addProposal_reparentFlutterList();
await _addProposal_reparentFlutterWidget();
+ await _addProposal_reparentFlutterWidgets();
await _addProposal_replaceConditionalWithIfElse();
await _addProposal_replaceIfElseWithConditional();
await _addProposal_splitAndCondition();
@@ -1868,11 +1873,11 @@
await _addProposal_reparentFlutterWidgetImpl();
await _addProposal_reparentFlutterWidgetImpl(
kind: DartAssistKind.REPARENT_FLUTTER_WIDGET_CENTER,
- parentLibraryUri: 'package:flutter/widgets.dart',
+ parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
parentClassName: 'Center');
await _addProposal_reparentFlutterWidgetImpl(
kind: DartAssistKind.REPARENT_FLUTTER_WIDGET_PADDING,
- parentLibraryUri: 'package:flutter/widgets.dart',
+ parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
parentClassName: 'Padding',
leadingLines: ['padding: const EdgeInsets.all(8.0),']);
}
@@ -1882,28 +1887,23 @@
String parentLibraryUri,
String parentClassName,
List<String> leadingLines: const []}) async {
- InstanceCreationExpression newExpr = flutter.identifyNewExpression(node);
- if (newExpr == null || !flutter.isWidgetCreation(newExpr)) {
+ Expression widgetExpr = flutter.identifyWidgetExpression(node);
+ if (widgetExpr == null) {
_coverageMarker();
return;
}
- String newExprSrc = utils.getNodeText(newExpr);
+ String widgetSrc = utils.getNodeText(widgetExpr);
// If the wrapper class is specified, find its element.
ClassElement parentClassElement;
if (parentLibraryUri != null && parentClassName != null) {
- var parentLibrary = await session.getLibraryByUri(parentLibraryUri);
- var element = parentLibrary.exportNamespace.get(parentClassName);
- if (element is ClassElement) {
- parentClassElement = element;
- } else {
- return;
- }
+ parentClassElement =
+ await _getExportedClass(parentLibraryUri, parentClassName);
}
DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
- builder.addReplacement(range.node(newExpr), (DartEditBuilder builder) {
+ builder.addReplacement(range.node(widgetExpr), (DartEditBuilder builder) {
builder.write('new ');
if (parentClassElement == null) {
builder.addSimpleLinkedEdit('WIDGET', 'widget');
@@ -1911,8 +1911,8 @@
builder.writeType(parentClassElement.type);
}
builder.write('(');
- if (newExprSrc.contains(eol) || leadingLines.isNotEmpty) {
- String indentOld = utils.getLinePrefix(newExpr.offset);
+ if (widgetSrc.contains(eol) || leadingLines.isNotEmpty) {
+ String indentOld = utils.getLinePrefix(widgetExpr.offset);
String indentNew = '$indentOld${utils.getIndent(1)}';
for (var leadingLine in leadingLines) {
@@ -1923,9 +1923,9 @@
builder.write(eol);
builder.write(indentNew);
- newExprSrc = newExprSrc.replaceAll(
+ widgetSrc = widgetSrc.replaceAll(
new RegExp("^$indentOld", multiLine: true), indentNew);
- newExprSrc += ",$eol$indentOld";
+ widgetSrc += ",$eol$indentOld";
}
if (parentClassElement == null) {
builder.addSimpleLinkedEdit('CHILD', 'child');
@@ -1933,7 +1933,7 @@
builder.write('child');
}
builder.write(': ');
- builder.write(newExprSrc);
+ builder.write(widgetSrc);
builder.write(')');
builder.selectHere();
});
@@ -1941,6 +1941,85 @@
_addAssistFromBuilder(changeBuilder, kind);
}
+ Future<Null> _addProposal_reparentFlutterWidgets() async {
+ var selectionRange = new SourceRange(selectionOffset, selectionLength);
+ var analyzer = new SelectionAnalyzer(selectionRange);
+ unit.accept(analyzer);
+
+ List<Expression> widgetExpressions = [];
+ if (analyzer.hasSelectedNodes) {
+ for (var selectedNode in analyzer.selectedNodes) {
+ if (!flutter.isWidgetExpression(selectedNode)) {
+ return;
+ }
+ widgetExpressions.add(selectedNode);
+ }
+ } else {
+ var widget = flutter.identifyWidgetExpression(analyzer.coveringNode);
+ if (widget != null) {
+ widgetExpressions.add(widget);
+ }
+ }
+ if (widgetExpressions.isEmpty) {
+ return;
+ }
+
+ var firstWidget = widgetExpressions.first;
+ var lastWidget = widgetExpressions.last;
+ var selectedRange = range.startEnd(firstWidget, lastWidget);
+ String src = utils.getRangeText(selectedRange);
+
+ Future<Null> addAssist(
+ {@required AssistKind kind,
+ @required String parentLibraryUri,
+ @required String parentClassName}) async {
+ ClassElement parentClassElement =
+ await _getExportedClass(parentLibraryUri, parentClassName);
+
+ DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+ await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+ builder.addReplacement(selectedRange, (DartEditBuilder builder) {
+ builder.write('new ');
+ builder.writeType(parentClassElement.type);
+ builder.write('(');
+
+ String indentOld = utils.getLinePrefix(firstWidget.offset);
+ String indentNew1 = indentOld + utils.getIndent(1);
+ String indentNew2 = indentOld + utils.getIndent(2);
+
+ builder.write(eol);
+ builder.write(indentNew1);
+ builder.write('children: [');
+ builder.write(eol);
+
+ String newSrc = _replaceSourceIndent(src, indentOld, indentNew2);
+ builder.write(indentNew2);
+ builder.write(newSrc);
+
+ builder.write(',');
+ builder.write(eol);
+
+ builder.write(indentNew1);
+ builder.write('],');
+ builder.write(eol);
+
+ builder.write(indentOld);
+ builder.write(')');
+ });
+ });
+ _addAssistFromBuilder(changeBuilder, kind);
+ }
+
+ await addAssist(
+ kind: DartAssistKind.REPARENT_FLUTTER_WIDGETS_COLUMN,
+ parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+ parentClassName: 'Column');
+ await addAssist(
+ kind: DartAssistKind.REPARENT_FLUTTER_WIDGETS_ROW,
+ parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+ parentClassName: 'Row');
+ }
+
Future<Null> _addProposal_replaceConditionalWithIfElse() async {
ConditionalExpression conditional = null;
// may be on Statement with Conditional
@@ -2505,6 +2584,48 @@
}
}
+ /// Return the [ClassElement] with the given [className] that is exported
+ /// from the library with the given [libraryUri], or `null` if the libary
+ /// does not export a class with such name.
+ Future<ClassElement> _getExportedClass(
+ String libraryUri, String className) async {
+ var libraryElement = await _getLibraryByUri(libraryUri);
+ var element = libraryElement.exportNamespace.get(className);
+ if (element is ClassElement) {
+ return element;
+ } else {
+ return null;
+ }
+ }
+
+ /// Return the [LibraryElement] for the library with the given [uri].
+ Future<LibraryElement> _getLibraryByUri(String uri) async {
+ var libraryElement = libraryCache[uri];
+ if (libraryElement == null) {
+ void walkLibraries(LibraryElement library) {
+ var libraryUri = library.source.uri.toString();
+ if (libraryCache[libraryUri] == null) {
+ libraryCache[libraryUri] = library;
+ library.importedLibraries.forEach(walkLibraries);
+ library.exportedLibraries.forEach(walkLibraries);
+ }
+ }
+
+ // Fill the cache with all libraries referenced from the unit.
+ walkLibraries(unitLibraryElement);
+
+ // The library might be already in the cache.
+ libraryElement = libraryCache[uri];
+
+ // If still not found, build a new library element.
+ if (libraryElement == null) {
+ libraryElement = await session.getLibraryByUri(uri);
+ libraryCache[uri] = libraryElement;
+ }
+ }
+ return libraryElement;
+ }
+
/**
* Returns the text of the given node in the unit.
*/
@@ -2551,8 +2672,8 @@
return utils.getText(startOffset, curOffset - startOffset);
}
- String outerIndent = utils.getNodePrefix(exprGoingDown.parent);
- String innerIndent = utils.getNodePrefix(exprGoingUp.parent);
+ String outerIndent = utils.getLinePrefix(exprGoingDown.offset);
+ String innerIndent = utils.getLinePrefix(exprGoingUp.offset);
exprGoingUp.argumentList.arguments.forEach((arg) {
if (arg is NamedExpression && arg.name.label.name == 'child') {
if (stableChild != arg) {
@@ -2565,8 +2686,7 @@
lnOffset = lineInfo.getOffsetOfLine(currLn - 1);
argSrc = utils.getText(
lnOffset, stableChild.expression.offset - lnOffset);
- argSrc = argSrc.replaceAll(
- new RegExp("^$innerIndent", multiLine: true), "$outerIndent");
+ argSrc = _replaceSourceIndent(argSrc, innerIndent, outerIndent);
builder.write(argSrc);
int nextLn = lineInfo.getLocation(exprGoingDown.offset).lineNumber;
lnOffset = lineInfo.getOffsetOfLine(nextLn);
@@ -2585,9 +2705,7 @@
}
} else {
argSrc = getSrc(val);
- argSrc = argSrc.replaceAll(
- new RegExp("^$outerIndent", multiLine: true),
- "$innerIndent");
+ argSrc = _replaceSourceIndent(argSrc, outerIndent, innerIndent);
builder.write(argSrc);
}
});
@@ -2598,8 +2716,7 @@
builder.write('),$eol');
} else {
argSrc = getSrc(arg);
- argSrc = argSrc.replaceAll(
- new RegExp("^$innerIndent", multiLine: true), "$outerIndent");
+ argSrc = _replaceSourceIndent(argSrc, innerIndent, outerIndent);
builder.write(argSrc);
}
});
@@ -2647,6 +2764,12 @@
return false;
}
+ static String _replaceSourceIndent(
+ String source, String indentOld, String indentNew) {
+ return source.replaceAll(
+ new RegExp('^$indentOld', multiLine: true), indentNew);
+ }
+
/**
* Checks if the given [Expression] should be wrapped with parenthesis when we
* want to use it as operand of a logical `and` expression.
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
index 60c9475..feb748d 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
@@ -447,7 +447,7 @@
bool _isPartOfConstantExpression(AstNode node) {
if (node is TypedLiteral) {
- return node.constKeyword != null;
+ return node.isConst;
}
if (node is InstanceCreationExpression) {
return node.isConst;
diff --git a/pkg/analysis_server/lib/src/utilities/flutter.dart b/pkg/analysis_server/lib/src/utilities/flutter.dart
index a875de8..7f5f1ba 100644
--- a/pkg/analysis_server/lib/src/utilities/flutter.dart
+++ b/pkg/analysis_server/lib/src/utilities/flutter.dart
@@ -9,6 +9,8 @@
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+const WIDGETS_LIBRARY_URI = 'package:flutter/widgets.dart';
+
const _WIDGET_NAME = "Widget";
const _WIDGET_URI = "package:flutter/src/widgets/framework.dart";
@@ -229,6 +231,22 @@
}
/**
+ * Attempt to find and return the closest expression that encloses the [node]
+ * and is a Flutter `Widget`. Return `null` if nothing found.
+ */
+Expression identifyWidgetExpression(AstNode node) {
+ for (; node != null; node = node.parent) {
+ if (isWidgetExpression(node)) {
+ return node;
+ }
+ if (node is ArgumentList || node is Statement || node is FunctionBody) {
+ return null;
+ }
+ }
+ return null;
+}
+
+/**
* Return `true` if the given [type] is the Flutter class `Widget`, or its
* subtype.
*/
@@ -273,6 +291,12 @@
* subtype.
*/
bool isWidgetExpression(AstNode node) {
+ if (node?.parent is TypeName || node?.parent?.parent is TypeName) {
+ return false;
+ }
+ if (node is NamedExpression) {
+ return false;
+ }
if (node is Expression) {
return isWidgetType(node.staticType);
}
diff --git a/pkg/analysis_server/test/integration/support/integration_tests.dart b/pkg/analysis_server/test/integration/support/integration_tests.dart
index 466cde6..a0bc922 100644
--- a/pkg/analysis_server/test/integration/support/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/support/integration_tests.dart
@@ -110,7 +110,7 @@
* Map from file path to the list of analysis errors which have most recently
* been received for the file.
*/
- HashMap<String, List<AnalysisError>> currentAnalysisErrors =
+ Map<String, List<AnalysisError>> currentAnalysisErrors =
new HashMap<String, List<AnalysisError>>();
/**
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index 09ec41d..17e2c43 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -3540,6 +3540,55 @@
''');
}
+ test_moveFlutterWidgetUp_OK_outerIsInChildren() async {
+ addFlutterPackage();
+ await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+ new Column(
+ children: [
+ new Column(
+ children: [
+ new Padding(
+ padding: new EdgeInsets.all(16.0),
+ child: new /*caret*/Center(
+ child: new Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: <Widget>[],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ );
+}
+''');
+ _setCaretLocation();
+ await assertHasAssist(DartAssistKind.MOVE_FLUTTER_WIDGET_UP, '''
+import 'package:flutter/material.dart';
+main() {
+ new Column(
+ children: [
+ new Column(
+ children: [
+ new /*caret*/Center(
+ child: new Padding(
+ padding: new EdgeInsets.all(16.0),
+ child: new Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: <Widget>[],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ );
+}
+''');
+ }
+
test_removeTypeAnnotation_classField_OK() async {
await resolveTestUnit('''
class A {
@@ -3909,6 +3958,29 @@
''');
}
+ test_reparentFlutterWidget_OK_variable() async {
+ addFlutterPackage();
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+ main() {
+ var container = new Container();
+ return /*caret*/container;
+ }
+}
+''');
+ _setCaretLocation();
+ await assertHasAssist(DartAssistKind.REPARENT_FLUTTER_WIDGET, '''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+ main() {
+ var container = new Container();
+ return /*caret*/new widget(child: container);
+ }
+}
+''');
+ }
+
test_reparentFlutterWidgetCenter_OK() async {
addFlutterPackage();
await resolveTestUnit('''
@@ -3954,6 +4026,119 @@
''');
}
+ test_reparentFlutterWidgets_OK_column_coveredByWidget() async {
+ addFlutterPackage();
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+ main() {
+ return new Container(
+ child: new /*caret*/Text('aaa'),
+ );
+ }
+}
+''');
+ _setCaretLocation();
+ await assertHasAssist(DartAssistKind.REPARENT_FLUTTER_WIDGETS_COLUMN, '''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+ main() {
+ return new Container(
+ child: new Column(
+ children: [
+ new /*caret*/Text('aaa'),
+ ],
+ ),
+ );
+ }
+}
+''');
+ }
+
+ test_reparentFlutterWidgets_OK_column_coversWidgets() async {
+ addFlutterPackage();
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+ main() {
+ return new Row(children: [
+ new Text('aaa'),
+// start
+ new Text('bbb'),
+ new Text('ccc'),
+// end
+ new Text('ddd'),
+ ]);
+ }
+}
+''');
+ _setStartEndSelection();
+ await assertHasAssist(DartAssistKind.REPARENT_FLUTTER_WIDGETS_COLUMN, '''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+ main() {
+ return new Row(children: [
+ new Text('aaa'),
+// start
+ new Column(
+ children: [
+ new Text('bbb'),
+ new Text('ccc'),
+ ],
+ ),
+// end
+ new Text('ddd'),
+ ]);
+ }
+}
+''');
+ }
+
+ test_reparentFlutterWidgets_OK_row() async {
+ addFlutterPackage();
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+ main() {
+ return new Column(children: [
+ new Text('aaa'),
+// start
+ new Text('bbb'),
+ new Text('ccc'),
+// end
+ new Text('ddd'),
+ ]);
+ }
+}
+''');
+ _setStartEndSelection();
+ await assertHasAssist(DartAssistKind.REPARENT_FLUTTER_WIDGETS_ROW, '''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+ main() {
+ return new Column(children: [
+ new Text('aaa'),
+// start
+ new Row(
+ children: [
+ new Text('bbb'),
+ new Text('ccc'),
+ ],
+ ),
+// end
+ new Text('ddd'),
+ ]);
+ }
+}
+''');
+ }
+
test_replaceConditionalWithIfElse_BAD_noEnclosingStatement() async {
await resolveTestUnit('''
var v = true ? 111 : 222;
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index a38a0d0..1e84fb1 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -2718,7 +2718,7 @@
class B extends A {
@override
- forEach(int f(double p1, String p2)) {
+ forEach(int Function(double p1, String p2) f) {
// TODO: implement forEach
}
}
diff --git a/pkg/analysis_server/test/src/utilities/flutter_test.dart b/pkg/analysis_server/test/src/utilities/flutter_test.dart
index 776eecd..d0daca6 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_test.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_test.dart
@@ -93,6 +93,138 @@
expect(getWidgetPresentationText(w), isNull);
}
+ test_identifyWidgetExpression_identifier() async {
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+ var text = new Text('abc');
+ text;
+}
+''');
+ {
+ Expression expression = findNodeAtString("text;");
+ expect(identifyWidgetExpression(expression), expression);
+ }
+ }
+
+ test_identifyWidgetExpression_instanceCreation() async {
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+ new MyWidget(1234);
+ new MyWidget.named(5678);
+}
+
+class MyWidget extends StatelessWidget {
+ MyWidget(int a);
+ MyWidget.named(int a);
+ Widget build(BuildContext context) => null;
+}
+''');
+ FunctionDeclaration main = testUnit.declarations[0];
+ BlockFunctionBody body = main.functionExpression.body;
+ List<Statement> statements = body.block.statements;
+
+ // new MyWidget(1234);
+ {
+ ExpressionStatement statement = statements[0];
+ InstanceCreationExpression creation = statement.expression;
+ ConstructorName constructorName = creation.constructorName;
+ TypeName typeName = constructorName.type;
+ ArgumentList argumentList = creation.argumentList;
+ expect(identifyWidgetExpression(creation), creation);
+ expect(identifyWidgetExpression(constructorName), creation);
+ expect(identifyWidgetExpression(typeName), creation);
+ expect(identifyWidgetExpression(argumentList), isNull);
+ expect(identifyWidgetExpression(argumentList.arguments[0]), isNull);
+ }
+
+ // new MyWidget.named(5678);
+ {
+ ExpressionStatement statement = statements[1];
+ InstanceCreationExpression creation = statement.expression;
+ ConstructorName constructorName = creation.constructorName;
+ TypeName typeName = constructorName.type;
+ ArgumentList argumentList = creation.argumentList;
+ expect(identifyWidgetExpression(creation), creation);
+ expect(identifyWidgetExpression(constructorName), creation);
+ expect(identifyWidgetExpression(typeName), creation);
+ expect(identifyWidgetExpression(typeName.name), creation);
+ expect(identifyWidgetExpression(constructorName.name), creation);
+ expect(identifyWidgetExpression(argumentList), isNull);
+ expect(identifyWidgetExpression(argumentList.arguments[0]), isNull);
+ }
+ }
+
+ test_identifyWidgetExpression_invocation() async {
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+ createEmptyText();
+ createText('xyz');
+}
+
+Text createEmptyText() => new Text('');
+Text createText(String txt) => new Text(txt);
+''');
+ {
+ MethodInvocation invocation = findNodeAtString(
+ "createEmptyText();", (node) => node is MethodInvocation);
+ expect(identifyWidgetExpression(invocation), invocation);
+ ArgumentList argumentList = invocation.argumentList;
+ expect(identifyWidgetExpression(argumentList), isNull);
+ }
+
+ {
+ MethodInvocation invocation = findNodeAtString(
+ "createText('xyz');", (node) => node is MethodInvocation);
+ expect(identifyWidgetExpression(invocation), invocation);
+ ArgumentList argumentList = invocation.argumentList;
+ expect(identifyWidgetExpression(argumentList), isNull);
+ expect(identifyWidgetExpression(argumentList.arguments[0]), isNull);
+ }
+ }
+
+ test_identifyWidgetExpression_namedExpression() async {
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+ new Container(child: new Text(''));
+}
+
+Text createEmptyText() => new Text('');
+''');
+ Expression childExpression = findNodeAtString('child: ');
+ expect(identifyWidgetExpression(childExpression), isNull);
+ }
+
+ test_identifyWidgetExpression_null() async {
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+ var intVariable = 42;
+ intVariable;
+}
+
+Text createEmptyText() => new Text('');
+''');
+ expect(identifyWidgetExpression(null), isNull);
+ {
+ Expression expression = findNodeAtString("42;");
+ expect(identifyWidgetExpression(expression), isNull);
+ }
+
+ {
+ Expression expression = findNodeAtString("intVariable;");
+ expect(identifyWidgetExpression(expression), isNull);
+ }
+ }
+
test_isWidget() async {
await resolveTestUnit('''
import 'package:flutter/widgets.dart';
@@ -141,6 +273,7 @@
var text = new Text('abc');
text;
createEmptyText();
+ new Container(child: text);
var intVariable = 42;
intVariable;
}
@@ -164,6 +297,17 @@
}
{
+ SimpleIdentifier expression = findNodeAtString('Container(');
+ expect(isWidgetExpression(expression), isFalse);
+ }
+
+ {
+ NamedExpression expression =
+ findNodeAtString('child: ', (n) => n is NamedExpression);
+ expect(isWidgetExpression(expression), isFalse);
+ }
+
+ {
Expression expression = findNodeAtString("42;");
expect(isWidgetExpression(expression), isFalse);
}
diff --git a/pkg/analysis_server/test/src/utilities/flutter_util.dart b/pkg/analysis_server/test/src/utilities/flutter_util.dart
index 6a3167c..250cb37 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_util.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_util.dart
@@ -86,6 +86,16 @@
void createRendering() {
newFile('$flutterPkgLibPath/rendering.dart', r'''
export 'painting.dart';
+export 'src/rendering/flex.dart';
+''');
+ newFile('$flutterPkgLibPath/src/rendering/flex.dart', r'''
+enum CrossAxisAlignment {
+ start,
+ end,
+ center,
+ stretch,
+ baseline,
+}
''');
}
@@ -124,7 +134,8 @@
import 'framework.dart';
import 'rendering.dart';
-export 'painting.dart';
+export 'package:flutter/painting.dart';
+export 'package:flutter/rendering.dart';
class Center extends StatelessWidget {
const Center({Widget child, Key key});
@@ -133,6 +144,7 @@
class Column extends Flex {
Column({
Key key,
+ CrossAxisAlignment crossAxisAlignment: CrossAxisAlignment.center,
List<Widget> children: const <Widget>[],
});
}
diff --git a/pkg/analysis_server_client/test/analysis_server_client_test.dart b/pkg/analysis_server_client/test/analysis_server_client_test.dart
index 900bd52..03c8ae1 100644
--- a/pkg/analysis_server_client/test/analysis_server_client_test.dart
+++ b/pkg/analysis_server_client/test/analysis_server_client_test.dart
@@ -23,7 +23,7 @@
});
test('test_listenToOutput_good', () async {
- when(_process.stdout).thenReturn(_goodMessage());
+ when(_process.stdout).thenAnswer((_) => _goodMessage());
final future = serverWrapper.send('blahMethod', null);
serverWrapper.listenToOutput();
@@ -35,7 +35,7 @@
});
test('test_listenToOutput_error', () async {
- when(_process.stdout).thenReturn(_badMessage());
+ when(_process.stdout).thenAnswer((_) => _badMessage());
final future = serverWrapper.send('blahMethod', null);
future.catchError((e) {
expect(e, new isInstanceOf<ServerErrorMessage>());
@@ -48,7 +48,7 @@
});
test('test_listenToOutput_event', () async {
- when(_process.stdout).thenReturn(_eventMessage());
+ when(_process.stdout).thenAnswer((_) => _eventMessage());
void eventHandler(String event, Map<String, Object> params) {
expect(event, 'fooEvent');
diff --git a/pkg/analyzer/lib/context/declared_variables.dart b/pkg/analyzer/lib/context/declared_variables.dart
index 5f6d6f1..add4797 100644
--- a/pkg/analyzer/lib/context/declared_variables.dart
+++ b/pkg/analyzer/lib/context/declared_variables.dart
@@ -20,7 +20,7 @@
/**
* A table mapping the names of declared variables to their values.
*/
- HashMap<String, String> _declaredVariables = new HashMap<String, String>();
+ Map<String, String> _declaredVariables = new HashMap<String, String>();
/**
* Return the names of the variables for which a value has been defined.
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 65314c8..f0ee200 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -170,6 +170,8 @@
CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
CompileTimeErrorCode.MIXIN_DEFERRED_CLASS,
CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS,
+ CompileTimeErrorCode.MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES,
+ CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS,
CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT,
CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
CompileTimeErrorCode.MIXIN_OF_ENUM,
@@ -668,7 +670,6 @@
StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE,
StrongModeCode.TOP_LEVEL_INSTANCE_GETTER,
StrongModeCode.TOP_LEVEL_INSTANCE_METHOD,
- StrongModeCode.TOP_LEVEL_TYPE_ARGUMENTS,
StrongModeCode.TOP_LEVEL_UNSUPPORTED,
StrongModeCode.USES_DYNAMIC_AS_BOTTOM,
TodoCode.TODO,
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index b444188..c7dc866 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -153,14 +153,14 @@
* the corresponding PendingFuture objects. These sources will be analyzed
* in the same way as priority sources, except with higher priority.
*/
- HashMap<AnalysisTarget, List<PendingFuture>> _pendingFutureTargets =
+ Map<AnalysisTarget, List<PendingFuture>> _pendingFutureTargets =
new HashMap<AnalysisTarget, List<PendingFuture>>();
/**
* A table mapping sources to the change notices that are waiting to be
* returned related to that source.
*/
- HashMap<Source, ChangeNoticeImpl> _pendingNotices =
+ Map<Source, ChangeNoticeImpl> _pendingNotices =
new HashMap<Source, ChangeNoticeImpl>();
/**
@@ -447,7 +447,7 @@
/**
* Make _pendingFutureSources available to unit tests.
*/
- HashMap<AnalysisTarget, List<PendingFuture>>
+ Map<AnalysisTarget, List<PendingFuture>>
get pendingFutureSources_forTesting => _pendingFutureTargets;
@override
@@ -1955,7 +1955,7 @@
/**
* A table mapping SDK's to the partitions used for those SDK's.
*/
- HashMap<DartSdk, SdkCachePartition> _sdkPartitions =
+ Map<DartSdk, SdkCachePartition> _sdkPartitions =
new HashMap<DartSdk, SdkCachePartition>();
/**
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index d0a69b7..7c95144 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -2448,7 +2448,7 @@
@override
Object visitMapLiteral(MapLiteral node) {
- HashMap<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<String, Object>();
for (MapLiteralEntry entry in node.entries) {
Object key = entry.key.accept(this);
Object value = entry.value.accept(this);
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 79a8383..5f7251b 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -106,7 +106,7 @@
bool checkFromEnvironmentArguments(
NodeList<Expression> arguments,
List<DartObjectImpl> argumentValues,
- HashMap<String, DartObjectImpl> namedArgumentValues,
+ Map<String, DartObjectImpl> namedArgumentValues,
InterfaceType expectedDefaultValueType) {
int argumentCount = arguments.length;
if (argumentCount < 1 || argumentCount > 2) {
@@ -147,7 +147,7 @@
bool checkSymbolArguments(
NodeList<Expression> arguments,
List<DartObjectImpl> argumentValues,
- HashMap<String, DartObjectImpl> namedArgumentValues) {
+ Map<String, DartObjectImpl> namedArgumentValues) {
if (arguments.length != 1) {
return false;
}
@@ -386,7 +386,7 @@
DartObjectImpl computeValueFromEnvironment(
DartObject environmentValue,
DartObjectImpl builtInDefaultValue,
- HashMap<String, DartObjectImpl> namedArgumentValues) {
+ Map<String, DartObjectImpl> namedArgumentValues) {
DartObjectImpl value = environmentValue as DartObjectImpl;
if (value.isUnknown || value.isNull) {
// The name either doesn't exist in the environment or we couldn't parse
@@ -431,9 +431,9 @@
new List<DartObjectImpl>(argumentCount);
List<DartObjectImpl> positionalArguments = <DartObjectImpl>[];
List<Expression> argumentNodes = new List<Expression>(argumentCount);
- HashMap<String, DartObjectImpl> namedArgumentValues =
+ Map<String, DartObjectImpl> namedArgumentValues =
new HashMap<String, DartObjectImpl>();
- HashMap<String, NamedExpression> namedArgumentNodes =
+ Map<String, NamedExpression> namedArgumentNodes =
new HashMap<String, NamedExpression>();
for (int i = 0; i < argumentCount; i++) {
Expression argument = arguments[i];
@@ -532,7 +532,7 @@
//
// They will be added to the lexical environment when evaluating
// subexpressions.
- HashMap<String, DartObjectImpl> typeArgumentMap;
+ Map<String, DartObjectImpl> typeArgumentMap;
if (strongMode) {
// Instantiate the constructor with the in-scope type arguments.
definingClass = constantVisitor.evaluateType(definingClass);
@@ -609,7 +609,7 @@
}
}
// Now evaluate the constructor declaration.
- HashMap<String, DartObjectImpl> parameterMap =
+ Map<String, DartObjectImpl> parameterMap =
new HashMap<String, DartObjectImpl>();
List<ParameterElement> parameters = constructor.parameters;
int parameterCount = parameters.length;
@@ -789,7 +789,7 @@
void evaluateSuperConstructorCall(
AstNode node,
- HashMap<String, DartObjectImpl> fieldMap,
+ Map<String, DartObjectImpl> fieldMap,
ConstructorElement superConstructor,
List<Expression> superArguments,
ConstantVisitor initializerVisitor,
@@ -1158,7 +1158,7 @@
*/
final ConstantEvaluationEngine evaluationEngine;
- final HashMap<String, DartObjectImpl> _lexicalEnvironment;
+ final Map<String, DartObjectImpl> _lexicalEnvironment;
/**
* Error reporter that we use to report errors accumulated while computing the
@@ -1180,7 +1180,7 @@
* correct dependency analysis.
*/
ConstantVisitor(this.evaluationEngine, this._errorReporter,
- {HashMap<String, DartObjectImpl> lexicalEnvironment})
+ {Map<String, DartObjectImpl> lexicalEnvironment})
: _lexicalEnvironment = lexicalEnvironment {
this._dartObjectComputer =
new DartObjectComputer(_errorReporter, evaluationEngine.typeProvider);
@@ -1392,7 +1392,7 @@
@override
DartObjectImpl visitListLiteral(ListLiteral node) {
- if (node.constKeyword == null) {
+ if (!node.isConst) {
_errorReporter.reportErrorForNode(
CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL, node);
return null;
@@ -1424,14 +1424,14 @@
@override
DartObjectImpl visitMapLiteral(MapLiteral node) {
- if (node.constKeyword == null) {
+ if (!node.isConst) {
_errorReporter.reportErrorForNode(
CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL, node);
return null;
}
bool errorOccurred = false;
- LinkedHashMap<DartObjectImpl, DartObjectImpl> map =
- new LinkedHashMap<DartObjectImpl, DartObjectImpl>();
+ Map<DartObjectImpl, DartObjectImpl> map =
+ <DartObjectImpl, DartObjectImpl>{};
for (MapLiteralEntry entry in node.entries) {
DartObjectImpl keyResult = entry.key.accept(this);
DartObjectImpl valueResult = entry.value.accept(this);
diff --git a/pkg/analyzer/lib/src/dart/constant/utilities.dart b/pkg/analyzer/lib/src/dart/constant/utilities.dart
index e4bcf2a..b07ff69 100644
--- a/pkg/analyzer/lib/src/dart/constant/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/constant/utilities.dart
@@ -150,7 +150,7 @@
@override
void visitListLiteral(ListLiteral node) {
- if (node.constKeyword != null) {
+ if (node.isConst) {
_find(node);
} else {
super.visitListLiteral(node);
@@ -159,7 +159,7 @@
@override
void visitMapLiteral(MapLiteral node) {
- if (node.constKeyword != null) {
+ if (node.isConst) {
_find(node);
} else {
super.visitMapLiteral(node);
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index ea4f84d..1ba6e80 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -201,7 +201,7 @@
return new DartObjectImpl(type, GenericState.UNKNOWN_VALUE);
}
- HashMap<String, DartObjectImpl> get fields => _state.fields;
+ Map<String, DartObjectImpl> get fields => _state.fields;
@override
int get hashCode => JenkinsSmiHash.hash2(type.hashCode, _state.hashCode);
@@ -1355,7 +1355,7 @@
/**
* The values of the fields of this instance.
*/
- final HashMap<String, DartObjectImpl> _fieldMap;
+ final Map<String, DartObjectImpl> _fieldMap;
/**
* Information about the constructor invoked to generate this instance.
@@ -1369,7 +1369,7 @@
GenericState(this._fieldMap, {this.invocation});
@override
- HashMap<String, DartObjectImpl> get fields => _fieldMap;
+ Map<String, DartObjectImpl> get fields => _fieldMap;
@override
int get hashCode {
@@ -1452,7 +1452,7 @@
* If this represents a generic dart object, return a map from its field names
* to their values. Otherwise return null.
*/
- HashMap<String, DartObjectImpl> get fields => null;
+ Map<String, DartObjectImpl> get fields => null;
/**
* Return `true` if this object represents an object whose type is 'bool'.
@@ -2427,7 +2427,7 @@
/**
* The entries in the map.
*/
- final HashMap<DartObjectImpl, DartObjectImpl> _entries;
+ final Map<DartObjectImpl, DartObjectImpl> _entries;
/**
* Initialize a newly created state to represent a map with the given
@@ -2450,7 +2450,7 @@
@override
bool operator ==(Object object) {
if (object is MapState) {
- HashMap<DartObjectImpl, DartObjectImpl> otherElements = object._entries;
+ Map<DartObjectImpl, DartObjectImpl> otherElements = object._entries;
int count = _entries.length;
if (otherElements.length != count) {
return false;
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index 1837250..8102be1 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -32,7 +32,7 @@
* A table mapping field names to field elements for the fields defined in the current class, or
* `null` if we are not in the scope of a class.
*/
- HashMap<String, FieldElement> _fieldMap;
+ Map<String, FieldElement> _fieldMap;
/**
* Whether the class being built has a constant constructor.
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 6a73509..23397df 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -561,7 +561,7 @@
@override
List<InterfaceType> get allSupertypes {
List<InterfaceType> list = new List<InterfaceType>();
- _collectAllSupertypes(list);
+ collectAllSupertypes(list, type, type);
return list;
}
@@ -946,7 +946,13 @@
void set mixins(List<InterfaceType> mixins) {
_assertNotResynthesized(_unlinkedClass);
- _mixins = mixins;
+ // Note: if we are using kernel or the analysis driver, the set of
+ // mixins has already been computed, and it's more accurate (since mixin
+ // arguments have been inferred). So we only store mixins if we are using
+ // the old task model.
+ if (_unlinkedClass == null && _kernel == null) {
+ _mixins = mixins;
+ }
}
@override
@@ -1168,32 +1174,6 @@
safelyVisitChildren(typeParameters, visitor);
}
- void _collectAllSupertypes(List<InterfaceType> supertypes) {
- List<InterfaceType> typesToVisit = new List<InterfaceType>();
- List<ClassElement> visitedClasses = new List<ClassElement>();
- typesToVisit.add(this.type);
- while (!typesToVisit.isEmpty) {
- InterfaceType currentType = typesToVisit.removeAt(0);
- ClassElement currentElement = currentType.element;
- if (!visitedClasses.contains(currentElement)) {
- visitedClasses.add(currentElement);
- if (!identical(currentType, this.type)) {
- supertypes.add(currentType);
- }
- InterfaceType supertype = currentType.superclass;
- if (supertype != null) {
- typesToVisit.add(supertype);
- }
- for (InterfaceType type in currentType.interfaces) {
- typesToVisit.add(type);
- }
- for (InterfaceType type in currentType.mixins) {
- typesToVisit.add(type);
- }
- }
- }
- }
-
/**
* Compute a list of constructors for this class, which is a mixin
* application. If specified, [visitedClasses] is a list of the other mixin
@@ -1452,6 +1432,33 @@
return false;
}
+ static void collectAllSupertypes(List<InterfaceType> supertypes,
+ InterfaceType startingType, InterfaceType excludeType) {
+ List<InterfaceType> typesToVisit = new List<InterfaceType>();
+ List<ClassElement> visitedClasses = new List<ClassElement>();
+ typesToVisit.add(startingType);
+ while (!typesToVisit.isEmpty) {
+ InterfaceType currentType = typesToVisit.removeAt(0);
+ ClassElement currentElement = currentType.element;
+ if (!visitedClasses.contains(currentElement)) {
+ visitedClasses.add(currentElement);
+ if (!identical(currentType, excludeType)) {
+ supertypes.add(currentType);
+ }
+ InterfaceType supertype = currentType.superclass;
+ if (supertype != null) {
+ typesToVisit.add(supertype);
+ }
+ for (InterfaceType type in currentType.interfaces) {
+ typesToVisit.add(type);
+ }
+ for (InterfaceType type in currentType.mixins) {
+ typesToVisit.add(type);
+ }
+ }
+ }
+ }
+
/**
* Return `true` if the given [type] is a class [InterfaceType].
*/
diff --git a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
index 2d32994..8995708 100644
--- a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
@@ -451,7 +451,7 @@
if (lookupMaps == null) {
resultMap = new Map<String, ExecutableElement>();
} else {
- HashMap<String, List<ExecutableElement>> unionMap =
+ Map<String, List<ExecutableElement>> unionMap =
_unionInterfaceLookupMaps(lookupMaps);
resultMap = _resolveInheritanceLookup(classElt, unionMap);
}
@@ -872,9 +872,9 @@
* @param lookupMaps the maps to be unioned together.
* @return the resulting union map.
*/
- HashMap<String, List<ExecutableElement>> _unionInterfaceLookupMaps(
+ Map<String, List<ExecutableElement>> _unionInterfaceLookupMaps(
List<Map<String, ExecutableElement>> lookupMaps) {
- HashMap<String, List<ExecutableElement>> unionMap =
+ Map<String, List<ExecutableElement>> unionMap =
new HashMap<String, List<ExecutableElement>>();
for (Map<String, ExecutableElement> lookupMap in lookupMaps) {
for (String memberName in lookupMap.keys) {
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart
index 80122b6..ef99e4c 100644
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart
@@ -707,7 +707,7 @@
//
return Namespace.EMPTY;
}
- HashMap<String, Element> exportedNames = _getExportMapping(exportedLibrary);
+ Map<String, Element> exportedNames = _getExportMapping(exportedLibrary);
exportedNames = _applyCombinators(exportedNames, element.combinators);
return new Namespace(exportedNames);
}
@@ -716,7 +716,7 @@
* Create a namespace representing the export namespace of the given [library].
*/
Namespace createExportNamespaceForLibrary(LibraryElement library) {
- HashMap<String, Element> exportedNames = _getExportMapping(library);
+ Map<String, Element> exportedNames = _getExportMapping(library);
return new Namespace(exportedNames);
}
@@ -732,7 +732,7 @@
//
return Namespace.EMPTY;
}
- HashMap<String, Element> exportedNames = _getExportMapping(importedLibrary);
+ Map<String, Element> exportedNames = _getExportMapping(importedLibrary);
exportedNames = _applyCombinators(exportedNames, element.combinators);
PrefixElement prefix = element.prefix;
if (prefix != null) {
@@ -746,7 +746,7 @@
* [library].
*/
Namespace createPublicNamespaceForLibrary(LibraryElement library) {
- HashMap<String, Element> definedNames = new HashMap<String, Element>();
+ Map<String, Element> definedNames = new HashMap<String, Element>();
_addPublicNames(definedNames, library.definingCompilationUnit);
for (CompilationUnitElement compilationUnit in library.parts) {
_addPublicNames(definedNames, compilationUnit);
@@ -805,8 +805,7 @@
* Apply the given [combinators] to all of the names in the given table of
* [definedNames].
*/
- HashMap<String, Element> _applyCombinators(
- HashMap<String, Element> definedNames,
+ Map<String, Element> _applyCombinators(Map<String, Element> definedNames,
List<NamespaceCombinator> combinators) {
for (NamespaceCombinator combinator in combinators) {
if (combinator is HideElementCombinator) {
@@ -829,11 +828,11 @@
* library because all of the names defined by them will be added by another
* library.
*/
- HashMap<String, Element> _computeExportMapping(
+ Map<String, Element> _computeExportMapping(
LibraryElement library, HashSet<LibraryElement> visitedElements) {
visitedElements.add(library);
try {
- HashMap<String, Element> definedNames = new HashMap<String, Element>();
+ Map<String, Element> definedNames = new HashMap<String, Element>();
for (ExportElement element in library.exports) {
LibraryElement exportedLibrary = element.exportedLibrary;
if (exportedLibrary != null &&
@@ -842,7 +841,7 @@
// The exported library will be null if the URI does not reference a
// valid library.
//
- HashMap<String, Element> exportedNames =
+ Map<String, Element> exportedNames =
_computeExportMapping(exportedLibrary, visitedElements);
exportedNames = _applyCombinators(exportedNames, element.combinators);
definedNames.addAll(exportedNames);
@@ -858,12 +857,12 @@
}
}
- HashMap<String, Element> _getExportMapping(LibraryElement library) {
+ Map<String, Element> _getExportMapping(LibraryElement library) {
if (library.exportNamespace != null) {
return library.exportNamespace.definedNames;
}
if (library is LibraryElementImpl) {
- HashMap<String, Element> exportMapping =
+ Map<String, Element> exportMapping =
_computeExportMapping(library, new HashSet<LibraryElement>());
library.exportNamespace = new Namespace(exportMapping);
return exportMapping;
@@ -876,8 +875,8 @@
* with exception of [hiddenNames].
*/
Map<String, Element> _hide(
- HashMap<String, Element> definedNames, List<String> hiddenNames) {
- HashMap<String, Element> newNames =
+ Map<String, Element> definedNames, List<String> hiddenNames) {
+ Map<String, Element> newNames =
new HashMap<String, Element>.from(definedNames);
for (String name in hiddenNames) {
newNames.remove(name);
@@ -889,9 +888,9 @@
/**
* Return a new map of names which has only [shownNames] from [definedNames].
*/
- HashMap<String, Element> _show(
- HashMap<String, Element> definedNames, List<String> shownNames) {
- HashMap<String, Element> newNames = new HashMap<String, Element>();
+ Map<String, Element> _show(
+ Map<String, Element> definedNames, List<String> shownNames) {
+ Map<String, Element> newNames = new HashMap<String, Element>();
for (String name in shownNames) {
Element element = definedNames[name];
if (element != null) {
@@ -926,7 +925,7 @@
* A table mapping names that are defined in this namespace to the element
* representing the thing declared with that name.
*/
- final HashMap<String, Element> _definedNames;
+ final Map<String, Element> _definedNames;
/**
* Initialize a newly created namespace to have the names resulting from
@@ -992,7 +991,7 @@
* A table mapping names that are defined in this scope to the element
* representing the thing declared with that name.
*/
- HashMap<String, Element> _definedNames = null;
+ Map<String, Element> _definedNames = null;
/**
* Return the scope in which this scope is lexically enclosed.
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index dc4b398..81f5a4c 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -1686,6 +1686,21 @@
"This mixin application is invalid because all of the constructors "
"in the base class '{0}' have optional parameters.");
+ static const CompileTimeErrorCode
+ MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES =
+ const CompileTimeErrorCode(
+ 'MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES',
+ "Type parameters could not be inferred for the mixin '{0}' because "
+ "the base class implements the mixin's supertype constraint "
+ "'{1}' in multiple conflicting ways");
+
+ static const CompileTimeErrorCode MIXIN_INFERENCE_NO_MATCHING_CLASS =
+ const CompileTimeErrorCode(
+ 'MIXIN_INFERENCE_NO_MATCHING_CLASS',
+ "Type parameters could not be inferred for the mixin '{0}' because "
+ "the base class does not implement the mixin's supertype "
+ "constraint '{1}'");
+
/**
* 9 Mixins: It is a compile-time error if a mixin is derived from a class
* whose superclass is not Object.
@@ -5056,12 +5071,6 @@
"method, '{1}', which has an implicit type.",
"Add an explicit type for either '{0}' or '{1}'.");
- static const StrongModeCode TOP_LEVEL_TYPE_ARGUMENTS = const StrongModeCode(
- ErrorType.HINT,
- 'TOP_LEVEL_TYPE_ARGUMENTS',
- "The type of '{0}' can't be inferred because type arguments were not given for '{1}'.",
- "Try adding type arguments for '{1}', or add an explicit type for '{0}'.");
-
static const StrongModeCode TOP_LEVEL_UNSUPPORTED = const StrongModeCode(
ErrorType.HINT,
'TOP_LEVEL_UNSUPPORTED',
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index ee7fdb3..9fd938e 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -2030,7 +2030,8 @@
}
@override
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
assert(getOrSet == null ||
optional('get', getOrSet) ||
optional('set', getOrSet));
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index cc8dc80..9e112c9 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.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.
-library analyzer.src.generated.element_resolver;
-
import 'dart:collection';
import 'package:analyzer/dart/ast/ast.dart';
@@ -28,7 +26,6 @@
import 'package:analyzer/src/error/codes.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/testing/token_factory.dart';
import 'package:analyzer/src/task/strong/checker.dart';
/**
@@ -1648,7 +1645,7 @@
InterfaceType classType = classElement.type;
if (node.typeArguments != null) {
int parameterCount = classType.typeParameters.length;
- int argumentCount = node.typeArguments.length;
+ int argumentCount = node.typeArguments.arguments.length;
if (parameterCount == argumentCount) {
// TODO(brianwilkerson) More gracefully handle the case where the counts
// are different.
@@ -1740,13 +1737,32 @@
if (classElement == null) {
return null;
}
+ InterfaceType classType = classElement.type;
+ if (node.typeArguments != null) {
+ int parameterCount = classType.typeParameters.length;
+ int argumentCount = node.typeArguments.arguments.length;
+ if (parameterCount == argumentCount) {
+ // TODO(brianwilkerson) More gracefully handle the case where the counts
+ // are different.
+ List<DartType> typeArguments = node.typeArguments.arguments
+ .map((TypeAnnotation type) => type.type)
+ .toList();
+ classType = classType.instantiate(typeArguments);
+ }
+ } else {
+ int parameterCount = classType.typeParameters.length;
+ if (parameterCount > 0) {
+ List<DartType> typeArguments =
+ new List<DartType>.filled(parameterCount, _dynamicType);
+ classType = classType.instantiate(typeArguments);
+ }
+ }
ConstructorElement constructorElt;
if (isNamedConstructorCase) {
- constructorElt = classElement.type
- .lookUpConstructor(node.methodName.name, _definingLibrary);
- } else {
constructorElt =
- classElement.type.lookUpConstructor(null, _definingLibrary);
+ classType.lookUpConstructor(node.methodName.name, _definingLibrary);
+ } else {
+ constructorElt = classType.lookUpConstructor(null, _definingLibrary);
}
// If the constructor was not looked up, return `null` so resulting
// resolution, such as error messages, will proceed as a [MethodInvocation].
@@ -1761,18 +1777,16 @@
// p.A.n()
// libraryPrefixId is a PrefixedIdentifier in this case
typeName = _astFactory.typeName(libraryPrefixId, node.typeArguments);
- typeName.type = classElement.type;
+ typeName.type = classType;
constructorName =
_astFactory.constructorName(typeName, node.operator, node.methodName);
} else {
// p.A()
// libraryPrefixId is a SimpleIdentifier in this case
PrefixedIdentifier prefixedIdentifier = _astFactory.prefixedIdentifier(
- libraryPrefixId,
- TokenFactory.tokenFromType(TokenType.PERIOD),
- node.methodName);
+ libraryPrefixId, node.operator, node.methodName);
typeName = _astFactory.typeName(prefixedIdentifier, node.typeArguments);
- typeName.type = classElement.type;
+ typeName.type = classType;
constructorName = _astFactory.constructorName(typeName, null, null);
}
InstanceCreationExpression instanceCreationExpression = _astFactory
@@ -1783,15 +1797,14 @@
}
constructorName.staticElement = constructorElt;
instanceCreationExpression.staticElement = constructorElt;
- instanceCreationExpression.staticType = classElement.type;
+ instanceCreationExpression.staticType = classType;
// Finally, do the node replacement, true is returned iff the replacement
// was successful, only return the new node if it was successful.
if (NodeReplacer.replace(node, instanceCreationExpression)) {
return instanceCreationExpression;
- } else {
- return null;
}
+ return null;
}
/**
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index e0802f5..6d835b7 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -652,7 +652,7 @@
* A mapping from source to what type of analysis should be performed on that
* source.
*/
- HashMap<Source, AnalysisLevel> _analysisMap =
+ Map<Source, AnalysisLevel> _analysisMap =
new HashMap<Source, AnalysisLevel>();
/**
@@ -2067,7 +2067,7 @@
* A table mapping the sources whose content has been changed to the current
* content of those sources.
*/
- HashMap<Source, String> _changedContent = new HashMap<Source, String>();
+ Map<Source, String> _changedContent = new HashMap<Source, String>();
/**
* A table mapping the sources whose content has been changed within a single
@@ -2221,7 +2221,7 @@
* [label] and a separator if [needsSeparator] is `true`. Return `true` if
* future lists of sources will need a separator.
*/
- bool _appendSources2(StringBuffer buffer, HashMap<Source, dynamic> sources,
+ bool _appendSources2(StringBuffer buffer, Map<Source, dynamic> sources,
bool needsSeparator, String label) {
if (sources.isEmpty) {
return needsSeparator;
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index f7d851f..f88a050 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -250,26 +250,26 @@
*
* See [visitClassDeclaration], and [_checkForAllFinalInitializedErrorCodes].
*/
- HashMap<FieldElement, INIT_STATE> _initialFieldElementsMap;
+ Map<FieldElement, INIT_STATE> _initialFieldElementsMap;
/**
* A table mapping name of the library to the export directive which export
* this library.
*/
- HashMap<String, LibraryElement> _nameToExportElement =
+ Map<String, LibraryElement> _nameToExportElement =
new HashMap<String, LibraryElement>();
/**
* A table mapping name of the library to the import directive which import
* this library.
*/
- HashMap<String, LibraryElement> _nameToImportElement =
+ Map<String, LibraryElement> _nameToImportElement =
new HashMap<String, LibraryElement>();
/**
* A table mapping names to the exported elements.
*/
- HashMap<String, Element> _exportedElements = new HashMap<String, Element>();
+ Map<String, Element> _exportedElements = new HashMap<String, Element>();
/**
* A set of the names of the variable initializers we are visiting now.
@@ -931,7 +931,7 @@
Object visitListLiteral(ListLiteral node) {
TypeArgumentList typeArguments = node.typeArguments;
if (typeArguments != null) {
- if (!_options.strongMode && node.constKeyword != null) {
+ if (!_options.strongMode && node.isConst) {
NodeList<TypeAnnotation> arguments = typeArguments.arguments;
if (arguments.isNotEmpty) {
_checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
@@ -951,7 +951,7 @@
if (typeArguments != null) {
NodeList<TypeAnnotation> arguments = typeArguments.arguments;
if (!_options.strongMode && arguments.isNotEmpty) {
- if (node.constKeyword != null) {
+ if (node.isConst) {
_checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP);
}
@@ -1319,6 +1319,7 @@
_checkImplementsSuperClass(implementsClause);
_checkImplementsFunctionWithoutCall(node.name);
_checkForMixinHasNoConstructors(node);
+ _checkMixinInference(node, withClause);
if (_options.strongMode) {
_checkForMixinWithConflictingPrivateMember(withClause, superclass);
@@ -1603,7 +1604,7 @@
return;
}
- HashMap<FieldElement, INIT_STATE> fieldElementsMap =
+ Map<FieldElement, INIT_STATE> fieldElementsMap =
new HashMap<FieldElement, INIT_STATE>.from(_initialFieldElementsMap);
// Visit all of the field formal parameters
NodeList<FormalParameter> formalParameters =
@@ -2939,8 +2940,7 @@
// members in the class to construct the HashMap, at the same time,
// look for violations. Don't add members if they are part of a conflict,
// this prevents multiple warnings for one issue.
- HashMap<String, ClassMember> memberHashMap =
- new HashMap<String, ClassMember>();
+ Map<String, ClassMember> memberHashMap = new HashMap<String, ClassMember>();
for (ClassMember member in classMembers) {
if (member is MethodDeclaration) {
if (member.isStatic) {
@@ -3446,7 +3446,7 @@
NodeList<Directive> directives = unit.directives;
int count = directives.length;
if (count > 0) {
- HashMap<PrefixElement, List<ImportDirective>> prefixToDirectivesMap =
+ Map<PrefixElement, List<ImportDirective>> prefixToDirectivesMap =
new HashMap<PrefixElement, List<ImportDirective>>();
for (int i = 0; i < count; i++) {
Directive directive = directives[i];
@@ -4506,8 +4506,9 @@
DartType listElementType = typeArguments[0];
// Check every list element.
+ bool isConst = literal.isConst;
for (Expression element in literal.elements) {
- if (literal.constKeyword != null) {
+ if (isConst) {
// TODO(paulberry): this error should be based on the actual type of the
// list element, not the static type. See dartbug.com/21119.
_checkForArgumentTypeNotAssignableWithExpectedTypes(
@@ -4546,11 +4547,12 @@
DartType keyType = typeArguments[0];
DartType valueType = typeArguments[1];
+ bool isConst = literal.isConst;
NodeList<MapLiteralEntry> entries = literal.entries;
for (MapLiteralEntry entry in entries) {
Expression key = entry.key;
Expression value = entry.value;
- if (literal.constKeyword != null) {
+ if (isConst) {
// TODO(paulberry): this error should be based on the actual type of the
// list element, not the static type. See dartbug.com/21119.
_checkForArgumentTypeNotAssignableWithExpectedTypes(key, keyType,
@@ -6171,6 +6173,31 @@
}
}
+ void _checkMixinInference(
+ NamedCompilationUnitMember node, WithClause withClause) {
+ if (withClause == null) return;
+ if (!_options.enableSuperMixins) return;
+ ClassElement classElement = node.element;
+ var type = classElement.type;
+ var supertype = classElement.supertype;
+ List<InterfaceType> supertypesForMixinInference = <InterfaceType>[];
+ ClassElementImpl.collectAllSupertypes(
+ supertypesForMixinInference, supertype, type);
+ for (var typeName in withClause.mixinTypes) {
+ if (typeName.typeArguments != null) continue;
+ var mixinElement = typeName.name.staticElement;
+ if (mixinElement is ClassElement) {
+ var mixinSupertypeConstraint = mixinElement.supertype;
+ if (mixinSupertypeConstraint.element.typeParameters.isNotEmpty) {
+ _findInterfaceTypeForMixin(
+ typeName, mixinSupertypeConstraint, supertypesForMixinInference);
+ }
+ ClassElementImpl.collectAllSupertypes(
+ supertypesForMixinInference, mixinElement.type, type);
+ }
+ }
+ }
+
/**
* Verify that the given [typeArguments] are all within their bounds, as
* defined by the given [element].
@@ -6267,6 +6294,32 @@
isDeclarationCast: isDeclarationCast);
}
+ void _findInterfaceTypeForMixin(TypeName mixin,
+ InterfaceType supertypeConstraint, List<InterfaceType> interfaceTypes) {
+ var element = supertypeConstraint.element;
+ InterfaceType foundInterfaceType;
+ for (var interfaceType in interfaceTypes) {
+ if (interfaceType.element != element) continue;
+ if (foundInterfaceType == null) {
+ foundInterfaceType = interfaceType;
+ } else {
+ if (interfaceType != foundInterfaceType) {
+ _errorReporter.reportErrorForToken(
+ CompileTimeErrorCode
+ .MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES,
+ mixin.name.beginToken,
+ [mixin, supertypeConstraint]);
+ }
+ }
+ }
+ if (foundInterfaceType == null) {
+ _errorReporter.reportErrorForToken(
+ CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS,
+ mixin.name.beginToken,
+ [mixin, supertypeConstraint]);
+ }
+ }
+
MethodElement _findOverriddenMemberThatMustCallSuper(MethodDeclaration node) {
ExecutableElement overriddenMember = _getOverriddenMember(node.element);
List<ExecutableElement> seen = <ExecutableElement>[];
diff --git a/pkg/analyzer/lib/src/generated/parser_fasta.dart b/pkg/analyzer/lib/src/generated/parser_fasta.dart
index 4e03662..fa6527c 100644
--- a/pkg/analyzer/lib/src/generated/parser_fasta.dart
+++ b/pkg/analyzer/lib/src/generated/parser_fasta.dart
@@ -109,9 +109,7 @@
<ClassMember>[],
null /* rightBracket */,
);
- currentToken = fastaParser
- .parseClassMember(fastaParser.syntheticPreviousToken(currentToken))
- .next;
+ currentToken = fastaParser.parseClassMember(currentToken);
ClassDeclaration declaration = astBuilder.classDeclaration;
astBuilder.classDeclaration = null;
return declaration.members[0];
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 21e168c..b07f7ab7 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -1356,7 +1356,7 @@
return;
}
// Collect getters and setters.
- HashMap<String, PropertyAccessorElement> getters =
+ Map<String, PropertyAccessorElement> getters =
new HashMap<String, PropertyAccessorElement>();
List<PropertyAccessorElement> setters = <PropertyAccessorElement>[];
_collectAccessors(getters, setters, library.definingCompilationUnit);
@@ -1539,7 +1539,7 @@
@override
Object visitListLiteral(ListLiteral node) {
super.visitListLiteral(node);
- if (node.constKeyword != null) {
+ if (node.isConst) {
DartObjectImpl result;
for (Expression element in node.elements) {
result =
@@ -1558,7 +1558,7 @@
@override
Object visitMapLiteral(MapLiteral node) {
super.visitMapLiteral(node);
- bool isConst = node.constKeyword != null;
+ bool isConst = node.isConst;
bool reportEqualKeys = true;
HashSet<DartObject> keys = new HashSet<DartObject>();
List<Expression> invalidKeys = new List<Expression>();
@@ -3028,7 +3028,7 @@
//
// Create a value for the constant.
//
- HashMap<String, DartObjectImpl> fieldMap =
+ Map<String, DartObjectImpl> fieldMap =
new HashMap<String, DartObjectImpl>();
fieldMap[indexFieldName] = new DartObjectImpl(intType, new IntState(i));
DartObjectImpl value =
@@ -6937,7 +6937,7 @@
int requiredParameterCount = 0;
int unnamedParameterCount = 0;
List<ParameterElement> unnamedParameters = new List<ParameterElement>();
- HashMap<String, ParameterElement> namedParameters = null;
+ Map<String, ParameterElement> namedParameters = null;
int length = parameters.length;
for (int i = 0; i < length; i++) {
ParameterElement parameter = parameters[i];
@@ -7745,7 +7745,7 @@
* A map between [ClassElement]s and a set of [ClassElement]s that are subtypes of the
* key.
*/
- HashMap<ClassElement, HashSet<ClassElement>> _subtypeMap =
+ Map<ClassElement, HashSet<ClassElement>> _subtypeMap =
new HashMap<ClassElement, HashSet<ClassElement>>();
/**
@@ -8890,7 +8890,7 @@
/**
* A table mapping elements to the promoted type of that element.
*/
- HashMap<Element, DartType> _promotedTypes = new HashMap<Element, DartType>();
+ Map<Element, DartType> _promotedTypes = new HashMap<Element, DartType>();
/**
* Initialize a newly created scope to be an empty child of the given scope.
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index a81b50f..eb7b7b1 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -157,8 +157,7 @@
/**
* A table mapping Dart library URI's to the library.
*/
- LinkedHashMap<String, SdkLibraryImpl> _libraryMap =
- new LinkedHashMap<String, SdkLibraryImpl>();
+ Map<String, SdkLibraryImpl> _libraryMap = <String, SdkLibraryImpl>{};
/**
* Return a list containing all of the sdk libraries in this mapping.
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 4237caf..f930bcd 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -35,14 +35,14 @@
* A table mapping the full path of sources to the contents of those sources.
* This is used to override the default contents of a source.
*/
- HashMap<String, String> _contentMap = new HashMap<String, String>();
+ Map<String, String> _contentMap = new HashMap<String, String>();
/**
* A table mapping the full path of sources to the modification stamps of
* those sources. This is used when the default contents of a source has been
* overridden.
*/
- HashMap<String, int> _stampMap = new HashMap<String, int>();
+ Map<String, int> _stampMap = new HashMap<String, int>();
int _nextStamp = 0;
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 11ed85d..bdefbd8 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -82,7 +82,7 @@
/**
* A table mapping [ExecutableElement]s to their propagated return types.
*/
- HashMap<ExecutableElement, DartType> _propagatedReturnTypes =
+ Map<ExecutableElement, DartType> _propagatedReturnTypes =
new HashMap<ExecutableElement, DartType>();
/**
@@ -1676,8 +1676,8 @@
* @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
*/
- DartType _getElementNameAsType(LibraryElement library, String elementName,
- HashMap<String, String> nameMap) {
+ DartType _getElementNameAsType(
+ LibraryElement library, String elementName, Map<String, String> nameMap) {
if (elementName != null) {
if (nameMap != null) {
elementName = nameMap[elementName.toLowerCase()];
@@ -1776,7 +1776,7 @@
* @return the type specified by the first argument in the argument list
*/
DartType _getFirstArgumentAsTypeWithMap(LibraryElement library,
- ArgumentList argumentList, HashMap<String, String> nameMap) =>
+ ArgumentList argumentList, Map<String, String> nameMap) =>
_getElementNameAsType(
library, _getFirstArgumentAsString(argumentList), nameMap);
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index ddbefd3..4d19bff 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -165,7 +165,7 @@
constantElement.isStatic = true;
constantElement.isConst = true;
constantElement.type = enumType;
- HashMap<String, DartObjectImpl> fieldMap =
+ Map<String, DartObjectImpl> fieldMap =
new HashMap<String, DartObjectImpl>();
fieldMap[indexFieldName] = new DartObjectImpl(intType, new IntState(i));
fieldMap[nameFieldName] =
diff --git a/pkg/analyzer/lib/src/generated/utilities_collection.dart b/pkg/analyzer/lib/src/generated/utilities_collection.dart
index e6d6919..d27ac93 100644
--- a/pkg/analyzer/lib/src/generated/utilities_collection.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_collection.dart
@@ -98,7 +98,7 @@
* to a set of tails. Nodes that are not the head of any edge are represented by an entry mapping
* the node to an empty set of tails.
*/
- HashMap<N, HashSet<N>> _edges = new HashMap<N, HashSet<N>>();
+ Map<N, HashSet<N>> _edges = new HashMap<N, HashSet<N>>();
/**
* Return `true` if this graph is empty.
@@ -359,7 +359,7 @@
/**
* A table mapping nodes to information about the nodes that is used by this algorithm.
*/
- HashMap<N, DirectedGraph_NodeInfo<N>> _nodeMap =
+ Map<N, DirectedGraph_NodeInfo<N>> _nodeMap =
new HashMap<N, DirectedGraph_NodeInfo<N>>();
/**
@@ -704,7 +704,7 @@
* One possibility is a pair of parallel arrays, with keys being sorted by their offset and a
* cursor indicating where to start searching.
*/
- HashMap<Token, Token> _map = new HashMap<Token, Token>();
+ Map<Token, Token> _map = new HashMap<Token, Token>();
/**
* Return the token that is mapped to the given token, or `null` if there is no token
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 0ec4a47..5d981ba 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -2286,6 +2286,7 @@
List<int> _implicitFunctionTypeIndices;
int _paramReference;
int _reference;
+ int _refinedSlot;
int _slot;
List<UnlinkedParamBuilder> _syntheticParams;
EntityRefBuilder _syntheticReturnType;
@@ -2379,6 +2380,25 @@
}
@override
+ int get refinedSlot => _refinedSlot ??= 0;
+
+ /**
+ * If this [EntityRef] appears in a syntactic context where its type arguments
+ * might need to be inferred by a method other than instantiate-to-bounds,
+ * and [typeArguments] is empty, a slot id (which is unique within the
+ * compilation unit). If an entry appears in [LinkedUnit.types] whose [slot]
+ * matches this value, that entry will contain the complete inferred type.
+ *
+ * This is called `refinedSlot` to clarify that if it points to an inferred
+ * type, it points to a type that is a "refinement" of this one (one in which
+ * some type arguments have been inferred).
+ */
+ void set refinedSlot(int value) {
+ assert(value == null || value >= 0);
+ this._refinedSlot = value;
+ }
+
+ @override
int get slot => _slot ??= 0;
/**
@@ -2449,6 +2469,7 @@
List<int> implicitFunctionTypeIndices,
int paramReference,
int reference,
+ int refinedSlot,
int slot,
List<UnlinkedParamBuilder> syntheticParams,
EntityRefBuilder syntheticReturnType,
@@ -2458,6 +2479,7 @@
_implicitFunctionTypeIndices = implicitFunctionTypeIndices,
_paramReference = paramReference,
_reference = reference,
+ _refinedSlot = refinedSlot,
_slot = slot,
_syntheticParams = syntheticParams,
_syntheticReturnType = syntheticReturnType,
@@ -2516,6 +2538,7 @@
}
}
signature.addInt(this._entityKind == null ? 0 : this._entityKind.index);
+ signature.addInt(this._refinedSlot ?? 0);
}
fb.Offset finish(fb.Builder fbBuilder) {
@@ -2557,6 +2580,9 @@
if (_reference != null && _reference != 0) {
fbBuilder.addUint32(0, _reference);
}
+ if (_refinedSlot != null && _refinedSlot != 0) {
+ fbBuilder.addUint32(9, _refinedSlot);
+ }
if (_slot != null && _slot != 0) {
fbBuilder.addUint32(2, _slot);
}
@@ -2596,6 +2622,7 @@
List<int> _implicitFunctionTypeIndices;
int _paramReference;
int _reference;
+ int _refinedSlot;
int _slot;
List<idl.UnlinkedParam> _syntheticParams;
idl.EntityRef _syntheticReturnType;
@@ -2629,6 +2656,12 @@
}
@override
+ int get refinedSlot {
+ _refinedSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 9, 0);
+ return _refinedSlot;
+ }
+
+ @override
int get slot {
_slot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0);
return _slot;
@@ -2676,6 +2709,7 @@
_result["implicitFunctionTypeIndices"] = implicitFunctionTypeIndices;
if (paramReference != 0) _result["paramReference"] = paramReference;
if (reference != 0) _result["reference"] = reference;
+ if (refinedSlot != 0) _result["refinedSlot"] = refinedSlot;
if (slot != 0) _result["slot"] = slot;
if (syntheticParams.isNotEmpty)
_result["syntheticParams"] =
@@ -2697,6 +2731,7 @@
"implicitFunctionTypeIndices": implicitFunctionTypeIndices,
"paramReference": paramReference,
"reference": reference,
+ "refinedSlot": refinedSlot,
"slot": slot,
"syntheticParams": syntheticParams,
"syntheticReturnType": syntheticReturnType,
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 8722ccc..2b752f0 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1272,6 +1272,19 @@
reference:uint (id: 0);
/**
+ * If this [EntityRef] appears in a syntactic context where its type arguments
+ * might need to be inferred by a method other than instantiate-to-bounds,
+ * and [typeArguments] is empty, a slot id (which is unique within the
+ * compilation unit). If an entry appears in [LinkedUnit.types] whose [slot]
+ * matches this value, that entry will contain the complete inferred type.
+ *
+ * This is called `refinedSlot` to clarify that if it points to an inferred
+ * type, it points to a type that is a "refinement" of this one (one in which
+ * some type arguments have been inferred).
+ */
+ refinedSlot:uint (id: 9);
+
+ /**
* If this [EntityRef] is contained within [LinkedUnit.types], slot id (which
* is unique within the compilation unit) identifying the target of type
* propagation or type inference with which this [EntityRef] is associated.
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index b4ce55a..49b3d3e 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -465,6 +465,20 @@
int get reference;
/**
+ * If this [EntityRef] appears in a syntactic context where its type arguments
+ * might need to be inferred by a method other than instantiate-to-bounds,
+ * and [typeArguments] is empty, a slot id (which is unique within the
+ * compilation unit). If an entry appears in [LinkedUnit.types] whose [slot]
+ * matches this value, that entry will contain the complete inferred type.
+ *
+ * This is called `refinedSlot` to clarify that if it points to an inferred
+ * type, it points to a type that is a "refinement" of this one (one in which
+ * some type arguments have been inferred).
+ */
+ @Id(9)
+ int get refinedSlot;
+
+ /**
* If this [EntityRef] is contained within [LinkedUnit.types], slot id (which
* is unique within the compilation unit) identifying the target of type
* propagation or type inference with which this [EntityRef] is associated.
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index 5169d33..6a75797 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -656,8 +656,83 @@
}
@override
- List<InterfaceType> get mixins =>
- _mixins ??= _unlinkedClass.mixins.map(_computeInterfaceType).toList();
+ List<InterfaceType> get mixins {
+ if (_mixins == null) {
+ // Note: in the event of a loop in the class hierarchy, the calls to
+ // collectAllSupertypes below will wind up reentrantly calling
+ // this.mixins. So to prevent infinite recursion we need to set _mixins
+ // to non-null now. It's ok that we populate it gradually; in the event
+ // of a reentrant call, the user's code is known to have errors, so it's
+ // ok if the reentrant call doesn't return the complete set of mixins; we
+ // just need to ensure that analysis terminates.
+ _mixins = <InterfaceType>[];
+ List<InterfaceType> supertypesForMixinInference; // populated lazily
+ for (var entity in _unlinkedClass.mixins) {
+ var mixin = _computeInterfaceType(entity);
+ var mixinElement = mixin.element;
+ var slot = entity.refinedSlot;
+ if (slot != 0 && mixinElement.typeParameters.isNotEmpty) {
+ CompilationUnitElementForLink enclosingElement =
+ this.enclosingElement;
+ if (enclosingElement is CompilationUnitElementInBuildUnit) {
+ var mixinSupertypeConstraint = mixinElement.supertype;
+ if (mixinSupertypeConstraint.element.typeParameters.isNotEmpty) {
+ if (supertypesForMixinInference == null) {
+ supertypesForMixinInference = <InterfaceType>[];
+ ClassElementImpl.collectAllSupertypes(
+ supertypesForMixinInference, supertype, type);
+ for (var previousMixin in _mixins) {
+ ClassElementImpl.collectAllSupertypes(
+ supertypesForMixinInference, previousMixin, type);
+ }
+ }
+ var matchingInterfaceType = _findInterfaceTypeForElement(
+ mixinSupertypeConstraint.element,
+ supertypesForMixinInference);
+ // TODO(paulberry): If matchingInterfaceType is null, that's an
+ // error. Also, if there are multiple matching interface types
+ // that use different type parameters, that's also an error. But
+ // we can't report errors from the linker, so we just use the
+ // first matching interface type (if there is one) and hope for
+ // the best. The error detection logic will have to be
+ // implemented in the ErrorVerifier.
+ if (matchingInterfaceType != null) {
+ // TODO(paulberry): now we should pattern match
+ // matchingInterfaceType against mixinSupertypeConstraint to
+ // find the correct set of type parameters to apply to the
+ // mixin. But as a quick hack, we assume that the mixin just
+ // passes its type parameters through to the supertype
+ // constraint (that is, each type in
+ // mixinSupertypeConstraint.typeParameters should be a
+ // TypeParameterType pointing to the corresponding element of
+ // mixinElement.typeParameters). To avoid a complete disaster
+ // if this assumption is wrong, we only do the inference if the
+ // number of type arguments applied to mixinSupertypeConstraint
+ // matches the number of type parameters accepted by the mixin.
+ if (mixinSupertypeConstraint.typeArguments.length ==
+ mixinElement.typeParameters.length) {
+ mixin = mixinElement.type
+ .instantiate(matchingInterfaceType.typeArguments);
+ enclosingElement._storeLinkedType(slot, mixin, this);
+ }
+ }
+ }
+ } else {
+ var refinedMixin = enclosingElement.getLinkedType(this, slot);
+ if (refinedMixin is InterfaceType) {
+ mixin = refinedMixin;
+ }
+ }
+ }
+ _mixins.add(mixin);
+ if (supertypesForMixinInference != null) {
+ ClassElementImpl.collectAllSupertypes(
+ supertypesForMixinInference, mixin, type);
+ }
+ }
+ }
+ return _mixins;
+ }
@override
String get name => _unlinkedClass.name;
@@ -715,6 +790,11 @@
@override
void link(CompilationUnitElementInBuildUnit compilationUnit) {
+ // Force mixins to be inferred by calling this.mixins. We don't need the
+ // return value from the getter; we just need it to execute and record the
+ // mixin inference results as a side effect.
+ this.mixins;
+
for (ConstructorElementForLink constructorElement in constructors) {
constructorElement.link(compilationUnit);
}
@@ -750,6 +830,14 @@
}
return enclosingElement.enclosingElement._linker.typeProvider.objectType;
}
+
+ InterfaceType _findInterfaceTypeForElement(
+ ClassElement element, List<InterfaceType> interfaceTypes) {
+ for (var interfaceType in interfaceTypes) {
+ if (interfaceType.element == element) return interfaceType;
+ }
+ return null;
+ }
}
/**
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 1012d43..879fb63 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -932,7 +932,7 @@
*/
Namespace buildExportNamespace(
Namespace publicNamespace, List<LinkedExportName> exportNames) {
- HashMap<String, Element> definedNames = new HashMap<String, Element>();
+ Map<String, Element> definedNames = new HashMap<String, Element>();
// Start by populating all the public names from [publicNamespace].
publicNamespace.definedNames.forEach((String name, Element element) {
definedNames[name] = element;
@@ -1659,6 +1659,12 @@
return DynamicTypeImpl.instance;
}
}
+ if (type.refinedSlot != 0) {
+ var refinedType = linkedTypeMap[type.refinedSlot];
+ if (refinedType != null) {
+ type = refinedType;
+ }
+ }
if (type.paramReference != 0) {
return context.typeParameterContext
.getTypeParameterType(type.paramReference);
@@ -1693,7 +1699,7 @@
}
UnitExplicitTopLevelAccessors buildUnitExplicitTopLevelAccessors() {
- HashMap<String, TopLevelVariableElementImpl> implicitVariables =
+ Map<String, TopLevelVariableElementImpl> implicitVariables =
new HashMap<String, TopLevelVariableElementImpl>();
UnitExplicitTopLevelAccessors accessorsData =
new UnitExplicitTopLevelAccessors();
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index f487341..1d38fda 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -459,7 +459,7 @@
b.hasNoSupertype = isCoreLibrary && name == 'Object';
}
if (withClause != null) {
- b.mixins = withClause.mixinTypes.map(serializeType).toList();
+ b.mixins = withClause.mixinTypes.map(serializeMixedInType).toList();
}
if (implementsClause != null) {
b.interfaces = implementsClause.interfaces.map(serializeType).toList();
@@ -922,6 +922,19 @@
}
/**
+ * Serialize a type name that appears in a "with" clause to an [EntityRef].
+ */
+ EntityRefBuilder serializeMixedInType(TypeAnnotation node) {
+ var builder = serializeType(node);
+ if (builder != null && builder.typeArguments.isEmpty) {
+ // Type arguments may get inferred so we need to assign a slot to hold the
+ // complete inferred mixed in type.
+ builder.refinedSlot = assignSlot();
+ }
+ return builder;
+ }
+
+ /**
* Serialize a type name (which might be defined in a nested scope, at top
* level within this library, or at top level within an imported library) to
* a [EntityRef]. Note that this method does the right thing if the
diff --git a/pkg/analyzer/lib/src/task/html.dart b/pkg/analyzer/lib/src/task/html.dart
index 81587b2..76ef914 100644
--- a/pkg/analyzer/lib/src/task/html.dart
+++ b/pkg/analyzer/lib/src/task/html.dart
@@ -4,8 +4,6 @@
library analyzer.src.task.html;
-import 'dart:collection';
-
import 'package:analyzer/error/error.dart';
import 'package:analyzer/exception/exception.dart';
import 'package:analyzer/src/context/cache.dart';
@@ -134,7 +132,7 @@
List<DartScript> inlineScripts = <DartScript>[];
List<Element> scripts = document.getElementsByTagName('script');
for (Element script in scripts) {
- LinkedHashMap<dynamic, String> attributes = script.attributes;
+ Map<dynamic, String> attributes = script.attributes;
if (attributes['type'] == 'application/dart') {
String src = attributes['src'];
if (src == null) {
diff --git a/pkg/analyzer/test/generated/analysis_context_factory.dart b/pkg/analyzer/test/generated/analysis_context_factory.dart
index 77dd48c..20382a2 100644
--- a/pkg/analyzer/test/generated/analysis_context_factory.dart
+++ b/pkg/analyzer/test/generated/analysis_context_factory.dart
@@ -409,7 +409,7 @@
//
// Record the elements.
//
- HashMap<Source, LibraryElement> elementMap =
+ Map<Source, LibraryElement> elementMap =
new HashMap<Source, LibraryElement>();
elementMap[coreSource] = coreLibrary;
if (asyncSource != null) {
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
index c78e97e..d80d8d5 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
@@ -1079,12 +1079,24 @@
}
@override
+ @failingTest
+ test_implementsDisallowedClass_class_String_num() async {
+ await super.test_implementsDisallowedClass_class_String_num();
+ }
+
+ @override
test_implementsDisallowedClass_classTypeAlias_Null() async {
await super.test_implementsDisallowedClass_classTypeAlias_Null();
}
@override
@failingTest
+ test_implementsDisallowedClass_classTypeAlias_String_num() async {
+ await super.test_implementsDisallowedClass_classTypeAlias_String_num();
+ }
+
+ @override
+ @failingTest
test_implementsDynamic() async {
// AnalysisException: Element mismatch in /test.dart at /test.dart
await super.test_implementsDynamic();
@@ -1711,6 +1723,27 @@
@override
@failingTest
+ test_mixinInference_matchingClass() =>
+ super.test_mixinInference_matchingClass();
+
+ @override
+ @failingTest
+ test_mixinInference_noMatchingClass() =>
+ super.test_mixinInference_noMatchingClass();
+
+ @override
+ @failingTest
+ test_mixinInference_noMatchingClass_constraintSatisfiedByImplementsClause() =>
+ super
+ .test_mixinInference_noMatchingClass_constraintSatisfiedByImplementsClause();
+
+ @override
+ @failingTest
+ test_mixinInference_noMatchingClass_namedMixinApplication() =>
+ super.test_mixinInference_noMatchingClass_namedMixinApplication();
+
+ @override
+ @failingTest
test_mixinInheritsFromNotObject_classDeclaration_extends() async {
// Expected 1 errors of type CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT, found 0
await super.test_mixinInheritsFromNotObject_classDeclaration_extends();
@@ -3085,18 +3118,6 @@
// Test passes, even though if fails in the superclass
await super.test_yieldInNonGenerator_async();
}
-
- @override
- @failingTest
- test_implementsDisallowedClass_class_String_num() async {
- await super.test_implementsDisallowedClass_class_String_num();
- }
-
- @override
- @failingTest
- test_implementsDisallowedClass_classTypeAlias_String_num() async {
- await super.test_implementsDisallowedClass_classTypeAlias_String_num();
- }
}
/// Tests marked with this annotation fail because of a Fasta problem.
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 3079a45..e5a4f44 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -3962,6 +3962,108 @@
verify([source]);
}
+ test_mixinInference_matchingClass() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+class B {}
+class M<T> extends A<T> {}
+class C extends A<int> with M {}
+''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ }
+
+ test_mixinInference_matchingClass_inPreviousMixin() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+class B {}
+class M1 implements A<B> {}
+class M2<T> extends A<T> {}
+class C extends Object with M1, M2 {}
+''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ }
+
+ test_mixinInference_noMatchingClass() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+class B {}
+class M<T> extends A<T> {}
+class C extends Object with M {}
+''');
+ await computeAnalysisResult(source);
+ assertErrors(
+ source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
+ }
+
+ test_mixinInference_noMatchingClass_constraintSatisfiedByImplementsClause() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+class B {}
+class M<T> extends A<T> {}
+class C extends Object with M implements A<B> {}
+''');
+ await computeAnalysisResult(source);
+ assertErrors(
+ source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
+ }
+
+ test_mixinInference_noMatchingClass_namedMixinApplication() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+class B {}
+class M<T> extends A<T> {}
+class C = Object with M;
+''');
+ await computeAnalysisResult(source);
+ assertErrors(
+ source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
+ }
+
+ test_mixinInference_noMatchingClass_noSuperclassConstraint() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+class B {}
+class M<T> {}
+class C extends Object with M {}
+''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ }
+
+ test_mixinInference_noMatchingClass_typeParametersSupplied() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+class B {}
+class M<T> extends A<T> {}
+class C extends Object with M<int> {}
+''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ }
+
test_mixinInheritsFromNotObject_classDeclaration_extends() async {
Source source = addSource(r'''
class A {}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
index b18fe32..7cfa206 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
@@ -16,4 +16,7 @@
class NonErrorResolverTest_Driver extends NonErrorResolverTest {
@override
bool get enableNewAnalysisDriver => true;
+
+ @override // Passes with driver
+ test_infer_mixin() => super.test_infer_mixin();
}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_kernel_test.dart b/pkg/analyzer/test/generated/non_error_resolver_kernel_test.dart
index e7bf2d5..f7270d3 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_kernel_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_kernel_test.dart
@@ -198,6 +198,11 @@
@override
@failingTest
+ @FastaProblem('https://github.com/dart-lang/sdk/issues/31984')
+ test_infer_mixin() => super.test_infer_mixin();
+
+ @override
+ @failingTest
@potentialAnalyzerProblem
test_integerLiteralOutOfRange_negative_valid() async {
return super.test_integerLiteralOutOfRange_negative_valid();
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index cb9fca4..63c7ba1 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -3008,6 +3008,30 @@
verify([source]);
}
+ @failingTest // Does not work with old task model
+ test_infer_mixin() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWith(options: options);
+ Source source = addSource('''
+abstract class A<T> {}
+
+class B {}
+
+class M<T> extends A<T> {}
+
+class C extends A<B> with M {}
+''');
+ TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+ assertNoErrors(source);
+ verify([source]);
+ CompilationUnit unit = analysisResult.unit;
+ ClassElement classC =
+ resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
+ expect(classC.mixins, hasLength(1));
+ expect(classC.mixins[0].toString(), 'M<B>');
+ }
+
test_initializingFormalForNonExistentField() async {
Source source = addSource(r'''
class A {
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index 5d5b522..ebdc78c 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -877,9 +877,10 @@
}
@override
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
end('Method');
- super.endMethod(getOrSet, beginToken, endToken);
+ super.endMethod(getOrSet, beginToken, beginParam, endToken);
}
@override
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index cce7def..7042388 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -611,20 +611,6 @@
@override
@failingTest
- void test_invalidOperator_unary() {
- // TODO(danrubel) Wrong errors
- super.test_invalidOperator_unary();
- }
-
- void test_invalidOperator_unary_noErrors() {
- // TODO(danrubel): remove this test once test_invalidOperator_unary passes.
- createParser('int operator unary- => 0;');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- }
-
- @override
- @failingTest
void test_invalidOperatorAfterSuper_primaryExpression() {
// TODO(brianwilkerson) Does not recover.
// Expected: true
@@ -2319,13 +2305,6 @@
@override
@failingTest
- void test_incomplete_constructorInitializers_empty() {
- // TODO(brianwilkerson) reportUnrecoverableErrorWithToken
- super.test_incomplete_constructorInitializers_empty();
- }
-
- @override
- @failingTest
void test_incomplete_constructorInitializers_missingEquals() {
// TODO(brianwilkerson) exception:
// NoSuchMethodError: The getter 'thisKeyword' was called on null.
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 857d40e..7c03a15 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -2601,6 +2601,24 @@
: [expectedError(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, 0, 3)]);
}
+ void test_constructorPartial() {
+ createParser('class C { C< }');
+ parser.parseCompilationUnit2();
+ listener.assertErrors(usingFastaParser
+ ? [
+ expectedError(ParserErrorCode.MISSING_IDENTIFIER, 13, 1),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 13, 1),
+ expectedError(ParserErrorCode.MISSING_METHOD_PARAMETERS, 10, 1),
+ expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 13, 1)
+ ]
+ : [
+ expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 13, 1),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 13, 1),
+ expectedError(ParserErrorCode.MISSING_IDENTIFIER, 13, 1),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 13, 1)
+ ]);
+ }
+
void test_constTypedef() {
parseCompilationUnit("const typedef F();",
errors: [expectedError(ParserErrorCode.CONST_TYPEDEF, 0, 5)]);
@@ -3809,11 +3827,26 @@
}
void test_invalidOperator_unary() {
- createParser('int operator unary- => 0;');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- listener
- .assertErrors([expectedError(ParserErrorCode.EXPECTED_TOKEN, 9, 5)]);
+ createParser('class C { int operator unary- => 0; }');
+ CompilationUnit unit = parser.parseCompilationUnit2();
+ expectNotNullIfNoErrors(unit);
+ listener.assertErrors(usingFastaParser
+ ? [
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 23, 5),
+ expectedError(ParserErrorCode.MISSING_KEYWORD_OPERATOR, 28, 1),
+ expectedError(ParserErrorCode.MISSING_METHOD_PARAMETERS, 28, 0)
+ ]
+ : [
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 14, 8),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 28, 1),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 28, 1),
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 28, 1),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 30, 2),
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 30, 2),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 33, 1),
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 33, 1),
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 34, 1)
+ ]);
}
void test_invalidOperatorAfterSuper_assignableExpression() {
@@ -10511,8 +10544,9 @@
createParser('C() : {}');
ClassMember member = parser.parseClassMember('C');
expectNotNullIfNoErrors(member);
- listener.assertErrors(
- [expectedError(ParserErrorCode.MISSING_INITIALIZER, 4, 1)]);
+ listener.assertErrors(usingFastaParser
+ ? [expectedError(ParserErrorCode.MISSING_IDENTIFIER, 6, 1)]
+ : [expectedError(ParserErrorCode.MISSING_INITIALIZER, 4, 1)]);
}
void test_incomplete_constructorInitializers_missingEquals() {
@@ -15504,6 +15538,7 @@
if (keyword.isBuiltIn) {
String lexeme = keyword.lexeme;
parseCompilationUnit('$lexeme(x) => 0;');
+ parseCompilationUnit('class C {$lexeme(x) => 0;}');
}
}
}
@@ -15514,6 +15549,7 @@
if (keyword.isBuiltIn) {
String lexeme = keyword.lexeme;
parseCompilationUnit('$lexeme<T>(x) => 0;');
+ parseCompilationUnit('class C {$lexeme<T>(x) => 0;}');
}
}
}
@@ -15524,6 +15560,7 @@
if (keyword.isBuiltIn) {
String lexeme = keyword.lexeme;
parseCompilationUnit('get $lexeme => 0;');
+ parseCompilationUnit('class C {get $lexeme => 0;}');
}
}
}
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 91c212c..d9edb36 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -372,8 +372,8 @@
expect(namespace.get('p.A'), same(element));
}
- HashMap<String, Element> _toMap(List<Element> elements) {
- HashMap<String, Element> map = new HashMap<String, Element>();
+ Map<String, Element> _toMap(List<Element> elements) {
+ Map<String, Element> map = new HashMap<String, Element>();
for (Element element in elements) {
map[element.name] = element;
}
diff --git a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
index 5dd8b4c..898773e 100644
--- a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
@@ -60,26 +60,6 @@
''');
}
- @failingTest
- void test_extraParenInMapLiteral() {
- // https://github.com/dart-lang/sdk/issues/12100
- testRecovery('''
-class C {}
-final Map v = {
- 'a': () => new C(),
- 'b': () => new C()),
- 'c': () => new C(),
-};
-''', [ParserErrorCode.UNEXPECTED_TOKEN], '''
-class C {}
-final Map v = {
- 'a': () => new C(),
- 'b': () => new C(),
- 'c': () => new C(),
-};
-''');
- }
-
void test_getter_parameters() {
testRecovery('''
int get g() => 0;
@@ -88,6 +68,20 @@
''');
}
+ @failingTest
+ void test_identifier_afterNamedArgument() {
+ // https://github.com/dart-lang/sdk/issues/30370
+ testRecovery('''
+a() {
+ b(c: c(d: d(e: null f,),),);
+}
+''', [], '''
+a() {
+ b(c: c(d: d(e: null,),),);
+}
+''');
+ }
+
void test_invalidRangeCheck() {
parseCompilationUnit('''
f(x) {
@@ -96,6 +90,26 @@
''', codes: [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
}
+ @failingTest
+ void test_listLiteralType() {
+ // https://github.com/dart-lang/sdk/issues/4348
+ testRecovery('''
+List<int> ints = List<int>[];
+''', [], '''
+List<int> ints = <int>[];
+''');
+ }
+
+ @failingTest
+ void test_mapLiteralType() {
+ // https://github.com/dart-lang/sdk/issues/4348
+ testRecovery('''
+Map<int, int> map = Map<int, int>{};
+''', [], '''
+Map<int, int> map = <int, int>{};
+''');
+ }
+
void test_multipleRedirectingInitializers() {
testRecovery('''
class A {
@@ -111,6 +125,26 @@
}
''');
}
+
+ @failingTest
+ void test_parenInMapLiteral() {
+ // https://github.com/dart-lang/sdk/issues/12100
+ testRecovery('''
+class C {}
+final Map v = {
+ 'a': () => new C(),
+ 'b': () => new C()),
+ 'c': () => new C(),
+};
+''', [ParserErrorCode.UNEXPECTED_TOKEN], '''
+class C {}
+final Map v = {
+ 'a': () => new C(),
+ 'b': () => new C(),
+ 'c': () => new C(),
+};
+''');
+ }
}
/**
@@ -128,6 +162,36 @@
class A {}
''');
}
+
+ void test_methodDeclaration_const_getter() {
+ testRecovery('''
+main() {}
+const int get foo => 499;
+''', [ParserErrorCode.EXTRANEOUS_MODIFIER], '''
+main() {}
+int get foo => 499;
+''');
+ }
+
+ void test_methodDeclaration_const_method() {
+ testRecovery('''
+main() {}
+const int foo() => 499;
+''', [ParserErrorCode.EXTRANEOUS_MODIFIER], '''
+main() {}
+int foo() => 499;
+''');
+ }
+
+ void test_methodDeclaration_const_setter() {
+ testRecovery('''
+main() {}
+const set foo(v) => 499;
+''', [ParserErrorCode.EXTRANEOUS_MODIFIER], '''
+main() {}
+set foo(v) => 499;
+''');
+ }
}
/**
diff --git a/pkg/analyzer/test/src/fasta/recovery/invalid_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/invalid_code_test.dart
new file mode 100644
index 0000000..f080fb8
--- /dev/null
+++ b/pkg/analyzer/test/src/fasta/recovery/invalid_code_test.dart
@@ -0,0 +1,87 @@
+// Copyright (c) 2017, 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:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'recovery_test_support.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(InvalidCodeTest);
+ defineReflectiveTests(MisplacedCodeTest);
+ });
+}
+
+@reflectiveTest
+class InvalidCodeTest extends AbstractRecoveryTest {
+ @failingTest
+ void test_const_mistyped() {
+ // https://github.com/dart-lang/sdk/issues/9714
+ testRecovery('''
+List<String> fruits = cont <String>['apples', 'bananas', 'pears'];
+''', [], '''
+List<String> fruits = const <String>['apples', 'bananas', 'pears'];
+''');
+ }
+
+ void test_default_asVariableName() {
+ testRecovery('''
+const default = const Object();
+''', [ParserErrorCode.MISSING_IDENTIFIER], '''
+const default = const Object();
+''', expectedErrorsInValidCode: [ParserErrorCode.MISSING_IDENTIFIER]);
+ }
+
+ @failingTest
+ void test_expressionInPlaceOfTypeName() {
+ // https://github.com/dart-lang/sdk/issues/30370
+ testRecovery('''
+f() {
+ return <g('')>[0, 1, 2];
+}
+''', [], '''
+f() {
+ return <_s_>[0, 1, 2];
+}
+''');
+ }
+
+ void test_with_asArgumentName() {
+ testRecovery('''
+f() {}
+g() {
+ f(with: 3);
+}
+''', [ParserErrorCode.MISSING_IDENTIFIER], '''
+f() {}
+g() {
+ f(with: 3);
+}
+''', expectedErrorsInValidCode: [ParserErrorCode.MISSING_IDENTIFIER]);
+ }
+
+ @failingTest
+ void test_with_asParameterName() {
+ testRecovery('''
+f({int with: 0}) {}
+''', [], '''
+f({int _s_}) {}
+''');
+ }
+}
+
+@reflectiveTest
+class MisplacedCodeTest extends AbstractRecoveryTest {
+ @failingTest
+ void test_const_mistyped() {
+ // https://github.com/dart-lang/sdk/issues/10554
+ testRecovery('''
+var allValues = [];
+allValues.forEach((enum) {});
+''', [], '''
+var allValues = [];
+''');
+ }
+}
diff --git a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
index 7cdabed..58ab4ff 100644
--- a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
@@ -293,6 +293,26 @@
testUserDefinableOperatorWithSuper('-');
}
+ @failingTest
+ void test_parameterList_leftParen() {
+ // https://github.com/dart-lang/sdk/issues/22938
+ testRecovery('''
+int f int x, int y) {}
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+int f (int x, int y) {}
+''');
+ }
+
+ @failingTest
+ void test_parentheses_aroundThrow() {
+ // https://github.com/dart-lang/sdk/issues/24892
+ testRecovery('''
+f(x) => x ?? throw 0;
+''', [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.EXPECTED_TOKEN], '''
+f(x) => x ?? (throw 0);
+''');
+ }
+
void test_percent() {
testBinaryExpression('%');
}
@@ -339,15 +359,7 @@
testUserDefinableOperatorWithSuper('*');
}
- void test_tildeSlash() {
- testBinaryExpression('~/');
- }
-
- void test_tildeSlash_super() {
- testUserDefinableOperatorWithSuper('~/');
- }
-
- void test_unclosedStringInterpolation() {
+ void test_stringInterpolation_unclosed() {
// https://github.com/dart-lang/sdk/issues/946
// TODO(brianwilkerson) Try to recover better. Ideally there would be a
// single error about an unterminated interpolation block.
@@ -369,6 +381,14 @@
''');
}
+ void test_tildeSlash() {
+ testBinaryExpression('~/');
+ }
+
+ void test_tildeSlash_super() {
+ testUserDefinableOperatorWithSuper('~/');
+ }
+
void testBinaryExpression(String operator) {
testRecovery('''
f() => x $operator
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart
index f49fba3..d1f7a02 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart
@@ -64,7 +64,7 @@
failing: allExceptEof),
new TestDescriptor('final_name', 'final f',
[ParserErrorCode.EXPECTED_TOKEN], 'final f;',
- failing: allExceptEof),
+ failing: ['methodNonVoid', 'getter', 'setter']),
new TestDescriptor(
'final_equals',
'final f =',
@@ -90,7 +90,7 @@
failing: allExceptEof),
new TestDescriptor(
'var_name', 'var f', [ParserErrorCode.EXPECTED_TOKEN], 'var f;',
- failing: allExceptEof),
+ failing: ['methodNonVoid', 'getter', 'setter']),
new TestDescriptor(
'var_equals',
'var f =',
@@ -115,8 +115,7 @@
'A _s_;',
allFailing: true),
new TestDescriptor(
- 'type_name', 'A f', [ParserErrorCode.EXPECTED_TOKEN], 'A f;',
- failing: allExceptEof),
+ 'type_name', 'A f', [ParserErrorCode.EXPECTED_TOKEN], 'A f;'),
new TestDescriptor(
'type_equals',
'A f =',
@@ -168,7 +167,7 @@
failing: allExceptEof),
new TestDescriptor('static_final_name', 'static final f',
[ParserErrorCode.EXPECTED_TOKEN], 'static final f;',
- failing: allExceptEof),
+ failing: ['methodNonVoid', 'getter', 'setter']),
new TestDescriptor(
'static_final_equals',
'static final f =',
@@ -194,7 +193,7 @@
failing: allExceptEof),
new TestDescriptor('static_var_name', 'static var f',
[ParserErrorCode.EXPECTED_TOKEN], 'static var f;',
- failing: allExceptEof),
+ failing: ['methodNonVoid', 'getter', 'setter']),
new TestDescriptor(
'static_var_equals',
'static var f =',
@@ -219,8 +218,7 @@
'static A _s_;',
allFailing: true),
new TestDescriptor('static_type_name', 'static A f',
- [ParserErrorCode.EXPECTED_TOKEN], 'static A f;',
- failing: allExceptEof),
+ [ParserErrorCode.EXPECTED_TOKEN], 'static A f;'),
new TestDescriptor(
'static_type_equals',
'static A f =',
diff --git a/pkg/analyzer/test/src/fasta/recovery/test_all.dart b/pkg/analyzer/test/src/fasta/recovery/test_all.dart
index b7c7464..4a668cc 100644
--- a/pkg/analyzer/test/src/fasta/recovery/test_all.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/test_all.dart
@@ -6,6 +6,7 @@
import 'code_order_test.dart' as code_order;
import 'extra_code_test.dart' as extra_code;
+import 'invalid_code_test.dart' as invalid_code_test;
import 'missing_code_test.dart' as missing_code;
import 'paired_tokens_test.dart' as paired_tokens;
import 'partial_code/test_all.dart' as partial_code;
@@ -14,6 +15,7 @@
defineReflectiveSuite(() {
code_order.main();
extra_code.main();
+ invalid_code_test.main();
missing_code.main();
paired_tokens.main();
partial_code.main();
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 7141785..6713e90 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -269,7 +269,6 @@
removeCode(StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE);
removeCode(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER);
removeCode(StrongModeCode.TOP_LEVEL_INSTANCE_METHOD);
- removeCode(StrongModeCode.TOP_LEVEL_TYPE_ARGUMENTS);
removeCode(StrongModeCode.TOP_LEVEL_UNSUPPORTED);
removeCode(StrongModeCode.USES_DYNAMIC_AS_BOTTOM);
} else if (errorType == TodoCode) {
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index 9155d58..5c1d95a 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -348,7 +348,8 @@
push(popList(count) ?? NullValue.Metadata);
}
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
debugEvent("Method");
pop(); // Body
pop(); // Initializers
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
index ea4e3af..60c028e 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
@@ -100,7 +100,7 @@
void writeClassDeclaration(String name,
{Iterable<DartType> interfaces,
bool isAbstract: false,
- void memberWriter(),
+ void membersWriter(),
Iterable<DartType> mixins,
String nameGroupName,
DartType superclass,
@@ -126,10 +126,8 @@
writeTypes(mixins, prefix: ' with ');
writeTypes(interfaces, prefix: ' implements ');
writeln(' {');
- if (memberWriter != null) {
- writeln();
- memberWriter();
- writeln();
+ if (membersWriter != null) {
+ membersWriter();
}
write('}');
}
@@ -337,9 +335,10 @@
writeln('@override');
write(prefix);
// return type
- bool shouldReturn = writeType(member.type.returnType,
+ DartType returnType = member.type.returnType;
+ bool typeWritten = writeType(returnType,
groupName: returnTypeGroupName, methodBeingCopied: member);
- if (shouldReturn) {
+ if (typeWritten) {
write(' ');
}
if (isGetter) {
@@ -365,7 +364,7 @@
// TO-DO
write(prefix2);
writeln('// TODO: implement ${member.displayName}');
- if (shouldReturn) {
+ if (typeWritten && !returnType.isVoid) {
write(prefix2);
writeln('return null;');
}
@@ -792,10 +791,7 @@
// type parameter
type = _getVisibleType(type, enclosingClass, enclosingExecutable,
methodBeingCopied: methodBeingCopied);
- if (type == null ||
- type.isDynamic ||
- type.isBottom ||
- type.isDartCoreNull) {
+ if (type == null || type.isDynamic || type.isBottom) {
if (parameterName != null) {
return parameterName;
}
@@ -816,6 +812,9 @@
if (parameterName == null) {
return 'Function';
}
+ // TODO(brianwilkerson) Using a buffer here means that we cannot re-use
+ // the existing `write*` functions. Refactor this code to remove the
+ // duplication.
StringBuffer buffer = new StringBuffer();
String returnType = _getTypeSource(
type.returnType, enclosingClass, enclosingExecutable,
@@ -824,7 +823,32 @@
buffer.write(returnType);
buffer.write(' ');
}
- buffer.write(parameterName);
+ if (element is GenericFunctionTypeElement) {
+ buffer.write('Function');
+ if (element.typeParameters.isNotEmpty) {
+ buffer.write('<');
+ bool isFirst = true;
+ for (TypeParameterElement typeParameter in element.typeParameters) {
+ if (!isFirst) {
+ buffer.write(', ');
+ }
+ isFirst = false;
+ buffer.write(typeParameter.name);
+ if (typeParameter.bound != null) {
+ String bound = _getTypeSource(
+ typeParameter.bound, enclosingClass, enclosingExecutable,
+ methodBeingCopied: methodBeingCopied);
+ if (bound != null) {
+ buffer.write(' extends ');
+ buffer.write(bound);
+ }
+ }
+ }
+ buffer.write('>');
+ }
+ } else {
+ buffer.write(parameterName);
+ }
buffer.write('(');
int count = type.parameters.length;
for (int i = 0; i < count; i++) {
@@ -839,6 +863,10 @@
buffer.write(parameterType);
}
buffer.write(')');
+ if (element is GenericFunctionTypeElement) {
+ buffer.write(' ');
+ buffer.write(parameterName);
+ }
return buffer.toString();
}
// prepare element
@@ -970,6 +998,10 @@
if (type is TypeParameterType) {
TypeParameterElement parameterElement = type.element;
Element parameterParent = parameterElement.enclosingElement;
+ while (parameterParent is GenericFunctionTypeElement ||
+ parameterParent is ParameterElement) {
+ parameterParent = parameterParent.enclosingElement;
+ }
// TODO(brianwilkerson) This needs to compare the parameterParent with
// each of the parents of the enclosingExecutable. (That means that we
// only need the most closely enclosing element.)
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
index 2bc7d7d..79d3f3c 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
@@ -43,9 +43,8 @@
* Write the code for a declaration of a class with the given [name]. If a
* list of [interfaces] is provided, then the class will implement those
* interfaces. If [isAbstract] is `true`, then the class will be abstract. If
- * a [memberWriter] is provided, then it will be invoked to allow members to
- * be generated. (The members will automatically be preceded and followed by
- * end-of-line markers.) If a list of [mixins] is provided, then the class
+ * a [membersWriter] is provided, then it will be invoked to allow members to
+ * be generated. If a list of [mixins] is provided, then the class
* will mix in those classes. If a [nameGroupName] is provided, then the name
* of the class will be included in the linked edit group with that name. If a
* [superclass] is given then it will be the superclass of the class. (If a
@@ -55,7 +54,7 @@
void writeClassDeclaration(String name,
{Iterable<DartType> interfaces,
bool isAbstract: false,
- void memberWriter(),
+ void membersWriter(),
Iterable<DartType> mixins,
String nameGroupName,
DartType superclass,
diff --git a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
index 3f6a1c3..58003eb 100644
--- a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
+++ b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
@@ -110,7 +110,7 @@
* Map from file path to the list of analysis errors which have most recently
* been received for the file.
*/
- HashMap<String, List<AnalysisError>> currentAnalysisErrors =
+ Map<String, List<AnalysisError>> currentAnalysisErrors =
new HashMap<String, List<AnalysisError>>();
/**
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
index b953cf1..e696ed4 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
@@ -325,13 +325,13 @@
await builder.addFileEdit(path, (FileEditBuilder builder) {
builder.addInsertion(0, (EditBuilder builder) {
(builder as DartEditBuilder).writeClassDeclaration('C',
- memberWriter: () {
+ membersWriter: () {
builder.write('/**/');
});
});
});
SourceEdit edit = getEdit(builder);
- expect(edit.replacement, equalsIgnoringWhitespace('class C { /**/ }'));
+ expect(edit.replacement, equalsIgnoringWhitespace('class C { /**/}'));
}
test_writeClassDeclaration_mixins_noSuperclass() async {
@@ -915,7 +915,6 @@
@override
void perform(F f) {
// TODO: implement perform
- return null;
}
''');
}
@@ -930,7 +929,7 @@
}
''', '''
@override
-forEach(int f(double p1, String p2)) {
+forEach(int Function(double p1, String p2) f) {
// TODO: implement forEach
}
''');
@@ -968,6 +967,57 @@
''');
}
+ test_writeOverrideOfInheritedMember_method_genericFunctionTypedParameter() async {
+ await _assertWriteOverrideOfInheritedMethod('''
+abstract class A {
+ int foo(T Function<T>() fn);
+}
+
+class B extends A {
+}
+''', '''
+@override
+int foo(T Function<T>() fn) {
+ // TODO: implement foo
+ return null;
+}
+''');
+ }
+
+ test_writeOverrideOfInheritedMember_method_nullAsTypeArgument() async {
+ await _assertWriteOverrideOfInheritedMethod('''
+abstract class A {
+ List<Null> foo();
+}
+
+class B extends A {
+}
+''', '''
+@override
+List<Null> foo() {
+ // TODO: implement foo
+ return null;
+}
+''');
+ }
+
+ test_writeOverrideOfInheritedMember_method_voidAsTypeArgument() async {
+ await _assertWriteOverrideOfInheritedMethod('''
+abstract class A {
+ List<void> foo();
+}
+
+class B extends A {
+}
+''', '''
+@override
+List<void> foo() {
+ // TODO: implement foo
+ return null;
+}
+''');
+ }
+
test_writeParameterMatchingArgument() async {
String path = provider.convertPath('/test.dart');
String content = r'''
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 7a0b6de..4e7da14 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -39,7 +39,6 @@
/// See [CompilerOptions.useKernel] for details.
static const String useKernel = '--use-kernel';
static const String strongMode = '--strong';
- static const String addMethodSignatures = '--method-signatures';
static const String platformBinaries = '--platform-binaries=.+';
static const String minify = '--minify';
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index bd2e4ce..19d3b29 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -402,7 +402,6 @@
new OptionHandler(Flags.enableExperimentalMirrors, passThrough),
new OptionHandler(Flags.enableAssertMessage, passThrough),
new OptionHandler(Flags.strongMode, passThrough),
- new OptionHandler(Flags.addMethodSignatures, passThrough),
// TODO(floitsch): remove conditional directives flag.
// We don't provide the info-message yet, since we haven't publicly
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index a81a272..391f14b 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -515,8 +515,9 @@
String result = computeImportDeferName(import, compiler);
assert(result != null);
// Note: tools that process the json file to build multi-part initial load
- // bundles depend on the fact that makeUnique appends only digits.
- _importDeferName[import] = makeUnique(result, usedImportNames);
+ // bundles depend on the fact that makeUnique appends only digits, or a
+ // period followed by digits.
+ _importDeferName[import] = makeUnique(result, usedImportNames, '.');
}
// Sort the output units in descending order of the number of imports they
diff --git a/pkg/compiler/lib/src/helpers/debug_collection.dart b/pkg/compiler/lib/src/helpers/debug_collection.dart
index fa4e363..2ec5eb9 100644
--- a/pkg/compiler/lib/src/helpers/debug_collection.dart
+++ b/pkg/compiler/lib/src/helpers/debug_collection.dart
@@ -5,12 +5,12 @@
typedef void DebugCallback(String methodName, var arg1, var arg2);
class DebugMap<K, V> implements Map<K, V> {
- final Map<K, V> map;
+ final Map<K, V> sourceMap;
DebugCallback indexSetCallback;
DebugCallback putIfAbsentCallback;
DebugCallback removeCallback;
- DebugMap(this.map, {DebugCallback addCallback, this.removeCallback}) {
+ DebugMap(this.sourceMap, {DebugCallback addCallback, this.removeCallback}) {
if (addCallback != null) {
this.addCallback = addCallback;
}
@@ -21,23 +21,30 @@
putIfAbsentCallback = value;
}
- bool containsValue(Object value) {
- return map.containsValue(value);
+ Map<RK, RV> cast<RK, RV>() {
+ Map<Object, Object> self = this;
+ return self is Map<RK, RV> ? self : this.retype<RK, RV>();
}
- bool containsKey(Object key) => map.containsKey(key);
+ Map<RK, RV> retype<RK, RV>() => Map.castFrom<K, V, RK, RV>(this);
- V operator [](Object key) => map[key];
+ bool containsValue(Object value) {
+ return sourceMap.containsValue(value);
+ }
+
+ bool containsKey(Object key) => sourceMap.containsKey(key);
+
+ V operator [](Object key) => sourceMap[key];
void operator []=(K key, V value) {
if (indexSetCallback != null) {
indexSetCallback('[]=', key, value);
}
- map[key] = value;
+ sourceMap[key] = value;
}
V putIfAbsent(K key, V ifAbsent()) {
- return map.putIfAbsent(key, () {
+ return sourceMap.putIfAbsent(key, () {
V v = ifAbsent();
if (putIfAbsentCallback != null) {
putIfAbsentCallback('putIfAbsent', key, v);
@@ -46,33 +53,53 @@
});
}
- void addAll(Map<K, V> other) => map.addAll(other);
+ void addAll(Map<K, V> other) => sourceMap.addAll(other);
V remove(Object key) {
if (removeCallback != null) {
- removeCallback('remove', key, map[key]);
+ removeCallback('remove', key, sourceMap[key]);
}
- return map.remove(key);
+ return sourceMap.remove(key);
}
void clear() {
if (removeCallback != null) {
- removeCallback('clear', map, null);
+ removeCallback('clear', sourceMap, null);
}
- map.clear();
+ sourceMap.clear();
}
- void forEach(void f(K key, V value)) => map.forEach(f);
+ void forEach(void f(K key, V value)) => sourceMap.forEach(f);
- Iterable<K> get keys => map.keys;
+ Iterable<K> get keys => sourceMap.keys;
- Iterable<V> get values => map.values;
+ Iterable<V> get values => sourceMap.values;
- int get length => map.length;
+ Iterable<MapEntry<K, V>> get entries => sourceMap.entries;
- bool get isEmpty => map.isEmpty;
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
+ sourceMap.addEntries(entries);
+ }
- bool get isNotEmpty => map.isNotEmpty;
+ Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> transform(K key, V value)) =>
+ sourceMap.map(transform);
+
+ int get length => sourceMap.length;
+
+ bool get isEmpty => sourceMap.isEmpty;
+
+ bool get isNotEmpty => sourceMap.isNotEmpty;
+
+ V update(K key, V update(V value), {V ifAbsent()}) =>
+ sourceMap.update(key, update, ifAbsent: ifAbsent);
+
+ void updateAll(V update(K key, V value)) {
+ sourceMap.updateAll(update);
+ }
+
+ void removeWhere(bool test(K key, V value)) {
+ sourceMap.removeWhere(test);
+ }
}
class DebugIterable<E> implements Iterable<E> {
@@ -82,6 +109,13 @@
Iterator<E> get iterator => iterable.iterator;
+ Iterable<R> cast<R>() {
+ Iterable<Object> self = this;
+ return self is Iterable<R> ? self : this.retype<R>();
+ }
+
+ Iterable<R> retype<R>() => Iterable.castFrom<E, R>(this);
+
Iterable<T> map<T>(T f(E element)) => iterable.map(f);
Iterable<E> where(bool test(E element)) => iterable.where(test);
@@ -138,10 +172,15 @@
return iterable.lastWhere(test, orElse: orElse);
}
- E singleWhere(bool test(E element)) => iterable.singleWhere(test);
+ E singleWhere(bool test(E element), {E orElse()}) =>
+ iterable.singleWhere(test, orElse: orElse);
E elementAt(int index) => iterable.elementAt(index);
+ Iterable<E> followedBy(Iterable<E> other) => iterable.followedBy(other);
+
+ Iterable<T> whereType<T>() => iterable.whereType<T>();
+
String toString() => iterable.toString();
}
@@ -154,12 +193,29 @@
List<E> get list => iterable;
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : this.retype<R>();
+ }
+
+ List<R> retype<R>() => List.castFrom<E, R>(this);
+
+ List<E> operator +(List<E> other) => list + other;
+
E operator [](int index) => list[index];
void operator []=(int index, E value) {
list[index] = value;
}
+ void set first(E element) {
+ list.first = element;
+ }
+
+ void set last(E element) {
+ list.last = element;
+ }
+
int get length => list.length;
void set length(int newLength) {
@@ -188,8 +244,14 @@
int indexOf(E element, [int start = 0]) => list.indexOf(element, start);
+ int indexWhere(bool test(E element), [int start = 0]) =>
+ list.indexWhere(test, start);
+
int lastIndexOf(E element, [int start]) => list.lastIndexOf(element, start);
+ int lastIndexWhere(bool test(E element), [int start]) =>
+ list.lastIndexWhere(test, start);
+
void clear() => list.clear();
void insert(int index, E element) => list.insert(index, element);
@@ -240,6 +302,13 @@
Set<E> get set => iterable;
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R> ? self : this.retype<R>();
+ }
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this);
+
bool contains(Object value) => set.contains(value);
bool add(E value) {
diff --git a/pkg/compiler/lib/src/helpers/expensive_map.dart b/pkg/compiler/lib/src/helpers/expensive_map.dart
index 40b426c..35001e4 100644
--- a/pkg/compiler/lib/src/helpers/expensive_map.dart
+++ b/pkg/compiler/lib/src/helpers/expensive_map.dart
@@ -2,12 +2,14 @@
// 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:collection";
+
/**
* The expensive map is a data structure useful for tracking down
* excessive memory usage due to large maps. It acts as an ordinary
* hash map, but it uses 10 times more memory (by default).
*/
-class ExpensiveMap<K, V> implements Map<K, V> {
+class ExpensiveMap<K, V> extends MapBase<K, V> {
final List _maps;
ExpensiveMap([int copies = 10]) : _maps = new List(copies) {
@@ -66,5 +68,43 @@
}
}
+ Map<KR, VR> cast<KR, VR>() {
+ Map<Object, Object> self = this;
+ return self is Map<KR, VR> ? self : Map.castFrom<K, V, KR, VR>(this);
+ }
+
+ Map<KR, VR> retype<KR, VR>() => Map.castFrom<K, V, KR, VR>(this);
+
+ Iterable<MapEntry<K, V>> get entries => _maps[0].entries;
+
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
+ for (int i = 0; i < _maps.length; i++) {
+ _maps[i].addEntries(entries);
+ }
+ }
+
+ Map<KR, VR> map<KR, VR>(MapEntry<KR, VR> transform(K key, V value)) =>
+ _maps[0].map(transform);
+
+ V update(K key, V update(V value), {V ifAbsent()}) {
+ V result;
+ for (int i = 0; i < _maps.length; i++) {
+ result = _maps[i].update(key, update, ifAbsent: ifAbsent);
+ }
+ return result;
+ }
+
+ void updateAll(V update(K key, V value)) {
+ for (int i = 0; i < _maps.length; i++) {
+ _maps[i].updateAll(update);
+ }
+ }
+
+ void removeWhere(bool test(K key, V value)) {
+ for (int i = 0; i < _maps.length; i++) {
+ _maps[i].removeWhere(test);
+ }
+ }
+
String toString() => "expensive(${_maps[0]}x${_maps.length})";
}
diff --git a/pkg/compiler/lib/src/helpers/expensive_set.dart b/pkg/compiler/lib/src/helpers/expensive_set.dart
index d4c6493..76f8cd7 100644
--- a/pkg/compiler/lib/src/helpers/expensive_set.dart
+++ b/pkg/compiler/lib/src/helpers/expensive_set.dart
@@ -9,7 +9,7 @@
* excessive memory usage due to large sets. It acts as an ordinary
* hash set, but it uses 10 times more memory (by default).
*/
-class ExpensiveSet<E> extends IterableBase<E> implements Set<E> {
+class ExpensiveSet<E> extends SetBase<E> {
final List _sets;
ExpensiveSet([int copies = 10]) : _sets = new List(copies) {
diff --git a/pkg/compiler/lib/src/helpers/track_map.dart b/pkg/compiler/lib/src/helpers/track_map.dart
index fff6ba6..833a08a 100644
--- a/pkg/compiler/lib/src/helpers/track_map.dart
+++ b/pkg/compiler/lib/src/helpers/track_map.dart
@@ -97,6 +97,32 @@
_map.clear();
}
+ Map<KR, VR> cast<KR, VR>() => _map.cast<KR, VR>();
+
+ Map<KR, VR> retype<KR, VR>() => _map.retype<KR, VR>();
+
+ Iterable<MapEntry<K, V>> get entries => _map.entries;
+
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
+ for (var entry in entries) this[entry.key] = entry.value;
+ }
+
+ Map<KR, VR> map<KR, VR>(MapEntry<KR, VR> transform(K key, V value)) =>
+ _map.map(transform);
+
+ V update(K key, V update(V value), {V ifAbsent()}) =>
+ _map.update(key, update, ifAbsent: ifAbsent);
+
+ void updateAll(V update(K key, V value)) {
+ _map.updateAll(update);
+ }
+
+ void removeWhere(bool test(K key, V value)) {
+ int before = _map.length;
+ _map.removeWhere(test);
+ _notifyLengthChanged(_map.length - before);
+ }
+
void _notifyLengthChanged(int delta) {
int oldLength = _map.length;
int newLength = oldLength + delta;
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 3209051..1131467 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -597,11 +597,9 @@
ClosedWorld closedWorld, CodegenWorldBuilder codegenWorldBuilder) {
return compiler.options.enableMinification
? compiler.options.useFrequencyNamer
- ? new FrequencyBasedNamer(
- closedWorld, codegenWorldBuilder, compiler.options)
- : new MinifyNamer(
- closedWorld, codegenWorldBuilder, compiler.options)
- : new Namer(closedWorld, codegenWorldBuilder, compiler.options);
+ ? new FrequencyBasedNamer(closedWorld, codegenWorldBuilder)
+ : new MinifyNamer(closedWorld, codegenWorldBuilder)
+ : new Namer(closedWorld, codegenWorldBuilder);
}
void validateInterceptorImplementsAllObjectMethods(
@@ -979,7 +977,10 @@
_namer = determineNamer(closedWorld, codegenWorldBuilder);
tracer = new Tracer(closedWorld, namer, compiler.outputProvider);
_rtiEncoder = _namer.rtiEncoder = new RuntimeTypesEncoderImpl(
- namer, closedWorld.elementEnvironment, closedWorld.commonElements);
+ namer,
+ closedWorld.elementEnvironment,
+ closedWorld.commonElements,
+ compiler.options.strongMode);
emitter.createEmitter(namer, closedWorld, codegenWorldBuilder, sorter);
// TODO(johnniwinther): Share the impact object created in
// createCodegenEnqueuer.
diff --git a/pkg/compiler/lib/src/js_backend/frequency_namer.dart b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
index e075856..9ce989c 100644
--- a/pkg/compiler/lib/src/js_backend/frequency_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
@@ -29,9 +29,9 @@
jsAst.Name get staticsPropertyName =>
_staticsPropertyName ??= getFreshName(instanceScope, 'static');
- FrequencyBasedNamer(ClosedWorld closedWorld,
- CodegenWorldBuilder codegenWorldBuilder, CompilerOptions options)
- : super(closedWorld, codegenWorldBuilder, options) {
+ FrequencyBasedNamer(
+ ClosedWorld closedWorld, CodegenWorldBuilder codegenWorldBuilder)
+ : super(closedWorld, codegenWorldBuilder) {
fieldRegistry = new _FieldNamingRegistry(this);
}
diff --git a/pkg/compiler/lib/src/js_backend/minify_namer.dart b/pkg/compiler/lib/src/js_backend/minify_namer.dart
index 94ba9a0..0554923 100644
--- a/pkg/compiler/lib/src/js_backend/minify_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/minify_namer.dart
@@ -12,9 +12,8 @@
_MinifiedFieldNamer,
_MinifyConstructorBodyNamer,
_MinifiedOneShotInterceptorNamer {
- MinifyNamer(ClosedWorld closedWorld, CodegenWorldBuilder codegenWorldBuilder,
- CompilerOptions options)
- : super(closedWorld, codegenWorldBuilder, options) {
+ MinifyNamer(ClosedWorld closedWorld, CodegenWorldBuilder codegenWorldBuilder)
+ : super(closedWorld, codegenWorldBuilder) {
reserveBackendNames();
fieldRegistry = new _FieldNamingRegistry(this);
}
@@ -385,7 +384,7 @@
String prefix =
selector.isGetter ? r"$get" : selector.isSetter ? r"$set" : "";
String callSuffix = selector.isCall
- ? callSuffixForStructure(selector.callStructure).join()
+ ? Namer.callSuffixForStructure(selector.callStructure).join()
: "";
String suffix = suffixForGetInterceptor(classes);
String fullName = "\$intercepted$prefix\$$root$callSuffix\$$suffix";
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 0360aac..a32d5ec 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -30,7 +30,6 @@
import '../elements/types.dart';
import '../js/js.dart' as jsAst;
import '../js_model/closure.dart';
-import '../options.dart';
import '../universe/call_structure.dart' show CallStructure;
import '../universe/selector.dart' show Selector, SelectorKind;
import '../universe/world_builder.dart' show CodegenWorldBuilder;
@@ -502,7 +501,6 @@
final ClosedWorld _closedWorld;
final CodegenWorldBuilder _codegenWorldBuilder;
- final CompilerOptions _options;
RuntimeTypesEncoder _rtiEncoder;
RuntimeTypesEncoder get rtiEncoder {
@@ -573,7 +571,7 @@
final Map<LibraryEntity, String> _libraryKeys =
new HashMap<LibraryEntity, String>();
- Namer(this._closedWorld, this._codegenWorldBuilder, this._options) {
+ Namer(this._closedWorld, this._codegenWorldBuilder) {
_literalAsyncPrefix = new StringBackedName(asyncPrefix);
_literalGetterPrefix = new StringBackedName(getterPrefix);
_literalSetterPrefix = new StringBackedName(setterPrefix);
@@ -808,13 +806,18 @@
/// The suffix list for the pattern:
///
- /// $<N>$namedParam1...$namedParam<M>
+ /// $<T>$<N>$namedParam1...$namedParam<M>
+ ///
+ /// Where <T> is the number of type arguments, <N> is the number of positional
+ /// arguments and <M> is the number of named arguments.
+ ///
+ /// If there are no type arguments the `$<T>` is omitted.
///
/// This is used for the annotated names of `call`, and for the proposed name
/// for other instance methods.
- List<String> callSuffixForStructure(CallStructure callStructure) {
+ static List<String> callSuffixForStructure(CallStructure callStructure) {
List<String> suffixes = [];
- if (_options.strongMode) {
+ if (callStructure.typeArgumentCount > 0) {
suffixes.add('${callStructure.typeArgumentCount}');
}
suffixes.add('${callStructure.argumentCount}');
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 3702cd3..90cbe16 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -545,12 +545,15 @@
}
bool localFunctionNeedsSignature(Local function) {
+ // This function should not be called when the compiler is using the new FE
+ // (--use-kernel). As an invariant, localFunctionsNeedingSignature is always
+ // null when --use-kernel is true.
if (localFunctionsNeedingSignature == null) {
- // [localFunctionNeedsRti] is only used by the old frontend.
- throw new UnsupportedError('RuntimeTypesNeed.localFunctionsNeedingRti');
+ throw new UnsupportedError(
+ 'RuntimeTypesNeed.localFunctionNeedingSignature with --use-kernel');
}
- return localFunctionsNeedingSignature.contains(function) ||
- _backendUsage.isRuntimeTypeUsed;
+ return _backendUsage.isRuntimeTypeUsed ||
+ localFunctionsNeedingSignature.contains(function);
}
@override
@@ -1398,9 +1401,10 @@
final CommonElements commonElements;
final TypeRepresentationGenerator _representationGenerator;
- RuntimeTypesEncoderImpl(
- this.namer, this._elementEnvironment, this.commonElements)
- : _representationGenerator = new TypeRepresentationGenerator(namer);
+ RuntimeTypesEncoderImpl(this.namer, this._elementEnvironment,
+ this.commonElements, bool strongMode)
+ : _representationGenerator =
+ new TypeRepresentationGenerator(namer, strongMode);
@override
bool isSimpleFunctionType(FunctionType type) {
@@ -1424,8 +1428,6 @@
jsAst.Expression getTypeRepresentation(
Emitter emitter, DartType type, OnVariableCallback onVariable,
[ShouldEncodeTypedefCallback shouldEncodeTypedef]) {
- // GENERIC_METHODS: When generic method support is complete enough to
- // include a runtime value for method type variables this must be updated.
return _representationGenerator.getTypeRepresentation(
emitter, type, onVariable, shouldEncodeTypedef);
}
@@ -1575,12 +1577,14 @@
class TypeRepresentationGenerator
implements ResolutionDartTypeVisitor<jsAst.Expression, Emitter> {
final Namer namer;
+ // If true, compile using strong mode.
+ final bool _strongMode;
OnVariableCallback onVariable;
ShouldEncodeTypedefCallback shouldEncodeTypedef;
Map<TypeVariableType, jsAst.Expression> typedefBindings;
List<FunctionTypeVariable> functionTypeVariables = <FunctionTypeVariable>[];
- TypeRepresentationGenerator(this.namer);
+ TypeRepresentationGenerator(this.namer, this._strongMode);
/**
* Creates a type representation for [type]. [onVariable] is called to provide
@@ -1615,10 +1619,7 @@
jsAst.Expression visitTypeVariableType(
TypeVariableType type, Emitter emitter) {
- if (type.element.typeDeclaration is! ClassEntity) {
- /// A [TypeVariableType] from a generic method is replaced by a
- /// [DynamicType].
- /// GENERIC_METHODS: Temporary, only used with '--generic-method-syntax'.
+ if (!_strongMode && type.element.typeDeclaration is! ClassEntity) {
return getDynamicValue();
}
if (typedefBindings != null) {
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index 2eccc93..751aa63 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -14,8 +14,7 @@
import '../common/names.dart' show Identifiers;
import '../common_elements.dart' show CommonElements, ElementEnvironment;
import '../deferred_load.dart' show OutputUnit, OutputUnitData;
-import '../elements/elements.dart'
- show ClassElement, MethodElement, MixinApplicationElement;
+import '../elements/elements.dart' show ClassElement, MethodElement;
import '../elements/entities.dart';
import '../elements/types.dart';
import '../js/js.dart' as jsAst;
@@ -322,7 +321,7 @@
supertypesNeedSubstitutions = true;
}
- if (cls is MixinApplicationElement) {
+ if (_elementEnvironment.isMixinApplication(cls)) {
supertypesNeedSubstitutions = true;
}
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart
index b50699f..30d7a36 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -93,8 +93,15 @@
/// with the stated type.
final bool _addTypeChecks;
+ /// If true, we are compiling using strong mode, and therefore we will create
+ /// a "signatureMethod" for a closure that can output the type. In this
+ /// instance, we may need access to a type variable that has not otherwise
+ /// been captured, and therefore we need to mark it as being used so that the
+ /// RTI optimization doesn't optimize it away..
+ final bool _strongMode;
+
KernelClosureConversionTask(Measurer measurer, this._elementMap,
- this._globalLocalsMap, this._addTypeChecks)
+ this._globalLocalsMap, this._addTypeChecks, this._strongMode)
: super(measurer);
/// The combined steps of generating our intermediate representation of
@@ -110,13 +117,16 @@
void _updateScopeBasedOnRtiNeed(
KernelScopeInfo scope,
ir.Node node,
- bool Function(ir.Node) localFunctionNeedsSignature,
bool Function(ClassEntity) classNeedsTypeArguments,
bool Function(MemberEntity) methodNeedsTypeArguments,
bool Function(ir.Node) localFunctionNeedsTypeArguments,
MemberEntity outermostEntity) {
if (scope.thisUsedAsFreeVariableIfNeedsRti &&
- classNeedsTypeArguments(outermostEntity.enclosingClass)) {
+ (classNeedsTypeArguments(outermostEntity.enclosingClass) ||
+ // TODO(johnniwinther): Instead of _strongMode, make this branch test
+ // if an added signature method needs type arguments (see comment in
+ // TypeVariableKind.method branch below.
+ _strongMode)) {
scope.thisUsedAsFreeVariable = true;
}
if (_addTypeChecks) {
@@ -133,7 +143,18 @@
break;
case TypeVariableKind.method:
if (methodNeedsTypeArguments(
- _elementMap.getMember(typeVariable.typeDeclaration))) {
+ _elementMap.getMember(typeVariable.typeDeclaration)) ||
+ // In Dart 2, we have the notion of generic methods. This is
+ // partly implemented by adding a "method signature" function to
+ // closure classes. This signature reports the type of the
+ // method, and therefore may access the type variable of the
+ // parameter, which might otherwise not be used (and therefore
+ // isn't captured in the set that `methodNeedsTypeArguments`
+ // compares against.
+ // TODO(johnniwinther): Include this reasoning inside
+ // [methodNeedsTypeArguments] rather than an add on here.
+ _strongMode &&
+ scope.freeVariablesForRti.contains(typeVariable)) {
scope.freeVariables.add(typeVariable);
}
break;
@@ -168,14 +189,8 @@
.forEach((ir.Node node, KernelCapturedScope scope) {
Map<Local, JRecordField> boxedVariables =
_elementMap.makeRecordContainer(scope, member, localsMap);
- _updateScopeBasedOnRtiNeed(
- scope,
- node,
- localFunctionNeedsSignature,
- classNeedsTypeArguments,
- methodNeedsTypeArguments,
- localFunctionNeedsTypeArguments,
- member);
+ _updateScopeBasedOnRtiNeed(scope, node, classNeedsTypeArguments,
+ methodNeedsTypeArguments, localFunctionNeedsTypeArguments, member);
if (scope is KernelCapturedLoopScope) {
_capturedScopesMap[node] = new JsCapturedLoopScope.from(
@@ -204,7 +219,6 @@
functionNode,
closuresToGenerate[node],
allBoxedVariables,
- localFunctionNeedsSignature,
classNeedsTypeArguments,
methodNeedsTypeArguments,
localFunctionNeedsTypeArguments);
@@ -229,18 +243,11 @@
ir.FunctionNode node,
KernelScopeInfo info,
Map<Local, JRecordField> boxedVariables,
- bool Function(ir.Node) localFunctionNeedsSignature,
bool Function(ClassEntity) classNeedsTypeArguments,
bool Function(FunctionEntity) methodNeedsTypeArguments,
bool Function(ir.Node) localFunctionNeedsTypeArguments) {
- _updateScopeBasedOnRtiNeed(
- info,
- node.parent,
- localFunctionNeedsSignature,
- classNeedsTypeArguments,
- methodNeedsTypeArguments,
- localFunctionNeedsTypeArguments,
- member);
+ _updateScopeBasedOnRtiNeed(info, node.parent, classNeedsTypeArguments,
+ methodNeedsTypeArguments, localFunctionNeedsTypeArguments, member);
KernelToLocalsMap localsMap = _globalLocalsMap.getLocalsMap(member);
KernelClosureClassInfo closureClassInfo =
closedWorldBuilder.buildClosureClass(
@@ -372,7 +379,9 @@
String toString() {
StringBuffer sb = new StringBuffer();
sb.write('this=$hasThisLocal,');
+ sb.write('freeVriables=$freeVariables,');
sb.write('localsUsedInTryOrSync={${localsUsedInTryOrSync.join(', ')}}');
+ sb.write('freeVariablesForRti={${freeVariablesForRti.join(', ')}}');
return sb.toString();
}
}
@@ -818,6 +827,10 @@
/// Collected [ScopeInfo] data for nodes.
Map<ir.TreeNode, KernelScopeInfo> closuresToGenerate =
<ir.TreeNode, KernelScopeInfo>{};
+
+ String toString() {
+ return '$scopeInfo\n$capturedScopesMap\n$closuresToGenerate';
+ }
}
enum TypeVariableKind { cls, method, local, function }
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 6efd179..f3db942 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -73,8 +73,12 @@
_compiler.reporter, _compiler.environment, strategy.elementMap);
_elementEnvironment = _elementMap.elementEnvironment;
_commonElements = _elementMap.commonElements;
- _closureDataLookup = new KernelClosureConversionTask(_compiler.measurer,
- _elementMap, _globalLocalsMap, _compiler.options.enableTypeAssertions);
+ _closureDataLookup = new KernelClosureConversionTask(
+ _compiler.measurer,
+ _elementMap,
+ _globalLocalsMap,
+ _compiler.options.enableTypeAssertions,
+ _compiler.options.strongMode);
JsClosedWorldBuilder closedWorldBuilder = new JsClosedWorldBuilder(
_elementMap, _closureDataLookup, _compiler.options);
return closedWorldBuilder._convertClosedWorld(
@@ -293,20 +297,18 @@
localFunctionsNodesNeedingTypeArguments.add(localFunction.node);
}
- Set<ClassEntity> classesNeedingTypeArguments =
- map.toBackendClassSet(kernelRtiNeed.classesNeedingTypeArguments);
-
- Set<FunctionEntity> methodsNeedingTypeArguments =
- map.toBackendFunctionSet(kernelRtiNeed.methodsNeedingTypeArguments);
-
+ RuntimeTypesNeedImpl jRtiNeed =
+ _convertRuntimeTypesNeed(map, backendUsage, kernelRtiNeed);
callMethods = _closureConversionTask.createClosureEntities(
this, map.toBackendMemberMap(closureModels, identity),
- localFunctionNeedsSignature:
- localFunctionsNodesNeedingSignature.contains,
- classNeedsTypeArguments: classesNeedingTypeArguments.contains,
- methodNeedsTypeArguments: methodsNeedingTypeArguments.contains,
- localFunctionNeedsTypeArguments:
- localFunctionsNodesNeedingTypeArguments.contains);
+ localFunctionNeedsSignature: backendUsage.isRuntimeTypeUsed
+ ? (_) => true
+ : localFunctionsNodesNeedingSignature.contains,
+ classNeedsTypeArguments: jRtiNeed.classNeedsTypeArguments,
+ methodNeedsTypeArguments: jRtiNeed.methodNeedsTypeArguments,
+ localFunctionNeedsTypeArguments: backendUsage.isRuntimeTypeUsed
+ ? (_) => true
+ : localFunctionsNodesNeedingTypeArguments.contains);
List<FunctionEntity> callMethodsNeedingSignature = <FunctionEntity>[];
for (ir.Node node in localFunctionsNodesNeedingSignature) {
@@ -318,15 +320,11 @@
callMethodsNeedingTypeArguments
.add(_closureConversionTask.getClosureInfo(node).callMethod);
}
+ jRtiNeed.methodsNeedingSignature.addAll(callMethodsNeedingSignature);
+ jRtiNeed.methodsNeedingTypeArguments
+ .addAll(callMethodsNeedingTypeArguments);
- rtiNeed = _convertRuntimeTypesNeed(
- map,
- backendUsage,
- kernelRtiNeed,
- callMethodsNeedingSignature,
- callMethodsNeedingTypeArguments,
- classesNeedingTypeArguments,
- methodsNeedingTypeArguments);
+ rtiNeed = jRtiNeed;
}
NoSuchMethodDataImpl oldNoSuchMethodData = closedWorld.noSuchMethodData;
@@ -496,18 +494,14 @@
interceptorData.classesMixedIntoInterceptedClasses));
}
- RuntimeTypesNeed _convertRuntimeTypesNeed(
- JsToFrontendMap map,
- BackendUsage backendUsage,
- RuntimeTypesNeedImpl rtiNeed,
- List<FunctionEntity> callMethodsNeedingSignature,
- List<FunctionEntity> callMethodsNeedingTypeArguments,
- Set<ClassEntity> classesNeedingTypeArguments,
- Set<FunctionEntity> methodsNeedingTypeArguments) {
+ RuntimeTypesNeed _convertRuntimeTypesNeed(JsToFrontendMap map,
+ BackendUsage backendUsage, RuntimeTypesNeedImpl rtiNeed) {
+ Set<ClassEntity> classesNeedingTypeArguments =
+ map.toBackendClassSet(rtiNeed.classesNeedingTypeArguments);
+ Set<FunctionEntity> methodsNeedingTypeArguments =
+ map.toBackendFunctionSet(rtiNeed.methodsNeedingTypeArguments);
Set<FunctionEntity> methodsNeedingSignature =
map.toBackendFunctionSet(rtiNeed.methodsNeedingSignature);
- methodsNeedingSignature.addAll(callMethodsNeedingSignature);
- methodsNeedingTypeArguments.addAll(callMethodsNeedingTypeArguments);
Set<ClassEntity> classesUsingTypeVariableExpression =
map.toBackendClassSet(rtiNeed.classesUsingTypeVariableLiterals);
return new RuntimeTypesNeedImpl(
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index f71d749..30499d6 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -2501,7 +2501,7 @@
_buildClosureClassFields(closureClassInfo, member, memberThisType, info,
localsMap, recordFieldsVisibleInScope, memberMap);
- if (options.addMethodSignatures) {
+ if (options.strongMode) {
_constructSignatureMethod(closureClassInfo, memberMap, node,
memberThisType, location, typeVariableAccess);
}
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart
index ed2fb89..782c999 100644
--- a/pkg/compiler/lib/src/kernel/env.dart
+++ b/pkg/compiler/lib/src/kernel/env.dart
@@ -579,11 +579,18 @@
!elementMap.options.strongMode) {
_typeVariables = const <TypeVariableType>[];
} else {
- _typeVariables = functionNode.typeParameters
- .map<TypeVariableType>((ir.TypeParameter typeParameter) {
- return elementMap
- .getDartType(new ir.TypeParameterType(typeParameter));
- }).toList();
+ ir.TreeNode parent = functionNode.parent;
+ if (parent is ir.Constructor ||
+ (parent is ir.Procedure &&
+ parent.kind == ir.ProcedureKind.Factory)) {
+ _typeVariables = const <TypeVariableType>[];
+ } else {
+ _typeVariables = functionNode.typeParameters
+ .map<TypeVariableType>((ir.TypeParameter typeParameter) {
+ return elementMap
+ .getDartType(new ir.TypeParameterType(typeParameter));
+ }).toList();
+ }
}
}
return _typeVariables;
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index db380bc..3602620 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -259,12 +259,6 @@
/// This is an experimental feature.
final String experimentalAllocationsPath;
- /// Add signatures to closures that return the type of the original closure
- /// call. Currently hidden behind a flag because this interacts with generic
- /// function types and strong mode, hitting some edge cases that have not yet
- /// been implemented.
- final bool addMethodSignatures;
-
// -------------------------------------------------
// Options for deprecated features
// -------------------------------------------------
@@ -345,7 +339,6 @@
sourceMapUri: _extractUriOption(options, '--source-map='),
strips: _extractCsvOption(options, '--force-strip='),
strongMode: _hasOption(options, Flags.strongMode),
- addMethodSignatures: _hasOption(options, Flags.addMethodSignatures),
testMode: _hasOption(options, Flags.testMode),
trustJSInteropTypeAnnotations:
_hasOption(options, Flags.trustJSInteropTypeAnnotations),
@@ -414,7 +407,6 @@
Uri sourceMapUri: null,
List<String> strips: const [],
bool strongMode: false,
- bool addMethodSignatures: false,
bool testMode: false,
bool trustJSInteropTypeAnnotations: false,
bool trustPrimitives: false,
@@ -498,7 +490,6 @@
sourceMapUri: sourceMapUri,
strips: strips,
strongMode: strongMode,
- addMethodSignatures: addMethodSignatures,
testMode: testMode,
trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations,
trustPrimitives: trustPrimitives,
@@ -554,7 +545,6 @@
this.sourceMapUri: null,
this.strips: const [],
this.strongMode: false,
- this.addMethodSignatures: false,
this.testMode: false,
this.trustJSInteropTypeAnnotations: false,
this.trustPrimitives: false,
@@ -618,7 +608,6 @@
sourceMapUri,
strips,
strongMode,
- addMethodSignatures,
testMode,
trustJSInteropTypeAnnotations,
trustPrimitives,
@@ -689,7 +678,6 @@
sourceMapUri: sourceMapUri ?? options.sourceMapUri,
strips: strips ?? options.strips,
strongMode: strongMode ?? options.strongMode,
- addMethodSignatures: addMethodSignatures ?? options.addMethodSignatures,
testMode: testMode ?? options.testMode,
trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations ??
options.trustJSInteropTypeAnnotations,
diff --git a/pkg/compiler/lib/src/parser/member_listener.dart b/pkg/compiler/lib/src/parser/member_listener.dart
index 38b9548..7846f70 100644
--- a/pkg/compiler/lib/src/parser/member_listener.dart
+++ b/pkg/compiler/lib/src/parser/member_listener.dart
@@ -68,8 +68,9 @@
}
@override
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
- super.endMethod(getOrSet, beginToken, endToken);
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
+ super.endMethod(getOrSet, beginToken, beginParam, endToken);
FunctionExpression method = popNode();
pushNode(null);
bool isConstructor = isConstructorName(method.name);
diff --git a/pkg/compiler/lib/src/parser/node_listener.dart b/pkg/compiler/lib/src/parser/node_listener.dart
index eba0594..7fb0704 100644
--- a/pkg/compiler/lib/src/parser/node_listener.dart
+++ b/pkg/compiler/lib/src/parser/node_listener.dart
@@ -744,7 +744,8 @@
}
@override
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
Statement body = popNode();
AsyncModifier asyncModifier = popNode();
NodeList initializers = popNode();
diff --git a/pkg/compiler/lib/src/parser/partial_elements.dart b/pkg/compiler/lib/src/parser/partial_elements.dart
index f3b2551..8207794 100644
--- a/pkg/compiler/lib/src/parser/partial_elements.dart
+++ b/pkg/compiler/lib/src/parser/partial_elements.dart
@@ -94,9 +94,9 @@
if (cachedNode != null) return cachedNode;
parseFunction(Parser p) {
if (isClassMember) {
- p.parseMember(beginToken);
+ p.parseClassMember(beginToken);
} else {
- p.parseTopLevelMember(p.syntheticPreviousToken(beginToken));
+ p.parseTopLevelMemberImpl(p.syntheticPreviousToken(beginToken));
}
}
@@ -242,7 +242,7 @@
DiagnosticReporter reporter = parsing.reporter;
reporter.withCurrentElement(element, () {
definitions = parse(parsing, element, declarationSite,
- (Parser parser) => parser.parseMember(beginToken));
+ (Parser parser) => parser.parseClassMember(beginToken));
if (!hasParseError &&
!definitions.modifiers.isVar &&
diff --git a/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
index 760482f..3983391 100644
--- a/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart
@@ -523,10 +523,10 @@
return node;
case AstKind.FACTORY:
Token beginToken = readBeginToken();
- return doParse((parser) => parser.parseMember(beginToken));
+ return doParse((parser) => parser.parseClassMember(beginToken));
case AstKind.FIELD:
Token beginToken = readBeginToken();
- return doParse((parser) => parser.parseMember(beginToken));
+ return doParse((parser) => parser.parseClassMember(beginToken));
case AstKind.FUNCTION:
Token beginToken = readBeginToken();
int getOrSetOffset =
@@ -542,7 +542,7 @@
}
}
return doParse((parser) {
- parser.parseMember(beginToken);
+ parser.parseClassMember(beginToken);
});
}
}
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 8d18334..7c42e2c 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -3130,11 +3130,12 @@
if (isFixedListConstructorCall) {
assert(
- arguments.length == 1,
+ // Arguments may include the type.
+ arguments.length == 1 || arguments.length == 2,
failedAt(
function,
"Unexpected arguments. "
- "Expected 1 argument, actual: $arguments."));
+ "Expected 1-2 argument, actual: $arguments."));
HInstruction lengthInput = arguments.first;
if (!lengthInput.isNumber(closedWorld)) {
HTypeConversion conversion = new HTypeConversion(
@@ -3167,7 +3168,8 @@
resultType = inferredType.containsAll(closedWorld)
? commonMasks.fixedListType
: inferredType;
- HForeignCode foreign = new HForeignCode(code, resultType, arguments,
+ HForeignCode foreign = new HForeignCode(
+ code, resultType, <HInstruction>[lengthInput],
nativeBehavior: behavior,
throwBehavior: canThrow
? native.NativeThrowBehavior.MAY
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart
index c005b86..5a87372 100644
--- a/pkg/compiler/lib/src/ssa/type_builder.dart
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart
@@ -103,7 +103,7 @@
{SourceInformation sourceInformation}) {
assert(assertTypeInContext(type));
if (type.element.typeDeclaration is! ClassEntity &&
- !builder.options.strongMode) {
+ (!builder.options.strongMode || !builder.options.useKernel)) {
// GENERIC_METHODS: We currently don't reify method type variables.
return builder.graph.addConstantNull(builder.closedWorld);
}
@@ -218,9 +218,10 @@
List<HInstruction> inputs = <HInstruction>[];
argument.forEachTypeVariable((TypeVariableType variable) {
- if (variable.element.typeDeclaration is ClassEntity) {
- // GENERIC_METHODS: We currently only reify class type variables but not
- // method type variables.
+ if (variable.element.typeDeclaration is ClassEntity ||
+ (builder.options.strongMode && builder.options.useKernel)) {
+ // TODO(johnniwinther): Also make this conditional on whether we have
+ // calculated we need that particular method signature.
inputs.add(analyzeTypeArgument(variable, sourceElement));
}
});
diff --git a/pkg/compiler/lib/src/util/emptyset.dart b/pkg/compiler/lib/src/util/emptyset.dart
index 728e902..d37b0c4 100644
--- a/pkg/compiler/lib/src/util/emptyset.dart
+++ b/pkg/compiler/lib/src/util/emptyset.dart
@@ -9,6 +9,13 @@
class ImmutableEmptySet<E> extends IterableBase<E> implements Set<E> {
const ImmutableEmptySet();
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R> ? self : this.retype<R>();
+ }
+
+ Set<R> retype<R>() => new ImmutableEmptySet<R>();
+
get iterator => const _EmptySetIterator();
int get length => 0;
bool get isEmpty => true;
@@ -33,12 +40,12 @@
Set<E> union(Set<E> other) => new Set.from(other);
Set<E> intersection(Set<Object> other) => this;
Set<E> difference(Set<Object> other) => this;
- Set<E> toSet() => new Set();
+ Set<E> toSet() => new Set<E>();
}
-class _EmptySetIterator<E> implements Iterator<E> {
+class _EmptySetIterator implements Iterator<Null> {
const _EmptySetIterator();
- E get current => null;
+ Null get current => null;
bool moveNext() => false;
}
diff --git a/pkg/compiler/lib/src/util/setlet.dart b/pkg/compiler/lib/src/util/setlet.dart
index 3d8da64..27e7a86 100644
--- a/pkg/compiler/lib/src/util/setlet.dart
+++ b/pkg/compiler/lib/src/util/setlet.dart
@@ -4,9 +4,9 @@
library dart2js.util.setlet;
-import 'dart:collection' show IterableBase;
+import 'dart:collection' show SetBase;
-class Setlet<E> extends IterableBase<E> implements Set<E> {
+class Setlet<E> extends SetBase<E> {
static const _SetletMarker _MARKER = const _SetletMarker();
static const int CAPACITY = 8;
@@ -27,6 +27,10 @@
addAll(elements);
}
+ static Set<R> _newSet<R>() => new Setlet<R>();
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this, newSet: _newSet);
+
Iterator<E> get iterator {
if (_extra == null) {
return new _SetletSingleIterator<E>(_contents);
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index d33e9e7..113a2ed 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -245,13 +245,14 @@
/// the smallest number that makes it not appear in [usedNames].
///
/// Adds the result to [usedNames].
-String makeUnique(String suggestedName, Set<String> usedNames) {
+String makeUnique(String suggestedName, Set<String> usedNames,
+ [String separator = '']) {
String result = suggestedName;
if (usedNames.contains(suggestedName)) {
int counter = 0;
while (usedNames.contains(result)) {
counter++;
- result = "$suggestedName$counter";
+ result = "$suggestedName$separator$counter";
}
}
usedNames.add(result);
diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
index cd60f2f..056ae25 100644
--- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
@@ -164,7 +164,7 @@
/// The current function body being compiled.
FunctionBody _currentFunction;
- HashMap<TypeDefiningElement, AstNode> _declarationNodes;
+ Map<TypeDefiningElement, AstNode> _declarationNodes;
/// The stack of currently emitting elements, if generating top-level code
/// for them. This is not used when inside method bodies, because order does
@@ -2463,16 +2463,14 @@
}
var body = <JS.Statement>[];
- emitFieldInit(FieldElement f, Expression initializer,
- [AstNode sourceInfo]) {
+ emitFieldInit(FieldElement f, Expression initializer, AstNode hoverInfo) {
var access =
_classProperties.virtualFields[f] ?? _declareMemberName(f.getter);
var jsInit = _visitInitializer(initializer, f);
body.add(jsInit
- .toAssignExpression(js.call('this.#', [access])
- ..sourceInformation = sourceInfo == null ? f : null)
- .toStatement()
- ..sourceInformation = sourceInfo);
+ .toAssignExpression(
+ js.call('this.#', [access])..sourceInformation = hoverInfo)
+ .toStatement());
}
for (var field in fieldDecls) {
@@ -2485,21 +2483,23 @@
_constants.isFieldInitConstant(field)) {
continue;
}
- emitFieldInit(f, init);
+ emitFieldInit(f, init, field.name);
}
- // Run constructor field initializers such as `: foo = bar.baz`
if (ctor != null) {
+ // Run constructor parameter initializers such as `this.foo`
for (var p in ctor.parameters.parameters) {
var element = p.element;
if (element is FieldFormalParameterElement) {
- emitFieldInit(element.field, p.identifier);
+ emitFieldInit(element.field, p.identifier, p.identifier);
}
}
+ // Run constructor field initializers such as `: foo = bar.baz`
for (var init in ctor.initializers) {
if (init is ConstructorFieldInitializer) {
- emitFieldInit(init.fieldName.staticElement, init.expression, init);
+ var field = init.fieldName;
+ emitFieldInit(field.staticElement, init.expression, field);
} else if (init is AssertInitializer) {
body.add(_emitAssert(init.condition, init.message));
}
@@ -3500,7 +3500,7 @@
}
if (element is LocalVariableElement || element is ParameterElement) {
- return _emitSetLocal(element, right);
+ return _emitSetLocal(element, right, node);
}
if (element.enclosingElement is CompilationUnitElement) {
@@ -3519,7 +3519,7 @@
}
/// Emits assignment to a simple local variable or parameter.
- JS.Expression _emitSetLocal(Element element, Expression rhs) {
+ JS.Expression _emitSetLocal(Element element, Expression rhs, AstNode left) {
JS.Expression target;
if (element is TemporaryVariableElement) {
// If this is one of our compiler's temporary variables, use its JS form.
@@ -3529,7 +3529,7 @@
} else {
target = new JS.Identifier(element.name);
}
- target.sourceInformation = element;
+ target.sourceInformation = left;
return _visitExpression(rhs).toAssignExpression(target);
}
@@ -4072,7 +4072,7 @@
@override
JS.Statement visitExpressionStatement(ExpressionStatement node) =>
- node.expression.accept(this).toStatement()..sourceInformation = node;
+ node.expression.accept(this).toStatement();
@override
JS.EmptyStatement visitEmptyStatement(EmptyStatement node) =>
diff --git a/pkg/dev_compiler/lib/src/analyzer/source_map_printer.dart b/pkg/dev_compiler/lib/src/analyzer/source_map_printer.dart
index 20d4a7b..2b01425 100644
--- a/pkg/dev_compiler/lib/src/analyzer/source_map_printer.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/source_map_printer.dart
@@ -4,10 +4,7 @@
import 'dart:collection';
-import 'package:analyzer/dart/ast/ast.dart'
- show AstNode, CompilationUnit, Identifier;
-import 'package:analyzer/dart/element/element.dart'
- show Element, CompilationUnitElement;
+import 'package:analyzer/dart/ast/ast.dart' show AstNode, CompilationUnit;
import 'package:analyzer/src/generated/source.dart' show LineInfo;
import 'package:source_maps/source_maps.dart' hide Printer;
import 'package:source_span/source_span.dart' show SourceLocation;
@@ -54,37 +51,9 @@
}
void enterNode(JS.Node jsNode) {
- var srcInfo = jsNode.sourceInformation;
- if (srcInfo == null) return;
-
- int offset;
- int end;
- CompilationUnitElement unit;
- String identifier;
- if (srcInfo is AstNode) {
- if (srcInfo.isSynthetic) return;
- offset = srcInfo.offset;
- end = srcInfo.end;
- if (srcInfo is Identifier) {
- identifier = srcInfo.name;
- }
- if (_topLevelNode == null) {
- unit = (srcInfo.getAncestor((n) => n is CompilationUnit)
- as CompilationUnit)
- ?.element;
- }
- } else {
- var element = srcInfo as Element;
- if (element.isSynthetic) return;
- offset = element.nameOffset;
- end = offset + element.nameLength;
- identifier = element.name;
- if (identifier == '') identifier = null;
- if (_topLevelNode == null) {
- unit = element.getAncestor((n) => n is CompilationUnitElement);
- }
- }
-
+ var srcInfo = jsNode.sourceInformation as AstNode;
+ if (srcInfo == null || srcInfo.isSynthetic) return;
+ int offset = srcInfo.offset;
if (offset == -1) return;
// Make sure source locations are associated with the correct source file.
@@ -96,6 +65,11 @@
// This happens for synthetic nodes created by AstFactory.
// We don't need to mark positions for them because we'll have a position
// for the next thing down.
+
+ var unit =
+ (srcInfo.getAncestor((n) => n is CompilationUnit) as CompilationUnit)
+ ?.element;
+
if (unit == null) return;
if (unit.source.isInSystemLibrary) {
_sourceUri = unit.source.uri;
@@ -115,8 +89,8 @@
_lineInfo = unit.lineInfo;
}
- _mark(offset, identifier);
- _ends[jsNode] = end;
+ _mark(offset);
+ _ends[jsNode] = srcInfo.end;
}
void exitNode(JS.Node jsNode) {
@@ -132,7 +106,7 @@
}
}
- void _mark(int offset, [String identifier]) {
+ void _mark(int offset) {
if (_previousColumn == _column && _previousLine == _line) return;
var loc = _lineInfo.getLocation(offset);
@@ -145,17 +119,13 @@
}
_previousLine = _line;
_previousColumn = _column;
- // TODO(vsm): We suppress the identifier as it appears to confuse dev
- // tools when the identifier is renamed. Investigate if this is
- // ever worth doing.
- identifier = null;
sourceMap.addLocation(
new SourceLocation(offset,
sourceUrl: _sourceUri,
line: loc.lineNumber - 1,
column: loc.columnNumber - 1),
new SourceLocation(buffer.length, line: _line, column: _column),
- identifier);
+ null);
}
}
diff --git a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc.status b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc.status
index 954a843..3744224 100644
--- a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc.status
+++ b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddc.status
@@ -3,14 +3,11 @@
# BSD-style license that can be found in the LICENSE.md file.
/hello_sane_column_on_print_return_value: Crash
-/printing_class_fields: Crash
/printing_class_fields_step_into: Crash
/stops_at_ending_brace: Crash
/no_mapping_on_class_constructor_line: Crash
/no_mapping_on_class_named_constructor_line: Crash
-/next_through_assign_call_test: Crash
/hello_class_call: Crash
-/next_through_assign_call_test: Crash
/method_call_with_named_parameters: Crash
/method_call_with_named_parameters_no_given: Crash
/call_on_field_in_class: Crash
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
index 29ff1d0..546c00b 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
@@ -141,7 +141,8 @@
factory LinkedHashSet.identity() = _IdentityHashSet<E>;
}
-class _HashSet<E> extends _InternalSet<E> implements LinkedHashSet<E> {
+class _HashSet<E> extends _InternalSet<E>
+ implements HashSet<E>, LinkedHashSet<E> {
/// The backing store for this set.
///
/// Keys that use identity equality are stored directly. For other types of
@@ -174,6 +175,8 @@
Set<E> _newSet() => new _HashSet<E>();
+ Set<R> _newSimilarSet<R>() => new _HashSet<R>();
+
bool contains(Object key) {
if (key == null) {
key = null;
@@ -299,7 +302,8 @@
}
}
-class _IdentityHashSet<E> extends _InternalSet<E> implements LinkedHashSet<E> {
+class _IdentityHashSet<E> extends _InternalSet<E>
+ implements HashSet<E>, LinkedHashSet<E> {
/// The backing store for this set.
@notNull
final _map = JS('', 'new Set()');
@@ -311,6 +315,8 @@
Set<E> _newSet() => new _IdentityHashSet<E>();
+ Set<R> _newSimilarSet<R>() => new _IdentityHashSet<R>();
+
bool contains(Object element) {
return JS('', '#.has(#)', _map, element);
}
@@ -362,6 +368,8 @@
Set<E> _newSet() => new _CustomKeyHashSet<E>(_equals, _hashCode, _validKey);
+ Set<R> _newSimilarSet<R>() => new _HashSet<R>();
+
bool contains(Object element) {
// TODO(jmesserly): there is a subtle difference here compared to Dart 1.
// See the comment on CustomKeyHashMap.containsKey for more information.
@@ -382,7 +390,8 @@
}
}
-class _CustomHashSet<E> extends _InternalSet<E> implements LinkedHashSet<E> {
+class _CustomHashSet<E> extends _InternalSet<E>
+ implements HashSet<E>, LinkedHashSet<E> {
_Equality<E> _equals;
_Hasher<E> _hashCode;
@@ -409,6 +418,7 @@
_CustomHashSet(this._equals, this._hashCode);
Set<E> _newSet() => new _CustomHashSet<E>(_equals, _hashCode);
+ Set<R> _newSimilarSet<R>() => new _HashSet<R>();
bool contains(Object key) {
if (key is E) {
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
index fda27ec..5ef68a4 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
@@ -8,7 +8,7 @@
import 'dart:_foreign_helper' show JS;
import 'dart:_interceptors' show JSExtendableArray;
import 'dart:_internal' show MappedIterable, ListIterable;
-import 'dart:collection' show Maps, LinkedHashMap;
+import 'dart:collection' show Maps, LinkedHashMap, MapBase;
/**
* Parses [json] and builds the corresponding parsed JSON value.
@@ -123,7 +123,7 @@
return object;
}
-class _JsonMap implements Map<String, dynamic> {
+class _JsonMap extends MapBase<String, dynamic> {
// The original JavaScript object remains unchanged until
// the map is eventually upgraded, in which case we null it
// out to reclaim the memory used by it.
@@ -255,8 +255,6 @@
}
}
- String toString() => Maps.mapToString(this);
-
// ------------------------------------------
// Private helper methods.
// ------------------------------------------
diff --git a/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart b/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart
index d00ded1..3fa774e 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart
@@ -186,8 +186,6 @@
_modifications = (_modifications + 1) & 0x3ffffff;
}
}
-
- String toString() => Maps.mapToString(this);
}
typedef bool _Equality<K>(K a, K b);
diff --git a/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart b/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart
index b8dfc0d..8de3f2f 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart
@@ -89,8 +89,6 @@
_modifications = (_modifications + 1) & 0x3ffffff;
}
}
-
- String toString() => Maps.mapToString(this);
}
class _JSMapIterable<E> extends EfficientLengthIterable<E> {
diff --git a/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart
index 20941a0..15ee787 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart
@@ -1352,6 +1352,7 @@
final bool _once;
bool _inEventLoop = false;
int _handle;
+ int _tick = 0;
TimerImpl(int milliseconds, void callback()) : _once = true {
if (milliseconds == 0 && (!hasTimer() || _globalState.isWorker)) {
@@ -1377,6 +1378,7 @@
void internalCallback() {
_handle = null;
leaveJsAsync();
+ _tick = 1;
callback();
}
@@ -1394,7 +1396,16 @@
: _once = false {
if (hasTimer()) {
enterJsAsync();
+ int start = JS('int', 'Date.now()');
_handle = JS('int', '#.setInterval(#, #)', global, () {
+ int tick = this._tick + 1;
+ if (milliseconds > 0) {
+ int duration = JS('int', 'Date.now()') - start;
+ if (duration > (tick + 1) * milliseconds) {
+ tick = duration ~/ milliseconds;
+ }
+ }
+ this._tick = tick;
callback(this);
}, milliseconds);
} else {
@@ -1402,6 +1413,8 @@
}
}
+ int get tick => _tick;
+
void cancel() {
if (hasTimer()) {
if (_inEventLoop) {
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_array.dart b/pkg/dev_compiler/tool/input_sdk/private/js_array.dart
index 5f353d3..714ad2a 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_array.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_array.dart
@@ -66,6 +66,13 @@
}
}
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<E, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<E, R>(this);
+
void add(E value) {
checkGrowable('add');
JS('void', r'#.push(#)', this, value);
@@ -286,7 +293,7 @@
throw IterableElementError.noElement();
}
- E singleWhere(bool test(E element)) {
+ E singleWhere(bool test(E element), {E orElse()}) {
int length = this.length;
E match = null;
bool matchFound = false;
@@ -306,6 +313,7 @@
}
}
if (matchFound) return match;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -589,6 +597,54 @@
Type get runtimeType =>
dart.wrapType(JS('', '#(#)', dart.getGenericClass(List), E));
+
+ Iterable<E> followedBy(Iterable<E> other) sync* {
+ yield* this;
+ yield* other;
+ }
+
+ Iterable<T> whereType<T>() sync* {
+ for (var i = 0; i < this.length; i++) {
+ var element = this[i];
+ if (element is T) yield element;
+ }
+ }
+
+ List<E> operator +(List<E> other) {
+ int totalLength = this.length + other.length;
+ return <E>[]
+ ..length = totalLength
+ ..setRange(0, this.length, this)
+ ..setRange(this.length, totalLength, other);
+ }
+
+ int indexWhere(bool test(E element), [int start = 0]) {
+ if (start >= this.length) return -1;
+ if (start < 0) start = 0;
+ for (int i = start; i < this.length; i++) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(E element), [int start]) {
+ if (start == null) start = this.length - 1;
+ if (start < 0) return -1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ void set first(E element) {
+ if (this.isEmpty) throw new RangeError.index(0, this);
+ this[0] = element;
+ }
+
+ void set last(E element) {
+ if (this.isEmpty) throw new RangeError.index(0, this);
+ this[this.length - 1] = element;
+ }
}
/**
diff --git a/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart b/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart
index a622970..8cc2af5 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart
@@ -7,8 +7,8 @@
part of dart._js_helper;
-/// Our internal LinkedHashMaps.
-abstract class InternalMap<K, V> implements LinkedHashMap<K, V> {
+abstract class InternalMap<K, V> extends MapBase<K, V>
+ implements LinkedHashMap<K, V>, HashMap<K, V> {
@notNull
get _map;
@@ -240,8 +240,6 @@
_modifications = (_modifications + 1) & 0x3ffffff;
}
}
-
- String toString() => Maps.mapToString(this);
}
@NoReifyGeneric()
diff --git a/pkg/dev_compiler/tool/input_sdk/private/preambles/d8.js b/pkg/dev_compiler/tool/input_sdk/private/preambles/d8.js
index c330ad8..0c432f5 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/preambles/d8.js
+++ b/pkg/dev_compiler/tool/input_sdk/private/preambles/d8.js
@@ -85,7 +85,7 @@
var id = timerIdCounter++;
f.$timerId = id;
timerIds[id] = f;
- if (ms == 0) {
+ if (ms == 0 && !isNextTimerDue()) {
zeroTimerQueue.push(f);
} else {
addDelayedTimer(f, ms);
@@ -134,7 +134,10 @@
var originalDate = Date;
var originalNow = originalDate.now;
function advanceTimeTo(time) {
- timeOffset = time - originalNow();
+ var now = originalNow();
+ if (timeOffset < time - now) {
+ timeOffset = time - now;
+ }
}
function installMockDate() {
var NewDate = function Date(Y, M, D, h, m, s, ms) {
@@ -179,6 +182,12 @@
}
}
+ function isNextTimerDue() {
+ if (timerHeap.length == 0) return false;
+ var head = timerHeap[0];
+ return head[0] < originalNow() + timeOffset;
+ }
+
function nextDelayedTimerQueue() {
if (timerHeap.length == 0) return null;
var result = timerHeap[0];
diff --git a/pkg/front_end/lib/src/fasta/builder/type_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_builder.dart
index 924d9cf..273009a 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_builder.dart
@@ -25,6 +25,12 @@
TypeBuilder subst(Map<TypeVariableBuilder, TypeBuilder> substitution) => this;
+ /// Clones the type builder recursively without binding the subterms to
+ /// existing declaration or type variable builders. All newly built types
+ /// are added to [newTypes], so that they can be added to a proper scope and
+ /// resolved later.
+ TypeBuilder clone(List<TypeBuilder> newTypes);
+
build(LibraryBuilder library);
buildInvalidType(int charOffset, Uri fileUri);
diff --git a/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart b/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart
index a7b5df7..465da46 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_variable_builder.dart
@@ -30,4 +30,6 @@
String toString() => "${printOn(new StringBuffer())}";
T asTypeBuilder();
+
+ TypeVariableBuilder clone(List<TypeBuilder> newTypes);
}
diff --git a/pkg/front_end/lib/src/fasta/dill/built_type_builder.dart b/pkg/front_end/lib/src/fasta/dill/built_type_builder.dart
index 2117d24..80e256a 100644
--- a/pkg/front_end/lib/src/fasta/dill/built_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/built_type_builder.dart
@@ -6,9 +6,10 @@
import 'package:kernel/ast.dart' show DartType, Supertype;
-import '../kernel/kernel_builder.dart' show KernelTypeBuilder, LibraryBuilder;
+import '../kernel/kernel_builder.dart'
+ show KernelTypeBuilder, LibraryBuilder, TypeBuilder;
-import '../problems.dart' show unimplemented;
+import '../problems.dart' show unimplemented, unsupported;
class BuiltTypeBuilder extends KernelTypeBuilder {
final DartType builtType;
@@ -35,4 +36,8 @@
String get name {
return unimplemented("name", -1, null);
}
+
+ BuiltTypeBuilder clone(List<TypeBuilder> newTypes) {
+ return unsupported("clone", -1, null);
+ }
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index e70282b..3228ddf 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -1125,9 +1125,16 @@
cls = cls.superclass;
if (cls == null) return null;
}
- return isSuper
+ Member target = isSuper
? hierarchy.getDispatchTarget(cls, name, setter: isSetter)
: hierarchy.getInterfaceMember(cls, name, setter: isSetter);
+ if (isSuper &&
+ target == null &&
+ library.loader.target.backendTarget.enableSuperMixins &&
+ classBuilder.isAbstract) {
+ target = hierarchy.getInterfaceMember(cls, name, setter: isSetter);
+ }
+ return target;
}
@override
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart
index a682a2d..0f119bf 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart
@@ -25,6 +25,7 @@
KernelTypeBuilder,
KernelTypeVariableBuilder,
LibraryBuilder,
+ TypeBuilder,
TypeVariableBuilder;
class KernelFunctionTypeBuilder extends FunctionTypeBuilder
@@ -83,4 +84,21 @@
buildInvalidType(int charOffset, Uri fileUri) {
return unsupported("buildInvalidType", charOffset, fileUri);
}
+
+ KernelFunctionTypeBuilder clone(List<TypeBuilder> newTypes) {
+ List<TypeVariableBuilder> clonedTypeVariables =
+ new List<TypeVariableBuilder>(typeVariables.length);
+ for (int i = 0; i < clonedTypeVariables.length; i++) {
+ clonedTypeVariables[i] = typeVariables[i].clone(newTypes);
+ }
+ List<FormalParameterBuilder> clonedFormals =
+ new List<FormalParameterBuilder>(formals.length);
+ for (int i = 0; i < clonedFormals.length; i++) {
+ clonedFormals[i] = formals[i].clone(newTypes);
+ }
+ KernelFunctionTypeBuilder newType = new KernelFunctionTypeBuilder(
+ returnType.clone(newTypes), clonedTypeVariables, clonedFormals);
+ newTypes.add(newType);
+ return newType;
+ }
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index ec69a92..102d448 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -78,6 +78,7 @@
Scope,
TypeBuilder,
TypeVariableBuilder,
+ UnresolvedType,
VoidTypeBuilder,
compareProcedures,
toKernelCombinators;
@@ -678,7 +679,9 @@
staticMask | modifiers,
returnType,
procedureName,
- <TypeVariableBuilder>[],
+ copyTypeVariables(
+ currentDeclaration.typeVariables ?? <TypeVariableBuilder>[],
+ factoryDeclaration),
formals,
ProcedureKind.Factory,
this,
@@ -693,7 +696,15 @@
procedure.target, documentationComment);
metadataCollector?.setConstructorNameOffset(procedure.target, name);
- currentDeclaration.addFactoryDeclaration(procedure, factoryDeclaration);
+ DeclarationBuilder<TypeBuilder> savedDeclaration = currentDeclaration;
+ currentDeclaration = factoryDeclaration;
+ for (TypeVariableBuilder tv in procedure.typeVariables) {
+ KernelNamedTypeBuilder t = procedure.returnType;
+ t.arguments.add(addNamedType(tv.name, null, procedure.charOffset));
+ }
+ currentDeclaration = savedDeclaration;
+
+ factoryDeclaration.resolveTypes(procedure.typeVariables, this);
addBuilder(procedureName, procedure, charOffset);
if (nativeMethodName != null) {
addNativeMethod(procedure);
@@ -1010,23 +1021,17 @@
}
List<TypeVariableBuilder> copyTypeVariables(
- List<TypeVariableBuilder> original) {
+ List<TypeVariableBuilder> original, DeclarationBuilder declaration) {
+ List<TypeBuilder> newTypes = <TypeBuilder>[];
List<TypeVariableBuilder> copy = <TypeVariableBuilder>[];
for (KernelTypeVariableBuilder variable in original) {
- var newVariable = new KernelTypeVariableBuilder(
- variable.name, this, variable.charOffset);
+ var newVariable = new KernelTypeVariableBuilder(variable.name, this,
+ variable.charOffset, variable.bound?.clone(newTypes));
copy.add(newVariable);
boundlessTypeVariables.add(newVariable);
}
- Map<TypeVariableBuilder, TypeBuilder> substitution =
- <TypeVariableBuilder, TypeBuilder>{};
- int i = 0;
- for (KernelTypeVariableBuilder variable in original) {
- substitution[variable] = copy[i++].asTypeBuilder();
- }
- i = 0;
- for (KernelTypeVariableBuilder variable in original) {
- copy[i++].bound = variable.bound?.subst(substitution);
+ for (TypeBuilder newType in newTypes) {
+ declaration.addType(new UnresolvedType(newType, -1, null));
}
return copy;
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_mixin_application_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_mixin_application_builder.dart
index bd92c44..47306fd 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_mixin_application_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_mixin_application_builder.dart
@@ -13,6 +13,7 @@
KernelTypeBuilder,
LibraryBuilder,
MixinApplicationBuilder,
+ TypeBuilder,
TypeVariableBuilder;
class KernelMixinApplicationBuilder
@@ -43,4 +44,10 @@
buildInvalidType(int charOffset, Uri fileUri) {
return unsupported("buildInvalidType", charOffset, fileUri);
}
+
+ KernelMixinApplicationBuilder clone(List<TypeBuilder> newTypes) {
+ int charOffset = -1; // TODO(dmitryas): Provide these.
+ Uri fileUri = null; // TODO(dmitryas): Provide these.
+ return unsupported("clone", charOffset, fileUri);
+ }
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
index 9a45b86..dd6bbd1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
@@ -77,4 +77,18 @@
}
return this;
}
+
+ KernelNamedTypeBuilder clone(List<TypeBuilder> newTypes) {
+ List<KernelTypeBuilder> clonedArguments;
+ if (arguments != null) {
+ clonedArguments = new List<KernelTypeBuilder>(arguments.length);
+ for (int i = 0; i < clonedArguments.length; i++) {
+ clonedArguments[i] = arguments[i].clone(newTypes);
+ }
+ }
+ KernelNamedTypeBuilder newType =
+ new KernelNamedTypeBuilder(name, clonedArguments);
+ newTypes.add(newType);
+ return newType;
+ }
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index 292034e..b1f8d42 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -1680,8 +1680,9 @@
void _inferStatement(ShadowTypeInferrer inferrer) {
inferrer.listener.returnStatementEnter(this);
var closureContext = inferrer.closureContext;
- var typeContext =
- !closureContext.isGenerator ? closureContext.returnContext : null;
+ var typeContext = !closureContext.isGenerator
+ ? closureContext.returnOrYieldContext
+ : null;
var inferredType = expression != null
? inferrer.inferExpression(expression, typeContext, true)
: const VoidType();
@@ -2471,7 +2472,7 @@
inferrer.listener.yieldStatementEnter(this);
var closureContext = inferrer.closureContext;
var typeContext =
- closureContext.isGenerator ? closureContext.returnContext : null;
+ closureContext.isGenerator ? closureContext.returnOrYieldContext : null;
if (isYieldStar && typeContext != null) {
typeContext = inferrer.wrapType(
typeContext,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 47bc3b4..0fff6fa 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -117,6 +117,8 @@
bool get disableTypeInference => backendTarget.disableTypeInference;
+ final bool excludeSource = !CompilerContext.current.options.embedSourceText;
+
KernelTarget(this.fileSystem, this.includeComments, DillTarget dillTarget,
UriTranslator uriTranslator,
{Map<Uri, Source> uriToSource, MetadataCollector metadataCollector})
@@ -350,10 +352,16 @@
/// Creates a program by combining [libraries] with the libraries of
/// `dillTarget.loader.program`.
Program link(List<Library> libraries, {CanonicalName nameRoot}) {
- Map<Uri, Source> uriToSource = new Map<Uri, Source>.from(this.uriToSource);
-
libraries.addAll(dillTarget.loader.libraries);
- uriToSource.addAll(dillTarget.loader.uriToSource);
+
+ Map<Uri, Source> uriToSource = new Map<Uri, Source>();
+ void copySource(Uri uri, Source source) {
+ uriToSource[uri] =
+ excludeSource ? new Source(source.lineStarts, const <int>[]) : source;
+ }
+
+ this.uriToSource.forEach(copySource);
+ dillTarget.loader.uriToSource.forEach(copySource);
Program program = new Program(
nameRoot: nameRoot, libraries: libraries, uriToSource: uriToSource);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart
index 867d27b..db58c93 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart
@@ -18,6 +18,7 @@
KernelNamedTypeBuilder,
KernelTypeBuilder,
LibraryBuilder,
+ TypeBuilder,
TypeVariableBuilder;
class KernelTypeVariableBuilder
@@ -76,4 +77,12 @@
void applyPatch(covariant KernelTypeVariableBuilder patch) {
patch.actualOrigin = this;
}
+
+ KernelTypeVariableBuilder clone(List<TypeBuilder> newTypes) {
+ // TODO(dmitryas): Figure out if using [charOffset] here is a good idea.
+ // An alternative is to use the offset of the node the cloned type variable
+ // is declared on.
+ return new KernelTypeVariableBuilder(
+ name, parent, charOffset, bound.clone(newTypes));
+ }
}
diff --git a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
index 0dab4fc..ccdefbb 100644
--- a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
@@ -707,8 +707,9 @@
}
@override
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
- listener?.endMethod(getOrSet, beginToken, endToken);
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
+ listener?.endMethod(getOrSet, beginToken, beginParam, endToken);
}
@override
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index eebba73..ce5ca69 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -638,7 +638,8 @@
/// - initializers
/// - async marker
/// - body
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
logEvent("Method");
}
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index dc031af..a0ea650 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -91,7 +91,7 @@
import 'type_continuation.dart'
show TypeContinuation, typeContinuationFromFormalParameterKind;
-import 'util.dart' show beforeCloseBraceTokenFor, closeBraceTokenFor, optional;
+import 'util.dart' show closeBraceTokenFor, optional;
/// An event generating parser of Dart programs. This parser expects all tokens
/// in a linked list (aka a token stream).
@@ -469,11 +469,11 @@
// TODO(danrubel): improve parseTopLevelMember
// so that we don't parse modifiers twice.
directiveState?.checkDeclaration();
- return parseTopLevelMember(start);
+ return parseTopLevelMemberImpl(start);
} else if (start.next != next) {
directiveState?.checkDeclaration();
// Handle the edge case where a modifier is being used as an identifier
- return parseTopLevelMember(start);
+ return parseTopLevelMemberImpl(start);
}
// Recovery
if (next.isOperator && optional('(', next.next)) {
@@ -485,7 +485,7 @@
next,
new SyntheticStringToken(TokenType.IDENTIFIER,
'#synthetic_function_${next.charOffset}', token.charOffset, 0));
- return parseTopLevelMember(next);
+ return parseTopLevelMemberImpl(next);
}
// Ignore any preceding modifiers and just report the unexpected token
listener.beginTopLevelMember(next);
@@ -533,7 +533,7 @@
if (next.isIdentifier || optional("void", next)) {
return parseTypedef(previous);
} else {
- return parseTopLevelMember(previous);
+ return parseTopLevelMemberImpl(previous);
}
} else {
// The remaining top level keywords are built-in keywords
@@ -545,7 +545,7 @@
identical(nextValue, '<') ||
identical(nextValue, '.')) {
directiveState?.checkDeclaration();
- return parseTopLevelMember(previous);
+ return parseTopLevelMemberImpl(previous);
} else if (identical(value, 'library')) {
directiveState?.checkLibrary(this, token);
return parseLibraryName(previous);
@@ -1884,13 +1884,21 @@
/// message based on the given [context]. Return the synthetic identifier that
/// was inserted.
Token insertSyntheticIdentifier(Token token, IdentifierContext context,
- [String stringValue]) {
+ {Message message, Token messageOnToken}) {
Token next = token.next;
- stringValue ??= '';
- Message message = context.recoveryTemplate.withArguments(next);
+ reportRecoverableError(messageOnToken ?? next,
+ message ?? context.recoveryTemplate.withArguments(next));
Token identifier = new SyntheticStringToken(
- TokenType.IDENTIFIER, stringValue, next.charOffset, 0);
- return rewriteAndRecover(token, message, identifier).next;
+ TokenType.IDENTIFIER,
+ context == IdentifierContext.methodDeclaration ||
+ context == IdentifierContext.topLevelVariableDeclaration ||
+ context == IdentifierContext.fieldDeclaration
+ ? '#synthetic_identifier_${next.offset}'
+ : '',
+ next.charOffset,
+ 0);
+ rewriter.insertTokenAfter(token, identifier);
+ return token.next;
}
/// Parse a simple identifier at the given [token], and return the identifier
@@ -1937,8 +1945,7 @@
token = next.next;
// Supply a non-empty method name so that it does not accidentally
// match the default constructor.
- token = insertSyntheticIdentifier(
- next, context, '#synthetic_method_name_${token.offset}');
+ token = insertSyntheticIdentifier(next, context);
} else if (context == IdentifierContext.topLevelVariableDeclaration ||
context == IdentifierContext.fieldDeclaration) {
// Since the token is not a keyword or identifier, consume it to
@@ -1946,8 +1953,7 @@
token = next.next;
// Supply a non-empty method name so that it does not accidentally
// match the default constructor.
- token = insertSyntheticIdentifier(
- next, context, '#synthetic_field_name_${token.offset}');
+ token = insertSyntheticIdentifier(next, context);
} else if (context == IdentifierContext.constructorReference) {
token = insertSyntheticIdentifier(token, context);
} else {
@@ -2084,7 +2090,7 @@
context == IdentifierContext.typeReferenceContinuation) {
followingValues = ['>', ')', ']', '}', ',', ';'];
} else if (context == IdentifierContext.typeVariableDeclaration) {
- followingValues = ['<', '>'];
+ followingValues = ['<', '>', ';', '}'];
} else {
return false;
}
@@ -2919,7 +2925,18 @@
return token;
}
+ /// Parse a top level field or function.
+ ///
+ /// This method is only invoked from outside the parser. As a result, this
+ /// method takes the next token to be consumed rather than the last consumed
+ /// token and returns the token after the last consumed token rather than the
+ /// last consumed token.
Token parseTopLevelMember(Token token) {
+ token = parseMetadataStar(syntheticPreviousToken(token));
+ return parseTopLevelMemberImpl(token).next;
+ }
+
+ Token parseTopLevelMemberImpl(Token token) {
Token beforeStart = token;
Token next = token.next;
listener.beginTopLevelMember(next);
@@ -3023,31 +3040,15 @@
} else if (!next.isIdentifier) {
// Recovery
if (next.isKeyword) {
- reportRecoverableErrorWithToken(
- next, fasta.templateExpectedIdentifier);
- rewriter.insertTokenAfter(
- next,
- new SyntheticStringToken(
- TokenType.IDENTIFIER,
- '#synthetic_identifier_${next.charOffset}',
- next.charOffset,
- 0));
- token = next;
- next = token.next;
+ // Fall through to parse the keyword as the identifier.
+ // ensureIdentifier will report the error.
} else if (token == beforeStart) {
// Ensure we make progress.
return reportInvalidTopLevelDeclaration(next);
} else {
// Looks like a declaration missing an identifier.
// Insert synthetic identifier and fall through.
- rewriteAndRecover(
- token,
- fasta.templateExpectedIdentifier.withArguments(next),
- new SyntheticStringToken(
- TokenType.IDENTIFIER,
- '#synthetic_identifier_${next.charOffset}',
- next.charOffset,
- 0));
+ insertSyntheticIdentifier(token, IdentifierContext.methodDeclaration);
next = token.next;
}
}
@@ -3205,185 +3206,6 @@
}
}
- /// Looks ahead to find the name of a member. Returns a link of tokens
- /// immediately before the modifiers, set/get, (operator) name, and either the
- /// start of the method body or the end of the declaration.
- ///
- /// Examples:
- ///
- /// int get foo;
- /// results in the tokens before
- /// [';', 'foo', 'get', 'int']
- ///
- ///
- /// static const List<int> foo = null;
- /// results in the tokens before
- /// ['=', 'foo', 'List', 'const', 'static']
- ///
- ///
- /// get foo async* { return null }
- /// results in the tokens before
- /// ['{', 'foo', 'get']
- ///
- ///
- /// operator *(arg) => null;
- /// results in the tokens before
- /// ['(', '*', 'operator']
- ///
- Link<Token> findMemberName(Token token) {
- // TODO(ahe): This method is rather broken for examples like this:
- //
- // get<T>(){}
- //
- // In addition, the loop below will include things that can't be
- // identifiers. This may be desirable (for error recovery), or
- // not. Regardless, this method probably needs an overhaul.
- Link<Token> identifiers = const Link<Token>();
-
- // `true` if 'get' has been seen.
- bool isGetter = false;
- // `true` if an identifier has been seen after 'get'.
- bool hasName = false;
-
- Token previous = token;
- token = token.next;
-
- while (token.kind != EOF_TOKEN) {
- if (optional('get', token)) {
- isGetter = true;
- } else if (hasName &&
- (optional("sync", token) || optional("async", token))) {
- // Skip.
- previous = token;
- token = token.next;
- if (optional("*", token)) {
- // Skip.
- previous = token;
- token = token.next;
- }
- continue;
- } else if (optional("(", token) ||
- optional("{", token) ||
- optional("=>", token)) {
- // A method.
- identifiers = identifiers.prepend(previous);
- return identifiers;
- } else if (optional("=", token) ||
- optional(";", token) ||
- optional(",", token) ||
- optional("}", token)) {
- // A field or abstract getter.
- identifiers = identifiers.prepend(previous);
- return identifiers;
- } else if (hasName &&
- optional('native', token) &&
- (token.next.kind == STRING_TOKEN || optional(';', token.next))) {
- // Skip.
- previous = token;
- token = token.next;
- if (token.kind == STRING_TOKEN) {
- previous = token;
- token = token.next;
- }
- continue;
- } else if (isGetter) {
- hasName = true;
- }
- identifiers = identifiers.prepend(previous);
-
- if (!isGeneralizedFunctionType(token)) {
- // Read a potential return type.
- if (isValidTypeReference(token)) {
- // type ...
- if (optional('.', token.next)) {
- // type '.' ...
- if (token.next.next.isIdentifier) {
- // type '.' identifier
- previous = token.next;
- token = token.next.next;
- }
- }
- if (optional('<', token.next)) {
- if (token.next is BeginToken) {
- previous = token;
- token = token.next;
- Token beforeCloseBrace = beforeCloseBraceTokenFor(token);
- if (beforeCloseBrace == null) {
- previous = reportUnmatchedToken(token);
- token = previous.next;
- } else {
- previous = beforeCloseBrace;
- token = beforeCloseBrace.next;
- }
- }
- }
- } else if (token.type.isBuiltIn) {
- // Handle the edge case where a built-in keyword is being used
- // as the identifier, as in "abstract<T>() => 0;".
- if (optional('<', token.next)) {
- Token beforeIdentifier = previous;
- Token identifier = token;
- if (token.next is BeginToken) {
- previous = token;
- token = token.next;
- Token beforeCloseBrace = beforeCloseBraceTokenFor(token);
- if (beforeCloseBrace == null) {
- // Handle the edge case where the user is defining the less
- // than operator, as in "bool operator <(other) => false;"
- if (optional('operator', identifier)) {
- previous = beforeIdentifier;
- token = identifier;
- } else {
- previous = reportUnmatchedToken(token);
- token = previous.next;
- }
- } else {
- previous = beforeCloseBrace;
- token = beforeCloseBrace.next;
- }
- }
- }
- }
- previous = token;
- token = token.next;
- }
- while (isGeneralizedFunctionType(token)) {
- previous = token;
- token = token.next;
- if (optional('<', token)) {
- if (token is BeginToken) {
- Token closeBrace = closeBraceTokenFor(token);
- if (closeBrace == null) {
- previous = reportUnmatchedToken(token);
- token = previous.next;
- } else {
- previous = closeBrace;
- token = previous.next;
- }
- }
- }
- if (!optional('(', token)) {
- if (optional(';', token)) {
- reportRecoverableError(token, fasta.messageExpectedOpenParens);
- }
- previous = token;
- token = expect("(", token);
- }
- if (token is BeginToken) {
- Token closeBrace = closeBraceTokenFor(token);
- if (closeBrace == null) {
- previous = reportUnmatchedToken(token);
- token = previous.next;
- } else {
- previous = closeBrace;
- token = previous.next;
- }
- }
- }
- }
- return const Link<Token>();
- }
-
Token parseFieldInitializerOpt(
Token token, Token name, Token varFinalOrConst, bool isTopLevel) {
Token next = token.next;
@@ -3469,7 +3291,15 @@
listener.beginInitializer(next);
if (optional('assert', next)) {
token = parseAssert(token, Assert.Initializer);
+ } else if (optional('super', next)) {
+ token = parseExpression(token);
+ } else if (optional('this', next)) {
+ token = parseExpression(token);
+ } else if (next.isIdentifier) {
+ token = parseExpression(token);
} else {
+ // Recovery
+ insertSyntheticIdentifier(token, IdentifierContext.fieldInitializer);
token = parseExpression(token);
}
listener.endInitializer(token.next);
@@ -3707,7 +3537,7 @@
listener.beginClassBody(token);
int count = 0;
while (notEofOrValue('}', token.next)) {
- token = parseClassMember(token);
+ token = parseClassMemberImpl(token);
++count;
}
token = token.next;
@@ -3730,8 +3560,8 @@
/// method takes the next token to be consumed rather than the last consumed
/// token and returns the token after the last consumed token rather than the
/// last consumed token.
- Token parseMember(Token token) {
- return parseClassMember(syntheticPreviousToken(token)).next;
+ Token parseClassMember(Token token) {
+ return parseClassMemberImpl(syntheticPreviousToken(token)).next;
}
/// ```
@@ -3741,7 +3571,7 @@
/// methodDeclaration
/// ;
/// ```
- Token parseClassMember(Token token) {
+ Token parseClassMemberImpl(Token token) {
Token beforeStart = token = parseMetadataStar(token);
TypeContinuation typeContinuation;
@@ -3803,118 +3633,91 @@
listener.beginMember();
- if (optional('factory', next)) {
- token = parseFactoryMethod(token, beforeStart, externalToken,
- staticToken ?? covariantToken, varFinalOrConst);
- listener.endMember();
- assert(token.next != null);
- return token;
+ Token beforeType = token;
+ // TODO(danrubel): Consider changing the listener contract
+ // so that the type reference can be parsed immediately
+ // rather than skipped now and parsed later.
+ token = skipTypeReferenceOpt(token);
+ if (token == beforeType) {
+ // There is no type reference.
+ beforeType = null;
}
+ next = token.next;
- Link<Token> identifiers = findMemberName(token);
- if (identifiers.isEmpty) {
- return recoverFromInvalidClassMember(token, beforeStart, externalToken,
- staticToken, covariantToken, varFinalOrConst, typeContinuation);
- }
- Token afterName = identifiers.head.next;
- identifiers = identifiers.tail;
-
- if (identifiers.isEmpty) {
- return recoverFromInvalidClassMember(token, beforeStart, externalToken,
- staticToken, covariantToken, varFinalOrConst, typeContinuation);
- }
- Token beforeName = identifiers.head;
- identifiers = identifiers.tail;
- if (!identifiers.isEmpty) {
- if (optional('operator', identifiers.head.next)) {
- beforeName = identifiers.head;
- identifiers = identifiers.tail;
- }
- }
Token getOrSet;
- if (!identifiers.isEmpty) {
- if (isGetOrSet(identifiers.head.next)) {
- getOrSet = identifiers.head.next;
- identifiers = identifiers.tail;
- }
- }
- Token beforeType;
- if (!identifiers.isEmpty) {
- Token maybeType = identifiers.head.next;
- if (isValidTypeReference(maybeType)) {
- beforeType = identifiers.head;
- identifiers = identifiers.tail;
- } else if (maybeType.type.isBuiltIn && optional('<', maybeType.next)) {
- // Recovery
- // It is an error when built-in keyword is being used
- // as a type, as in `abstract<t> foo`.
- // This error is reported by parseFields and parseMethod
- // via ensureIdentifier.
- beforeType = identifiers.head;
- identifiers = identifiers.tail;
- }
- }
-
- // Recovery: Anything left in the identifiers list is unexpected.
- if (identifiers.isNotEmpty) {
- identifiers = identifiers.reverse();
- while (identifiers.isNotEmpty) {
- token = identifiers.head.next;
- identifiers = identifiers.tail;
- String value = token.stringValue;
- if (identical(value, 'class')) {
- return reportAndSkipClassInClass(token);
- } else if (identical(value, 'enum')) {
- return reportAndSkipEnumInClass(token);
- } else if (identical(value, 'typedef')) {
- return reportAndSkipTypedefInClass(token);
- } else {
- reportRecoverableErrorWithToken(token, fasta.templateUnexpectedToken);
+ if (next.type != TokenType.IDENTIFIER) {
+ String value = next.stringValue;
+ if (identical(value, 'get') || identical(value, 'set')) {
+ if (next.next.isIdentifier) {
+ getOrSet = token = next;
+ next = token.next;
+ if (!next.isIdentifier) {
+ // Recovery
+ insertSyntheticIdentifier(
+ token, IdentifierContext.methodDeclaration);
+ next = token.next;
+ }
}
- }
- }
-
- token = afterName;
- bool isField;
- while (true) {
- // Loop to allow the listener to rewrite the token stream for
- // error handling.
- final String value = token.stringValue;
- if ((identical(value, '(')) ||
- (identical(value, '.')) ||
- (identical(value, '{')) ||
- (identical(value, '=>')) ||
- (identical(value, '<'))) {
- isField = false;
- break;
- } else if (identical(value, ';')) {
- if (getOrSet != null) {
- // If we found a "get" keyword, this must be an abstract
- // getter.
- isField = !optional("get", getOrSet);
- // TODO(ahe): This feels like a hack.
- } else {
- isField = true;
- }
- break;
- } else if (identical(value, '=') ||
- identical(value, ',') ||
- identical(value, '}')) {
- isField = true;
- break;
- } else {
- token = reportUnexpectedToken(token);
- if (identical(token.next.kind, EOF_TOKEN)) {
- // TODO(ahe): This is a hack, see parseTopLevelMember.
- listener.endFields(1, beforeStart.next, token.next);
+ // Fall through to continue parsing `get` or `set` as an identifier.
+ } else if (identical(value, 'factory')) {
+ if (next.next.isIdentifier) {
+ token = parseFactoryMethod(token, beforeStart, externalToken,
+ staticToken ?? covariantToken, varFinalOrConst);
listener.endMember();
return token;
}
- token = token.next;
+ // Fall through to continue parsing `factory` as an identifier.
+ } else if (identical(value, 'operator')) {
+ Token next2 = next.next;
+ // `operator` can be used as an identifier as in
+ // `int operator<T>()` or `int operator = 2`
+ if (next2.isUserDefinableOperator && next2.endGroup == null) {
+ token = parseMethod(beforeStart, externalToken, staticToken,
+ covariantToken, varFinalOrConst, beforeType, getOrSet, token);
+ listener.endMember();
+ return token;
+ } else if (optional('===', next2) ||
+ (next2.isOperator &&
+ !optional('=', next2) &&
+ !optional('<', next2))) {
+ // Recovery
+ token = next2;
+ insertSyntheticIdentifier(token, IdentifierContext.methodDeclaration,
+ message: fasta.templateInvalidOperator.withArguments(token),
+ messageOnToken: token);
+ next = token.next;
+ }
+ // Fall through to continue parsing `operator` as an identifier.
+ } else if (!next.isIdentifier ||
+ (identical(value, 'typedef') &&
+ token == beforeStart &&
+ next.next.isIdentifier)) {
+ // Recovery
+ return recoverFromInvalidClassMember(
+ token,
+ beforeStart,
+ externalToken,
+ staticToken,
+ covariantToken,
+ varFinalOrConst,
+ beforeType,
+ getOrSet,
+ typeContinuation);
}
}
+ // At this point, token is before the name, and next is the name
- if (isField) {
+ next = next.next;
+ String value = next.stringValue;
+ if (getOrSet != null ||
+ identical(value, '(') ||
+ identical(value, '{') ||
+ identical(value, '<') ||
+ identical(value, '.') ||
+ identical(value, '=>')) {
+ token = parseMethod(beforeStart, externalToken, staticToken,
+ covariantToken, varFinalOrConst, beforeType, getOrSet, token);
+ } else {
if (getOrSet != null) {
reportRecoverableErrorWithToken(
getOrSet, fasta.templateExtraneousModifier);
@@ -3926,14 +3729,11 @@
covariantToken,
varFinalOrConst,
beforeType,
- beforeName,
+ token,
staticToken != null
? MemberKind.StaticField
: MemberKind.NonStaticField,
typeContinuation);
- } else {
- token = parseMethod(beforeStart, externalToken, staticToken,
- covariantToken, varFinalOrConst, beforeType, getOrSet, beforeName);
}
listener.endMember();
return token;
@@ -4021,6 +3821,7 @@
? MemberKind.StaticMethod
: MemberKind.NonStaticMethod;
checkFormals(beforeName.next, isGetter, token.next, kind);
+ Token beforeParam = token;
token = parseFormalParametersOpt(token, kind);
token = parseInitializersOpt(token);
@@ -4044,7 +3845,7 @@
token, false, staticToken == null || externalToken != null);
}
asyncState = savedAsyncModifier;
- listener.endMethod(getOrSet, beforeStart.next, token);
+ listener.endMethod(getOrSet, beforeStart.next, beforeParam.next, token);
return token;
}
@@ -4124,8 +3925,15 @@
assert(optional('operator', token));
Token next = token.next;
if (next.isUserDefinableOperator) {
- listener.handleOperatorName(token, next);
- return next;
+ if (next.endGroup != null) {
+ // `operator` is being used as an identifier.
+ // For example: `int operator<T>(foo) => 0;`
+ listener.handleIdentifier(token, IdentifierContext.methodDeclaration);
+ return token;
+ } else {
+ listener.handleOperatorName(token, next);
+ return next;
+ }
} else if (optional('(', next)) {
return ensureIdentifier(beforeToken, IdentifierContext.operatorName);
} else {
@@ -6412,36 +6220,78 @@
Token staticToken,
Token covariantToken,
Token varFinalOrConst,
+ Token beforeType,
+ Token getOrSet,
TypeContinuation typeContinuation) {
Token next = token.next;
- if (staticToken != null ||
- covariantToken != null ||
- varFinalOrConst != null ||
- next.isIdentifier) {
- // Looks like a partial field declaration
- token = parseFields(
- beforeStart,
- externalToken,
- staticToken,
- covariantToken,
- varFinalOrConst,
- null,
- token,
- MemberKind.NonStaticField,
- typeContinuation);
- listener.endMember();
- return token;
+ String value = next.stringValue;
+
+ if (identical(value, 'class')) {
+ return reportAndSkipClassInClass(next);
+ } else if (identical(value, 'enum')) {
+ return reportAndSkipEnumInClass(next);
+ } else if (identical(value, 'typedef')) {
+ return reportAndSkipTypedefInClass(next);
}
- if (optional(';', next)) {
- // Report and skip extra semicolons that appear between members.
- // TODO(brianwilkerson): Provide a more specific error message.
+
+ bool looksLikeMethod = getOrSet != null ||
+ identical(value, '(') ||
+ identical(value, '=>') ||
+ identical(value, '{') ||
+ next.isOperator;
+ if (token == beforeStart && !looksLikeMethod) {
+ // Ensure we make progress.
+ // TODO(danrubel): Provide a more specific error message for extra ';'.
reportRecoverableErrorWithToken(next, fasta.templateExpectedClassMember);
listener.handleInvalidMember(next);
- listener.endMember();
- return next;
+ token = next;
+ } else {
+ // Looks like a partial declaration.
+ if (next.isUserDefinableOperator) {
+ reportRecoverableError(next, fasta.messageMissingOperatorKeyword);
+ // Insert a synthetic 'operator'.
+ rewriter.insertTokenAfter(
+ token, new SyntheticToken(Keyword.OPERATOR, next.offset));
+ } else {
+ if (next.isOperator) {
+ reportRecoverableErrorWithToken(next, fasta.templateInvalidOperator);
+ token = next;
+ next = token.next;
+ } else {
+ reportRecoverableError(
+ next, fasta.templateExpectedIdentifier.withArguments(next));
+ }
+ // Insert a synthetic identifier and continue parsing.
+ if (!next.isIdentifier) {
+ rewriter.insertTokenAfter(
+ token,
+ new SyntheticStringToken(
+ TokenType.IDENTIFIER,
+ '#synthetic_identifier_${next.charOffset}',
+ next.charOffset,
+ 0));
+ }
+ }
+
+ if (looksLikeMethod) {
+ token = parseMethod(beforeStart, externalToken, staticToken,
+ covariantToken, varFinalOrConst, beforeType, getOrSet, token);
+ } else {
+ token = parseFields(
+ beforeStart,
+ externalToken,
+ staticToken,
+ covariantToken,
+ varFinalOrConst,
+ beforeType,
+ token,
+ MemberKind.NonStaticField,
+ typeContinuation);
+ }
}
- return reportUnrecoverableErrorWithToken(
- next, fasta.templateExpectedClassMember);
+
+ listener.endMember();
+ return token;
}
/// Report that the nesting depth of the code being parsed is too large for
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index fa54d3b..2ecd66f 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -511,16 +511,13 @@
}
@override
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
debugEvent("Method");
- Token bodyToken = pop();
+ pop(); // bodyToken
Object name = pop();
Token metadata = pop();
checkEmpty(beginToken.charOffset);
- if (bodyToken == null) {
- // TODO(ahe): Don't skip this. We need to compile metadata.
- return;
- }
ProcedureBuilder builder;
if (name is QualifiedName ||
(getOrSet == null && name == currentClass.name)) {
@@ -529,7 +526,7 @@
builder = lookupBuilder(beginToken, getOrSet, name);
}
buildFunctionBody(
- bodyToken,
+ beginParam,
builder,
builder.isStatic ? MemberKind.StaticMethod : MemberKind.NonStaticMethod,
metadata);
@@ -729,13 +726,9 @@
Token token = startToken;
Parser parser = new Parser(listener);
if (isTopLevel) {
- // There's a slight asymmetry between [parseTopLevelMember] and
- // [parseMember] because the former doesn't call `parseMetadataStar`.
- token = parser
- .parseMetadataStar(parser.syntheticPreviousToken(metadata ?? token));
- token = parser.parseTopLevelMember(token).next;
+ token = parser.parseTopLevelMember(metadata ?? token);
} else {
- token = parser.parseMember(metadata ?? token).next;
+ token = parser.parseClassMember(metadata ?? token).next;
}
listenerFinishFields(listener, startToken, metadata, isTopLevel);
listener.checkEmpty(token.charOffset);
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 7963f3e..b6b3372 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -145,11 +145,11 @@
void endExport(Token exportKeyword, Token semicolon) {
debugEvent("Export");
List<Combinator> combinators = pop();
- List<Configuration> conditionalUris = pop();
+ List<Configuration> configurations = pop();
int uriOffset = popCharOffset();
String uri = pop();
List<MetadataBuilder> metadata = pop();
- library.addExport(metadata, uri, conditionalUris, combinators,
+ library.addExport(metadata, uri, configurations, combinators,
exportKeyword.charOffset, uriOffset);
checkEmpty(exportKeyword.charOffset);
}
@@ -348,13 +348,21 @@
@override
void beginClassDeclaration(Token begin, Token name) {
debugEvent("beginNamedMixinApplication");
- library.currentDeclaration.name = name.lexeme;
+ List<TypeVariableBuilder> typeVariables = pop();
+ push(typeVariables ?? NullValue.TypeVariables);
+ library.currentDeclaration
+ ..name = name.lexeme
+ ..typeVariables = typeVariables;
}
@override
void beginNamedMixinApplication(Token beginToken, Token name) {
debugEvent("beginNamedMixinApplication");
- library.currentDeclaration.name = name.lexeme;
+ List<TypeVariableBuilder> typeVariables = pop();
+ push(typeVariables ?? NullValue.TypeVariables);
+ library.currentDeclaration
+ ..name = name.lexeme
+ ..typeVariables = typeVariables;
}
@override
@@ -504,7 +512,8 @@
}
@override
- void endMethod(Token getOrSet, Token beginToken, Token endToken) {
+ void endMethod(
+ Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
debugEvent("Method");
MethodBody bodyKind = pop();
if (bodyKind == MethodBody.RedirectingFactoryBody) {
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index e58f517..375def5 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -22,7 +22,6 @@
LibraryBuilder,
MemberBuilder,
MetadataBuilder,
- NamedTypeBuilder,
PrefixBuilder,
ProcedureBuilder,
QualifiedName,
@@ -193,17 +192,26 @@
void addExport(
List<MetadataBuilder> metadata,
String uri,
- List<Configuration> conditionalUris,
+ List<Configuration> configurations,
List<Combinator> combinators,
int charOffset,
int uriOffset) {
+ if (configurations != null) {
+ for (Configuration config in configurations) {
+ if (lookupImportCondition(config.dottedName) == config.condition) {
+ uri = config.importUri;
+ break;
+ }
+ }
+ }
+
var exportedLibrary = loader
.read(resolve(this.uri, uri, uriOffset), charOffset, accessor: this);
exportedLibrary.addExporter(this, combinators, charOffset);
exports.add(new Export(this, exportedLibrary, combinators, charOffset));
}
- String _lookupImportCondition(String dottedName) {
+ String lookupImportCondition(String dottedName) {
const String prefix = "dart.library.";
if (!dottedName.startsWith(prefix)) return "";
dottedName = dottedName.substring(prefix.length);
@@ -227,7 +235,7 @@
int uriOffset) {
if (configurations != null) {
for (Configuration config in configurations) {
- if (_lookupImportCondition(config.dottedName) == config.condition) {
+ if (lookupImportCondition(config.dottedName) == config.condition) {
uri = config.importUri;
break;
}
@@ -640,7 +648,7 @@
}
List<TypeVariableBuilder> copyTypeVariables(
- List<TypeVariableBuilder> original);
+ List<TypeVariableBuilder> original, DeclarationBuilder declaration);
@override
String get fullNameForErrors {
@@ -687,23 +695,21 @@
String name;
- final Map<ProcedureBuilder, DeclarationBuilder<T>> factoryDeclarations;
+ List<TypeVariableBuilder> typeVariables;
- DeclarationBuilder(this.members, this.setters, this.constructors,
- this.factoryDeclarations, this.name, this.parent) {
+ DeclarationBuilder(
+ this.members, this.setters, this.constructors, this.name, this.parent) {
assert(name != null);
}
DeclarationBuilder.library()
- : this(<String, Builder>{}, <String, Builder>{}, null, null, "library",
- null);
+ : this(<String, Builder>{}, <String, Builder>{}, null, "library", null);
DeclarationBuilder createNested(String name, bool hasMembers) {
return new DeclarationBuilder<T>(
hasMembers ? <String, MemberBuilder>{} : null,
hasMembers ? <String, MemberBuilder>{} : null,
hasMembers ? <String, MemberBuilder>{} : null,
- <ProcedureBuilder, DeclarationBuilder<T>>{},
name,
this);
}
@@ -722,26 +728,8 @@
if (typeVariables == null) {
// If there are no type variables in the scope, propagate our types to be
// resolved in the parent declaration.
- factoryDeclarations.forEach((_, DeclarationBuilder<T> declaration) {
- parent.types.addAll(declaration.types);
- });
parent.types.addAll(types);
} else {
- factoryDeclarations.forEach(
- (ProcedureBuilder procedure, DeclarationBuilder<T> declaration) {
- assert(procedure.typeVariables.isEmpty);
- procedure.typeVariables
- .addAll(library.copyTypeVariables(typeVariables));
- DeclarationBuilder<T> savedDeclaration = library.currentDeclaration;
- library.currentDeclaration = declaration;
- for (TypeVariableBuilder tv in procedure.typeVariables) {
- NamedTypeBuilder<T, dynamic> t = procedure.returnType;
- t.arguments
- .add(library.addNamedType(tv.name, null, procedure.charOffset));
- }
- library.currentDeclaration = savedDeclaration;
- declaration.resolveTypes(procedure.typeVariables, library);
- });
Map<String, TypeVariableBuilder> map = <String, TypeVariableBuilder>{};
for (TypeVariableBuilder builder in typeVariables) {
map[builder.name] = builder;
@@ -771,14 +759,6 @@
types.clear();
}
- /// Called to register [procedure] as a factory whose types are collected in
- /// [factoryDeclaration]. Later, once the class has been built, we can
- /// synthesize type variables on the factory matching the class'.
- void addFactoryDeclaration(
- ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) {
- factoryDeclarations[procedure] = factoryDeclaration;
- }
-
Scope toScope(Scope parent) {
return new Scope(members, setters, parent, name, isModifiable: false);
}
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index c615c57..ce6ba35 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -41,8 +41,6 @@
NamedTypeBuilder,
TypeBuilder;
-import '../compiler_context.dart' show CompilerContext;
-
import '../deprecated_problems.dart' show deprecated_inputError;
import '../problems.dart' show internalProblem;
@@ -101,8 +99,6 @@
final Map<Uri, List<int>> sourceBytes = <Uri, List<int>>{};
- final bool excludeSource = !CompilerContext.current.options.embedSourceText;
-
// Used when building directly to kernel.
ClassHierarchy hierarchy;
CoreTypes coreTypes;
@@ -170,8 +166,6 @@
}
List<int> getSource(List<int> bytes) {
- if (excludeSource) return const <int>[];
-
// bytes is 0-terminated. We don't want that included.
if (bytes is Uint8List) {
return new Uint8List.view(
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart
index df2cd7f..30cf05c 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart
@@ -34,11 +34,10 @@
String get _indent => '| ' * _indentLevel;
- bool genericExpressionEnter(
+ void genericExpressionEnter(
String expressionType, Expression expression, DartType typeContext) {
_enter('genericExpressionEnter', '$expressionType($expression)',
'(offset=${expression.fileOffset}, context=$typeContext)');
- return true;
}
void genericExpressionExit(
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index 74fc526..3cb2b70 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -94,13 +94,32 @@
final bool isGenerator;
- final DartType returnContext;
+ /// The typing expectation for the subexpression of a `return` or `yield`
+ /// statement inside the function.
+ ///
+ /// For non-generator async functions, this will be a "FutureOr" type (since
+ /// it is permissible for such a function to return either a direct value or
+ /// a future).
+ ///
+ /// For generator functions containing a `yield*` statement, the expected type
+ /// for the subexpression of the `yield*` statement is the result of wrapping
+ /// this typing expectation in `Stream` or `Iterator`, as appropriate.
+ final DartType returnOrYieldContext;
final bool _needToInferReturnType;
final bool _needImplicitDowncasts;
- DartType _inferredReturnType;
+ /// The type that actually appeared as the subexpression of `return` or
+ /// `yield` statements inside the function.
+ ///
+ /// For non-generator async functions, this is the "unwrapped" type (e.g. if
+ /// the function is expected to return `Future<int>`, this is `int`).
+ ///
+ /// For generator functions containing a `yield*` statement, the type that
+ /// appeared as the subexpression of the `yield*` statement was the result of
+ /// wrapping this type in `Stream` or `Iterator`, as appropriate.
+ DartType _inferredUnwrappedReturnOrYieldType;
factory ClosureContext(
TypeInferrerImpl inferrer,
@@ -128,7 +147,7 @@
needToInferReturnType, needImplicitDowncasts);
}
- ClosureContext._(this.isAsync, this.isGenerator, this.returnContext,
+ ClosureContext._(this.isAsync, this.isGenerator, this.returnOrYieldContext,
this._needToInferReturnType, this._needImplicitDowncasts);
/// Updates the inferred return type based on the presence of a return
@@ -149,24 +168,24 @@
DartType inferReturnType(TypeInferrerImpl inferrer) {
assert(_needToInferReturnType);
- DartType inferredReturnType = _wrapAsyncOrGenerator(
- inferrer, inferrer.inferReturnType(_inferredReturnType));
- if (returnContext != null &&
- !_analyzerSubtypeOf(inferrer, inferredReturnType, returnContext)) {
+ DartType inferredType =
+ inferrer.inferReturnType(_inferredUnwrappedReturnOrYieldType);
+ if (returnOrYieldContext != null &&
+ !_analyzerSubtypeOf(inferrer, inferredType, returnOrYieldContext)) {
// If the inferred return type isn't a subtype of the context, we use the
// context.
- return greatestClosure(inferrer.coreTypes, returnContext);
+ inferredType = returnOrYieldContext;
}
- return inferredReturnType;
+ return _wrapAsyncOrGenerator(inferrer, inferredType);
}
void _updateInferredReturnType(TypeInferrerImpl inferrer, DartType type,
Expression expression, int fileOffset, bool isReturn, bool isYieldStar) {
if (_needImplicitDowncasts) {
var expectedType = isYieldStar
- ? _wrapAsyncOrGenerator(inferrer, returnContext)
- : returnContext;
+ ? _wrapAsyncOrGenerator(inferrer, returnOrYieldContext)
+ : returnOrYieldContext;
if (expectedType != null) {
expectedType = greatestClosure(inferrer.coreTypes, expectedType);
if (inferrer.checkAssignability(
@@ -188,11 +207,12 @@
type;
}
if (_needToInferReturnType) {
- if (_inferredReturnType == null) {
- _inferredReturnType = unwrappedType;
+ if (_inferredUnwrappedReturnOrYieldType == null) {
+ _inferredUnwrappedReturnOrYieldType = unwrappedType;
} else {
- _inferredReturnType = inferrer.typeSchemaEnvironment
- .getLeastUpperBound(_inferredReturnType, unwrappedType);
+ _inferredUnwrappedReturnOrYieldType = inferrer.typeSchemaEnvironment
+ .getLeastUpperBound(
+ _inferredUnwrappedReturnOrYieldType, unwrappedType);
}
}
}
diff --git a/pkg/front_end/test/fasta/super_mixins_test.dart b/pkg/front_end/test/fasta/super_mixins_test.dart
new file mode 100644
index 0000000..450dac8
--- /dev/null
+++ b/pkg/front_end/test/fasta/super_mixins_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2017, 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.md file.
+
+library fasta.test.incremental_dynamic_test;
+
+import 'package:async_helper/async_helper.dart' show asyncTest;
+
+import 'package:expect/expect.dart' show Expect;
+
+import 'package:kernel/target/targets.dart' show NoneTarget, TargetFlags;
+
+import "package:front_end/src/api_prototype/compiler_options.dart"
+ show CompilerOptions, ProblemHandler;
+
+import 'package:front_end/src/testing/compiler_common.dart' show compileScript;
+
+import 'package:front_end/src/fasta/fasta_codes.dart'
+ show LocatedMessage, codeSuperclassHasNoMethod;
+
+import 'package:front_end/src/fasta/severity.dart' show Severity;
+
+/// A subclass of NoneTarget that enables Flutter style super-mixin semantics.
+///
+/// See dartbug.com/31542 for details of the semantics.
+class NoneTargetWithSuperMixins extends NoneTarget {
+ NoneTargetWithSuperMixins(TargetFlags flags) : super(flags);
+
+ @override
+ bool get enableSuperMixins => true;
+}
+
+const String testSource = '''
+abstract class A {
+ void foo(String value);
+}
+
+abstract class B {
+ void bar(String value);
+}
+
+abstract class Mixin extends A with B {
+ void bar(String value) {
+ // CFE should report an error on the line below under the normal
+ // Dart 2 semantics, because super invocation targets abstract
+ // member. However when enableSuperMixins is set
+ // in the Target the error should be suppressed.
+ super.bar(value);
+ // This line should always trigger an error, irrespective of
+ // whether super-mixins semantics is enabled or disabled.
+ super.baz();
+ }
+}
+
+class NotMixin extends A with B {
+ void bar(String value) {
+ // Both of these should be reported as error independently
+ // of super-mixins semantics because NotMixin is not an abstract
+ // class.
+ super.foo(value);
+ super.quux();
+ }
+}
+
+void main() {
+ // Dummy main to avoid warning.
+}
+''';
+
+ProblemHandler _makeProblemHandler(Set<String> names) {
+ return (LocatedMessage message, Severity severity, String formatted, int line,
+ int column) {
+ Expect.equals(Severity.error, severity);
+ Expect.equals(codeSuperclassHasNoMethod, message.code);
+ names.add(message.arguments['name']);
+ };
+}
+
+/// Check that by default an error is reported for all unresolved super
+/// invocations: independently of weather they target abstract super members
+/// or nonexistent targets.
+testDisabledSuperMixins() async {
+ var missingSuperMethodNames = new Set<String>();
+ var options = new CompilerOptions()
+ ..onProblem = _makeProblemHandler(missingSuperMethodNames)
+ ..strongMode = true;
+ await compileScript(testSource, options: options);
+ Expect.setEquals(
+ const <String>['bar', 'baz', 'foo', 'quux'], missingSuperMethodNames);
+}
+
+/// Check that in an abstract class an error is reported only for a
+/// super-invocation that targets an non-existent method, a super-invocation
+/// that targets an abstract member of the super-class should not be reported.
+/// In non-abstract class we should report both cases as an error.
+testEnabledSuperMixins() async {
+ var missingSuperMethodNames = new Set<String>();
+ var options = new CompilerOptions()
+ ..onProblem = _makeProblemHandler(missingSuperMethodNames)
+ ..strongMode = true
+ ..target = new NoneTargetWithSuperMixins(new TargetFlags(strongMode: true));
+ await compileScript(testSource, options: options);
+ Expect
+ .setEquals(const <String>['baz', 'foo', 'quux'], missingSuperMethodNames);
+}
+
+void main() {
+ asyncTest(() async {
+ await testDisabledSuperMixins();
+ await testEnabledSuperMixins();
+ });
+}
diff --git a/pkg/front_end/test/fasta/testing/analyzer_diet_listener.dart b/pkg/front_end/test/fasta/testing/analyzer_diet_listener.dart
index 72a523c..7e1de38 100644
--- a/pkg/front_end/test/fasta/testing/analyzer_diet_listener.dart
+++ b/pkg/front_end/test/fasta/testing/analyzer_diet_listener.dart
@@ -170,13 +170,9 @@
// this information.
Parser parser = new Parser(_bodyBuilder);
if (isTopLevel) {
- // There's a slight asymmetry between [parseTopLevelMember] and
- // [parseMember] because the former doesn't call `parseMetadataStar`.
- token = parser
- .parseMetadataStar(parser.syntheticPreviousToken(metadata ?? token));
- token = parser.parseTopLevelMember(token).next;
+ token = parser.parseTopLevelMember(metadata ?? token);
} else {
- token = parser.parseMember(metadata ?? token).next;
+ token = parser.parseClassMember(metadata ?? token).next;
}
_bodyBuilder.finishFields();
_bodyBuilder.checkEmpty(token.charOffset);
diff --git a/pkg/front_end/testcases/ast_builder.status b/pkg/front_end/testcases/ast_builder.status
index b464fce..c804aae 100644
--- a/pkg/front_end/testcases/ast_builder.status
+++ b/pkg/front_end/testcases/ast_builder.status
@@ -108,6 +108,7 @@
rasta/issue_000002: Crash
rasta/issue_000004: Crash
rasta/issue_000031: Crash
+rasta/issue_000032: Crash
rasta/issue_000036: Crash
rasta/issue_000039: VerificationError
rasta/issue_000042: Crash
@@ -128,7 +129,6 @@
rasta/unresolved_constructor: Crash
rasta/unresolved_for_in: Crash
rasta/unresolved_recovery: Crash
-redirecting_factory_typeparambounds_test: VerificationError
regress/issue_29937: Crash
regress/issue_29941: Crash
regress/issue_29942: Crash
diff --git a/pkg/front_end/testcases/compile.status b/pkg/front_end/testcases/compile.status
index 32cb788..a25981a 100644
--- a/pkg/front_end/testcases/compile.status
+++ b/pkg/front_end/testcases/compile.status
@@ -22,7 +22,7 @@
redirecting_factory_simple_test: Fail # Missing support for RedirectingFactoryConstructor.
redirecting_factory_typeargs_test: Fail # Missing support for RedirectingFactoryConstructor.
redirecting_factory_typeparam_test: Fail # Missing support for RedirectingFactoryConstructor.
-redirecting_factory_typeparambounds_test: VerificationError # Incorrect references to class type parameters. Missing support for RedirectingFactoryConstructor.
+redirecting_factory_typeparambounds_test: Fail # Missing support for RedirectingFactoryConstructor.
statements: Fail # Make async tranformer optional for golden file testing.
type_variable_as_super: Fail
uninitialized_fields: Fail # Fasta and dartk disagree on static initializers
@@ -59,6 +59,7 @@
rasta/constant_get_and_invoke: Fail
rasta/deferred_lib: Fail
rasta/deferred_load: Fail
+rasta/external_factory_redirection: Fail
rasta/for_loop: Fail
rasta/generic_factory: Fail
rasta/issue_000001: Fail
diff --git a/pkg/front_end/testcases/expressions.dart.direct.expect b/pkg/front_end/testcases/expressions.dart.direct.expect
index 181488f..7fece02 100644
--- a/pkg/front_end/testcases/expressions.dart.direct.expect
+++ b/pkg/front_end/testcases/expressions.dart.direct.expect
@@ -42,7 +42,7 @@
core::print(let final dynamic #t3 = i in let final dynamic #t4 = i = #t3.+(1) in #t3);
core::print(new core::Object::•());
core::print(const core::Object::•());
- core::print(core::List::_internal<core::String>(2).runtimeType);
+ core::print(core::List::•<core::String>(2).runtimeType);
self::foo(fisk: "Blorp gulp");
function f() → dynamic {
core::print("f was called");
diff --git a/pkg/front_end/testcases/expressions.dart.strong.expect b/pkg/front_end/testcases/expressions.dart.strong.expect
index d157089..c0b0a88 100644
--- a/pkg/front_end/testcases/expressions.dart.strong.expect
+++ b/pkg/front_end/testcases/expressions.dart.strong.expect
@@ -43,7 +43,7 @@
core::print(let final core::int #t3 = i in let final core::int #t4 = i = #t3.{core::num::+}(1) in #t3);
core::print(new core::Object::•());
core::print(const core::Object::•());
- core::print(core::List::_internal<core::String>(2).{core::Object::runtimeType});
+ core::print(core::List::•<core::String>(2).{core::Object::runtimeType});
self::foo(fisk: "Blorp gulp");
function f() → core::Null {
core::print("f was called");
diff --git a/pkg/front_end/testcases/external.dart.direct.expect b/pkg/front_end/testcases/external.dart.direct.expect
index 48a61ed..273c277 100644
--- a/pkg/front_end/testcases/external.dart.direct.expect
+++ b/pkg/front_end/testcases/external.dart.direct.expect
@@ -10,7 +10,7 @@
}
static method main() → dynamic {
dynamic string = core::String::fromCharCode(65);
- dynamic port = new iso::_ReceivePortImpl::•();
+ dynamic port = iso::ReceivePort::•();
self::subscription = port.listen(self::onData);
port.sendPort.send(string);
}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.direct.expect b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.direct.expect
index 939cead..2a6a8d9 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.direct.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.direct.expect
@@ -15,8 +15,8 @@
}
static method bar() → core::Iterable<core::Map<core::int, core::int>> sync* {
yield<dynamic, dynamic>{};
- yield core::List::_internal<dynamic>();
+ yield core::List::•<dynamic>();
yield*<dynamic, dynamic>{};
- yield* core::List::_internal<dynamic>();
+ yield* core::List::•<dynamic>();
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.strong.expect b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.strong.expect
index 8e73907..abcd30c 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.strong.expect
@@ -15,8 +15,8 @@
}
static method bar() → core::Iterable<core::Map<core::int, core::int>> sync* {
yield<core::int, core::int>{};
- yield let final dynamic #t3 = core::List::_internal<dynamic>() in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart:23:67: Error: A value of type 'dart.core::List<dynamic>' can't be assigned to a variable of type 'dart.core::Map<dart.core::int, dart.core::int>'.\nTry changing the type of the left hand side, or casting the right hand side to 'dart.core::Map<dart.core::int, dart.core::int>'.\n yield /*error:YIELD_OF_INVALID_TYPE*/ new /*@typeArgs=dynamic*/ List();\n ^";
+ yield let final dynamic #t3 = core::List::•<dynamic>() in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart:23:67: Error: A value of type 'dart.core::List<dynamic>' can't be assigned to a variable of type 'dart.core::Map<dart.core::int, dart.core::int>'.\nTry changing the type of the left hand side, or casting the right hand side to 'dart.core::Map<dart.core::int, dart.core::int>'.\n yield /*error:YIELD_OF_INVALID_TYPE*/ new /*@typeArgs=dynamic*/ List();\n ^";
yield* let final dynamic #t4 = <dynamic, dynamic>{} in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart:24:73: Error: A value of type 'dart.core::Map<dynamic, dynamic>' can't be assigned to a variable of type 'dart.core::Iterable<dart.core::Map<dart.core::int, dart.core::int>>'.\nTry changing the type of the left hand side, or casting the right hand side to 'dart.core::Iterable<dart.core::Map<dart.core::int, dart.core::int>>'.\n yield* /*error:YIELD_OF_INVALID_TYPE*/ /*@typeArgs=dynamic, dynamic*/ {};\n ^";
- yield* core::List::_internal<core::Map<core::int, core::int>>();
+ yield* core::List::•<core::Map<core::int, core::int>>();
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/generator_closure.dart b/pkg/front_end/testcases/inference/generator_closure.dart
new file mode 100644
index 0000000..ed7b973
--- /dev/null
+++ b/pkg/front_end/testcases/inference/generator_closure.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2018, 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.
+
+/*@testedFeatures=inference*/
+library test;
+
+import 'dart:async';
+
+void foo(Stream<int> Function() values) {}
+
+void main() {
+ foo(/*@returnType=Stream<int>*/ () async* {
+ yield 0;
+ yield 1;
+ });
+}
diff --git a/pkg/front_end/testcases/inference/generator_closure.dart.direct.expect b/pkg/front_end/testcases/inference/generator_closure.dart.direct.expect
new file mode 100644
index 0000000..e9984fd
--- /dev/null
+++ b/pkg/front_end/testcases/inference/generator_closure.dart.direct.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method foo(() → asy::Stream<core::int> values) → void {}
+static method main() → void {
+ self::foo(() → asy::Stream<dynamic> async* {
+ yield 0;
+ yield 1;
+ });
+}
diff --git a/pkg/front_end/testcases/inference/generator_closure.dart.outline.expect b/pkg/front_end/testcases/inference/generator_closure.dart.outline.expect
new file mode 100644
index 0000000..caa562f
--- /dev/null
+++ b/pkg/front_end/testcases/inference/generator_closure.dart.outline.expect
@@ -0,0 +1,9 @@
+library test;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method foo(() → asy::Stream<core::int> values) → void
+ ;
+static method main() → void
+ ;
diff --git a/pkg/front_end/testcases/inference/generator_closure.dart.strong.expect b/pkg/front_end/testcases/inference/generator_closure.dart.strong.expect
new file mode 100644
index 0000000..57bbcb0
--- /dev/null
+++ b/pkg/front_end/testcases/inference/generator_closure.dart.strong.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method foo(() → asy::Stream<core::int> values) → void {}
+static method main() → void {
+ self::foo(() → asy::Stream<core::int> async* {
+ yield 0;
+ yield 1;
+ });
+}
diff --git a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
index 98bd7ec..3a5760c 100644
--- a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
+++ b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
@@ -14,8 +14,7 @@
}
var /*@topType=List<B<int>>*/ t3 = /*@typeArgs=B<int>*/ [
- new
- /*error:TOP_LEVEL_TYPE_ARGUMENTS*/ /*@typeArgs=int*/ B(3)
+ new /*@typeArgs=int*/ B(3)
];
main() {}
diff --git a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
index ec0be4d..4c8edf2 100644
--- a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
+++ b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
@@ -10,8 +10,7 @@
}
var /*@topType=List<A<int>>*/ t2 = /*@typeArgs=A<int>*/ [
- new
- /*error:TOP_LEVEL_TYPE_ARGUMENTS*/ /*@typeArgs=int*/ A(2)
+ new /*@typeArgs=int*/ A(2)
];
main() {}
diff --git a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
index b5570fa..0567c06 100644
--- a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
+++ b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
@@ -16,7 +16,7 @@
print("running");
}
-var /*@topType=void*/ y = /*info:USE_OF_VOID_RESULT, error:TOP_LEVEL_TYPE_ARGUMENTS*/ /*@typeArgs=void*/ run(
+var /*@topType=void*/ y = /*info:USE_OF_VOID_RESULT*/ /*@typeArgs=void*/ run(
printRunning);
main() {}
diff --git a/pkg/front_end/testcases/map.dart.direct.expect b/pkg/front_end/testcases/map.dart.direct.expect
index 7e063bc..c82d4a6 100644
--- a/pkg/front_end/testcases/map.dart.direct.expect
+++ b/pkg/front_end/testcases/map.dart.direct.expect
@@ -1,8 +1,7 @@
library;
import self as self;
import "dart:core" as core;
-import "dart:collection" as col;
static method main() → dynamic {
- core::print(col::LinkedHashMap::•<dynamic, dynamic>());
+ core::print(core::Map::•<dynamic, dynamic>());
}
diff --git a/pkg/front_end/testcases/outline.status b/pkg/front_end/testcases/outline.status
index ba3b18d..80f615e 100644
--- a/pkg/front_end/testcases/outline.status
+++ b/pkg/front_end/testcases/outline.status
@@ -7,7 +7,7 @@
redirecting_factory_simple_test: Fail # Missing support for RedirectingFactoryConstructor.
redirecting_factory_typeargs_test: Fail # Missing support for RedirectingFactoryConstructor.
redirecting_factory_typeparam_test: Fail # Missing support for RedirectingFactoryConstructor.
-redirecting_factory_typeparambounds_test: VerificationError # Incorrect references to class type parameters. Missing support for RedirectingFactoryConstructor.
+redirecting_factory_typeparambounds_test: Fail # Missing support for RedirectingFactoryConstructor.
inference/async_closure_return_type_flatten: Fail
inference/async_closure_return_type_future: Fail
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.direct.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.direct.expect
index 4324cb8..a80d4c3 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.direct.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.direct.expect
@@ -6,7 +6,7 @@
class A<N extends core::Object, S extends core::Object, U extends core::Object> extends core::Object {
final field core::List<self::A::U> field;
constructor •(self::A::N n, self::A::S s) → void
- : self::A::field = core::List::_internal<self::A::U>(), super core::Object::•() {
+ : self::A::field = core::List::•<self::A::U>(), super core::Object::•() {
exp::Expect::isTrue(n is self::A::N);
exp::Expect::isTrue(s is self::A::S);
}
diff --git a/pkg/front_end/testcases/regress/issue_31183.dart.direct.expect b/pkg/front_end/testcases/regress/issue_31183.dart.direct.expect
index 4277942..29c088f 100644
--- a/pkg/front_end/testcases/regress/issue_31183.dart.direct.expect
+++ b/pkg/front_end/testcases/regress/issue_31183.dart.direct.expect
@@ -3,13 +3,14 @@
import "dart:core" as core;
class C extends core::Object {
+ field dynamic operator = null;
synthetic constructor •() → void
: super core::Object::•()
;
operator unary-() → dynamic
return 0;
}
-static const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_31183.dart:6:3: Error: Unexpected token 'operator'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: Operator declarations must be preceeded by the keyword 'operator'.\nTry adding the keyword 'operator'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: A method declaration needs an explicit list of parameters.\nTry adding a parameter list to the method declaration.\n operator unary- => 0;\n ^"]/* from null */;
+static const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_31183.dart:6:3: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.\nTry adding the name of the type of the variable or the keyword 'var'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:12: Error: Expected ';' before this.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: Operator declarations must be preceeded by the keyword 'operator'.\nTry adding the keyword 'operator'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: A method declaration needs an explicit list of parameters.\nTry adding a parameter list to the method declaration.\n operator unary- => 0;\n ^"]/* from null */;
static method main() → dynamic {
new self::C::•();
}
diff --git a/pkg/front_end/testcases/regress/issue_31183.dart.outline.expect b/pkg/front_end/testcases/regress/issue_31183.dart.outline.expect
index 626dcfc..1b80db7 100644
--- a/pkg/front_end/testcases/regress/issue_31183.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_31183.dart.outline.expect
@@ -3,6 +3,7 @@
import "dart:core" as core;
class C extends core::Object {
+ field dynamic operator;
synthetic constructor •() → void
;
operator unary-() → dynamic
diff --git a/pkg/front_end/testcases/regress/issue_31183.dart.strong.expect b/pkg/front_end/testcases/regress/issue_31183.dart.strong.expect
index 4277942..29c088f 100644
--- a/pkg/front_end/testcases/regress/issue_31183.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_31183.dart.strong.expect
@@ -3,13 +3,14 @@
import "dart:core" as core;
class C extends core::Object {
+ field dynamic operator = null;
synthetic constructor •() → void
: super core::Object::•()
;
operator unary-() → dynamic
return 0;
}
-static const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_31183.dart:6:3: Error: Unexpected token 'operator'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: Operator declarations must be preceeded by the keyword 'operator'.\nTry adding the keyword 'operator'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: A method declaration needs an explicit list of parameters.\nTry adding a parameter list to the method declaration.\n operator unary- => 0;\n ^"]/* from null */;
+static const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/regress/issue_31183.dart:6:3: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.\nTry adding the name of the type of the variable or the keyword 'var'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:12: Error: Expected ';' before this.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: Operator declarations must be preceeded by the keyword 'operator'.\nTry adding the keyword 'operator'.\n operator unary- => 0;\n ^", "pkg/front_end/testcases/regress/issue_31183.dart:6:17: Error: A method declaration needs an explicit list of parameters.\nTry adding a parameter list to the method declaration.\n operator unary- => 0;\n ^"]/* from null */;
static method main() → dynamic {
new self::C::•();
}
diff --git a/pkg/front_end/testcases/shaker/empty_program.dart.outline.expect b/pkg/front_end/testcases/shaker/empty_program.dart.outline.expect
index 54d7983..06a5a03 100644
--- a/pkg/front_end/testcases/shaker/empty_program.dart.outline.expect
+++ b/pkg/front_end/testcases/shaker/empty_program.dart.outline.expect
@@ -326,8 +326,12 @@
}
abstract class Iterable<E extends self::Object> extends self::Object {
abstract get iterator() → self::Iterator<self::Iterable::E>;
+ method cast<R extends self::Object>() → self::Iterable<self::Iterable::cast::R>;
+ method retype<R extends self::Object>() → self::Iterable<self::Iterable::retype::R>;
+ method followedBy(self::Iterable<self::Iterable::E> other) → self::Iterable<self::Iterable::E>;
method map<T extends self::Object>((self::Iterable::E) → self::Iterable::map::T f) → self::Iterable<self::Iterable::map::T>;
method where((self::Iterable::E) → self::bool test) → self::Iterable<self::Iterable::E>;
+ method whereType<T extends self::Object>() → self::Iterable<self::Iterable::whereType::T>;
method expand<T extends self::Object>((self::Iterable::E) → self::Iterable<self::Iterable::expand::T> f) → self::Iterable<self::Iterable::expand::T>;
method contains(self::Object element) → self::bool;
method forEach((self::Iterable::E) → void f) → void;
@@ -350,7 +354,7 @@
get single() → self::Iterable::E;
method firstWhere((self::Iterable::E) → self::bool test, {() → self::Iterable::E orElse}) → self::Iterable::E;
method lastWhere((self::Iterable::E) → self::bool test, {() → self::Iterable::E orElse}) → self::Iterable::E;
- method singleWhere((self::Iterable::E) → self::bool test) → self::Iterable::E;
+ method singleWhere((self::Iterable::E) → self::bool test, {() → self::Iterable::E orElse}) → self::Iterable::E;
method elementAt(self::int index) → self::Iterable::E;
method toString() → self::String;
}
@@ -363,8 +367,12 @@
}
abstract class List<E extends self::Object> extends self::Object implements _in::EfficientLengthIterable<self::List::E> {
external static factory from<E extends self::Object>(self::Iterable<dynamic> elements, {self::bool growable}) → self::List<self::List::from::E>;
+ abstract method cast<R extends self::Object>() → self::List<self::List::cast::R>;
+ abstract method retype<R extends self::Object>() → self::List<self::List::retype::R>;
abstract operator [](self::int index) → self::List::E;
abstract operator []=(self::int index, self::List::E value) → void;
+ abstract set first(self::List::E value) → void;
+ abstract set last(self::List::E value) → void;
abstract get length() → self::int;
abstract set length(self::int newLength) → dynamic;
abstract method add(self::List::E value) → void;
@@ -373,6 +381,8 @@
abstract method sort([(self::List::E, self::List::E) → self::int compare]) → void;
abstract method shuffle([math::Random random]) → void;
abstract method indexOf(self::List::E element, [self::int start]) → self::int;
+ abstract method indexWhere((self::List::E) → self::bool test, [self::int start]) → self::int;
+ abstract method lastIndexWhere((self::List::E) → self::bool test, [self::int start]) → self::int;
abstract method lastIndexOf(self::List::E element, [self::int start]) → self::int;
abstract method clear() → void;
abstract method insert(self::int index, self::List::E element) → void;
@@ -383,6 +393,7 @@
abstract method removeLast() → self::List::E;
abstract method removeWhere((self::List::E) → self::bool test) → void;
abstract method retainWhere((self::List::E) → self::bool test) → void;
+ abstract operator +(self::List<self::List::E> other) → self::List<self::List::E>;
abstract method sublist(self::int start, [self::int end]) → self::List<self::List::E>;
abstract method getRange(self::int start, self::int end) → self::Iterable<self::List::E>;
abstract method setRange(self::int start, self::int end, self::Iterable<self::List::E> iterable, [self::int skipCount]) → void;
@@ -392,10 +403,18 @@
abstract method asMap() → self::Map<self::int, self::List::E>;
}
abstract class Map<K extends self::Object, V extends self::Object> extends self::Object {
+ abstract method cast<RK extends self::Object, RV extends self::Object>() → self::Map<self::Map::cast::RK, self::Map::cast::RV>;
+ abstract method retype<RK extends self::Object, RV extends self::Object>() → self::Map<self::Map::retype::RK, self::Map::retype::RV>;
abstract method containsValue(self::Object value) → self::bool;
abstract method containsKey(self::Object key) → self::bool;
abstract operator [](self::Object key) → self::Map::V;
abstract operator []=(self::Map::K key, self::Map::V value) → void;
+ abstract get entries() → self::Iterable<self::MapEntry<self::Map::K, self::Map::V>>;
+ abstract method map<K2 extends self::Object, V2 extends self::Object>((self::Map::K, self::Map::V) → self::MapEntry<self::Map::map::K2, self::Map::map::V2> f) → self::Map<self::Map::map::K2, self::Map::map::V2>;
+ abstract method addEntries(self::Iterable<self::MapEntry<self::Map::K, self::Map::V>> newEntries) → void;
+ abstract method update(self::Map::K key, (self::Map::V) → self::Map::V update, {() → self::Map::V ifAbsent}) → self::Map::V;
+ abstract method updateAll((self::Map::K, self::Map::V) → self::Map::V update) → void;
+ abstract method removeWhere((self::Map::K, self::Map::V) → self::bool predicate) → void;
abstract method putIfAbsent(self::Map::K key, () → self::Map::V ifAbsent) → self::Map::V;
abstract method addAll(self::Map<self::Map::K, self::Map::V> other) → void;
abstract method remove(self::Object key) → self::Map::V;
@@ -407,6 +426,10 @@
abstract get isEmpty() → self::bool;
abstract get isNotEmpty() → self::bool;
}
+class MapEntry<K extends self::Object, V extends self::Object> extends self::Object {
+ final field self::MapEntry::K key;
+ final field self::MapEntry::V value;
+}
class Null extends self::Object {
external get hashCode() → self::int;
method toString() → self::String;
@@ -482,6 +505,8 @@
abstract get pattern() → self::Pattern;
}
abstract class Set<E extends self::Object> extends _in::EfficientLengthIterable<self::Set::E> {
+ abstract method cast<R extends self::Object>() → self::Set<self::Set::cast::R>;
+ abstract method retype<R extends self::Object>() → self::Set<self::Set::retype::R>;
abstract get iterator() → self::Iterator<self::Set::E>;
abstract method contains(self::Object value) → self::bool;
abstract method add(self::Set::E value) → self::bool;
diff --git a/pkg/front_end/testcases/shaker/empty_program.dart.shaker.expect b/pkg/front_end/testcases/shaker/empty_program.dart.shaker.expect
index 5c54176..e788b61 100644
--- a/pkg/front_end/testcases/shaker/empty_program.dart.shaker.expect
+++ b/pkg/front_end/testcases/shaker/empty_program.dart.shaker.expect
@@ -267,8 +267,12 @@
- isAccessor
- class Iterable
- iterator
+ - cast
+ - retype
+ - followedBy
- map
- where
+ - whereType
- expand
- contains
- forEach
@@ -301,8 +305,12 @@
- current
- class List
- from
+ - cast
+ - retype
- []
- []=
+ - first
+ - last
- length
- length
- add
@@ -311,6 +319,8 @@
- sort
- shuffle
- indexOf
+ - indexWhere
+ - lastIndexWhere
- lastIndexOf
- clear
- insert
@@ -321,6 +331,7 @@
- removeLast
- removeWhere
- retainWhere
+ - +
- sublist
- getRange
- setRange
@@ -329,10 +340,18 @@
- replaceRange
- asMap
- class Map
+ - cast
+ - retype
- containsValue
- containsKey
- []
- []=
+ - entries
+ - map
+ - addEntries
+ - update
+ - updateAll
+ - removeWhere
- putIfAbsent
- addAll
- remove
@@ -343,6 +362,9 @@
- length
- isEmpty
- isNotEmpty
+ - class MapEntry
+ - key
+ - value
- class Null
- hashCode
- toString
@@ -413,6 +435,8 @@
- input
- pattern
- class Set
+ - cast
+ - retype
- iterator
- contains
- add
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 32163f0..cf9ddc8 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -55,7 +55,7 @@
redirecting_factory_simple_test: Fail # Missing support for RedirectingFactoryConstructor.
redirecting_factory_typeargs_test: Fail # Missing support for RedirectingFactoryConstructor.
redirecting_factory_typeparam_test: Fail # Missing support for RedirectingFactoryConstructor.
-redirecting_factory_typeparambounds_test: VerificationError # Incorrect references to class type parameters. Missing support for RedirectingFactoryConstructor.
+redirecting_factory_typeparambounds_test: Fail # Missing support for RedirectingFactoryConstructor.
statements: Fail
stringliteral: Fail
super_rasta_copy: TypeCheckError
diff --git a/pkg/kernel/lib/class_hierarchy.dart b/pkg/kernel/lib/class_hierarchy.dart
index 397e7f7..0a74e92 100644
--- a/pkg/kernel/lib/class_hierarchy.dart
+++ b/pkg/kernel/lib/class_hierarchy.dart
@@ -4,6 +4,7 @@
library kernel.class_hierarchy;
import 'ast.dart';
+import 'dart:collection' show IterableBase;
import 'dart:math';
import 'dart:typed_data';
import 'src/heap.dart';
@@ -338,9 +339,13 @@
final Map<Class, _ClassInfo> _infoFor = <Class, _ClassInfo>{};
+ /// All classes ordered by [_ClassInfo.topDownIndex].
+ final List<Class> _classesByTopDownIndex;
+
ClosedWorldClassHierarchy._internal(
this._program, int numberOfClasses, this._onAmbiguousSupertypes)
- : classes = new List<Class>(numberOfClasses);
+ : classes = new List<Class>(numberOfClasses),
+ _classesByTopDownIndex = new List<Class>(numberOfClasses);
@override
int getClassIndex(Class class_) => _infoFor[class_].topologicalIndex;
@@ -558,9 +563,8 @@
Name name = interfaceTarget.name;
Member target = null;
ClassSet subtypes = getSubtypesOf(interfaceTarget.enclosingClass);
- // TODO(alexmarkov): Implement more efficient way to iterate subtypes.
- for (Class c in classes) {
- if (subtypes.contains(c) && !c.isAbstract) {
+ for (Class c in subtypes) {
+ if (!c.isAbstract) {
Member candidate = getDispatchTarget(c, name, setter: setter);
if ((candidate != null) && !candidate.isAbstract) {
if (target == null) {
@@ -989,6 +993,7 @@
bool isMixedIn = info.directMixers.isNotEmpty;
int index = _topDownSortIndex++;
info.topDownIndex = index;
+ _classesByTopDownIndex[index] = info.classNode;
var subclassSetBuilder = new _IntervalListBuilder()..addSingleton(index);
var submixtureSetBuilder =
isMixedIn ? (new _IntervalListBuilder()..addSingleton(index)) : null;
@@ -1256,7 +1261,7 @@
}
/// An immutable set of classes, internally represented as an interval list.
-class ClassSet {
+class ClassSet extends IterableBase<Class> {
final ClosedWorldClassHierarchy _hierarchy;
final Uint32List _intervalList;
@@ -1269,9 +1274,10 @@
return list.length == 2 && list[0] + 1 == list[1];
}
- bool contains(Class class_) {
+ @override
+ bool contains(Object class_) {
return _intervalListContains(
- _intervalList, _hierarchy._infoFor[class_].topDownIndex);
+ _intervalList, _hierarchy._infoFor[class_ as Class].topDownIndex);
}
ClassSet union(ClassSet other) {
@@ -1282,6 +1288,51 @@
builder.addIntervalList(other._intervalList);
return new ClassSet(_hierarchy, builder.buildIntervalList());
}
+
+ @override
+ Iterator<Class> get iterator =>
+ new _ClassSetIterator(_hierarchy, _intervalList);
+}
+
+/// Iterator for [ClassSet].
+class _ClassSetIterator implements Iterator<Class> {
+ final ClosedWorldClassHierarchy _hierarchy;
+ final Uint32List _intervalList;
+ int _intervalIndex;
+ int _classIndex;
+ int _classIndexLimit;
+
+ // Interval list is a list of pairs (start, end).
+ static const int _intervalIndexStep = 2;
+
+ _ClassSetIterator(this._hierarchy, this._intervalList)
+ : _intervalIndex = -_intervalIndexStep,
+ _classIndex = -1,
+ _classIndexLimit = -1;
+
+ @override
+ bool moveNext() {
+ if (_classIndex + 1 < _classIndexLimit) {
+ _classIndex++;
+ return true;
+ }
+
+ if (_intervalIndex + _intervalIndexStep < _intervalList.length) {
+ _intervalIndex += _intervalIndexStep;
+ _classIndex = _intervalList[_intervalIndex];
+ _classIndexLimit = _intervalList[_intervalIndex + 1];
+ assert(_classIndex < _classIndexLimit);
+ return true;
+ }
+
+ _classIndex = _classIndexLimit = -1;
+ return false;
+ }
+
+ @override
+ Class get current => (_classIndex >= 0)
+ ? _hierarchy._classesByTopDownIndex[_classIndex]
+ : null;
}
/// Heap for use in computing least upper bounds.
diff --git a/pkg/kernel/lib/target/flutter.dart b/pkg/kernel/lib/target/flutter.dart
index b75e33d..d0d73b7 100644
--- a/pkg/kernel/lib/target/flutter.dart
+++ b/pkg/kernel/lib/target/flutter.dart
@@ -12,6 +12,9 @@
@override
String get name => 'flutter';
+ @override
+ bool get enableSuperMixins => true;
+
// This is the order that bootstrap libraries are loaded according to
// `runtime/vm/object_store.h`.
@override
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 1d1e8c9..9eecdb8 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -76,6 +76,22 @@
/// promotion do not slow down compilation too much.
bool get disableTypeInference => false;
+ /// A derived class may change this to `true` to enable Flutter specific
+ /// "super-mixins" semantics.
+ ///
+ /// This semantics relaxes a number of constraint previously imposed on
+ /// mixins. Importantly it imposes the following change:
+ ///
+ /// An abstract class may contain a member with a super-invocation that
+ /// corresponds to a member of the superclass interface, but where the
+ /// actual superclass does not declare or inherit a matching method.
+ /// Since no amount of overriding can change this property, such a class
+ /// cannot be extended to a class that is not abstract, it can only be
+ /// used to derive a mixin from.
+ ///
+ /// See dartbug.com/31542 for details of the semantics.
+ bool get enableSuperMixins => false;
+
/// Perform target-specific transformations on the outlines stored in
/// [Program] when generating summaries.
///
diff --git a/pkg/kernel/test/class_hierarchy_test.dart b/pkg/kernel/test/class_hierarchy_test.dart
index ee2e6c5..ac89f98 100644
--- a/pkg/kernel/test/class_hierarchy_test.dart
+++ b/pkg/kernel/test/class_hierarchy_test.dart
@@ -92,6 +92,53 @@
expect(cwch.getSingleTargetForInterfaceInvocation(methodInE),
null); // no concrete subtypes
}
+
+ void test_getSubtypesOf() {
+ var a = addClass(new Class(name: 'A', supertype: objectSuper));
+ var b = addClass(new Class(name: 'B', supertype: objectSuper));
+ var c = addClass(new Class(name: 'C', supertype: objectSuper));
+
+ var d = addClass(new Class(name: 'D', supertype: a.asThisSupertype));
+
+ var e = addClass(new Class(
+ name: 'E',
+ supertype: b.asThisSupertype,
+ implementedTypes: [c.asThisSupertype]));
+
+ var f = addClass(new Class(
+ name: 'F',
+ supertype: e.asThisSupertype,
+ implementedTypes: [a.asThisSupertype]));
+
+ var g = addClass(new Class(name: 'G', supertype: objectSuper));
+
+ var h = addClass(new Class(
+ name: 'H',
+ supertype: g.asThisSupertype,
+ implementedTypes: [c.asThisSupertype, a.asThisSupertype]));
+
+ _assertTestLibraryText('''
+class A {}
+class B {}
+class C {}
+class D extends self::A {}
+class E extends self::B implements self::C {}
+class F extends self::E implements self::A {}
+class G {}
+class H extends self::G implements self::C, self::A {}
+''');
+
+ ClosedWorldClassHierarchy cwch = hierarchy as ClosedWorldClassHierarchy;
+
+ expect(cwch.getSubtypesOf(a), unorderedEquals([a, d, f, h]));
+ expect(cwch.getSubtypesOf(b), unorderedEquals([b, e, f]));
+ expect(cwch.getSubtypesOf(c), unorderedEquals([c, e, f, h]));
+ expect(cwch.getSubtypesOf(d), unorderedEquals([d]));
+ expect(cwch.getSubtypesOf(e), unorderedEquals([e, f]));
+ expect(cwch.getSubtypesOf(f), unorderedEquals([f]));
+ expect(cwch.getSubtypesOf(g), unorderedEquals([g, h]));
+ expect(cwch.getSubtypesOf(h), unorderedEquals([h]));
+ }
}
abstract class _ClassHierarchyTest {
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 2c26a32..2fa7f84 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -153,7 +153,7 @@
analyzer/tool/*: Skip # Issue 26813
# Don't analyze tests in strong mode yet
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
# Analyze dev_compiler but only run its tests on the vm
diff --git a/pkg/status_file/test/data/vm.status b/pkg/status_file/test/data/vm.status
index 05d9029..e446356 100644
--- a/pkg/status_file/test/data/vm.status
+++ b/pkg/status_file/test/data/vm.status
@@ -129,7 +129,7 @@
dart/optimized_stacktrace_line_test: StaticWarning
dart/optimized_stacktrace_line_and_column_test: StaticWarning
-[ $compiler == dart2analyzer && $builder_tag == strong ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
[ $compiler == app_jit ]
diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart
index 60e73f2..0345df1 100644
--- a/pkg/vm/bin/kernel_service.dart
+++ b/pkg/vm/bin/kernel_service.dart
@@ -41,6 +41,17 @@
const bool verbose = const bool.fromEnvironment('DFE_VERBOSE');
const String platformKernelFile = 'virtual_platform_kernel.dill';
+// NOTE: Any changes to these tags need to be reflected in kernel_isolate.cc
+// Tags used to indicate different requests to the dart frontend.
+//
+// Current tags include the following:
+// 0 - Perform normal compilation.
+// 1 - Update in-memory file system with in-memory sources (used by tests).
+// 2 - APP JIT snapshot training run for kernel_service.
+const int kCompileTag = 0;
+const int kUpdateSourcesTag = 1;
+const int kTrainTag = 2;
+
abstract class Compiler {
final FileSystem fileSystem;
final bool strongMode;
@@ -115,7 +126,7 @@
if (generator == null) {
generator = new IncrementalKernelGenerator(options, script);
}
- return await generator.computeDelta();
+ return await generator.computeDelta(entryPoint: script);
}
void invalidate(Uri uri) {
@@ -146,26 +157,21 @@
final Map<int, Compiler> isolateCompilers = new Map<int, Compiler>();
+Compiler lookupIncrementalCompiler(int isolateId) {
+ return isolateCompilers[isolateId];
+}
+
Future<Compiler> lookupOrBuildNewIncrementalCompiler(int isolateId,
List sourceFiles, Uri platformKernelPath, List<int> platformKernel,
{bool strongMode: false,
bool suppressWarnings: false,
bool syncAsync: false}) async {
- IncrementalCompiler compiler;
- if (isolateCompilers.containsKey(isolateId)) {
- compiler = isolateCompilers[isolateId];
- final HybridFileSystem fileSystem = compiler.fileSystem;
- if (sourceFiles != null) {
- for (int i = 0; i < sourceFiles.length ~/ 2; i++) {
- Uri uri = Uri.parse(sourceFiles[i * 2]);
- fileSystem.memory
- .entityForUri(uri)
- .writeAsBytesSync(sourceFiles[i * 2 + 1]);
- compiler.invalidate(uri);
- }
- }
+ IncrementalCompiler compiler = lookupIncrementalCompiler(isolateId);
+ if (compiler != null) {
+ updateSources(compiler, sourceFiles);
+ invalidateSources(compiler, sourceFiles);
} else {
- final FileSystem fileSystem = sourceFiles == null && platformKernel == null
+ final FileSystem fileSystem = sourceFiles.isEmpty && platformKernel == null
? StandardFileSystem.instance
: _buildFileSystem(sourceFiles, platformKernel);
@@ -182,12 +188,44 @@
return compiler;
}
+void updateSources(IncrementalCompiler compiler, List sourceFiles) {
+ final bool hasMemoryFS = compiler.fileSystem is HybridFileSystem;
+ if (sourceFiles.isNotEmpty) {
+ final FileSystem fs = compiler.fileSystem;
+ for (int i = 0; i < sourceFiles.length ~/ 2; i++) {
+ Uri uri = Uri.parse(sourceFiles[i * 2]);
+ List<int> source = sourceFiles[i * 2 + 1];
+ // The source is only provided by unit tests and is normally empty.
+ // Don't add an entry for the uri so the compiler will fallback to the
+ // real file system for the updated source.
+ if (hasMemoryFS && source != null) {
+ (fs as HybridFileSystem)
+ .memory
+ .entityForUri(uri)
+ .writeAsBytesSync(source);
+ }
+ }
+ }
+}
+
+void invalidateSources(IncrementalCompiler compiler, List sourceFiles) {
+ if (sourceFiles.isNotEmpty) {
+ for (int i = 0; i < sourceFiles.length ~/ 2; i++) {
+ compiler.invalidate(Uri.parse(sourceFiles[i * 2]));
+ }
+ }
+}
+
+// Process a request from the runtime. See KernelIsolate::CompileToKernel in
+// kernel_isolate.cc and Loader::SendKernelRequest in loader.cc.
Future _processLoadRequest(request) async {
if (verbose) print("DFE: request: $request");
int tag = request[0];
final SendPort port = request[1];
final String inputFileUri = request[2];
+ final Uri script =
+ inputFileUri != null ? Uri.base.resolve(inputFileUri) : null;
final bool incremental = request[4];
final bool strong = request[5];
final int isolateId = request[6];
@@ -195,7 +233,6 @@
final bool suppressWarnings = request[8];
final bool syncAsync = request[9];
- final Uri script = Uri.base.resolve(inputFileUri);
Uri platformKernelPath = null;
List<int> platformKernel = null;
if (request[3] is String) {
@@ -209,6 +246,25 @@
}
Compiler compiler;
+
+ // Update the in-memory file system with the provided sources. Currently, only
+ // unit tests compile sources that are not on the file system, so this can only
+ // happen during unit tests.
+ if (tag == kUpdateSourcesTag) {
+ assert(
+ incremental,
+ "Incremental compiler required for use of"
+ "'kUpdateSourcesTag'");
+ compiler = lookupIncrementalCompiler(isolateId);
+ assert(compiler != null);
+ updateSources(compiler, sourceFiles);
+ port.send(new CompilationResult.ok(null).toResponse());
+ return;
+ }
+
+ // script should only be null for kUpdateSourcesTag.
+ assert(script != null);
+
// TODO(aam): There should be no need to have an option to choose
// one compiler or another. We should always use an incremental
// compiler as its functionality is a super set of the other one. We need to
@@ -216,13 +272,15 @@
if (incremental) {
compiler = await lookupOrBuildNewIncrementalCompiler(
isolateId, sourceFiles, platformKernelPath, platformKernel,
- suppressWarnings: suppressWarnings, syncAsync: syncAsync);
+ strongMode: strong,
+ suppressWarnings: suppressWarnings,
+ syncAsync: syncAsync);
} else {
- final FileSystem fileSystem = sourceFiles == null && platformKernel == null
+ final FileSystem fileSystem = sourceFiles.isEmpty && platformKernel == null
? StandardFileSystem.instance
: _buildFileSystem(sourceFiles, platformKernel);
compiler = new SingleShotCompiler(fileSystem, platformKernelPath,
- requireMain: sourceFiles == null,
+ requireMain: sourceFiles.isEmpty,
strongMode: strong,
suppressWarnings: suppressWarnings,
syncAsync: syncAsync);
@@ -254,17 +312,21 @@
if (verbose) print("DFE:> ${result}");
- // Check whether this is a Loader request or a bootstrapping request from
- // KernelIsolate::CompileToKernel.
- final isBootstrapRequest = tag == null;
- if (isBootstrapRequest) {
- port.send(result.toResponse());
- } else {
- // See loader.cc for the code that handles these replies.
+ if (tag == kTrainTag) {
if (result.status != Status.ok) {
tag = -tag;
}
port.send([tag, inputFileUri, inputFileUri, null, result.payload]);
+ } else if (tag == kCompileTag) {
+ port.send(result.toResponse());
+ } else {
+ port.send([
+ -tag,
+ inputFileUri,
+ inputFileUri,
+ null,
+ new CompilationResult.errors(<String>["unknown tag"]).payload
+ ]);
}
}
@@ -296,7 +358,7 @@
// TODO(28532): Enable on Windows.
if (Platform.isWindows) return;
- var tag = 1;
+ var tag = kTrainTag;
var responsePort = new RawReceivePort();
responsePort.handler = (response) {
if (response[0] == tag) {
@@ -317,7 +379,7 @@
false /* incremental */,
false /* strong */,
1 /* isolateId chosen randomly */,
- null /* source files */,
+ [] /* source files */,
false /* suppress warnings */,
false /* synchronous async */,
];
diff --git a/pkg/vm/lib/incremental_compiler.dart b/pkg/vm/lib/incremental_compiler.dart
new file mode 100644
index 0000000..017d612
--- /dev/null
+++ b/pkg/vm/lib/incremental_compiler.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2018, 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.
+
+/// Defines wrapper class around incremental compiler to support
+/// the flow, where incremental deltas can be rejected by VM.
+import 'dart:async';
+
+import 'package:front_end/src/api_prototype/compiler_options.dart';
+import 'package:front_end/src/api_prototype/incremental_kernel_generator.dart';
+import 'package:kernel/kernel.dart';
+
+/// Wrapper around [IncrementalKernelGenerator] that keeps track of rejected
+/// deltas and combines them together into resultant program until it is
+/// accepted.
+class IncrementalCompiler {
+ IncrementalKernelGenerator _generator;
+ List<Program> _pendingDeltas;
+ CompilerOptions _compilerOptions;
+
+ IncrementalCompiler(this._compilerOptions, Uri entryPoint) {
+ _generator = new IncrementalKernelGenerator(_compilerOptions, entryPoint);
+ _pendingDeltas = <Program>[];
+ }
+
+ /// Recompiles invalidated files, produces incremental program.
+ ///
+ /// If [entryPoint] is specified, that points to new entry point for the
+ /// compilation. Otherwise, previously set entryPoint is used.
+ Future<Program> compile({Uri entryPoint}) async {
+ Program program = await _generator.computeDelta(entryPoint: entryPoint);
+ final bool firstDelta = _pendingDeltas.isEmpty;
+ _pendingDeltas.add(program);
+ if (firstDelta) {
+ return program;
+ }
+
+ // If more than one delta is pending, we need to combine them.
+ Map<Uri, Library> combined = <Uri, Library>{};
+ for (Program delta in _pendingDeltas) {
+ for (Library library in delta.libraries) {
+ combined[library.importUri] = library;
+ }
+ }
+ return new Program(libraries: combined.values.toList());
+ }
+
+ /// This lets incremental compiler know that results of last [compile] call
+ /// were accepted, don't need to be included into subsequent [compile] calls
+ /// results.
+ accept() {
+ _pendingDeltas.clear();
+ }
+
+ /// This tells incremental compiler that it needs rescan [uri] file during
+ /// next [compile] call.
+ invalidate(Uri uri) {
+ _generator.invalidate(uri);
+ }
+}
diff --git a/pkg/vm/lib/transformations/devirtualization.dart b/pkg/vm/lib/transformations/devirtualization.dart
index 550ece77..0e03957 100644
--- a/pkg/vm/lib/transformations/devirtualization.dart
+++ b/pkg/vm/lib/transformations/devirtualization.dart
@@ -14,8 +14,10 @@
/// Devirtualization of method invocations based on the class hierarchy
/// analysis. Assumes strong mode and closed world.
Program transformProgram(CoreTypes coreTypes, Program program) {
- new CHADevirtualization(coreTypes, program, new ClassHierarchy(program))
- .visitProgram(program);
+ void ignoreAmbiguousSupertypes(Class cls, Supertype a, Supertype b) {}
+ final hierarchy = new ClassHierarchy(program,
+ onAmbiguousSupertypes: ignoreAmbiguousSupertypes);
+ new CHADevirtualization(coreTypes, program, hierarchy).visitProgram(program);
return program;
}
diff --git a/pkg/vm/test/incremental_compiler_test.dart b/pkg/vm/test/incremental_compiler_test.dart
new file mode 100644
index 0000000..1e9dc9a
--- /dev/null
+++ b/pkg/vm/test/incremental_compiler_test.dart
@@ -0,0 +1,247 @@
+// Copyright (c) 2018, 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 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:front_end/src/api_prototype/compilation_message.dart';
+import 'package:front_end/src/api_prototype/compiler_options.dart';
+import 'package:front_end/src/compute_platform_binaries_location.dart';
+import 'package:json_rpc_2/json_rpc_2.dart' as json_rpc;
+import 'package:kernel/binary/ast_to_binary.dart';
+import 'package:kernel/binary/limited_ast_to_binary.dart';
+import 'package:kernel/kernel.dart';
+import 'package:kernel/target/targets.dart';
+import 'package:kernel/target/vm.dart';
+import 'package:kernel/text/ast_to_text.dart';
+import 'package:stream_channel/stream_channel.dart';
+import 'package:test/test.dart';
+import 'package:vm/incremental_compiler.dart';
+import 'package:web_socket_channel/io.dart';
+
+main() {
+ final platformKernel =
+ computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
+ final sdkRoot = computePlatformBinariesLocation();
+ final options = new CompilerOptions()
+ ..sdkRoot = sdkRoot
+ ..strongMode = true
+ ..target = new VmTarget(new TargetFlags(strongMode: true))
+ ..linkedDependencies = <Uri>[platformKernel]
+ ..reportMessages = true
+ ..onError = (CompilationMessage error) {
+ fail("Compilation error: ${error}");
+ };
+
+ group('basic', () {
+ test('compile', () async {
+ var systemTempDir = Directory.systemTemp;
+ var file = new File('${systemTempDir.path}/foo.dart')..createSync();
+ file.writeAsStringSync("main() {}\n");
+
+ IncrementalCompiler compiler = new IncrementalCompiler(options, file.uri);
+ Program program = await compiler.compile();
+
+ final StringBuffer buffer = new StringBuffer();
+ new Printer(buffer, showExternal: false, showMetadata: true)
+ .writeLibraryFile(program.mainMethod.enclosingLibrary);
+ expect(
+ buffer.toString(),
+ equals('library;\n'
+ 'import self as self;\n'
+ '\n'
+ 'static method main() → dynamic {}\n'));
+ });
+ });
+
+ group('reload', () {
+ test('picks up after rejected delta', () async {
+ var systemTempDir = Directory.systemTemp;
+ var file = new File('${systemTempDir.path}/foo.dart')..createSync();
+ file.writeAsStringSync("import 'bar.dart';\n"
+ "import 'baz.dart';\n"
+ "main() {\n"
+ " new A();\n"
+ " openReceivePortSoWeWontDie();"
+ "}\n");
+
+ var fileBar = new File('${systemTempDir.path}/bar.dart')..createSync();
+ fileBar.writeAsStringSync("class A<T> { int _a; }\n");
+
+ var fileBaz = new File('${systemTempDir.path}/baz.dart')..createSync();
+ fileBaz.writeAsStringSync("import 'dart:isolate';\n"
+ "openReceivePortSoWeWontDie() { new RawReceivePort(); }\n");
+
+ IncrementalCompiler compiler = new IncrementalCompiler(options, file.uri);
+ Program program = await compiler.compile();
+
+ File outputFile = new File('${systemTempDir.path}/foo.dart.dill');
+ await _writeProgramToFile(program, outputFile);
+
+ final List<String> vmArgs = [
+ '--trace_reload',
+ '--trace_reload_verbose',
+ '--enable-vm-service=0', // Note: use 0 to avoid port collisions.
+ '--pause_isolates_on_start',
+ outputFile.path
+ ];
+ final vm = await Process.start(Platform.executable, vmArgs);
+
+ final splitter = new LineSplitter();
+
+ vm.exitCode.then((exitCode) {
+ print("Compiler terminated with $exitCode exit code");
+ });
+
+ Completer<String> portLineCompleter = new Completer<String>();
+ vm.stdout.transform(UTF8.decoder).transform(splitter).listen((String s) {
+ print("vm stdout: $s");
+ if (!portLineCompleter.isCompleted) {
+ portLineCompleter.complete(s);
+ }
+ });
+
+ vm.stderr
+ .transform(UTF8.decoder)
+ .transform(splitter)
+ .toList()
+ .then((err) {
+ print(err.join('\n'));
+ expect(err.isEmpty, isTrue,
+ reason: "Should be no errors, but got ${err.join('\n')}");
+ });
+
+ String portLine = await portLineCompleter.future;
+
+ final RegExp observatoryPortRegExp =
+ new RegExp("Observatory listening on http://127.0.0.1:\([0-9]*\)/");
+ expect(observatoryPortRegExp.hasMatch(portLine), isTrue);
+ final match = observatoryPortRegExp.firstMatch(portLine);
+ final port = int.parse(match.group(1));
+
+ var remoteVm = new RemoteVm(port);
+ await remoteVm.resume();
+ compiler.accept();
+
+ // Confirm that without changes VM reloads nothing.
+ program = await compiler.compile();
+ await _writeProgramToFile(program, outputFile);
+ var reloadResult = await remoteVm.reload(new Uri.file(outputFile.path));
+ expect(reloadResult['success'], isTrue);
+ expect(reloadResult['details']['loadedLibraryCount'], equals(0));
+
+ // Introduce a change that force VM to reject the change.
+ fileBar.writeAsStringSync("class A<T,U> { int _a; }\n");
+ compiler.invalidate(fileBar.uri);
+ program = await compiler.compile();
+ await _writeProgramToFile(program, outputFile);
+ reloadResult = await remoteVm.reload(new Uri.file(outputFile.path));
+ expect(reloadResult['success'], isFalse);
+
+ // Fix a change so VM is happy to accept the change.
+ fileBar.writeAsStringSync("class A<T> { int _a; hi() => _a; }\n");
+ compiler.invalidate(fileBar.uri);
+ program = await compiler.compile();
+ await _writeProgramToFile(program, outputFile);
+ reloadResult = await remoteVm.reload(new Uri.file(outputFile.path));
+ expect(reloadResult['success'], isTrue);
+ expect(reloadResult['details']['loadedLibraryCount'], equals(2));
+ compiler.accept();
+
+ vm.kill();
+ });
+ });
+}
+
+_writeProgramToFile(Program program, File outputFile) async {
+ final IOSink sink = outputFile.openWrite();
+ final BinaryPrinter printer = new LimitedBinaryPrinter(
+ sink, (_) => true /* predicate */, false /* excludeUriToSource */);
+ printer.writeProgramFile(program);
+ await sink.close();
+}
+
+/// APIs to communicate with a remote VM via the VM's service protocol.
+///
+/// Only supports APIs to resume the program execution (when isolates are paused
+/// at startup) and to trigger hot reloads.
+class RemoteVm {
+ /// Port used to connect to the vm service protocol, typically 8181.
+ final int port;
+
+ /// An peer point used to send service protocol messages. The service
+ /// protocol uses JSON rpc on top of web-sockets.
+ json_rpc.Peer get rpc => _rpc ??= _createPeer();
+ json_rpc.Peer _rpc;
+
+ /// The main isolate ID of the running VM. Needed to indicate to the VM which
+ /// isolate to reload.
+ FutureOr<String> get mainId async => _mainId ??= await _computeMainId();
+ String _mainId;
+
+ RemoteVm([this.port = 8181]);
+
+ /// Establishes the JSON rpc connection.
+ json_rpc.Peer _createPeer() {
+ StreamChannel socket =
+ new IOWebSocketChannel.connect('ws://127.0.0.1:$port/ws');
+ var peer = new json_rpc.Peer(socket);
+ peer.listen().then((_) {
+ print('connection to vm-service closed');
+ return disconnect();
+ }).catchError((e) {
+ print('error connecting to the vm-service');
+ return disconnect();
+ });
+ return peer;
+ }
+
+ /// Retrieves the ID of the main isolate using the service protocol.
+ Future<String> _computeMainId() async {
+ var vm = await rpc.sendRequest('getVM');
+ var isolates = vm['isolates'];
+ for (var isolate in isolates) {
+ if (isolate['name'].contains(r'$main')) {
+ return isolate['id'];
+ }
+ }
+ return isolates.first['id'];
+ }
+
+ /// Send a request to the VM to reload sources from [entryUri].
+ ///
+ /// This will establish a connection with the VM assuming it is running on the
+ /// local machine and listening on [port] for service protocol requests.
+ ///
+ /// The result is the JSON map received from the reload request.
+ Future<Map> reload(Uri entryUri) async {
+ print("reload($entryUri)");
+ var id = await mainId;
+ print("got $id, sending reloadSources rpc request");
+ var result = await rpc.sendRequest('reloadSources', {
+ 'isolateId': id,
+ 'rootLibUri': entryUri.toString(),
+ });
+ print("got rpc result $result");
+ return result;
+ }
+
+ Future resume() async {
+ var id = await mainId;
+ await rpc.sendRequest('resume', {'isolateId': id});
+ }
+
+ /// Close any connections used to communicate with the VM.
+ Future disconnect() async {
+ if (_rpc == null) return null;
+ this._mainId = null;
+ if (!_rpc.isClosed) {
+ var future = _rpc.close();
+ _rpc = null;
+ return future;
+ }
+ return null;
+ }
+}
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index e1ce40e..efc087b 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -272,7 +272,9 @@
]
if (is_fuchsia) {
deps += [ "//zircon/public/lib/launchpad" ]
- public_deps = [ "//zircon/public/lib/fdio" ]
+ public_deps = [
+ "//zircon/public/lib/fdio",
+ ]
}
include_dirs = [ ".." ]
set_sources_assignment_filter([
@@ -380,6 +382,7 @@
"psapi.lib",
"ws2_32.lib",
"Rpcrt4.lib",
+ "shlwapi.lib",
"winmm.lib",
]
}
@@ -422,7 +425,9 @@
if (is_fuchsia) {
deps += [ "//garnet/public/lib/netstack/c" ]
- public_deps = [ "//zircon/public/lib/fdio" ]
+ public_deps = [
+ "//zircon/public/lib/fdio",
+ ]
configs -= [ "//build/config:symbol_visibility_hidden" ]
}
@@ -523,7 +528,9 @@
"//garnet/public/lib/netstack/c",
"//zircon/public/lib/launchpad",
]
- public_deps = [ "//zircon/public/lib/fdio" ]
+ public_deps = [
+ "//zircon/public/lib/fdio",
+ ]
}
sources = io_impl_sources + builtin_impl_sources + cli_impl_sources
@@ -849,6 +856,7 @@
"psapi.lib",
"ws2_32.lib",
"Rpcrt4.lib",
+ "shlwapi.lib",
"winmm.lib",
]
}
@@ -1148,6 +1156,7 @@
"psapi.lib",
"ws2_32.lib",
"Rpcrt4.lib",
+ "shlwapi.lib",
"winmm.lib",
]
}
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index f42ca27..d9fde37 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -207,6 +207,12 @@
return reinterpret_cast<void*>(file);
}
+void* DartUtils::OpenFileUri(const char* uri, bool write) {
+ File* file =
+ File::OpenUri(NULL, uri, write ? File::kWriteTruncate : File::kRead);
+ return reinterpret_cast<void*>(file);
+}
+
void DartUtils::ReadFile(const uint8_t** data, intptr_t* len, void* stream) {
ASSERT(data != NULL);
ASSERT(len != NULL);
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index e2972cc..5002f31 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -121,6 +121,7 @@
static char* DirName(const char* url);
static void* MapExecutable(const char* name, intptr_t* file_len);
static void* OpenFile(const char* name, bool write);
+ static void* OpenFileUri(const char* uri, bool write);
static void ReadFile(const uint8_t** data, intptr_t* file_len, void* stream);
static void WriteFile(const void* buffer, intptr_t num_bytes, void* stream);
static void CloseFile(void* stream);
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc
index 3e568ac..df9750e 100644
--- a/runtime/bin/dfe.cc
+++ b/runtime/bin/dfe.cc
@@ -78,8 +78,11 @@
}
frontend_filename_ = NULL;
- delete reinterpret_cast<kernel::Program*>(kernel_service_program_);
- kernel_service_program_ = NULL;
+ // Do NOT delete kernel_service_program_ in the destructor.
+ // It is always a full a dill file, hence it is used as
+ // argument to Dart_CreateIsolateFromKernel as well as loaded
+ // as the kernel program for the isolate. Hence, deleting here
+ // would lead to double deletion.
delete reinterpret_cast<kernel::Program*>(platform_program_);
platform_program_ = NULL;
@@ -278,36 +281,32 @@
bool DFE::TryReadKernelFile(const char* script_uri,
const uint8_t** kernel_ir,
- intptr_t* kernel_ir_size) const {
- if (strlen(script_uri) >= 8 && strncmp(script_uri, "file:///", 8) == 0) {
- script_uri = script_uri + 7;
- }
-
+ intptr_t* kernel_ir_size) {
*kernel_ir = NULL;
*kernel_ir_size = -1;
- void* script_file = DartUtils::OpenFile(script_uri, false);
- if (script_file != NULL) {
- const uint8_t* buffer = NULL;
- DartUtils::ReadFile(&buffer, kernel_ir_size, script_file);
- DartUtils::CloseFile(script_file);
- if (*kernel_ir_size > 0 && buffer != NULL) {
- if (DartUtils::SniffForMagicNumber(buffer, *kernel_ir_size) !=
- DartUtils::kKernelMagicNumber) {
- free(const_cast<uint8_t*>(buffer));
- *kernel_ir = NULL;
- *kernel_ir_size = -1;
- return false;
- } else {
- // Do not free buffer if this is a kernel file - kernel_file will be
- // backed by the same memory as the buffer and caller will own it.
- // Caller is responsible for freeing the buffer when this function
- // returns true.
- *kernel_ir = buffer;
- return true;
- }
- }
+ void* script_file = DartUtils::OpenFileUri(script_uri, false);
+ if (script_file == NULL) {
+ return false;
}
- return false;
+ const uint8_t* buffer = NULL;
+ DartUtils::ReadFile(&buffer, kernel_ir_size, script_file);
+ DartUtils::CloseFile(script_file);
+ if (*kernel_ir_size == 0 || buffer == NULL) {
+ return false;
+ }
+ if (DartUtils::SniffForMagicNumber(buffer, *kernel_ir_size) !=
+ DartUtils::kKernelMagicNumber) {
+ free(const_cast<uint8_t*>(buffer));
+ *kernel_ir = NULL;
+ *kernel_ir_size = -1;
+ return false;
+ }
+ // Do not free buffer if this is a kernel file - kernel_file will be
+ // backed by the same memory as the buffer and caller will own it.
+ // Caller is responsible for freeing the buffer when this function
+ // returns true.
+ *kernel_ir = buffer;
+ return true;
}
} // namespace bin
diff --git a/runtime/bin/dfe.h b/runtime/bin/dfe.h
index 0ee4c25..72dacfe 100644
--- a/runtime/bin/dfe.h
+++ b/runtime/bin/dfe.h
@@ -67,6 +67,15 @@
static bool KernelServiceDillAvailable();
+ // Tries to read [script_uri] as a Kernel IR file.
+ // Returns `true` if successful and sets [kernel_file] and [kernel_length]
+ // to be the kernel IR contents.
+ // The caller is responsible for free()ing [kernel_file] if `true`
+ // was returned.
+ static bool TryReadKernelFile(const char* script_uri,
+ const uint8_t** kernel_ir,
+ intptr_t* kernel_ir_size);
+
// We distinguish between "intent to use Dart frontend" vs "can actually
// use Dart frontend". The method UseDartFrontend tells us about the
// intent to use DFE. This method tells us if Dart frontend can actually
@@ -78,15 +87,6 @@
void* LoadKernelServiceProgram();
private:
- // Tries to read [script_uri] as a Kernel IR file.
- // Returns `true` if successful and sets [kernel_file] and [kernel_length]
- // to be the kernel IR contents.
- // The caller is responsible for free()ing [kernel_file] if `true`
- // was returned.
- bool TryReadKernelFile(const char* script_uri,
- const uint8_t** kernel_ir,
- intptr_t* kernel_ir_size) const;
-
bool use_dfe_;
char* frontend_filename_;
diff --git a/runtime/bin/file.h b/runtime/bin/file.h
index 3e1ab2a..ae0096e 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -175,6 +175,10 @@
// mode contains kTruncate. Assumes we are in an API scope.
static File* Open(Namespace* namespc, const char* path, FileOpenMode mode);
+ // Same as [File::Open], but attempts to convert uri to path before opening
+ // the file. If conversion fails, uri is treated as a path.
+ static File* OpenUri(Namespace* namespc, const char* uri, FileOpenMode mode);
+
// Create a file object for the specified stdio file descriptor
// (stdin, stout or stderr).
static File* OpenStdio(int fd);
diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
index fdaab8c..3ac8908 100644
--- a/runtime/bin/file_android.cc
+++ b/runtime/bin/file_android.cc
@@ -236,6 +236,12 @@
return new File(new FileHandle(fd));
}
+File* File::OpenUri(Namespace* namespc, const char* uri, FileOpenMode mode) {
+ const char* path = (strlen(uri) >= 8 && strncmp(uri, "file:///", 8) == 0)
+ ? uri + 7 : uri;
+ return File::Open(namespc, path, mode);
+}
+
File* File::OpenStdio(int fd) {
return new File(new FileHandle(fd));
}
diff --git a/runtime/bin/file_fuchsia.cc b/runtime/bin/file_fuchsia.cc
index 929d5e1..dbec7d8 100644
--- a/runtime/bin/file_fuchsia.cc
+++ b/runtime/bin/file_fuchsia.cc
@@ -215,6 +215,12 @@
return new File(new FileHandle(fd));
}
+File* File::OpenUri(Namespace* namespc, const char* uri, FileOpenMode mode) {
+ const char* path = (strlen(uri) >= 8 && strncmp(uri, "file:///", 8) == 0)
+ ? uri + 7 : uri;
+ return File::Open(namespc, path, mode);
+}
+
File* File::OpenStdio(int fd) {
return new File(new FileHandle(fd));
}
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc
index 90098c7..c91b7f8 100644
--- a/runtime/bin/file_linux.cc
+++ b/runtime/bin/file_linux.cc
@@ -235,6 +235,12 @@
return new File(new FileHandle(fd));
}
+File* File::OpenUri(Namespace* namespc, const char* uri, FileOpenMode mode) {
+ const char* path = (strlen(uri) >= 8 && strncmp(uri, "file:///", 8) == 0)
+ ? uri + 7 : uri;
+ return File::Open(namespc, path, mode);
+}
+
File* File::OpenStdio(int fd) {
return new File(new FileHandle(fd));
}
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
index 6587527..308be6d 100644
--- a/runtime/bin/file_macos.cc
+++ b/runtime/bin/file_macos.cc
@@ -235,6 +235,12 @@
return new File(new FileHandle(fd));
}
+File* File::OpenUri(Namespace* namespc, const char* uri, FileOpenMode mode) {
+ const char* path = (strlen(uri) >= 8 && strncmp(uri, "file:///", 8) == 0)
+ ? uri + 7 : uri;
+ return File::Open(namespc, path, mode);
+}
+
File* File::OpenStdio(int fd) {
return new File(new FileHandle(fd));
}
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 77e9762..abc364d 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -10,6 +10,7 @@
#include <WinIoCtl.h> // NOLINT
#include <fcntl.h> // NOLINT
#include <io.h> // NOLINT
+#include <Shlwapi.h> // NOLINT
#include <stdio.h> // NOLINT
#include <string.h> // NOLINT
#include <sys/stat.h> // NOLINT
@@ -279,6 +280,18 @@
return file;
}
+File* File::OpenUri(Namespace* namespc, const char* uri, FileOpenMode mode) {
+ Utf8ToWideScope uri_w(uri);
+ if (!UrlIsFileUrlW(uri_w.wide())) {
+ return FileOpenW(uri_w.wide(), mode);
+ }
+ wchar_t filename_w[MAX_PATH];
+ DWORD filename_len = MAX_PATH;
+ HRESULT result = PathCreateFromUrlW(uri_w.wide(),
+ filename_w, &filename_len, /* dwFlags= */ NULL);
+ return (result == S_OK) ? FileOpenW(filename_w, mode) : NULL;
+}
+
File* File::OpenStdio(int fd) {
int stdio_fd = -1;
switch (fd) {
diff --git a/runtime/bin/io_service_patch.dart b/runtime/bin/io_service_patch.dart
index 4c024fd..d763ebb 100644
--- a/runtime/bin/io_service_patch.dart
+++ b/runtime/bin/io_service_patch.dart
@@ -10,7 +10,7 @@
static const int maxPorts = 32;
List<SendPort> _ports = <SendPort>[];
List<SendPort> _freePorts = <SendPort>[];
- HashMap<int, SendPort> _usedPorts = new HashMap<int, SendPort>();
+ Map<int, SendPort> _usedPorts = new HashMap<int, SendPort>();
_IOServicePorts();
diff --git a/runtime/bin/loader.cc b/runtime/bin/loader.cc
index 0f1db6e..9774833 100644
--- a/runtime/bin/loader.cc
+++ b/runtime/bin/loader.cc
@@ -664,8 +664,17 @@
}
Dart_Isolate current = Dart_CurrentIsolate();
if (tag == Dart_kKernelTag) {
- ASSERT(!Dart_IsServiceIsolate(current) && !Dart_IsKernelIsolate(current));
- return dfe.ReadKernelBinary(current, url_string);
+ const uint8_t* kernel_ir = NULL;
+ intptr_t kernel_ir_size = 0;
+
+ // Check to see if url_string points to a valid dill file. If so, return the
+ // loaded kernel::Program.
+ if (!DFE::TryReadKernelFile(url_string, &kernel_ir, &kernel_ir_size)) {
+ return DartUtils::NewError("'%s' is not a kernel file", url_string);
+ }
+ void* kernel_program =
+ Dart_ReadKernelBinary(kernel_ir, kernel_ir_size, ReleaseFetchedBytes);
+ return Dart_NewExternalTypedData(Dart_TypedData_kUint64, kernel_program, 1);
}
if (tag == Dart_kImportResolvedExtensionTag) {
if (strncmp(url_string, "file://", 7)) {
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 2741f90..a5cc7ac 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -160,6 +160,39 @@
SAVE_ERROR_AND_EXIT(result); \
}
+static void WriteDepsFile(Dart_Isolate isolate) {
+ if (Options::snapshot_deps_filename() == NULL) {
+ return;
+ }
+ Loader::ResolveDependenciesAsFilePaths();
+ IsolateData* isolate_data =
+ reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate));
+ ASSERT(isolate_data != NULL);
+ MallocGrowableArray<char*>* dependencies = isolate_data->dependencies();
+ ASSERT(dependencies != NULL);
+ File* file =
+ File::Open(NULL, Options::snapshot_deps_filename(), File::kWriteTruncate);
+ if (file == NULL) {
+ ErrorExit(kErrorExitCode, "Error: Unable to open snapshot depfile: %s\n\n",
+ Options::snapshot_deps_filename());
+ }
+ bool success = true;
+ success &= file->Print("%s: ", Options::snapshot_filename());
+ for (intptr_t i = 0; i < dependencies->length(); i++) {
+ char* dep = dependencies->At(i);
+ success &= file->Print("%s ", dep);
+ free(dep);
+ }
+ success &= file->Print("\n");
+ if (!success) {
+ ErrorExit(kErrorExitCode, "Error: Unable to write snapshot depfile: %s\n\n",
+ Options::snapshot_deps_filename());
+ }
+ file->Release();
+ isolate_data->set_dependencies(NULL);
+ delete dependencies;
+}
+
static void SnapshotOnExitHook(int64_t exit_code) {
if (Dart_CurrentIsolate() != main_isolate) {
Log::PrintErr(
@@ -170,6 +203,7 @@
}
if (exit_code == 0) {
Snapshot::GenerateAppJIT(Options::snapshot_filename());
+ WriteDepsFile(main_isolate);
}
}
@@ -491,19 +525,6 @@
}
if (!isolate_run_app_snapshot) {
kernel_program = dfe.ReadScript(script_uri);
- if (dfe.UseDartFrontend() && (kernel_program == NULL)) {
- if (!dfe.CanUseDartFrontend()) {
- *error = OS::SCreate(NULL, "Dart frontend unavailable to compile %s.",
- script_uri);
- return NULL;
- }
- kernel_program =
- dfe.CompileAndReadScript(script_uri, error, exit_code, flags->strong);
- if (kernel_program == NULL) {
- // Error message would have been set by DFE::CompileAndReadScript.
- return NULL;
- }
- }
}
#endif // !defined(DART_PRECOMPILED_RUNTIME)
@@ -514,26 +535,48 @@
}
Dart_Isolate isolate = NULL;
- if (kernel_program != NULL) {
-#if defined(DART_PRECOMPILED_RUNTIME)
- UNREACHABLE();
- return NULL;
-#else
- isolate_data->kernel_program = kernel_program;
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+ if (dfe.UseDartFrontend()) {
void* platform_program = dfe.platform_program(flags->strong) != NULL
? dfe.platform_program(flags->strong)
: kernel_program;
+
+ if (platform_program == NULL) {
+ FATAL("platform_program cannot be NULL.");
+ }
// TODO(sivachandra): When the platform program is unavailable, check if
// application kernel binary is self contained or an incremental binary.
// Isolate should be created only if it is a self contained kernel binary.
isolate = Dart_CreateIsolateFromKernel(script_uri, main, platform_program,
flags, isolate_data, error);
-#endif // !defined(DART_PRECOMPILED_RUNTIME)
+
+ if (!isolate_run_app_snapshot && kernel_program == NULL) {
+ if (!dfe.CanUseDartFrontend()) {
+ *error = OS::SCreate(NULL, "Dart frontend unavailable to compile %s.",
+ script_uri);
+ return NULL;
+ }
+
+ kernel_program =
+ dfe.CompileAndReadScript(script_uri, error, exit_code, flags->strong);
+ if (kernel_program == NULL) {
+ if (Dart_CurrentIsolate() != NULL) {
+ Dart_ShutdownIsolate();
+ }
+ return NULL;
+ }
+ }
+ isolate_data->kernel_program = kernel_program;
} else {
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
+
isolate = Dart_CreateIsolate(script_uri, main, isolate_snapshot_data,
isolate_snapshot_instructions, flags,
isolate_data, error);
+#if !defined(DART_PRECOMPILED_RUNTIME)
}
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
if (isolate == NULL) {
delete isolate_data;
return NULL;
@@ -916,37 +959,7 @@
}
}
- if (Options::snapshot_deps_filename() != NULL) {
- Loader::ResolveDependenciesAsFilePaths();
- IsolateData* isolate_data =
- reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate));
- ASSERT(isolate_data != NULL);
- MallocGrowableArray<char*>* dependencies = isolate_data->dependencies();
- ASSERT(dependencies != NULL);
- File* file = File::Open(NULL, Options::snapshot_deps_filename(),
- File::kWriteTruncate);
- if (file == NULL) {
- ErrorExit(kErrorExitCode,
- "Error: Unable to open snapshot depfile: %s\n\n",
- Options::snapshot_deps_filename());
- }
- bool success = true;
- success &= file->Print("%s: ", Options::snapshot_filename());
- for (intptr_t i = 0; i < dependencies->length(); i++) {
- char* dep = dependencies->At(i);
- success &= file->Print("%s ", dep);
- free(dep);
- }
- success &= file->Print("\n");
- if (!success) {
- ErrorExit(kErrorExitCode,
- "Error: Unable to write snapshot depfile: %s\n\n",
- Options::snapshot_deps_filename());
- }
- file->Release();
- isolate_data->set_dependencies(NULL);
- delete dependencies;
- }
+ WriteDepsFile(isolate);
Dart_ExitScope();
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 6f58f55..0b31bf7 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1885,6 +1885,19 @@
intptr_t length);
/**
+ * Returns a List of the desired length with the desired element type.
+ *
+ * \param element_type Handle to a type object. E.g., from Dart_GetType.
+ *
+ * \param length The length of the list.
+ *
+ * \return The List object if no error occurs. Otherwise returns
+ * an error handle.
+ */
+DART_EXPORT Dart_Handle Dart_NewListOfType(Dart_Handle element_type,
+ intptr_t length);
+
+/**
* Gets the length of a List.
*
* May generate an unhandled exception error.
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart
index 2170364..820594a 100644
--- a/runtime/lib/array_patch.dart
+++ b/runtime/lib/array_patch.dart
@@ -15,7 +15,14 @@
@patch
class List<E> {
@patch
- factory List([int length]) = List<E>._internal;
+ factory List([int length = _GROWABLE_ARRAY_MARKER]) {
+ if (identical(length, _GROWABLE_ARRAY_MARKER)) {
+ return new _GrowableList<E>(0);
+ }
+ // All error handling on the length parameter is done at the implementation
+ // of new _List.
+ return new _List<E>(length);
+ }
@patch
factory List.filled(int length, E fill, {bool growable: false}) {
@@ -58,17 +65,6 @@
return makeFixedListUnmodifiable(result);
}
- // The List factory constructor redirects to this one so that we can change
- // length's default value from the one in the SDK's implementation.
- factory List._internal([int length = _GROWABLE_ARRAY_MARKER]) {
- if (identical(length, _GROWABLE_ARRAY_MARKER)) {
- return new _GrowableList<E>(0);
- }
- // All error handling on the length parameter is done at the implementation
- // of new _List.
- return new _List<E>(length);
- }
-
// Factory constructing a mutable List from a parser generated List literal.
// [elements] contains elements that are already type checked.
factory List._fromLiteral(List elements) {
diff --git a/runtime/lib/bigint_patch.dart b/runtime/lib/bigint_patch.dart
index 5ad216f..0eab071 100644
--- a/runtime/lib/bigint_patch.dart
+++ b/runtime/lib/bigint_patch.dart
@@ -54,7 +54,7 @@
_BigIntImpl.parse(source, radix: radix);
@patch
- factory BigInt.from(num value) = _BigIntImpl.from;
+ factory BigInt.from(num value) => new _BigIntImpl.from(value);
}
int _max(int a, int b) => a > b ? a : b;
diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart
index 65d31bf..709e13e 100644
--- a/runtime/lib/collection_patch.dart
+++ b/runtime/lib/collection_patch.dart
@@ -50,14 +50,14 @@
}
@patch
- factory HashMap.identity() = _IdentityHashMap<K, V>;
+ factory HashMap.identity() => new _IdentityHashMap<K, V>();
Set<K> _newKeySet();
}
const int _MODIFICATION_COUNT_MASK = 0x3fffffff;
-class _HashMap<K, V> implements HashMap<K, V> {
+class _HashMap<K, V> extends MapBase<K, V> implements HashMap<K, V> {
static const int _INITIAL_CAPACITY = 8;
int _elementCount = 0;
@@ -240,8 +240,6 @@
_buckets = newBuckets;
}
- String toString() => Maps.mapToString(this);
-
Set<K> _newKeySet() => new _HashSet<K>();
}
@@ -340,8 +338,6 @@
return null;
}
- String toString() => Maps.mapToString(this);
-
Set<K> _newKeySet() => new _CustomHashSet<K>(_equals, _hashCode, _validKey);
}
@@ -431,8 +427,6 @@
return null;
}
- String toString() => Maps.mapToString(this);
-
Set<K> _newKeySet() => new _IdentityHashSet<K>();
}
@@ -558,7 +552,7 @@
}
@patch
- factory HashSet.identity() = _IdentityHashSet<E>;
+ factory HashSet.identity() => new _IdentityHashSet<E>();
}
class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> {
@@ -572,6 +566,8 @@
bool _equals(e1, e2) => e1 == e2;
int _hashCode(e) => e.hashCode;
+ static Set<R> _newEmpty<R>() => new _HashSet<R>();
+
// Iterable.
Iterator<E> get iterator => new _HashSetIterator<E>(this);
@@ -732,12 +728,15 @@
}
HashSet<E> _newSet() => new _HashSet<E>();
+ HashSet<R> _newSimilarSet<R>() => new _HashSet<R>();
}
class _IdentityHashSet<E> extends _HashSet<E> {
int _hashCode(e) => identityHashCode(e);
bool _equals(e1, e2) => identical(e1, e2);
+
HashSet<E> _newSet() => new _IdentityHashSet<E>();
+ HashSet<R> _newSimilarSet<R>() => new _IdentityHashSet<R>();
}
class _CustomHashSet<E> extends _HashSet<E> {
@@ -781,6 +780,7 @@
int _hashCode(e) => _hasher(e);
HashSet<E> _newSet() => new _CustomHashSet<E>(_equality, _hasher, _validKey);
+ HashSet<R> _newSimilarSet<R>() => new _HashSet<R>();
}
class _HashSetEntry<E> {
@@ -872,7 +872,7 @@
}
@patch
- factory LinkedHashMap.identity() = _CompactLinkedIdentityHashMap<K, V>;
+ factory LinkedHashMap.identity() => new _CompactLinkedIdentityHashMap<K, V>();
}
@patch
@@ -909,5 +909,5 @@
}
@patch
- factory LinkedHashSet.identity() = _CompactLinkedIdentityHashSet<E>;
+ factory LinkedHashSet.identity() => new _CompactLinkedIdentityHashSet<E>();
}
diff --git a/runtime/lib/compact_hash.dart b/runtime/lib/compact_hash.dart
index ff26bff..742457a 100644
--- a/runtime/lib/compact_hash.dart
+++ b/runtime/lib/compact_hash.dart
@@ -400,7 +400,7 @@
// Iterates through _data[_offset + _step], _data[_offset + 2*_step], ...
// and checks for concurrent modification.
-class _CompactIterable<E> extends IterableBase<E> {
+class _CompactIterable<E> extends Iterable<E> {
final _table;
final List _data;
final int _len;
@@ -456,6 +456,15 @@
assert(_HashBase._UNUSED_PAIR == 0);
}
+ static Set<R> _newEmpty<R>() => new _CompactLinkedHashSet<R>();
+
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R> ? self : Set.castFrom<E, R>(this, newSet: _newEmpty);
+ }
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this, newSet: _newEmpty);
+
int get length => _usedData - _deletedKeys;
void _rehash() {
@@ -589,6 +598,15 @@
class _CompactLinkedIdentityHashSet<E> extends _CompactLinkedHashSet<E>
with _IdenticalAndIdentityHashCode {
Set<E> toSet() => new _CompactLinkedIdentityHashSet<E>()..addAll(this);
+
+ static Set<R> _newEmpty<R>() => new _CompactLinkedIdentityHashSet<R>();
+
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R> ? self : Set.castFrom<E, R>(this, newSet: _newEmpty);
+ }
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this, newSet: _newEmpty);
}
class _CompactLinkedCustomHashSet<E> extends _CompactLinkedHashSet<E> {
@@ -606,6 +624,13 @@
_CompactLinkedCustomHashSet(this._equality, this._hasher, validKey)
: _validKey = (validKey != null) ? validKey : new _TypeTest<E>().test;
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R> ? self : Set.castFrom<E, R>(this);
+ }
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this);
+
Set<E> toSet() =>
new _CompactLinkedCustomHashSet<E>(_equality, _hasher, _validKey)
..addAll(this);
diff --git a/runtime/lib/core_patch.dart b/runtime/lib/core_patch.dart
index c7af7be..3bbb755 100644
--- a/runtime/lib/core_patch.dart
+++ b/runtime/lib/core_patch.dart
@@ -36,7 +36,9 @@
LinkedList,
LinkedListEntry,
ListBase,
+ MapBase,
Maps,
+ UnmodifiableMapBase,
UnmodifiableMapView;
import "dart:convert" show ascii, Encoding, json, latin1, utf8;
diff --git a/runtime/lib/immutable_map.dart b/runtime/lib/immutable_map.dart
index be854d6..726a376 100644
--- a/runtime/lib/immutable_map.dart
+++ b/runtime/lib/immutable_map.dart
@@ -81,9 +81,35 @@
throw new UnsupportedError("Cannot remove from unmodifiable Map");
}
- String toString() {
- return Maps.mapToString(this);
+ Iterable<MapEntry<K, V>> get entries =>
+ new _ImmutableMapEntryIterable<K, V>(this);
+
+ Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> f(K key, V value)) {
+ var result = <K2, V2>{};
+ for (int i = 0; i < _kvPairs.length; i += 2) {
+ var entry = f(_kvPairs[i], _kvPairs[i + 1]);
+ result[entry.key] = entry.value;
+ }
+ return result;
}
+
+ void addEntries(Iterable<MapEntry<K, V>> newEntries) {
+ throw new UnsupportedError("Cannot modify an unmodifiable Map");
+ }
+
+ V update(K key, V update(V value), {V ifAbsent()}) {
+ throw new UnsupportedError("Cannot modify an unmodifiable Map");
+ }
+
+ void updateAll(V update(K key, V value)) {
+ throw new UnsupportedError("Cannot modify an unmodifiable Map");
+ }
+
+ void removeWhere(bool predicate(K key, V value)) {
+ throw new UnsupportedError("Cannot modify an unmodifiable Map");
+ }
+
+ String toString() => MapBase.mapToString(this);
}
class _ImmutableMapKeyIterable<E> extends EfficientLengthIterable<E> {
@@ -108,22 +134,33 @@
int get length => _map.length;
}
+class _ImmutableMapEntryIterable<K, V>
+ extends EfficientLengthIterable<MapEntry<K, V>> {
+ final _ImmutableMap _map;
+ _ImmutableMapEntryIterable(this._map);
+
+ Iterator<MapEntry<K, V>> get iterator {
+ return new _ImmutableMapEntryIterator<K, V>(_map);
+ }
+
+ int get length => _map.length;
+}
+
class _ImmutableMapKeyIterator<E> implements Iterator<E> {
_ImmutableMap _map;
- int _index = -1;
+ int _nextIndex = 0;
E _current;
_ImmutableMapKeyIterator(this._map);
bool moveNext() {
- int newIndex = _index + 1;
+ int newIndex = _nextIndex;
if (newIndex < _map.length) {
- _index = newIndex;
+ _nextIndex = newIndex + 1;
_current = _map._kvPairs[newIndex * 2];
return true;
}
_current = null;
- _index = _map.length;
return false;
}
@@ -132,22 +169,43 @@
class _ImmutableMapValueIterator<E> implements Iterator<E> {
_ImmutableMap _map;
- int _index = -1;
+ int _nextIndex = 0;
E _current;
_ImmutableMapValueIterator(this._map);
bool moveNext() {
- int newIndex = _index + 1;
+ int newIndex = _nextIndex;
if (newIndex < _map.length) {
- _index = newIndex;
+ _nextIndex = newIndex + 1;
_current = _map._kvPairs[newIndex * 2 + 1];
return true;
}
_current = null;
- _index = _map.length;
return false;
}
E get current => _current;
}
+
+class _ImmutableMapEntryIterator<K, V> implements Iterator<MapEntry<K, V>> {
+ _ImmutableMap _map;
+ int _nextIndex = 0;
+ MapEntry<K, V> _current;
+
+ _ImmutableMapEntryIterator(this._map);
+
+ bool moveNext() {
+ int newIndex = _nextIndex;
+ if (newIndex < _map.length) {
+ _nextIndex = newIndex + 1;
+ _current = new MapEntry<K, V>(
+ _map._kvPairs[newIndex * 2], _map._kvPairs[newIndex * 2 + 1]);
+ return true;
+ }
+ _current = null;
+ return false;
+ }
+
+ MapEntry<K, V> get current => _current;
+}
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index ad4f63b..354aa46 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -20,17 +20,18 @@
@patch
class ReceivePort {
@patch
- factory ReceivePort() = _ReceivePortImpl;
+ factory ReceivePort() => new _ReceivePortImpl();
@patch
- factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) =
- _ReceivePortImpl.fromRawReceivePort;
+ factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) {
+ return new _ReceivePortImpl.fromRawReceivePort(rawPort);
+ }
}
@patch
class Capability {
@patch
- factory Capability() = _CapabilityImpl;
+ factory Capability() => new _CapabilityImpl();
}
class _CapabilityImpl implements Capability {
diff --git a/runtime/lib/map_patch.dart b/runtime/lib/map_patch.dart
index 10dd115..3e71459 100644
--- a/runtime/lib/map_patch.dart
+++ b/runtime/lib/map_patch.dart
@@ -26,5 +26,5 @@
}
@patch
- factory Map() = LinkedHashMap<K, V>;
+ factory Map() => new LinkedHashMap<K, V>();
}
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index 3030af2..a64c3c6 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -483,12 +483,8 @@
const TypeArguments& type_arguments =
TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0));
const intptr_t len = type_arguments.Length();
- const Array& type_list = Array::Handle(zone, Array::New(len));
- TypeArguments& type_list_type_args =
- TypeArguments::Handle(zone, TypeArguments::New(1));
- type_list_type_args.SetTypeAt(0, Type::Handle(zone, Type::DartTypeType()));
- type_list_type_args = type_list_type_args.Canonicalize();
- type_list.SetTypeArguments(type_list_type_args);
+ const Array& type_list = Array::Handle(
+ zone, Array::New(len, Type::Handle(zone, Type::DartTypeType())));
AbstractType& type = AbstractType::Handle(zone);
for (intptr_t i = 0; i < len; i++) {
type = type_arguments.TypeAt(i);
diff --git a/runtime/lib/timer_impl.dart b/runtime/lib/timer_impl.dart
index 375caa2..250d86c 100644
--- a/runtime/lib/timer_impl.dart
+++ b/runtime/lib/timer_impl.dart
@@ -146,6 +146,8 @@
var _indexOrNext; // Index if part of the TimerHeap, link otherwise.
int _id; // Incrementing id to enable sorting of timers with same expiry.
+ int _tick = 0; // Backing for [tick],
+
// Get the next available id. We accept collisions and reordering when the
// _idCount overflows and the timers expire at the same millisecond.
static int _nextId() {
@@ -197,6 +199,8 @@
bool get isActive => _callback != null;
+ int get tick => _tick;
+
// Cancels a set timer. The timer is removed from the timer heap if it is a
// non-zero timer. Zero timers are kept in the list as they need to consume
// the corresponding pending message.
@@ -363,7 +367,18 @@
if (!timer._repeating) {
// Mark timer as inactive.
timer._callback = null;
+ } else if (timer._milliSeconds > 0) {
+ var ms = timer._milliSeconds;
+ int overdue =
+ VMLibraryHooks.timerMillisecondClock() - timer._wakeupTime;
+ if (overdue > ms) {
+ int missedTicks = overdue ~/ ms;
+ timer._wakeupTime += missedTicks * ms;
+ timer._tick += missedTicks;
+ }
}
+ timer._tick += 1;
+
callback(timer);
// Re-insert repeating timer if not canceled.
if (timer._repeating && (timer._callback != null)) {
diff --git a/runtime/lib/typed_data_patch.dart b/runtime/lib/typed_data_patch.dart
index 1d500fd..5e2312c 100644
--- a/runtime/lib/typed_data_patch.dart
+++ b/runtime/lib/typed_data_patch.dart
@@ -112,6 +112,47 @@
List<int> _createList(int length);
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<int, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<int, R>(this);
+
+ void set first(int value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[0] = value;
+ }
+
+ void set last(int value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[this.length - 1] = value;
+ }
+
+ int indexWhere(bool test(int element), [int start = 0]) {
+ if (start < 0) start = 0;
+ for (int i = start; i < length; i++) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(int element), [int start]) {
+ if (start == null || start >= this.length) start = this.length - 1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ List<int> operator +(List<int> other) {
+ int totalLength = this.length + other.length;
+ return <int>[]
+ ..length = totalLength
+ ..setRange(0, this.length, this)
+ ..setRange(this.length, totalLength, other);
+ }
+
bool contains(Object element) {
var len = this.length;
for (var i = 0; i < len; ++i) {
@@ -298,7 +339,7 @@
throw IterableElementError.noElement();
}
- int singleWhere(bool test(int element)) {
+ int singleWhere(bool test(int element), {int orElse()}) {
var result = null;
bool foundMatching = false;
var len = this.length;
@@ -313,6 +354,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -424,6 +466,47 @@
List<double> _createList(int length);
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<double, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<double, R>(this);
+
+ void set first(double value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[0] = value;
+ }
+
+ void set last(double value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[this.length - 1] = value;
+ }
+
+ int indexWhere(bool test(double element), [int start = 0]) {
+ if (start < 0) start = 0;
+ for (int i = start; i < length; i++) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(double element), [int start]) {
+ if (start == null || start >= this.length) start = this.length - 1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ List<double> operator +(List<double> other) {
+ int totalLength = this.length + other.length;
+ return <double>[]
+ ..length = totalLength
+ ..setRange(0, this.length, this)
+ ..setRange(this.length, totalLength, other);
+ }
+
bool contains(Object element) {
var len = this.length;
for (var i = 0; i < len; ++i) {
@@ -613,7 +696,7 @@
throw IterableElementError.noElement();
}
- double singleWhere(bool test(double element)) {
+ double singleWhere(bool test(double element), {double orElse()}) {
var result = null;
bool foundMatching = false;
var len = this.length;
@@ -628,6 +711,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -739,6 +823,47 @@
List<Float32x4> _createList(int length);
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<Float32x4, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<Float32x4, R>(this);
+
+ void set first(Float32x4 value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[0] = value;
+ }
+
+ void set last(Float32x4 value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[this.length - 1] = value;
+ }
+
+ int indexWhere(bool test(Float32x4 element), [int start = 0]) {
+ if (start < 0) start = 0;
+ for (int i = start; i < length; i++) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(Float32x4 element), [int start]) {
+ if (start == null || start >= this.length) start = this.length - 1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ List<Float32x4> operator +(List<Float32x4> other) {
+ int totalLength = this.length + other.length;
+ return <Float32x4>[]
+ ..length = totalLength
+ ..setRange(0, this.length, this)
+ ..setRange(this.length, totalLength, other);
+ }
+
bool contains(Object element) {
var len = this.length;
for (var i = 0; i < len; ++i) {
@@ -929,7 +1054,7 @@
throw IterableElementError.noElement();
}
- Float32x4 singleWhere(bool test(Float32x4 element)) {
+ Float32x4 singleWhere(bool test(Float32x4 element), {Float32x4 orElse()}) {
var result = null;
bool foundMatching = false;
var len = this.length;
@@ -944,6 +1069,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -1058,6 +1184,47 @@
List<Int32x4> _createList(int length);
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<Int32x4, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<Int32x4, R>(this);
+
+ void set first(Int32x4 value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[0] = value;
+ }
+
+ void set last(Int32x4 value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[this.length - 1] = value;
+ }
+
+ int indexWhere(bool test(Int32x4 element), [int start = 0]) {
+ if (start < 0) start = 0;
+ for (int i = start; i < length; i++) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(Int32x4 element), [int start]) {
+ if (start == null || start >= this.length) start = this.length - 1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ List<Int32x4> operator +(List<Int32x4> other) {
+ int totalLength = this.length + other.length;
+ return <Int32x4>[]
+ ..length = totalLength
+ ..setRange(0, this.length, this)
+ ..setRange(this.length, totalLength, other);
+ }
+
bool contains(Object element) {
var len = this.length;
for (var i = 0; i < len; ++i) {
@@ -1247,7 +1414,7 @@
throw IterableElementError.noElement();
}
- Int32x4 singleWhere(bool test(Int32x4 element)) {
+ Int32x4 singleWhere(bool test(Int32x4 element), {Int32x4 orElse()}) {
var result = null;
bool foundMatching = false;
var len = this.length;
@@ -1262,6 +1429,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -1376,6 +1544,47 @@
List<Float64x2> _createList(int length);
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<Float64x2, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<Float64x2, R>(this);
+
+ void set first(Float64x2 value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[0] = value;
+ }
+
+ void set last(Float64x2 value) {
+ if (this.length == 0) throw new RangeError.index(0, this);
+ this[this.length - 1] = value;
+ }
+
+ int indexWhere(bool test(Float64x2 element), [int start = 0]) {
+ if (start < 0) start = 0;
+ for (int i = start; i < length; i++) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(Float64x2 element), [int start]) {
+ if (start == null || start >= this.length) start = this.length - 1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ List<Float64x2> operator +(List<Float64x2> other) {
+ int totalLength = this.length + other.length;
+ return <Float64x2>[]
+ ..length = totalLength
+ ..setRange(0, this.length, this)
+ ..setRange(this.length, totalLength, other);
+ }
+
bool contains(Object element) {
var len = this.length;
for (var i = 0; i < len; ++i) {
@@ -1566,7 +1775,7 @@
throw IterableElementError.noElement();
}
- Float64x2 singleWhere(bool test(Float64x2 element)) {
+ Float64x2 singleWhere(bool test(Float64x2 element), {Float64x2 orElse()}) {
var result = null;
bool foundMatching = false;
var len = this.length;
@@ -1581,6 +1790,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
diff --git a/runtime/observatory/.analysis_options b/runtime/observatory/.analysis_options
index b623ba9..ecd5b50 100644
--- a/runtime/observatory/.analysis_options
+++ b/runtime/observatory/.analysis_options
@@ -3,7 +3,6 @@
dead_code: ignore
unused_local_variable: ignore
exclude:
- - lib/src/models/objects/function.dart
- tests/service/bad_reload/v2/main.dart
- tests/service/complex_reload/v2/main.dart
- tests/service/developer_extension_test.dart
diff --git a/runtime/observatory/lib/src/elements/css/shared.css b/runtime/observatory/lib/src/elements/css/shared.css
index d02ba34..397de98 100644
--- a/runtime/observatory/lib/src/elements/css/shared.css
+++ b/runtime/observatory/lib/src/elements/css/shared.css
@@ -1644,6 +1644,9 @@
cursor: default;
}
+timeline-dashboard p {
+ margin-top: 0.4em;
+}
memory-dashboard button,
timeline-dashboard button,
@@ -1669,11 +1672,21 @@
timeline-dashboard .header_button {
padding: 3px 5px;
margin: 0px 1px;
+ min-width: 130px;
+}
+
+memory-profile .header_button,
+timeline-dashboard .header_button {
+ margin-left: 6px;
+}
+
+.header_button.left-pad {
+ margin-left: 75px;
}
memory-profile .header_button:first-child,
timeline-dashboard .header_button:first-child {
- margin-left: 5px;
+ margin-left: 30px;
}
memory-profile .tab_buttons,
@@ -1685,7 +1698,8 @@
memory-profile .tab_buttons button,
timeline-dashboard .tab_buttons button {
- padding: 10px 5px;
+ padding: 5px 5px;
+ min-width: 100px
}
memory-profile .tab_buttons button:not(:first-child),
@@ -1709,7 +1723,7 @@
memory-dashboard memory-profile {
position: absolute;
- bottom: 0;
+ bottom: 20px;
left: 0;
right: 0;
top: 300px;
diff --git a/runtime/observatory/lib/src/elements/timeline/dashboard.dart b/runtime/observatory/lib/src/elements/timeline/dashboard.dart
index 1231cd0..3217f0e 100644
--- a/runtime/observatory/lib/src/elements/timeline/dashboard.dart
+++ b/runtime/observatory/lib/src/elements/timeline/dashboard.dart
@@ -96,15 +96,16 @@
}
_frame.src = _makeFrameUrl();
_content.children = [
- new HeadingElement.h1()
- ..children = ([new Text("Timeline")]
+ new HeadingElement.h2()
+ ..children = ([new Text("Timeline View")]
..addAll(_createButtons())
..addAll(_createTabs())),
- new Text(_view == _TimelineView.frame
- ? 'Logical view of the computation involved in each frame. '
- '(Timestamps may not be preserved)'
- : 'Sequence of events generated during the execution. '
- '(Timestamps are preserved)')
+ new ParagraphElement()
+ ..text = (_view == _TimelineView.frame
+ ? 'Logical view of the computation involved in each frame '
+ '(timestamps may not be preserved)'
+ : 'Sequence of events generated during the execution '
+ '(timestamps are preserved)')
];
if (children.isEmpty) {
children = [
@@ -128,32 +129,27 @@
..text = 'Enable'
..title = 'The Timeline is not fully enabled, click to enable'
..onClick.listen((e) => _enable()),
- new ButtonElement()
- ..classes = ['header_button']
- ..text = ' 📂 Load'
- ..title = 'Load a saved timeline from file'
- ..onClick.listen((e) => _load()),
];
}
return [
new ButtonElement()
..classes = ['header_button']
- ..text = ' ↺ Refresh'
- ..title = 'Refresh the current timeline'
+ ..text = 'Load from VM'
+ ..title = 'Load the timeline'
..onClick.listen((e) => _refresh()),
new ButtonElement()
..classes = ['header_button']
- ..text = ' ❌ Clear'
- ..title = 'Clear the current Timeline to file'
+ ..text = 'Reset Timeline'
+ ..title = 'Reset the current timeline'
..onClick.listen((e) => _clear()),
new ButtonElement()
- ..classes = ['header_button']
- ..text = ' 💾 Save'
+ ..classes = ['header_button', 'left-pad']
+ ..text = 'Save to File…'
..title = 'Save the current Timeline to file'
..onClick.listen((e) => _save()),
new ButtonElement()
..classes = ['header_button']
- ..text = ' 📂 Load'
+ ..text = 'Load from File…'
..title = 'Load a saved timeline from file'
..onClick.listen((e) => _load()),
];
@@ -219,13 +215,9 @@
return _postMessage('clear');
}
- Future _save() async {
- return _postMessage('save');
- }
+ Future _save() => _postMessage('save');
- Future _load() async {
- return _postMessage('load');
- }
+ Future _load() => _postMessage('load');
Future _postMessage(String method,
[Map<String, dynamic> params = const <String, dynamic>{}]) async {
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 4189138..76e3487 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -304,7 +304,7 @@
if (obj == null) {
obj = new ServiceMap._empty(owner);
}
- obj.update(map);
+ obj.updateFromServiceMap(map);
return obj;
}
@@ -353,7 +353,7 @@
} else {
// TODO(turnidge): Check for vmType changing as well?
assert(mapType == _type);
- update(map);
+ updateFromServiceMap(map);
completer.complete(this);
}
}).catchError((e, st) {
@@ -369,7 +369,7 @@
}
/// Update [this] using [map] as a source. [map] can be a reference.
- void update(Map map) {
+ void updateFromServiceMap(Map map) {
assert(_isServiceMap(map));
// Don't allow the type to change on an object update.
@@ -694,7 +694,7 @@
}
VM() : super._empty(null) {
- update({'name': 'vm', 'type': '@VM'});
+ updateFromServiceMap({'name': 'vm', 'type': '@VM'});
}
void postServiceEvent(String streamId, Map response, ByteData data) {
@@ -782,7 +782,7 @@
var type = _stripRef(map['type']);
if (type == 'VM') {
// Update this VM object.
- update(map);
+ updateFromServiceMap(map);
return this;
}
@@ -801,7 +801,7 @@
Logger.root.info('Eagerly loading an isolate failed: $e\n$stack');
});
} else {
- isolate.update(map);
+ isolate.updateFromServiceMap(map);
}
return isolate;
}
@@ -1483,7 +1483,7 @@
String mapId = map['id'];
var obj = (mapId != null) ? _cache[mapId] : null;
if (obj != null) {
- obj.update(map);
+ obj.updateFromServiceMap(map);
return obj;
}
// Build the object from the map directly.
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index 9abd844..d2a54bb 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -69,21 +69,26 @@
[ $arch == simdbc64 && $compiler == dartk && $mode == debug ]
eval_test: Pass, Slow
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
[ $compiler == dartk && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
-bad_reload_test: RuntimeError # Please triage.
+async_generator_breakpoint_test: Pass, RuntimeError
+bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
+complex_reload_test: Skip # Times out on sim architectures, also RuntimeError.
coverage_leaf_function_test: RuntimeError # Please triage.
coverage_optimized_function_test: RuntimeError # Please triage.
get_object_rpc_test: RuntimeError # Please triage.
get_source_report_test: RuntimeError # Please triage.
library_dependency_test: RuntimeError # Please triage.
+positive_token_pos_test: Pass, RuntimeError
reload_sources_test: Timeout, Skip # Please triage.
+rewind_test: Pass, RuntimeError
set_name_rpc_test: RuntimeError # Please triage.
+unused_changes_in_last_reload_test: Skip # Times out on sim architectures.
[ $compiler == none && $runtime == vm && $system == fuchsia ]
*: Skip # Not yet triaged.
diff --git a/runtime/observatory/tests/service/service_kernel.status b/runtime/observatory/tests/service/service_kernel.status
index 323e712..831090c 100644
--- a/runtime/observatory/tests/service/service_kernel.status
+++ b/runtime/observatory/tests/service/service_kernel.status
@@ -11,14 +11,11 @@
async_star_step_out_test: RuntimeError # Issue 29158, Async debugging
async_step_out_test: RuntimeError # Issue 29158, Async debugging
awaiter_async_stack_contents_test: RuntimeError # Issue 29158, Async debugging
-complex_reload_test: RuntimeError
-developer_extension_test: CompileTimeError
eval_internal_class_test: RuntimeError
evaluate_activation_in_method_class_test: RuntimeError
evaluate_activation_test/instance: RuntimeError
evaluate_activation_test/scope: RuntimeError
evaluate_in_sync_star_activation_test: RuntimeError
-get_isolate_after_language_error_test: CompileTimeError
library_dependency_test: CompileTimeError # Deferred loading kernel issue 28335.
pause_on_unhandled_async_exceptions2_test: RuntimeError # --pause-isolates-on-unhandled-exceptions doesn't currently work. Issue #29056
pause_on_unhandled_async_exceptions_test: RuntimeError # --pause-isolates-on-unhandled-exceptions doesn't currently work. Issue #29056
@@ -28,6 +25,13 @@
[ $compiler == dartkp ]
*: Skip # Non-kernel also skips precompiled mode.
+[ $fasta ]
+developer_extension_test: CompileTimeError
+get_isolate_after_language_error_test: CompileTimeError
+
+[ $arch != simarm && $arch != simarm64 && $arch != simdbc && $compiler == dartk ]
+complex_reload_test: RuntimeError
+
[ $arch == simdbc64 && $compiler == dartk ]
pause_on_unhandled_async_exceptions2_test: RuntimeError, Timeout # Issue 31765
pause_on_unhandled_async_exceptions_test: RuntimeError, Timeout # Issue 31765
@@ -54,6 +58,7 @@
next_through_simple_async_with_returns_test: Pass, Timeout
next_through_simple_linear_2_test: Pass, Timeout
regress_28443_test: Pass, Timeout
+reload_sources_test: RuntimeError
step_test: Pass, Slow
step_through_constructor_test: Pass, Slow
step_through_function_2_test: Pass, Timeout
@@ -96,3 +101,5 @@
external_service_synchronous_invocation_test: CompileTimeError # Issue 31696
step_through_arithmetic_test: RuntimeError
+[ $compiler == dartk && $strong && ($arch == simarm || $arch == simarm64) ]
+async_single_step_exception_test: RuntimeError
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 2c7dea1..b87e9e3 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -25,10 +25,6 @@
#define NOKERNEL
#endif
-#if !defined(NOUSER)
-#define NOUSER
-#endif
-
#if !defined(NOSERVICE)
#define NOSERVICE
#endif
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index dcb48d1..9ca4e38 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -76,6 +76,9 @@
cc/Mixin_PrivateSuperResolution: Skip
cc/Mixin_PrivateSuperResolutionCrossLibraryShouldFail: Skip
+[ $compiler == fasta ]
+dart/data_uri_import_test/badencodeddate: CompileTimeError
+
[ $compiler == precompiler ]
dart/byte_array_test: Skip # Incompatible flag --disable_alloc_stubs_after_gc
@@ -87,7 +90,6 @@
[ $runtime == dart_precompiled ]
dart/data_uri_spawn_test: SkipByDesign # Isolate.spawnUri
-dart/optimized_stacktrace_line_and_column_test: RuntimeError, OK # AOT lacks column information
[ $runtime != vm ]
dart/hello_fuchsia_test: SkipByDesign # This is a test for fuchsia OS
@@ -155,7 +157,7 @@
[ $builder_tag == asan && $mode == debug && ($runtime == dart_precompiled || $runtime == vm) ]
cc/Dart2JSCompileAll: SkipSlow # Timeout.
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
[ $compiler == dartk && $mode == debug && $runtime == vm ]
@@ -368,7 +370,12 @@
dart/data_uri_spawn_test: Skip # Please triage.
dart/snapshot_version_test: RuntimeError # Please triage.
+[ $compiler == dartkp && $strong ]
+dart/optimized_stacktrace_line_and_column_test: CompileTimeError
+dart/optimized_stacktrace_line_test: CompileTimeError
+
[ $compiler == dartkp && !$strong ]
+dart/optimized_stacktrace_line_and_column_test: RuntimeError, OK # AOT lacks column information
dart/truncating_ints_test: Skip # This test cannot be run in dartkp/legacy mode (gen_kernel does not pass --limit-ints-to-64-bits in legacy mode).
[ $compiler == dartkp && ($runtime == dart_precompiled || $runtime == vm) ]
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index 04b3fd6..2856f70 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -419,7 +419,7 @@
for (intptr_t j = 0; j < fields_.Length(); j++) {
field_ ^= fields_.At(j);
if (field_.is_static() && field_.is_final() &&
- field_.has_initializer()) {
+ field_.has_initializer() && !field_.is_const()) {
if (FLAG_trace_precompiler) {
THR_Print("Precompiling initializer for %s\n", field_.ToCString());
}
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.h b/runtime/vm/compiler/assembler/assembler_arm64.h
index 2c204ee..ce1f83b 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.h
+++ b/runtime/vm/compiler/assembler/assembler_arm64.h
@@ -822,10 +822,10 @@
EmitMiscDP3Source(MSUB, rd, rn, rm, ra, kDoubleWord);
}
void smulh(Register rd, Register rn, Register rm) {
- EmitMiscDP3Source(SMULH, rd, rn, rm, R0, kDoubleWord);
+ EmitMiscDP3Source(SMULH, rd, rn, rm, R31, kDoubleWord);
}
void umulh(Register rd, Register rn, Register rm) {
- EmitMiscDP3Source(UMULH, rd, rn, rm, R0, kDoubleWord);
+ EmitMiscDP3Source(UMULH, rd, rn, rm, R31, kDoubleWord);
}
void umaddl(Register rd, Register rn, Register rm, Register ra) {
EmitMiscDP3Source(UMADDL, rd, rn, rm, ra, kDoubleWord);
@@ -1973,7 +1973,8 @@
ASSERT((rt != kNoRegister) && (rt != ZR));
const int32_t encoding = op | size | Arm64Encode::Rs(rs) |
- Arm64Encode::Rn(rn) | Arm64Encode::Rt(rt);
+ Arm64Encode::Rt2(R31) | Arm64Encode::Rn(rn) |
+ Arm64Encode::Rt(rt);
Emit(encoding);
}
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index d76581c..ec29c10e 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -795,6 +795,7 @@
type_translator_(builder_, /*finalize=*/true) {
H.InitFromScript(builder_->script());
type_translator_.active_class_ = &active_class_;
+ builder_->type_translator_.active_class_ = &active_class_;
}
StreamingScopeBuilder::~StreamingScopeBuilder() {
@@ -1014,9 +1015,10 @@
result_->this_variable = variable;
}
if (is_setter) {
- result_->setter_value =
- MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
- Symbols::Value(), AbstractType::dynamic_type());
+ result_->setter_value = MakeVariable(
+ TokenPosition::kNoSource, TokenPosition::kNoSource,
+ Symbols::Value(),
+ AbstractType::ZoneHandle(Z, function.ParameterTypeAt(pos)));
scope_->InsertParameterAt(pos++, result_->setter_value);
}
break;
@@ -3675,10 +3677,14 @@
if (is_setter) {
if (is_method) {
body += LoadLocal(scopes()->this_variable);
- body += LoadLocal(setter_value);
+ }
+ body += LoadLocal(setter_value);
+ if (I->argument_type_checks() && setter_value->needs_type_check()) {
+ body += CheckArgumentType(setter_value, setter_value->type());
+ }
+ if (is_method) {
body += flow_graph_builder_->StoreInstanceFieldGuarded(field, false);
} else {
- body += LoadLocal(setter_value);
body += StoreStaticField(TokenPosition::kNoSource, field);
}
body += NullConstant();
@@ -9346,7 +9352,7 @@
if (!parameterized_function.IsNull()) {
enclosing = ¶meterized_function;
}
- ActiveTypeParametersScope(active_class, enclosing, type_parameters, Z);
+ ActiveTypeParametersScope scope(active_class, enclosing, type_parameters, Z);
// Step b) Fill in the bounds of all [TypeParameter]s.
for (intptr_t i = 0; i < type_parameter_count; i++) {
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 4c0c8eb..49cb711 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -2571,6 +2571,23 @@
return Api::NewHandle(T, arr.raw());
}
+DART_EXPORT Dart_Handle Dart_NewListOfType(Dart_Handle element_type,
+ intptr_t length) {
+ DARTSCOPE(Thread::Current());
+ CHECK_LENGTH(length, Array::kMaxElements);
+ CHECK_CALLBACK_STATE(T);
+ const Type& type = Api::UnwrapTypeHandle(Z, element_type);
+ if (type.IsNull()) {
+ RETURN_TYPE_ERROR(Z, element_type, Type);
+ }
+ if (!type.IsFinalized()) {
+ return Api::NewError(
+ "%s expects argument 'type' to be a fully resolved type.",
+ CURRENT_FUNC);
+ }
+ return Api::NewHandle(T, Array::New(length, type));
+}
+
#define GET_LIST_LENGTH(zone, type, obj, len) \
type& array = type::Handle(zone); \
array ^= obj.raw(); \
@@ -5915,7 +5932,7 @@
return result;
#else
return KernelIsolate::CompileToKernel(script_uri, platform_kernel,
- platform_kernel_size);
+ platform_kernel_size, 0, NULL, true);
#endif
}
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 34a3d71..0fb4819 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -4783,6 +4783,66 @@
EXPECT(Dart_IsList(list_obj));
}
+TEST_CASE(DartAPI_NewListOfType) {
+ const char* kScriptChars =
+ "class ZXHandle {}\n"
+ "class ChannelReadResult {\n"
+ " final List<ZXHandle> handles;\n"
+ " ChannelReadResult(this.handles);\n"
+ "}\n"
+ "void expectListOfString(List<String> _) {}\n"
+ "void expectListOfDynamic(List<dynamic> _) {}\n";
+ Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+
+ Dart_Handle zxhandle_type = Dart_GetType(lib, NewString("ZXHandle"), 0, NULL);
+ EXPECT_VALID(zxhandle_type);
+
+ Dart_Handle zxhandle = Dart_New(zxhandle_type, Dart_Null(), 0, NULL);
+ EXPECT_VALID(zxhandle);
+
+ Dart_Handle zxhandle_list = Dart_NewListOfType(zxhandle_type, 1);
+ EXPECT_VALID(zxhandle_list);
+
+ EXPECT_VALID(Dart_ListSetAt(zxhandle_list, 0, zxhandle));
+
+ Dart_Handle readresult_type =
+ Dart_GetType(lib, NewString("ChannelReadResult"), 0, NULL);
+ EXPECT_VALID(zxhandle_type);
+
+ const int kNumArgs = 1;
+ Dart_Handle args[kNumArgs];
+ args[0] = zxhandle_list;
+ EXPECT_VALID(Dart_New(readresult_type, Dart_Null(), kNumArgs, args));
+
+ EXPECT_ERROR(
+ Dart_NewListOfType(Dart_Null(), 1),
+ "Dart_NewListOfType expects argument 'element_type' to be non-null.");
+ EXPECT_ERROR(
+ Dart_NewListOfType(Dart_True(), 1),
+ "Dart_NewListOfType expects argument 'element_type' to be of type Type.");
+
+ Dart_Handle dart_core = Dart_LookupLibrary(NewString("dart:core"));
+ EXPECT_VALID(dart_core);
+
+ Dart_Handle string_type =
+ Dart_GetType(dart_core, NewString("String"), 0, NULL);
+ EXPECT_VALID(string_type);
+ Dart_Handle string_list = Dart_NewListOfType(string_type, 0);
+ EXPECT_VALID(string_list);
+ args[0] = string_list;
+ EXPECT_VALID(
+ Dart_Invoke(lib, NewString("expectListOfString"), kNumArgs, args));
+
+ Dart_Handle dynamic_type =
+ Dart_GetType(dart_core, NewString("dynamic"), 0, NULL);
+ EXPECT_VALID(dynamic_type);
+ Dart_Handle dynamic_list = Dart_NewListOfType(string_type, 0);
+ EXPECT_VALID(dynamic_list);
+ args[0] = dynamic_list;
+ EXPECT_VALID(
+ Dart_Invoke(lib, NewString("expectListOfDynamic"), kNumArgs, args));
+}
+
static Dart_Handle PrivateLibName(Dart_Handle lib, const char* str) {
EXPECT(Dart_IsLibrary(lib));
Thread* thread = Thread::Current();
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index b8242e4..c8467ab 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -122,7 +122,7 @@
"Max size of new gen semi space in MB") \
P(optimization_counter_threshold, int, 30000, \
"Function's usage-counter value before it is optimized, -1 means never") \
- P(old_gen_heap_size, int, (kWordSize <= 4) ? 1536 : 0, \
+ P(old_gen_heap_size, int, kDefaultMaxOldGenHeapSize, \
"Max size of old gen heap size in MB, or 0 for unlimited," \
"e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap") \
R(pause_isolates_on_start, false, bool, false, \
diff --git a/runtime/vm/globals.h b/runtime/vm/globals.h
index 3a5441d..36525e7 100644
--- a/runtime/vm/globals.h
+++ b/runtime/vm/globals.h
@@ -32,6 +32,9 @@
const intptr_t kSmiMax32 = (static_cast<intptr_t>(1) << kSmiBits32) - 1;
const intptr_t kSmiMin32 = -(static_cast<intptr_t>(1) << kSmiBits32);
+// The default old gen heap size in MB, where 0 == unlimited.
+const intptr_t kDefaultMaxOldGenHeapSize = (kWordSize <= 4) ? 1536 : 0;
+
#define kPosInfinity bit_cast<double>(DART_UINT64_C(0x7ff0000000000000))
#define kNegInfinity bit_cast<double>(DART_UINT64_C(0xfff0000000000000))
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 92edc6f..e67f6e1 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -22,6 +22,7 @@
#include "vm/heap.h"
#include "vm/image_snapshot.h"
#include "vm/isolate_reload.h"
+#include "vm/kernel_isolate.h"
#include "vm/lockers.h"
#include "vm/log.h"
#include "vm/message_handler.h"
@@ -1050,11 +1051,19 @@
#undef ISOLATE_METRIC_INIT
#endif // !defined(PRODUCT)
+ bool is_service_or_kernel_isolate = ServiceIsolate::NameEquals(name_prefix);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+ is_service_or_kernel_isolate =
+ is_service_or_kernel_isolate || KernelIsolate::NameEquals(name_prefix);
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
+
Heap::Init(result,
is_vm_isolate
? 0 // New gen size 0; VM isolate should only allocate in old.
: FLAG_new_gen_semi_max_size * MBInWords,
- FLAG_old_gen_heap_size * MBInWords,
+ (is_service_or_kernel_isolate ? kDefaultMaxOldGenHeapSize
+ : FLAG_old_gen_heap_size) *
+ MBInWords,
FLAG_external_max_size * MBInWords);
// TODO(5411455): For now just set the recently created isolate as
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 1375924..9dc702d 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -10,6 +10,7 @@
#include "vm/dart_api_impl.h"
#include "vm/hash_table.h"
#include "vm/isolate.h"
+#include "vm/kernel_isolate.h"
#include "vm/kernel_loader.h"
#include "vm/log.h"
#include "vm/object.h"
@@ -516,6 +517,10 @@
~ResourceHolder() { delete (resource_); }
};
+static void ReleaseFetchedBytes(uint8_t* buffer) {
+ free(buffer);
+}
+
// NOTE: This function returns *after* FinalizeLoading is called.
void IsolateReloadContext::Reload(bool force_reload,
const char* root_script_url,
@@ -560,41 +565,41 @@
GrowableObjectArray::Handle(object_store()->libraries());
intptr_t num_libs = libs.Length();
modified_libs_ = new (Z) BitVector(Z, num_libs);
- TIR_Print("---- ENTERING TAG HANDLER\n");
- {
+
+ // ReadPrecompiledKernelFromFile checks to see if the file at
+ // root_script_url is a valid .dill file. If that's the case, a Program*
+ // is returned. Otherwise, this is likely a source file that needs to be
+ // compiled, so ReadPrecompiledKernelFromFile returns NULL.
+ kernel_program.set(ReadPrecompiledKernelFromFile(root_script_url));
+ if (kernel_program.get() == NULL) {
TransitionVMToNative transition(thread);
- Api::Scope api_scope(thread);
- Dart_Handle retval = (I->library_tag_handler())(
- Dart_kKernelTag, Api::NewHandle(thread, packages_url.raw()),
- Api::NewHandle(thread, root_lib_url.raw()));
- if (Dart_IsError(retval)) {
- // Compilation of the new sources failed, abort reload and report
- // error.
- result = Api::UnwrapHandle(retval);
- } else {
- uint64_t data;
- intptr_t data_len = 0;
- Dart_TypedData_Type data_type;
- ASSERT(Dart_IsTypedData(retval));
- Dart_Handle val = Dart_TypedDataAcquireData(
- retval, &data_type, reinterpret_cast<void**>(&data), &data_len);
- ASSERT(!Dart_IsError(val));
- ASSERT(data_type == Dart_TypedData_kUint64);
- ASSERT(data_len == 1);
- kernel_program.set(reinterpret_cast<kernel::Program*>(data));
- Dart_TypedDataReleaseData(retval);
- kernel::KernelLoader::FindModifiedLibraries(
- kernel_program.get(), I, modified_libs_, force_reload);
+ Dart_SourceFile* modified_scripts = NULL;
+ intptr_t modified_scripts_count = 0;
+
+ FindModifiedSources(thread, force_reload, &modified_scripts,
+ &modified_scripts_count);
+
+ Dart_KernelCompilationResult retval = KernelIsolate::CompileToKernel(
+ root_lib_url.ToCString(), NULL, 0, modified_scripts_count,
+ modified_scripts, true);
+
+ if (retval.status != Dart_KernelCompilationStatus_Ok) {
+ TIR_Print("---- LOAD FAILED, ABORTING RELOAD\n");
+ const String& error_str = String::Handle(String::New(retval.error));
+ const ApiError& error = ApiError::Handle(ApiError::New(error_str));
+ AddReasonForCancelling(new Aborted(zone_, error));
+ ReportReasonsForCancelling();
+ CommonFinalizeTail();
+ return;
}
+
+ kernel_program.set(
+ ReadPrecompiledKernelFromBuffer(retval.kernel, retval.kernel_size));
}
- if (result.IsError()) {
- TIR_Print("---- LOAD FAILED, ABORTING RELOAD\n");
- AddReasonForCancelling(new Aborted(zone_, ApiError::Cast(result)));
- ReportReasonsForCancelling();
- CommonFinalizeTail();
- return;
- }
- TIR_Print("---- EXITED TAG HANDLER\n");
+
+ kernel_program.get()->set_release_buffer_callback(ReleaseFetchedBytes);
+ kernel::KernelLoader::FindModifiedLibraries(kernel_program.get(), I,
+ modified_libs_, force_reload);
} else {
// Check to see which libraries have been modified.
modified_libs_ = FindModifiedLibraries(force_reload, root_lib_modified);
@@ -930,6 +935,68 @@
}
}
+static bool ContainsScriptUri(const GrowableArray<const char*>& seen_uris,
+ const char* uri) {
+ for (intptr_t i = 0; i < seen_uris.length(); i++) {
+ const char* seen_uri = seen_uris.At(i);
+ size_t seen_len = strlen(seen_uri);
+ if (seen_len != strlen(uri)) {
+ continue;
+ } else if (strncmp(seen_uri, uri, seen_len) == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void IsolateReloadContext::FindModifiedSources(
+ Thread* thread,
+ bool force_reload,
+ Dart_SourceFile** modified_sources,
+ intptr_t* count) {
+ Zone* zone = thread->zone();
+ int64_t last_reload = I->last_reload_timestamp();
+ GrowableArray<const char*> modified_sources_uris;
+ const GrowableObjectArray& libs =
+ GrowableObjectArray::Handle(object_store()->libraries());
+ Library& lib = Library::Handle(zone);
+ Array& scripts = Array::Handle(zone);
+ Script& script = Script::Handle(zone);
+ String& uri = String::Handle(zone);
+
+ for (intptr_t lib_idx = 0; lib_idx < libs.Length(); lib_idx++) {
+ lib ^= libs.At(lib_idx);
+ if (lib.is_dart_scheme()) {
+ // We don't consider dart scheme libraries during reload.
+ continue;
+ }
+ scripts = lib.LoadedScripts();
+ for (intptr_t script_idx = 0; script_idx < scripts.Length(); script_idx++) {
+ script ^= scripts.At(script_idx);
+ uri ^= script.url();
+ if (ContainsScriptUri(modified_sources_uris, uri.ToCString())) {
+ // We've already accounted for this script in a prior library.
+ continue;
+ }
+
+ if (force_reload || ScriptModifiedSince(script, last_reload)) {
+ modified_sources_uris.Add(uri.ToCString());
+ }
+ }
+ }
+
+ *count = modified_sources_uris.length();
+ if (*count == 0) {
+ return;
+ }
+
+ *modified_sources = new (zone_) Dart_SourceFile[*count];
+ for (intptr_t i = 0; i < *count; ++i) {
+ (*modified_sources)[i].uri = modified_sources_uris[i];
+ (*modified_sources)[i].source = NULL;
+ }
+}
+
BitVector* IsolateReloadContext::FindModifiedLibraries(bool force_reload,
bool root_lib_modified) {
Thread* thread = Thread::Current();
diff --git a/runtime/vm/isolate_reload.h b/runtime/vm/isolate_reload.h
index a8e860d..107e081 100644
--- a/runtime/vm/isolate_reload.h
+++ b/runtime/vm/isolate_reload.h
@@ -232,6 +232,10 @@
bool ScriptModifiedSince(const Script& script, int64_t since);
BitVector* FindModifiedLibraries(bool force_reload, bool root_lib_modified);
+ void FindModifiedSources(Thread* thread,
+ bool force_reload,
+ Dart_SourceFile** modified_sources,
+ intptr_t* count);
void CheckpointLibraries();
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index b60784f..25496a4 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -187,7 +187,7 @@
{
void* kernel_pgm = NULL;
char* error = TestCase::CompileTestScriptWithDFE(
- "file:///test-app",
+ "file:///test-app.dart",
sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile),
updated_sourcefiles, &kernel_pgm, true /* incrementally */);
EXPECT(error == NULL);
@@ -262,7 +262,7 @@
{
void* kernel_pgm = NULL;
char* error = TestCase::CompileTestScriptWithDFE(
- "file:///test-app",
+ "file:///test-app.dart",
sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile),
updated_sourcefiles, &kernel_pgm, true /* incrementally */);
EXPECT(error == NULL);
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h
index 30fe483..366277f 100644
--- a/runtime/vm/kernel.h
+++ b/runtime/vm/kernel.h
@@ -24,8 +24,8 @@
private:
int value_;
};
-} // kernel
-} // dart
+} // namespace kernel
+} // namespace dart
#if !defined(DART_PRECOMPILED_RUNTIME)
namespace dart {
@@ -192,6 +192,8 @@
} // namespace kernel
+kernel::Program* ReadPrecompiledKernelFromFile(const char* script_uri);
+
kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
intptr_t buffer_length);
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index d4fcd65..4f8ae5b 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -6,6 +6,7 @@
#include "vm/kernel_binary.h"
#include "platform/globals.h"
#include "vm/compiler/frontend/kernel_to_il.h"
+#include "vm/dart_api_impl.h"
#include "vm/flags.h"
#include "vm/growable_array.h"
#include "vm/kernel.h"
@@ -65,6 +66,34 @@
} // namespace kernel
+kernel::Program* ReadPrecompiledKernelFromFile(const char* script_uri) {
+ Thread* thread = Thread::Current();
+ if (script_uri == NULL) {
+ return NULL;
+ }
+ kernel::Program* kernel_program = NULL;
+ {
+ TransitionVMToNative transition(thread);
+ Api::Scope api_scope(thread);
+ Dart_Handle retval = (thread->isolate()->library_tag_handler())(
+ Dart_kKernelTag, NULL, Api::NewHandle(thread, String::New(script_uri)));
+ if (!Dart_IsError(retval)) {
+ uint64_t data;
+ intptr_t data_len = 0;
+ Dart_TypedData_Type data_type;
+ ASSERT(Dart_IsTypedData(retval));
+ Dart_Handle val = Dart_TypedDataAcquireData(
+ retval, &data_type, reinterpret_cast<void**>(&data), &data_len);
+ ASSERT(!Dart_IsError(val));
+ ASSERT(data_type == Dart_TypedData_kUint64);
+ ASSERT(data_len == 1);
+ kernel_program = reinterpret_cast<kernel::Program*>(data);
+ Dart_TypedDataReleaseData(retval);
+ }
+ }
+ return kernel_program;
+}
+
kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
intptr_t buffer_length) {
kernel::Reader reader(buffer, buffer_length);
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index 8767588..7b0f1f6 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -40,6 +40,17 @@
"Suppress warnings from the FE.");
const char* KernelIsolate::kName = DART_KERNEL_ISOLATE_NAME;
+
+// Tags used to indicate different requests to the dart frontend.
+//
+// Current tags include the following:
+// 0 - Perform normal compilation.
+// 1 - Update in-memory file system with in-memory sources (used by tests).
+// 2 - APP JIT snapshot training run for kernel_service.
+const int KernelIsolate::kCompileTag = 0;
+const int KernelIsolate::kUpdateSourcesTag = 1;
+const int KernelIsolate::kTrainTag = 2;
+
Dart_IsolateCreateCallback KernelIsolate::create_callback_ = NULL;
Monitor* KernelIsolate::monitor_ = new Monitor();
Isolate* KernelIsolate::isolate_ = NULL;
@@ -207,8 +218,7 @@
Thread* T = Thread::Current();
ASSERT(I == T->isolate());
ASSERT(I != NULL);
- ASSERT(I->name() != NULL);
- if (strcmp(I->name(), DART_KERNEL_ISOLATE_NAME) != 0) {
+ if (!NameEquals(I->name())) {
// Not kernel isolate.
return;
}
@@ -229,6 +239,11 @@
return (kernel_port_ != ILLEGAL_PORT) && (isolate_ != NULL);
}
+bool KernelIsolate::NameEquals(const char* name) {
+ ASSERT(name != NULL);
+ return (strcmp(name, DART_KERNEL_ISOLATE_NAME) == 0);
+}
+
bool KernelIsolate::Exists() {
MonitorLocker ml(monitor_);
return isolate_ != NULL;
@@ -270,13 +285,17 @@
source_uri->type = Dart_CObject_kString;
source_uri->value.as_string = const_cast<char*>(source_files[i].uri);
fileNamePairs[i * 2] = source_uri;
-
Dart_CObject* source_code = new Dart_CObject();
- source_code->type = Dart_CObject_kTypedData;
- source_code->value.as_typed_data.type = Dart_TypedData_kUint8;
- source_code->value.as_typed_data.length = strlen(source_files[i].source);
- source_code->value.as_typed_data.values =
- reinterpret_cast<uint8_t*>(const_cast<char*>(source_files[i].source));
+
+ if (source_files[i].source != NULL) {
+ source_code->type = Dart_CObject_kTypedData;
+ source_code->value.as_typed_data.type = Dart_TypedData_kUint8;
+ source_code->value.as_typed_data.length = strlen(source_files[i].source);
+ source_code->value.as_typed_data.values =
+ reinterpret_cast<uint8_t*>(const_cast<char*>(source_files[i].source));
+ } else {
+ source_code->type = Dart_CObject_kNull;
+ }
fileNamePairs[(i * 2) + 1] = source_code;
}
files.value.as_array.values = fileNamePairs;
@@ -311,6 +330,7 @@
}
Dart_KernelCompilationResult SendAndWaitForResponse(
+ int request_tag,
Dart_Port kernel_port,
const char* script_uri,
const uint8_t* platform_kernel,
@@ -320,10 +340,10 @@
bool incremental_compile) {
// Build the [null, send_port, script_uri, platform_kernel,
// incremental_compile, isolate_id, [files]] message for the Kernel isolate.
- // null tag tells it that request came from this code, instead of Loader
- // so that it can given a more informative response.
+ // tag is used to specify which operation the frontend should perform.
Dart_CObject tag;
- tag.type = Dart_CObject_kNull;
+ tag.type = Dart_CObject_kInt32;
+ tag.value.as_int32 = request_tag;
Dart_CObject send_port;
send_port.type = Dart_CObject_kSendPort;
@@ -331,8 +351,12 @@
send_port.value.as_send_port.origin_id = ILLEGAL_PORT;
Dart_CObject uri;
- uri.type = Dart_CObject_kString;
- uri.value.as_string = const_cast<char*>(script_uri);
+ if (script_uri != NULL) {
+ uri.type = Dart_CObject_kString;
+ uri.value.as_string = const_cast<char*>(script_uri);
+ } else {
+ uri.type = Dart_CObject_kNull;
+ }
Dart_CObject dart_platform_kernel;
if (platform_kernel != NULL) {
@@ -381,7 +405,8 @@
if (source_files_count != 0) {
files = BuildFilesPairs(source_files_count, source_files);
} else {
- files.type = Dart_CObject_kNull;
+ files.type = Dart_CObject_kArray;
+ files.value.as_array.length = 0;
}
Dart_CObject suppress_warnings;
@@ -436,9 +461,15 @@
message->value.as_array.values[0]->value.as_int32);
if (result_.status == Dart_KernelCompilationStatus_Ok) {
- ASSERT(response[1]->type == Dart_CObject_kTypedData);
- ASSERT(response[1]->value.as_typed_data.type == Dart_TypedData_kUint8);
+ ASSERT((response[1]->type == Dart_CObject_kTypedData) ||
+ (response[1]->type == Dart_CObject_kNull));
+ if (response[1]->type == Dart_CObject_kNull) {
+ ml.Notify();
+ return;
+ }
+
+ ASSERT(response[1]->value.as_typed_data.type == Dart_TypedData_kUint8);
result_.kernel_size = response[1]->value.as_typed_data.length;
result_.kernel = static_cast<uint8_t*>(malloc(result_.kernel_size));
memmove(result_.kernel, response[1]->value.as_typed_data.values,
@@ -531,11 +562,30 @@
}
KernelCompilationRequest request;
- return request.SendAndWaitForResponse(
- kernel_port, script_uri, platform_kernel, platform_kernel_size,
- source_file_count, source_files, incremental_compile);
+ return request.SendAndWaitForResponse(kCompileTag, kernel_port, script_uri,
+ platform_kernel, platform_kernel_size,
+ source_file_count, source_files,
+ incremental_compile);
}
+Dart_KernelCompilationResult KernelIsolate::UpdateInMemorySources(
+ int source_files_count,
+ Dart_SourceFile source_files[]) {
+ // This must be the main script to be loaded. Wait for Kernel isolate
+ // to finish initialization.
+ Dart_Port kernel_port = WaitForKernelPort();
+ if (kernel_port == ILLEGAL_PORT) {
+ Dart_KernelCompilationResult result;
+ result.status = Dart_KernelCompilationStatus_Unknown;
+ result.error = strdup("Error while initializing Kernel isolate");
+ return result;
+ }
+
+ KernelCompilationRequest request;
+ return request.SendAndWaitForResponse(kUpdateSourcesTag, kernel_port, NULL,
+ NULL, 0, source_files_count,
+ source_files, true);
+}
#endif // DART_PRECOMPILED_RUNTIME
} // namespace dart
diff --git a/runtime/vm/kernel_isolate.h b/runtime/vm/kernel_isolate.h
index b0f0819..6d32010 100644
--- a/runtime/vm/kernel_isolate.h
+++ b/runtime/vm/kernel_isolate.h
@@ -18,9 +18,13 @@
class KernelIsolate : public AllStatic {
public:
static const char* kName;
+ static const int kCompileTag;
+ static const int kUpdateSourcesTag;
+ static const int kTrainTag;
static void Run();
+ static bool NameEquals(const char* name);
static bool Exists();
static bool IsRunning();
static bool IsKernelIsolate(const Isolate* isolate);
@@ -33,7 +37,11 @@
intptr_t platform_kernel_size,
int source_files_count = 0,
Dart_SourceFile source_files[] = NULL,
- bool incremental_compile = false);
+ bool incremental_compile = true);
+
+ static Dart_KernelCompilationResult UpdateInMemorySources(
+ int source_files_count,
+ Dart_SourceFile source_files[]);
protected:
static Monitor* monitor_;
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index f7f94ef..238e6f3 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -786,7 +786,7 @@
if (task_running_) {
ml.Notify();
- } else if (queue_ != NULL) {
+ } else if ((queue_ != NULL) && (expirary != 0)) {
Task* task = new Task();
task_running_ = Dart::thread_pool()->Run(task);
if (!task_running_) {
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 9287b8b..21580bd 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -4677,7 +4677,10 @@
type = TypeAt(i);
// The hash may be calculated during type finalization (for debugging
// purposes only) while a type argument is still temporarily null.
- result = CombineHashes(result, type.IsNull() ? 0 : type.Hash());
+ if (type.IsNull() || type.IsNullTypeRef()) {
+ return 0; // Do not cache hash, since it will still change.
+ }
+ result = CombineHashes(result, type.Hash());
}
result = FinalizeHash(result, kHashBits);
SetHash(result);
@@ -4728,7 +4731,8 @@
for (intptr_t i = from_index; i < from_index + len; i++) {
type = TypeAt(i);
other_type = other.TypeAt(i);
- if (!type.IsNull() && !type.IsEquivalent(other_type, trail)) {
+ // Still unfinalized vectors should not be considered equivalent.
+ if (type.IsNull() || !type.IsEquivalent(other_type, trail)) {
return false;
}
}
@@ -4914,7 +4918,7 @@
for (intptr_t i = 0; i < num_types; i++) {
type = TypeAt(i);
if (type.IsNull()) {
- continue;
+ return false; // Still unfinalized, too early to tell.
}
if (!type.IsTypeParameter()) {
return false;
@@ -5307,8 +5311,8 @@
return "TypeArguments: null";
}
Zone* zone = Thread::Current()->zone();
- const char* prev_cstr = OS::SCreate(zone, "TypeArguments: (%" Pd ")",
- Smi::Value(raw_ptr()->hash_));
+ const char* prev_cstr = OS::SCreate(zone, "TypeArguments: (@%p H%" Px ")",
+ raw(), Smi::Value(raw_ptr()->hash_));
for (int i = 0; i < Length(); i++) {
const AbstractType& type_at = AbstractType::Handle(zone, TypeAt(i));
const char* type_cstr = type_at.IsNull() ? "null" : type_at.ToCString();
@@ -16467,6 +16471,10 @@
}
}
+bool AbstractType::IsNullTypeRef() const {
+ return IsTypeRef() && (TypeRef::Cast(*this).type() == AbstractType::null());
+}
+
bool AbstractType::IsDynamicType() const {
if (IsCanonical()) {
return raw() == Object::dynamic_type().raw();
@@ -17894,16 +17902,13 @@
if (ref_type.IsNull()) {
return "TypeRef: null";
}
- const char* type_cstr =
- String::Handle(Class::Handle(type_class()).Name()).ToCString();
+ const char* type_cstr = String::Handle(ref_type.Name()).ToCString();
if (ref_type.IsFinalized()) {
const intptr_t hash = ref_type.Hash();
- return OS::SCreate(Thread::Current()->zone(),
- "TypeRef: %s<...> (@%p H%" Px ")", type_cstr,
- ref_type.raw(), hash);
+ return OS::SCreate(Thread::Current()->zone(), "TypeRef: %s (@%p H%" Px ")",
+ type_cstr, ref_type.raw(), hash);
} else {
- return OS::SCreate(Thread::Current()->zone(), "TypeRef: %s<...>",
- type_cstr);
+ return OS::SCreate(Thread::Current()->zone(), "TypeRef: %s", type_cstr);
}
}
@@ -21616,6 +21621,19 @@
return New(kClassId, len, space);
}
+RawArray* Array::New(intptr_t len,
+ const AbstractType& element_type,
+ Heap::Space space) {
+ const Array& result = Array::Handle(Array::New(len, space));
+ if (!element_type.IsDynamicType()) {
+ TypeArguments& type_args = TypeArguments::Handle(TypeArguments::New(1));
+ type_args.SetTypeAt(0, element_type);
+ type_args = type_args.Canonicalize();
+ result.SetTypeArguments(type_args);
+ }
+ return result.raw();
+}
+
RawArray* Array::New(intptr_t class_id, intptr_t len, Heap::Space space) {
if ((len < 0) || (len > Array::kMaxElements)) {
// This should be caught before we reach here.
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 32d073e..a409542 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -5998,6 +5998,9 @@
// type.
RawString* ClassName() const;
+ // Check if this type is a still uninitialized TypeRef.
+ bool IsNullTypeRef() const;
+
// Check if this type represents the 'dynamic' type or if it is malformed,
// since a malformed type is mapped to 'dynamic'.
// Call IsMalformed() first, if distinction is required.
@@ -6287,7 +6290,8 @@
}
virtual bool IsResolved() const { return true; }
virtual bool HasResolvedTypeClass() const {
- return AbstractType::Handle(type()).HasResolvedTypeClass();
+ return (type() != AbstractType::null()) &&
+ AbstractType::Handle(type()).HasResolvedTypeClass();
}
RawAbstractType* type() const { return raw_ptr()->type_; }
void set_type(const AbstractType& value) const;
@@ -7834,6 +7838,9 @@
void MakeImmutable() const;
static RawArray* New(intptr_t len, Heap::Space space = Heap::kNew);
+ static RawArray* New(intptr_t len,
+ const AbstractType& element_type,
+ Heap::Space space = Heap::kNew);
// Creates and returns a new array with 'new_length'. Copies all elements from
// 'source' to the new array. 'new_length' must be greater than or equal to
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
index 07d90cc..5d3d00b0 100644
--- a/runtime/vm/profiler_test.cc
+++ b/runtime/vm/profiler_test.cc
@@ -1002,7 +1002,7 @@
EXPECT(walker.Down());
EXPECT_STREQ("new _List", walker.CurrentName());
EXPECT(walker.Down());
- EXPECT_STREQ("new List._internal", walker.CurrentName());
+ EXPECT_STREQ("new List", walker.CurrentName());
EXPECT(walker.Down());
EXPECT_STREQ("foo", walker.CurrentName());
EXPECT(!walker.Down());
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index c07ae21..a97c62c 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -2091,8 +2091,10 @@
const Register rs = instr->RsField();
const Register rn = instr->RnField();
const Register rt = instr->RtField();
+ ASSERT(instr->Rt2Field() == R31); // Should-Be-One
const bool is_load = instr->Bit(22) == 1;
if (is_load) {
+ ASSERT(rs == R31); // Should-Be-One
// Format(instr, "ldxr 'rt, 'rn");
if (size == 3) {
const int64_t addr = get_register(rn, R31IsSP);
@@ -2541,6 +2543,7 @@
}
} else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 2) &&
(instr->Bit(15) == 0)) {
+ ASSERT(ra == R31); // Should-Be-One
// Format(instr, "smulh 'rd, 'rn, 'rm");
const int64_t rn_val = get_register(rn, R31IsZR);
const int64_t rm_val = get_register(rm, R31IsZR);
@@ -2556,6 +2559,7 @@
set_register(instr, rd, alu_out, R31IsZR);
} else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 6) &&
(instr->Bit(15) == 0)) {
+ ASSERT(ra == R31); // Should-Be-One
// Format(instr, "umulh 'rd, 'rn, 'rm");
const uint64_t rn_val = get_register(rn, R31IsZR);
const uint64_t rm_val = get_register(rm, R31IsZR);
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 1897c69..6e51b38 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -604,14 +604,8 @@
TEST_CASE(SerializeArrayWithTypeArgument) {
// Write snapshot with object content.
const int kArrayLength = 10;
- Array& array = Array::Handle(Array::New(kArrayLength));
-
- TypeArguments& type_args = TypeArguments::Handle();
- type_args ^= TypeArguments::New(1);
- type_args.SetTypeAt(0, Type::Handle(Type::ObjectType()));
- type_args = type_args.Canonicalize();
-
- array.SetTypeArguments(type_args);
+ Array& array =
+ Array::Handle(Array::New(kArrayLength, Type::Handle(Type::ObjectType())));
Smi& smi = Smi::Handle();
for (int i = 0; i < kArrayLength; i++) {
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 81fe031..574e44f 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -18,6 +18,7 @@
#include "vm/compiler/jit/compiler.h"
#include "vm/dart_api_impl.h"
#include "vm/isolate_reload.h"
+#include "vm/kernel_isolate.h"
#include "vm/parser.h"
#include "vm/symbols.h"
#include "vm/thread.h"
@@ -164,7 +165,10 @@
}
static ThreadLocalKey script_reload_key = kUnsetThreadLocalKey;
+
+#ifndef PRODUCT
static ThreadLocalKey kernel_reload_key = kUnsetThreadLocalKey;
+#endif
char* TestCase::CompileTestScriptWithDFE(const char* url,
const char* source,
@@ -217,38 +221,6 @@
static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
Dart_Handle library,
Dart_Handle url) {
- if (FLAG_use_dart_frontend) {
- // Reload request.
-
- ASSERT(tag == Dart_kKernelTag);
- const char* urlstr = NULL;
- Dart_Handle result = Dart_StringToCString(url, &urlstr);
- if (Dart_IsError(result)) {
- return Dart_NewApiError("accessing url characters failed");
- }
-
- // Updated library either arrives as dart source or as
- // a precompiled kernel binary.
- void* kernel_pgm;
- if (script_reload_key != kUnsetThreadLocalKey) {
- const char* script_source = reinterpret_cast<const char*>(
- OSThread::GetThreadLocal(script_reload_key));
- ASSERT(script_source != NULL);
- OSThread::SetThreadLocal(script_reload_key, 0);
- char* error = TestCase::CompileTestScriptWithDFE(urlstr, script_source,
- &kernel_pgm);
- if (error != NULL) {
- return Dart_NewApiError(error);
- }
- } else {
- ASSERT(kernel_reload_key != kUnsetThreadLocalKey);
- kernel_pgm =
- reinterpret_cast<void*>(OSThread::GetThreadLocal(kernel_reload_key));
- OSThread::SetThreadLocal(kernel_reload_key, 0);
- }
- ASSERT(kernel_pgm != NULL);
- return Dart_NewExternalTypedData(Dart_TypedData_kUint64, kernel_pgm, 1);
- }
if (tag == Dart_kCanonicalizeUrl) {
Dart_Handle library_url = Dart_LibraryUrl(library);
if (Dart_IsError(library_url)) {
@@ -488,7 +460,13 @@
}
Dart_Handle TestCase::ReloadTestScript(const char* script) {
- SetReloadTestScript(script);
+ if (FLAG_use_dart_frontend) {
+ Dart_SourceFile sourcefiles[] = {{RESOLVED_USER_TEST_URI, script}};
+ KernelIsolate::UpdateInMemorySources(
+ sizeof(sourcefiles) / sizeof(Dart_SourceFile), sourcefiles);
+ } else {
+ SetReloadTestScript(script);
+ }
Dart_Handle result = TriggerReload();
if (Dart_IsError(result)) {
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index 53910eb..1f7fc8f 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -309,12 +309,12 @@
static char* CompileTestScriptWithDFE(const char* url,
const char* source,
void** kernel_pgm,
- bool incrementally = false);
+ bool incrementally = true);
static char* CompileTestScriptWithDFE(const char* url,
int sourcefiles_count,
Dart_SourceFile sourcefiles[],
void** kernel_pgm,
- bool incrementally = false);
+ bool incrementally = true);
static Dart_Handle LoadTestScript(const char* script,
Dart_NativeEntryResolver resolver,
const char* lib_uri = USER_TEST_URI,
@@ -325,7 +325,7 @@
Dart_SourceFile sourcefiles[],
Dart_NativeEntryResolver resolver = NULL,
bool finalize = true,
- bool incrementally = false);
+ bool incrementally = true);
static Dart_Handle LoadCoreTestScript(const char* script,
Dart_NativeEntryResolver resolver);
static Dart_Handle lib();
diff --git a/samples-dev/swarm/swarm_ui_lib/observable/observable.dart b/samples-dev/swarm/swarm_ui_lib/observable/observable.dart
index c941e81..373e350 100644
--- a/samples-dev/swarm/swarm_ui_lib/observable/observable.dart
+++ b/samples-dev/swarm/swarm_ui_lib/observable/observable.dart
@@ -146,6 +146,22 @@
int get length => _internal.length;
+ List<R> cast<R>() => _internal.cast<R>();
+
+ List<R> retype<R>() => _internal.retype<R>();
+
+ Iterable<R> whereType<R>() => _internal.whereType<R>();
+
+ List<T> operator +(List<T> other) => _internal + other;
+
+ Iterable<T> followedBy(Iterable<T> other) => _internal.followedBy(other);
+
+ int indexWhere(bool test(T element), [int start = 0]) =>
+ _internal.indexWhere(test, start);
+
+ int lastIndexWhere(bool test(T element), [int start]) =>
+ _internal.lastIndexWhere(test, start);
+
void set length(int value) {
_internal.length = value;
recordGlobalChange();
@@ -182,7 +198,15 @@
}
T get first => _internal.first;
+ void set first(T value) {
+ _internal.first = value;
+ }
+
T get last => _internal.last;
+ void set last(T value) {
+ _internal.last = value;
+ }
+
T get single => _internal.single;
void insert(int index, T element) {
@@ -214,7 +238,7 @@
return _internal.indexOf(element, start);
}
- int lastIndexOf(Object element, [int start = null]) {
+ int lastIndexOf(Object element, [int start]) {
if (start == null) start = length - 1;
return _internal.lastIndexOf(element, start);
}
@@ -288,8 +312,7 @@
throw new UnimplementedError();
}
- dynamic fold(
- var initialValue, dynamic combine(var previousValue, T element)) {
+ R fold<R>(R initialValue, R combine(R previousValue, T element)) {
throw new UnimplementedError();
}
@@ -297,8 +320,8 @@
Iterator<T> get iterator => _internal.iterator;
Iterable<T> where(bool f(T element)) => _internal.where(f);
- Iterable map(f(T element)) => _internal.map(f);
- Iterable expand(Iterable f(T element)) => _internal.expand(f);
+ Iterable<R> map<R>(R f(T element)) => _internal.map(f);
+ Iterable<R> expand<R>(Iterable<R> f(T element)) => _internal.expand(f);
List<T> skip(int count) => _internal.skip(count);
List<T> take(int count) => _internal.take(count);
bool every(bool f(T element)) => _internal.every(f);
@@ -325,8 +348,8 @@
Iterable<T> takeWhile(bool test(T value)) => throw new UnimplementedError();
Iterable<T> skipWhile(bool test(T value)) => throw new UnimplementedError();
- T singleWhere(bool test(T value)) {
- return _internal.singleWhere(test);
+ T singleWhere(bool test(T value), {T orElse()}) {
+ return _internal.singleWhere(test, orElse: orElse);
}
T elementAt(int index) {
diff --git a/samples/samples.status b/samples/samples.status
index 51914af..f72813e 100644
--- a/samples/samples.status
+++ b/samples/samples.status
@@ -2,39 +2,40 @@
# 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.
-[$runtime == vm && $compiler == none && $system == fuchsia]
-*: Skip # Not yet triaged.
-
-[ $browser ]
-# Skip tests that uses dart:io
-build_dart: Skip
-build_dart_simple: Skip
-sample_extension: Skip
-
-[ $compiler == dart2js && $runtime == none ]
-*: Fail, Pass # TODO(ahe): Triage these tests.
+[ $arch == arm ]
+sample_extension/test/*: Skip # Issue 14705
[ $compiler == dart2analyzer ]
build_dart: Skip
-[ $compiler == dart2analyzer && $builder_tag == strong ]
-*: Skip # Issue 28649
-
-[ $arch == arm ]
-sample_extension/test/*: Skip # Issue 14705
+[ $compiler == dartkp ]
+sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
+sample_extension/test/sample_extension_script_snapshot_test: RuntimeError
+sample_extension/test/sample_extension_test: RuntimeError
[ $compiler == precompiler ]
sample_extension/test/*: Skip # These tests attempt to spawn another script using the precompiled runtime.
-[ $compiler == none && $runtime == vm && $system == windows && $mode == debug ]
-sample_extension/test/sample_extension_app_snapshot_test: Pass, RuntimeError # Issue 28842
+# Skip tests that use dart:io
+[ $browser ]
+build_dart: Skip
+build_dart_simple: Skip
+sample_extension: Skip
+
+[ $compiler == dart2analyzer && $strong ]
+*: Skip # Issue 28649
+
+[ $compiler == dart2js && $runtime == none ]
+*: Fail, Pass # TODO(ahe): Triage these tests.
[ $compiler == dartk && $strong ]
sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
sample_extension/test/sample_extension_script_snapshot_test: RuntimeError
sample_extension/test/sample_extension_test: RuntimeError
-[ $compiler == dartkp ]
-sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
-sample_extension/test/sample_extension_script_snapshot_test: RuntimeError
-sample_extension/test/sample_extension_test: RuntimeError
+[ $compiler == none && $mode == debug && $runtime == vm && $system == windows ]
+sample_extension/test/sample_extension_app_snapshot_test: Pass, RuntimeError # Issue 28842
+
+[ $compiler == none && $runtime == vm && $system == fuchsia ]
+*: Skip # Not yet triaged.
+
diff --git a/sdk/lib/_http/http_session.dart b/sdk/lib/_http/http_session.dart
index cda70b8..1e1ff5e 100644
--- a/sdk/lib/_http/http_session.dart
+++ b/sdk/lib/_http/http_session.dart
@@ -64,6 +64,30 @@
_data.forEach(f);
}
+ Iterable<MapEntry> get entries => _data.entries;
+
+ void addEntries(Iterable<MapEntry> entries) {
+ _data.addEntries(entries);
+ }
+
+ Map<K, V> map<K, V>(MapEntry<K, V> transform(key, value)) =>
+ _data.map(transform);
+
+ void removeWhere(bool test(key, value)) {
+ _data.removeWhere(test);
+ }
+
+ Map<K, V> cast<K, V>() => _data.cast<K, V>();
+
+ Map<K, V> retype<K, V>() => _data.retype<K, V>();
+
+ update(key, update(value), {ifAbsent()}) =>
+ _data.update(key, update, ifAbsent: ifAbsent);
+
+ void updateAll(update(key, value)) {
+ _data.updateAll(update);
+ }
+
Iterable get keys => _data.keys;
Iterable get values => _data.values;
int get length => _data.length;
diff --git a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
index 33cfe4a..aab714a 100644
--- a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
@@ -58,7 +58,7 @@
factory HashMap.identity() = _IdentityHashMap<K, V>;
}
-class _HashMap<K, V> implements HashMap<K, V> {
+class _HashMap<K, V> extends MapBase<K, V> implements HashMap<K, V> {
int _length = 0;
// The hash map contents are divided into three parts: one part for
@@ -437,8 +437,6 @@
}
return -1;
}
-
- String toString() => Maps.mapToString(this);
}
class _HashMapKeyIterable<E> extends EfficientLengthIterable<E> {
@@ -673,8 +671,6 @@
// iterator.
_modifications = (_modifications + 1) & 0x3ffffff;
}
-
- String toString() => Maps.mapToString(this);
}
class _Es6MapIterable<E> extends EfficientLengthIterable<E> {
@@ -859,6 +855,7 @@
_HashSet();
Set<E> _newSet() => new _HashSet<E>();
+ Set<R> _newSimilarSet<R>() => new _HashSet<R>();
// Iterable.
Iterator<E> get iterator {
@@ -1111,6 +1108,7 @@
class _IdentityHashSet<E> extends _HashSet<E> {
Set<E> _newSet() => new _IdentityHashSet<E>();
+ Set<R> _newSimilarSet<R>() => new _IdentityHashSet<R>();
int _computeHashCode(var key) {
// We force the hash codes to be unsigned 30-bit integers to avoid
@@ -1137,6 +1135,7 @@
: _validKey = (validKey != null) ? validKey : ((x) => x is E);
Set<E> _newSet() => new _CustomHashSet<E>(_equality, _hasher, _validKey);
+ Set<R> _newSimilarSet<R>() => new _HashSet<R>();
int _findBucketIndex(var bucket, var element) {
if (bucket == null) return -1;
@@ -1269,6 +1268,7 @@
_LinkedHashSet();
Set<E> _newSet() => new _LinkedHashSet<E>();
+ Set<R> _newSimilarSet<R>() => new _LinkedHashSet<R>();
void _unsupported(String operation) {
throw 'LinkedHashSet: unsupported $operation';
@@ -1553,6 +1553,7 @@
class _LinkedIdentityHashSet<E> extends _LinkedHashSet<E> {
Set<E> _newSet() => new _LinkedIdentityHashSet<E>();
+ Set<R> _newSimilarSet<R>() => new _LinkedIdentityHashSet<R>();
int _computeHashCode(var key) {
// We force the hash codes to be unsigned 30-bit integers to avoid
@@ -1582,6 +1583,7 @@
Set<E> _newSet() =>
new _LinkedCustomHashSet<E>(_equality, _hasher, _validKey);
+ Set<R> _newSimilarSet<R>() => new _LinkedHashSet<R>();
int _findBucketIndex(var bucket, var element) {
if (bucket == null) return -1;
diff --git a/sdk/lib/_internal/js_runtime/lib/constant_map.dart b/sdk/lib/_internal/js_runtime/lib/constant_map.dart
index e127673..e5413a9 100644
--- a/sdk/lib/_internal/js_runtime/lib/constant_map.dart
+++ b/sdk/lib/_internal/js_runtime/lib/constant_map.dart
@@ -46,13 +46,20 @@
const ConstantMap._();
+ Map<RK, RV> cast<RK, RV>() {
+ Map<Object, Object> self = this;
+ return self is Map<RK, RV> ? self : Map.castFrom<K, V, RK, RV>(this);
+ }
+
+ Map<RK, RV> retype<RK, RV>() => Map.castFrom<K, V, RK, RV>(this);
+
bool get isEmpty => length == 0;
bool get isNotEmpty => !isEmpty;
- String toString() => Maps.mapToString(this);
+ String toString() => MapBase.mapToString(this);
- static _throwUnmodifiable() {
+ static Null _throwUnmodifiable() {
throw new UnsupportedError('Cannot modify unmodifiable Map');
}
@@ -61,6 +68,35 @@
V remove(K key) => _throwUnmodifiable();
void clear() => _throwUnmodifiable();
void addAll(Map<K, V> other) => _throwUnmodifiable();
+
+ Iterable<MapEntry<K, V>> get entries sync* {
+ for (var key in keys) yield new MapEntry<K, V>(key, this[key]);
+ }
+
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
+ for (var entry in entries) this[entry.key] = entry.value;
+ }
+
+ Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> transform(K key, V value)) {
+ var result = <K2, V2>{};
+ this.forEach((K key, V value) {
+ var entry = transform(key, value);
+ result[entry.key] = entry.value;
+ });
+ return result;
+ }
+
+ V update(K key, V update(V value), {V ifAbsent()}) {
+ _throwUnmodifiable();
+ }
+
+ void updateAll(V update(K key, V value)) {
+ _throwUnmodifiable();
+ }
+
+ void removeWhere(bool test(K key, V value)) {
+ _throwUnmodifiable();
+ }
}
class ConstantStringMap<K, V> extends ConstantMap<K, V> {
diff --git a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
index 4528048..994604a 100644
--- a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
@@ -8,7 +8,7 @@
import 'dart:_foreign_helper' show JS;
import 'dart:_interceptors' show JSExtendableArray;
import 'dart:_internal' show MappedIterable, ListIterable;
-import 'dart:collection' show Maps, LinkedHashMap;
+import 'dart:collection' show Maps, LinkedHashMap, MapBase;
import 'dart:_native_typed_data' show NativeUint8List;
/**
@@ -124,7 +124,7 @@
return object;
}
-class _JsonMap implements Map<String, dynamic> {
+class _JsonMap extends MapBase<String, dynamic> {
// The original JavaScript object remains unchanged until
// the map is eventually upgraded, in which case we null it
// out to reclaim the memory used by it.
@@ -256,8 +256,6 @@
}
}
- String toString() => Maps.mapToString(this);
-
// ------------------------------------------
// Private helper methods.
// ------------------------------------------
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index 2815296..67922a4 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -389,7 +389,7 @@
@patch
factory List.from(Iterable elements, {bool growable: true}) {
- List<E> list = new List<E>();
+ List<E> list = <E>[];
for (E e in elements) {
list.add(e);
}
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
index 9b17c9d..c035e20 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
@@ -1366,6 +1366,7 @@
final bool _once;
bool _inEventLoop = false;
int _handle;
+ int _tick = 0;
TimerImpl(int milliseconds, void callback()) : _once = true {
if (milliseconds == 0 && (!hasTimer() || _globalState.isWorker)) {
@@ -1391,6 +1392,7 @@
void internalCallback() {
_handle = null;
leaveJsAsync();
+ this._tick = 1;
callback();
}
@@ -1408,10 +1410,19 @@
: _once = false {
if (hasTimer()) {
enterJsAsync();
+ int start = JS('int', 'Date.now()');
_handle = JS(
'int',
'self.setInterval(#, #)',
convertDartClosureToJS(() {
+ int tick = this._tick + 1;
+ if (milliseconds > 0) {
+ int duration = JS('int', 'Date.now()') - start;
+ if (duration > (tick + 1) * milliseconds) {
+ tick = duration ~/ milliseconds;
+ }
+ }
+ this._tick = tick;
callback(this);
}, 0),
milliseconds);
@@ -1420,6 +1431,8 @@
}
}
+ int get tick => _tick;
+
void cancel() {
if (hasTimer()) {
if (_inEventLoop) {
diff --git a/sdk/lib/_internal/js_runtime/lib/js_array.dart b/sdk/lib/_internal/js_runtime/lib/js_array.dart
index afb6117..1cc7b2a 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_array.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_array.dart
@@ -119,6 +119,13 @@
}
}
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<E, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<E, R>(this);
+
void add(E value) {
checkGrowable('add');
JS('void', r'#.push(#)', this, value);
@@ -337,7 +344,7 @@
throw IterableElementError.noElement();
}
- E singleWhere(bool test(E element)) {
+ E singleWhere(bool test(E element), {E orElse()}) {
int length = this.length;
E match = null;
bool matchFound = false;
@@ -357,6 +364,7 @@
}
}
if (matchFound) return match;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -626,6 +634,54 @@
Map<int, E> asMap() {
return new ListMapView<E>(this);
}
+
+ Iterable<E> followedBy(Iterable<E> other) sync* {
+ yield* this;
+ yield* other;
+ }
+
+ Iterable<T> whereType<T>() sync* {
+ for (var i = 0; i < this.length; i++) {
+ var element = this[i];
+ if (element is T) yield element;
+ }
+ }
+
+ List<E> operator +(List<E> other) {
+ int totalLength = this.length + other.length;
+ return <E>[]
+ ..length = totalLength
+ ..setRange(0, this.length, this)
+ ..setRange(this.length, totalLength, other);
+ }
+
+ int indexWhere(bool test(E element), [int start = 0]) {
+ if (start >= this.length) return -1;
+ if (start < 0) start = 0;
+ for (int i = start; i < this.length; i++) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(E element), [int start]) {
+ if (start == null) start = this.length - 1;
+ if (start < 0) return -1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
+ }
+ return -1;
+ }
+
+ void set first(E element) {
+ if (this.isEmpty) throw IterableElementError.noElement();
+ this[0] = element;
+ }
+
+ void set last(E element) {
+ if (this.isEmpty) throw IterableElementError.noElement();
+ this[this.length - 1] = element;
+ }
}
/**
diff --git a/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart b/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart
index f4d8a0a..3cd22d2 100644
--- a/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart
+++ b/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart
@@ -9,7 +9,8 @@
const _USE_ES6_MAPS = const bool.fromEnvironment("dart2js.use.es6.maps");
-class JsLinkedHashMap<K, V> implements LinkedHashMap<K, V>, InternalMap {
+class JsLinkedHashMap<K, V> extends MapBase<K, V>
+ implements LinkedHashMap<K, V>, InternalMap {
int _length = 0;
// The hash map contents are divided into three parts: one part for
diff --git a/sdk/lib/_internal/js_runtime/lib/preambles/d8.js b/sdk/lib/_internal/js_runtime/lib/preambles/d8.js
index ca90937..00f2485 100644
--- a/sdk/lib/_internal/js_runtime/lib/preambles/d8.js
+++ b/sdk/lib/_internal/js_runtime/lib/preambles/d8.js
@@ -15,7 +15,6 @@
"use strict"; // Should be first statement of this function.
// Location (Uri.base)
-
var baseUri = 'org-dartlang-d8-preamble:///mock/uri/base/';
if (typeof process != "undefined" &&
typeof process.cwd == "function") {
@@ -78,7 +77,7 @@
var id = timerIdCounter++;
f.$timerId = id;
timerIds[id] = f;
- if (ms == 0) {
+ if (ms == 0 && !isNextTimerDue()) {
zeroTimerQueue.push(f);
} else {
addDelayedTimer(f, ms);
@@ -127,7 +126,10 @@
var originalDate = Date;
var originalNow = originalDate.now;
function advanceTimeTo(time) {
- timeOffset = time - originalNow();
+ var now = originalNow();
+ if (timeOffset < time - now) {
+ timeOffset = time - now;
+ }
}
function installMockDate() {
var NewDate = function Date(Y, M, D, h, m, s, ms) {
@@ -172,6 +174,12 @@
}
}
+ function isNextTimerDue() {
+ if (timerHeap.length == 0) return false;
+ var head = timerHeap[0];
+ return head[0] < originalNow() + timeOffset;
+ }
+
function nextDelayedTimerQueue() {
if (timerHeap.length == 0) return null;
var result = timerHeap[0];
@@ -261,7 +269,7 @@
// Global properties. "self" refers to the global object, so adding a
// property to "self" defines a global variable.
- self.self = self
+ self.self = self;
self.dartMainRunner = function(main, args) {
// Initialize.
var action = function() { main(args); }
diff --git a/sdk/lib/async/timer.dart b/sdk/lib/async/timer.dart
index b72c70f..186bbe6 100644
--- a/sdk/lib/async/timer.dart
+++ b/sdk/lib/async/timer.dart
@@ -93,6 +93,21 @@
void cancel();
/**
+ * The number of durations preceding the most recent timer event.
+ *
+ * The value starts at zero and is incremented each time a timer event
+ * occurs, so each callback will see a larger value than the previous one.
+ *
+ * If a periodic timer with a non-zero duration is delayed too much,
+ * so more than one tick should have happened,
+ * all but the last tick in the past are considered "missed",
+ * and no callback is invoked for them.
+ * The [tick] count reflects the number of durations that have passed and
+ * not the number of callback invocations that have happened.
+ */
+ int get tick;
+
+ /**
* Returns whether the timer is still active.
*
* A non-periodic timer is active if the callback has not been executed,
diff --git a/sdk/lib/cli/wait_for.dart b/sdk/lib/cli/wait_for.dart
index 03089bd..ffde36c 100644
--- a/sdk/lib/cli/wait_for.dart
+++ b/sdk/lib/cli/wait_for.dart
@@ -112,9 +112,11 @@
@provisional
T waitFor<T>(Future<T> future, {Duration timeout}) {
T result;
+ bool futureCompleted = false;
Object error;
StackTrace stacktrace;
future.then((r) {
+ futureCompleted = true;
result = r;
}, onError: (e, st) {
error = e;
@@ -126,7 +128,7 @@
s = new Stopwatch()..start();
}
Timer.run(() {}); // Enusre there is at least one message.
- while ((result == null) && (error == null)) {
+ while (!futureCompleted && (error == null)) {
Duration remaining;
if (timeout != null) {
if (s.elapsed >= timeout) {
diff --git a/sdk/lib/collection/hash_map.dart b/sdk/lib/collection/hash_map.dart
index a7a394d..8050607 100644
--- a/sdk/lib/collection/hash_map.dart
+++ b/sdk/lib/collection/hash_map.dart
@@ -102,7 +102,7 @@
* Creates a [HashMap] that contains all key/value pairs of [other].
*/
factory HashMap.from(Map other) {
- HashMap<K, V> result = new HashMap<K, V>();
+ Map<K, V> result = new HashMap<K, V>();
other.forEach((k, v) {
result[k] = v;
});
@@ -124,7 +124,7 @@
*/
factory HashMap.fromIterable(Iterable iterable,
{K key(element), V value(element)}) {
- HashMap<K, V> map = new HashMap<K, V>();
+ Map<K, V> map = new HashMap<K, V>();
Maps._fillMapWithMappedIterable(map, iterable, key, value);
return map;
}
@@ -141,7 +141,7 @@
* It is an error if the two [Iterable]s don't have the same length.
*/
factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) {
- HashMap<K, V> map = new HashMap<K, V>();
+ Map<K, V> map = new HashMap<K, V>();
Maps._fillMapWithIterables(map, keys, values);
return map;
}
diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart
index 1c056de..e77d31c 100644
--- a/sdk/lib/collection/hash_set.dart
+++ b/sdk/lib/collection/hash_set.dart
@@ -10,6 +10,19 @@
// It's possible to be more efficient if we have a way to create an empty
// set of the correct type.
+ Set<E> _newSet();
+
+ Set<R> _newSimilarSet<R>();
+
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R>
+ ? self
+ : Set.castFrom<E, R>(this, newSet: _newSimilarSet);
+ }
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this, newSet: _newSimilarSet);
+
Set<E> difference(Set<Object> other) {
Set<E> result = _newSet();
for (var element in this) {
@@ -26,8 +39,6 @@
return result;
}
- Set<E> _newSet();
-
// Subclasses can optimize this further.
Set<E> toSet() => _newSet()..addAll(this);
}
diff --git a/sdk/lib/collection/iterable.dart b/sdk/lib/collection/iterable.dart
index e32c10d..7d028a4 100644
--- a/sdk/lib/collection/iterable.dart
+++ b/sdk/lib/collection/iterable.dart
@@ -15,13 +15,31 @@
// - SetMixin
// If changing a method here, also change the other copies.
+ Iterable<R> cast<R>() {
+ Iterable<Object> self = this;
+ return self is Iterable<R> ? self : Iterable.castFrom<E, R>(this);
+ }
+
+ Iterable<R> retype<R>() => Iterable.castFrom<E, R>(this);
+
Iterable<T> map<T>(T f(E element)) => new MappedIterable<E, T>(this, f);
Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f);
+ Iterable<T> whereType<T>() sync* {
+ for (Object element in this) if (element is T) yield element;
+ }
+
Iterable<T> expand<T>(Iterable<T> f(E element)) =>
new ExpandIterable<E, T>(this, f);
+ Iterable<E> followedBy(Iterable<E> other) sync* {
+ // TODO(lrn): Optimize this (some operations can be more efficient,
+ // and the concatenation has efficient length if the source iterables do).
+ yield* this;
+ yield* other;
+ }
+
bool contains(Object element) {
for (E e in this) {
if (e == element) return true;
@@ -168,7 +186,7 @@
throw IterableElementError.noElement();
}
- E singleWhere(bool test(E value)) {
+ E singleWhere(bool test(E element), {E orElse()}) {
E result = null;
bool foundMatching = false;
for (E element in this) {
@@ -181,6 +199,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -201,7 +220,7 @@
/**
* Base class for implementing [Iterable].
*
- * This class implements all methods of [Iterable] except [Iterable.iterator]
+ * This class implements all methods of [Iterable], except [Iterable.iterator],
* in terms of `iterator`.
*/
abstract class IterableBase<E> extends Iterable<E> {
@@ -268,7 +287,7 @@
}
}
-/** A set used to identify cyclic lists during toString() calls. */
+/** A collection used to identify cyclic lists during toString() calls. */
final List _toStringVisiting = [];
/** Check if we are currently visiting `o` in a toString call. */
diff --git a/sdk/lib/collection/linked_hash_map.dart b/sdk/lib/collection/linked_hash_map.dart
index cd65c8a..7e075fc 100644
--- a/sdk/lib/collection/linked_hash_map.dart
+++ b/sdk/lib/collection/linked_hash_map.dart
@@ -23,7 +23,7 @@
*
* The map allows `null` as a key.
*/
-abstract class LinkedHashMap<K, V> implements HashMap<K, V> {
+abstract class LinkedHashMap<K, V> implements Map<K, V> {
/**
* Creates an insertion-ordered hash-table based [Map].
*
diff --git a/sdk/lib/collection/linked_hash_set.dart b/sdk/lib/collection/linked_hash_set.dart
index 398ee90..672f58b 100644
--- a/sdk/lib/collection/linked_hash_set.dart
+++ b/sdk/lib/collection/linked_hash_set.dart
@@ -29,7 +29,7 @@
* constant time: [add], [contains], [remove], and [length], provided the hash
* codes of objects are well distributed..
*/
-abstract class LinkedHashSet<E> implements HashSet<E> {
+abstract class LinkedHashSet<E> implements Set<E> {
/**
* Create an insertion-ordered hash set using the provided
* [equals] and [hashCode].
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart
index a039fdc..57e5ef4 100644
--- a/sdk/lib/collection/list.dart
+++ b/sdk/lib/collection/list.dart
@@ -53,10 +53,19 @@
*/
abstract class ListMixin<E> implements List<E> {
// Iterable interface.
+ // TODO(lrn): When we get composable mixins, reuse IterableMixin instead
+ // of redaclating everything.
Iterator<E> get iterator => new ListIterator<E>(this);
E elementAt(int index) => this[index];
+ Iterable<E> followedBy(Iterable<E> other) sync* {
+ for (var i = 0; i < length; i++) {
+ yield this[i];
+ }
+ yield* other;
+ }
+
void forEach(void action(E element)) {
int length = this.length;
for (int i = 0; i < length; i++) {
@@ -76,11 +85,21 @@
return this[0];
}
+ void set first(E value) {
+ if (length == 0) throw IterableElementError.noElement();
+ this[0] = value;
+ }
+
E get last {
if (length == 0) throw IterableElementError.noElement();
return this[length - 1];
}
+ void set last(E value) {
+ if (length == 0) throw IterableElementError.noElement();
+ this[length - 1] = value;
+ }
+
E get single {
if (length == 0) throw IterableElementError.noElement();
if (length > 1) throw IterableElementError.tooMany();
@@ -146,7 +165,7 @@
throw IterableElementError.noElement();
}
- E singleWhere(bool test(E element)) {
+ E singleWhere(bool test(E element), {E orElse()}) {
int length = this.length;
E match = null;
bool matchFound = false;
@@ -164,6 +183,7 @@
}
}
if (matchFound) return match;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -175,6 +195,10 @@
Iterable<E> where(bool test(E element)) => new WhereIterable<E>(this, test);
+ Iterable<T> whereType<T>() sync* {
+ for (var element in this) if (element is T) yield (element as T);
+ }
+
Iterable<T> map<T>(T f(E element)) => new MappedListIterable<E, T>(this, f);
Iterable<T> expand<T>(Iterable<T> f(E element)) =>
@@ -220,7 +244,7 @@
List<E> toList({bool growable: true}) {
List<E> result;
if (growable) {
- result = new List<E>()..length = length;
+ result = <E>[]..length = length;
} else {
result = new List<E>(length);
}
@@ -238,7 +262,7 @@
return result;
}
- // Collection interface.
+ // List interface.
void add(E element) {
this[this.length++] = element;
}
@@ -307,7 +331,12 @@
this.length = 0;
}
- // List interface.
+ List<R> cast<R>() {
+ List<Object> self = this;
+ return self is List<R> ? self : List.castFrom<E, R>(this);
+ }
+
+ List<R> retype<R>() => List.castFrom<E, R>(this);
E removeLast() {
if (length == 0) {
@@ -344,12 +373,19 @@
return new ListMapView<E>(this);
}
+ List<E> operator +(List<E> other) {
+ var result = <E>[]..length = (this.length + other.length);
+ result.setRange(0, this.length, this);
+ result.setRange(this.length, result.length, other);
+ return result;
+ }
+
List<E> sublist(int start, [int end]) {
int listLength = this.length;
if (end == null) end = listLength;
RangeError.checkValidRange(start, end, listLength);
int length = end - start;
- List<E> result = new List<E>()..length = length;
+ List<E> result = <E>[]..length = length;
for (int i = 0; i < length; i++) {
result[i] = this[start + i];
}
@@ -429,36 +465,34 @@
}
}
- int indexOf(Object element, [int startIndex = 0]) {
- if (startIndex >= this.length) {
- return -1;
- }
- if (startIndex < 0) {
- startIndex = 0;
- }
- for (int i = startIndex; i < this.length; i++) {
- if (this[i] == element) {
- return i;
- }
+ int indexOf(Object element, [int start = 0]) {
+ if (start < 0) start = 0;
+ for (int i = start; i < this.length; i++) {
+ if (this[i] == element) return i;
}
return -1;
}
- int lastIndexOf(Object element, [int startIndex]) {
- if (startIndex == null) {
- startIndex = this.length - 1;
- } else {
- if (startIndex < 0) {
- return -1;
- }
- if (startIndex >= this.length) {
- startIndex = this.length - 1;
- }
+ int indexWhere(bool test(E element), [int start = 0]) {
+ if (start < 0) start = 0;
+ for (int i = start; i < this.length; i++) {
+ if (test(this[i])) return i;
}
- for (int i = startIndex; i >= 0; i--) {
- if (this[i] == element) {
- return i;
- }
+ return -1;
+ }
+
+ int lastIndexOf(Object element, [int start]) {
+ if (start == null || start >= this.length) start = this.length - 1;
+ for (int i = start; i >= 0; i--) {
+ if (this[i] == element) return i;
+ }
+ return -1;
+ }
+
+ int lastIndexWhere(bool test(E element), [int start]) {
+ if (start == null || start >= this.length) start = this.length - 1;
+ for (int i = start; i >= 0; i--) {
+ if (test(this[i])) return i;
}
return -1;
}
diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart
index e1791d2..ac02022a 100644
--- a/sdk/lib/collection/maps.dart
+++ b/sdk/lib/collection/maps.dart
@@ -20,7 +20,36 @@
* A more efficient implementation is usually possible by overriding
* some of the other members as well.
*/
-abstract class MapBase<K, V> = Object with MapMixin<K, V>;
+abstract class MapBase<K, V> extends MapMixin<K, V> {
+ static String mapToString(Map m) {
+ // Reuses the list in IterableBase for detecting toString cycles.
+ if (_isToStringVisiting(m)) {
+ return '{...}';
+ }
+
+ var result = new StringBuffer();
+ try {
+ _toStringVisiting.add(m);
+ result.write('{');
+ bool first = true;
+ m.forEach((k, v) {
+ if (!first) {
+ result.write(', ');
+ }
+ first = false;
+ result.write(k);
+ result.write(': ');
+ result.write(v);
+ });
+ result.write('}');
+ } finally {
+ assert(identical(_toStringVisiting.last, m));
+ _toStringVisiting.removeLast();
+ }
+
+ return result.toString();
+ }
+}
/**
* Mixin implementing a [Map].
@@ -47,6 +76,13 @@
// It should clear the map even if some keys are not equal to themselves.
void clear();
+ Map<RK, RV> cast<RK, RV>() {
+ Map<Object, Object> self = this;
+ return self is Map<RK, RV> ? self : Map.castFrom<K, V, RK, RV>(this);
+ }
+
+ Map<RK, RV> retype<RK, RV>() => Map.castFrom<K, V, RK, RV>(this);
+
void forEach(void action(K key, V value)) {
for (K key in keys) {
action(key, this[key]);
@@ -73,12 +109,57 @@
return this[key] = ifAbsent();
}
+ V update(K key, V update(V value), {V ifAbsent()}) {
+ if (this.containsKey(key)) {
+ return this[key] = update(this[key]);
+ }
+ if (ifAbsent == null) {
+ return this[key] = ifAbsent();
+ }
+ throw new ArgumentError.value(key, "key", "Key not in map.");
+ }
+
+ void updateAll(V update(K key, V value)) {
+ for (var key in this.keys) {
+ this[key] = update(key, this[key]);
+ }
+ }
+
+ Iterable<MapEntry<K, V>> get entries {
+ return keys.map((K key) => new MapEntry<K, V>(key, this[key]));
+ }
+
+ Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> transform(K key, V value)) {
+ var result = <K2, V2>{};
+ for (var key in this.keys) {
+ var entry = transform(key, this[key]);
+ result[entry.key] = entry.value;
+ }
+ return result;
+ }
+
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
+ for (var entry in entries) {
+ this[entry.key] = entry.value;
+ }
+ }
+
+ void removeWhere(bool test(K key, V value)) {
+ var keysToRemove = <K>[];
+ for (var key in keys) {
+ if (test(key, this[key])) keysToRemove.add(key);
+ }
+ for (var key in keysToRemove) {
+ this.remove(key);
+ }
+ }
+
bool containsKey(Object key) => keys.contains(key);
int get length => keys.length;
bool get isEmpty => keys.isEmpty;
bool get isNotEmpty => keys.isNotEmpty;
Iterable<V> get values => new _MapBaseValueIterable<K, V>(this);
- String toString() => Maps.mapToString(this);
+ String toString() => MapBase.mapToString(this);
}
/**
@@ -193,6 +274,10 @@
final Map<K, V> _map;
const MapView(Map<K, V> map) : _map = map;
+ Map<RK, RV> cast<RK, RV>() => _map.cast<RK, RV>();
+
+ Map<RK, RV> retype<RK, RV>() => _map.retype<RK, RV>();
+
V operator [](Object key) => _map[key];
void operator []=(K key, V value) {
_map[key] = value;
@@ -220,6 +305,26 @@
V remove(Object key) => _map.remove(key);
String toString() => _map.toString();
Iterable<V> get values => _map.values;
+
+ Iterable<MapEntry<K, V>> get entries => _map.entries;
+
+ void addEntries(Iterable<Object> entries) {
+ _map.addEntries(entries);
+ }
+
+ Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> transform(K key, V value)) =>
+ _map.map<K2, V2>(transform);
+
+ V update(K key, V update(V value), {V ifAbsent()}) =>
+ _map.update(key, update, ifAbsent: ifAbsent);
+
+ void updateAll(V update(K key, V value)) {
+ _map.updateAll(update);
+ }
+
+ void removeWhere(bool test(K key, V value)) {
+ _map.removeWhere(test);
+ }
}
/**
@@ -237,6 +342,8 @@
* in term of basic ones ([Map.keys], [Map.[]],
* [Map.[]=] and [Map.remove].) Not all methods are
* necessary to implement each particular operation.
+ *
+ * Deprecated. Will be removed in Dart 2.
*/
class Maps {
static bool containsValue(Map map, Object value) {
@@ -289,49 +396,11 @@
static bool isNotEmpty(Map map) => map.keys.isNotEmpty;
/**
- * Returns a string representing the specified map. The returned string
- * looks like this: [:'{key0: value0, key1: value1, ... keyN: valueN}':].
- * The value returned by its [toString] method is used to represent each
- * key or value.
+ * Do not use. This entire class will be removed.
*
- * If the map collection contains a reference to itself, either
- * directly as a key or value, or indirectly through other collections
- * or maps, the contained reference is rendered as [:'{...}':]. This
- * prevents the infinite regress that would otherwise occur. So, for example,
- * calling this method on a map whose sole entry maps the string key 'me'
- * to a reference to the map would return [:'{me: {...}}':].
- *
- * A typical implementation of a map's [toString] method will
- * simply return the results of this method applied to the collection.
+ * Use [MapBase.mapToString] instead.
*/
- static String mapToString(Map m) {
- // Reuse the list in IterableBase for detecting toString cycles.
- if (_isToStringVisiting(m)) {
- return '{...}';
- }
-
- var result = new StringBuffer();
- try {
- _toStringVisiting.add(m);
- result.write('{');
- bool first = true;
- m.forEach((k, v) {
- if (!first) {
- result.write(', ');
- }
- first = false;
- result.write(k);
- result.write(': ');
- result.write(v);
- });
- result.write('}');
- } finally {
- assert(identical(_toStringVisiting.last, m));
- _toStringVisiting.removeLast();
- }
-
- return result.toString();
- }
+ static String mapToString(Map m) => MapBase.mapToString(m);
static _id(x) => x;
diff --git a/sdk/lib/collection/queue.dart b/sdk/lib/collection/queue.dart
index 2999bc0..b27c5c5 100644
--- a/sdk/lib/collection/queue.dart
+++ b/sdk/lib/collection/queue.dart
@@ -49,6 +49,36 @@
new CastQueue<S, T>(source);
/**
+ * Provides a view of this queue as a queue of [R] instances.
+ *
+ * If this queue is already a `Queue<R>`, it is returned unchanged.
+ *
+ * If this queue contains only instances of [R], all read operations
+ * will work correctly. If any operation tries to access an element
+ * that is not an instance of [R], the access will throw instead.
+ *
+ * Elements added to the queue (e.g., by using [addFirst] or [addAll])
+ * must be instance of [R] to be valid arguments to the adding function,
+ * and they must be instances of [E] as well to be accepted by
+ * this queue as well.
+ */
+ Queue<R> cast<R>();
+
+ /**
+ * Provides a view of this queue as a queue of [R] instances, if necessary.
+ *
+ * If this queue contains only instances of [R], all read operations
+ * will work correctly. If any operation tries to access an element
+ * that is not an instance of [R], the access will throw instead.
+ *
+ * Elements added to the queue (e.g., by using [addFirst] or [addAll])
+ * must be instance of [R] to be valid arguments to the adding function,
+ * and they must be instances of [E] as well to be accepted by
+ * this queue as well.
+ */
+ Queue<R> retype<R>();
+
+ /**
* Removes and returns the first element of this queue.
*
* The queue must not be empty when this method is called.
@@ -291,6 +321,13 @@
return list;
}
+ Queue<R> cast<R>() {
+ Queue<Object> self = this;
+ return self is Queue<R> ? self : Queue.castFrom<E, R>(this);
+ }
+
+ Queue<R> retype<R>() => Queue.castFrom<E, R>(this);
+
int get length => _elementCount;
void addLast(E value) {
@@ -569,6 +606,13 @@
// Iterable interface.
+ Queue<R> cast<R>() {
+ Queue<Object> self = this;
+ return self is Queue<R> ? self : this.retype<R>();
+ }
+
+ Queue<R> retype<R>() => Queue.castFrom<E, R>(this);
+
Iterator<E> get iterator => new _ListQueueIterator<E>(this);
void forEach(void f(E element)) {
@@ -607,7 +651,7 @@
List<E> toList({bool growable: true}) {
List<E> list;
if (growable) {
- list = new List<E>()..length = length;
+ list = <E>[]..length = length;
} else {
list = new List<E>(length);
}
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart
index 06e555e..5d51dff 100644
--- a/sdk/lib/collection/set.dart
+++ b/sdk/lib/collection/set.dart
@@ -23,6 +23,10 @@
* Implementations of `Set` using this mixin should consider also implementing
* `clear` in constant time. The default implementation works by removing every
* element.
+ *
+ * The [cast] implementation uses [retype] to do the actual cast, so if
+ * the cast operation wants to pass a custom `newSet` to [Set.castFrom],
+ * it only needs to override [retype].
*/
abstract class SetMixin<E> implements Set<E> {
// This class reimplements all of [IterableMixin].
@@ -47,6 +51,24 @@
bool get isNotEmpty => length != 0;
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R> ? self : this.retype<R>();
+ }
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this);
+
+ Iterable<E> followedBy(Iterable<E> other) sync* {
+ // TODO(lrn): Optimize this (some operations can be more efficient,
+ // and the concatenation has efficient length if the source iterables do).
+ yield* this;
+ yield* other;
+ }
+
+ Iterable<T> whereType<T>() sync* {
+ for (Object element in this) if (element is T) yield element;
+ }
+
void clear() {
removeAll(toList());
}
@@ -113,8 +135,7 @@
}
List<E> toList({bool growable: true}) {
- List<E> result =
- growable ? (new List<E>()..length = length) : new List<E>(length);
+ List<E> result = growable ? (<E>[]..length = length) : new List<E>(length);
int i = 0;
for (E element in this) result[i++] = element;
return result;
@@ -253,7 +274,7 @@
throw IterableElementError.noElement();
}
- E singleWhere(bool test(E value)) {
+ E singleWhere(bool test(E value), {E orElse()}) {
E result = null;
bool foundMatching = false;
for (E element in this) {
@@ -266,6 +287,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
diff --git a/sdk/lib/collection/splay_tree.dart b/sdk/lib/collection/splay_tree.dart
index 90f9806..3022df2 100644
--- a/sdk/lib/collection/splay_tree.dart
+++ b/sdk/lib/collection/splay_tree.dart
@@ -281,7 +281,7 @@
* value is a [K].
*/
class SplayTreeMap<K, V> extends _SplayTree<K, _SplayTreeMapNode<K, V>>
- implements Map<K, V> {
+ with MapMixin<K, V> {
_SplayTreeMapNode<K, V> _root;
final _SplayTreeMapNode<K, V> _dummy =
new _SplayTreeMapNode<K, V>(null, null);
@@ -455,10 +455,6 @@
Iterable<V> get values => new _SplayTreeValueIterable<K, V>(this);
- String toString() {
- return Maps.mapToString(this);
- }
-
/**
* Get the first key in the map. Returns [:null:] if the map is empty.
*/
@@ -737,6 +733,16 @@
return result;
}
+ Set<T> _newSet<T>() =>
+ new SplayTreeSet<T>((T a, T b) => _comparator(a as E, b as E), _validKey);
+
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ return self is Set<R> ? self : Set.castFrom<E, R>(this, newSet: _newSet);
+ }
+
+ Set<R> retype<R>() => Set.castFrom<E, R>(this, newSet: _newSet);
+
int _compare(E e1, E e2) => _comparator(e1, e2);
// From Iterable.
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index e140f01..d3cc85b 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -80,6 +80,8 @@
* have side effects.
*/
abstract class Iterable<E> {
+ // TODO(lrn): When we allow forwarding const constructors through
+ // mixin applications, make this class implement [IterableMixin].
const Iterable();
/**
@@ -152,6 +154,46 @@
Iterator<E> get iterator;
/**
+ * Makes this iterable useful as an `Iterable<R>`, if necessary.
+ *
+ * Like [retype] except that this iterable is returned as-is
+ * if it is already an `Iterable<R>`.
+ *
+ * It means that `someIterable.cast<Object>().toList()` is not guaranteed
+ * to return precisley a `List<Object>`, but it may return a subtype.
+ */
+ Iterable<R> cast<R>() {
+ Iterable<Object> self = this;
+ return self is Iterable<R> ? self : Iterable.castFrom<E, R>(this);
+ }
+
+ /**
+ * Provides a view of this iterable as an iterable of [R] instances.
+ *
+ * If this iterable only contains instances of [R], all operations
+ * will work correctly. If any operation tries to access an element
+ * that is not an instance of [R], the access will throw instead.
+ *
+ * When the returned iterable creates a new object that depends on
+ * the type [R], e.g., from [toList], it will have exactly the type [R].
+ */
+ Iterable<R> retype<R>() => Iterable.castFrom<E, R>(this);
+
+ /**
+ * Returns the lazy concatentation of this iterable and [other].
+ *
+ * The returned iterable will provide the same elements as this iterable,
+ * and, after that, the elements of [other], in the same order as in the
+ * original iterables.
+ */
+ Iterable<E> followedBy(Iterable<E> other) sync* {
+ // TODO(lrn): Optimize this (some operations can be more efficient,
+ // and the concatenation has efficient length if the source iterables do).
+ yield* this;
+ yield* other;
+ }
+
+ /**
* Returns a new lazy [Iterable] with elements that are created by
* calling `f` on each element of this `Iterable` in iteration order.
*
@@ -184,6 +226,21 @@
Iterable<E> where(bool test(E element)) => new WhereIterable<E>(this, test);
/**
+ * Returns a new lazy [Iterable] with all elements that have type [T].
+ *
+ * The matching elements have the same order in the returned iterable
+ * as they have in [iterator].
+ *
+ * This method returns a view of the mapped elements.
+ * Iterating will not cache results, and thus iterating multiple times over
+ * the returned [Iterable] may yield different results,
+ * if the underlying elements change between iterations.
+ */
+ Iterable<T> whereType<T>() sync* {
+ for (var element in this) if (element is T) yield (element as T);
+ }
+
+ /**
* Expands each element of this [Iterable] into zero or more elements.
*
* The resulting Iterable runs through the elements returned
@@ -563,12 +620,14 @@
/**
* Returns the single element that satisfies [test].
*
- * Checks all elements to see if `test(element)` returns true.
+ * Checks elements to see if `test(element)` returns true.
* If exactly one element satisfies [test], that element is returned.
* Otherwise, if there are no matching elements, or if there is more than
- * one matching element, a [StateError] is thrown.
+ * one matching element, the result of invoking the [orElse]
+ * function is returned.
+ * If [orElse] is omitted, it defaults to throwing a [StateError].
*/
- E singleWhere(bool test(E element)) {
+ E singleWhere(bool test(E element), {E orElse()}) {
E result = null;
bool foundMatching = false;
for (E element in this) {
@@ -581,6 +640,7 @@
}
}
if (foundMatching) return result;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -591,9 +651,9 @@
* Index zero represents the first element (so `iterable.elementAt(0)` is
* equivalent to `iterable.first`).
*
- * May iterate through the elements in iteration order, skipping the
- * first `index` elements and returning the next.
- * Some iterable may have more efficient ways to find the element.
+ * May iterate through the elements in iteration order, ignoring the
+ * first [index] elements and then returning the next.
+ * Some iterables may have more a efficient way to find the element.
*/
E elementAt(int index) {
if (index is! int) throw new ArgumentError.notNull("index");
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index c64809c..fe9ee96 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -172,6 +172,38 @@
static List<T> castFrom<S, T>(List<S> source) => new CastList<S, T>(source);
/**
+ * Returns a view of this list as a list of [R] instances, if necessary.
+ *
+ * If this list is already a `List<R>`, it is returned unchanged.
+ *
+ * If this list contains only instances of [R], all read operations
+ * will work correctly. If any operation tries to access an element
+ * that is not an instance of [R], the access will throw instead.
+ *
+ * Elements added to the list (e.g., by using [add] or [addAll])
+ * must be instance of [R] to be valid arguments to the adding function,
+ * and they must be instances of [E] as well to be accepted by
+ * this list as well.
+ */
+ List<R> cast<R>();
+
+ /**
+ * Returns a view of this list as a list of [R] instances.
+ *
+ * If this list contains only instances of [R], all read operations
+ * will work correctly. If any operation tries to access an element
+ * that is not an instance of [R], the access will throw instead.
+ *
+ * Elements added to the list (e.g., by using [add] or [addAll])
+ * must be instance of [R] to be valid arguments to the adding function,
+ * and they must be instances of [E] as well to be accepted by
+ * this list as well.
+ *
+ * Typically implemented as `List.castFrom<E, R>(this)`.
+ */
+ List<R> retype<R>();
+
+ /**
* Returns the object at the given [index] in the list
* or throws a [RangeError] if [index] is out of bounds.
*/
@@ -184,6 +216,24 @@
void operator []=(int index, E value);
/**
+ * Updates the first position of the list to contain [value].
+ *
+ * Equivalent to `theList[0] = value;`.
+ *
+ * The list must be non-empty.
+ */
+ void set first(E value);
+
+ /**
+ * Updates the last position of the list to contain [value].
+ *
+ * Equivalent to `theList[theList.length - 1] = value;`.
+ *
+ * The list must be non-empty.
+ */
+ void set last(E value);
+
+ /**
* Returns the number of objects in this list.
*
* The valid indices for a list are `0` through `length - 1`.
@@ -272,6 +322,46 @@
int indexOf(E element, [int start = 0]);
/**
+ * Returns the first index in the list that satisfies the provided [test].
+ *
+ * Searches the list from index [start] to the end of the list.
+ * The first time an object `o` is encountered so that `test(o)` is true,
+ * the index of `o` is returned.
+ *
+ * ```
+ * List<String> notes = ['do', 're', 'mi', 're'];
+ * notes.indexWhere((note) => note.startsWith('r')); // 1
+ * notes.indexWhere((note) => note.startsWith('r'), 2); // 3
+ * ```
+ *
+ * Returns -1 if [element] is not found.
+ * ```
+ * notes.indexWhere((note) => note.startsWith('k')); // -1
+ * ```
+ */
+ int indexWhere(bool test(E element), [int start = 0]);
+
+ /**
+ * Returns the last index in the list that satisfies the provided [test].
+ *
+ * Searches the list from index [start] to 0.
+ * The first time an object `o` is encountered so that `test(o)` is true,
+ * the index of `o` is returned.
+ *
+ * ```
+ * List<String> notes = ['do', 're', 'mi', 're'];
+ * notes.lastIndexWhere((note) => note.startsWith('r')); // 3
+ * notes.lastIndexWhere((note) => note.startsWith('r'), 2); // 1
+ * ```
+ *
+ * Returns -1 if [element] is not found.
+ * ```
+ * notes.lastIndexWhere((note) => note.startsWith('k')); // -1
+ * ```
+ */
+ int lastIndexWhere(bool test(E element), [int start]);
+
+ /**
* Returns the last index of [element] in this list.
*
* Searches the list backwards from index [start] to 0.
@@ -412,6 +502,18 @@
void retainWhere(bool test(E element));
/**
+ * Returns the concatenation of this list and [other].
+ *
+ * Returns a new list containing the elements of this list followed by
+ * the elements of [other].
+ *
+ * The default behavior is to return a normal growable list.
+ * Some list types may choose to return a list of the same type as themselves
+ * (see [Uint8List.+]);
+ */
+ List<E> operator +(List<E> other);
+
+ /**
* Returns a new list containing the objects from [start] inclusive to [end]
* exclusive.
*
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index b7929f6..0cae297 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -5,7 +5,7 @@
part of dart.core;
/**
- * An collection of key-value pairs, from which you retrieve a value
+ * A collection of key/value pairs, from which you retrieve a value
* using its associated key.
*
* There is a finite number of keys in the map,
@@ -42,7 +42,7 @@
external factory Map();
/**
- * Creates a [LinkedHashMap] instance that contains all key-value pairs of
+ * Creates a [LinkedHashMap] instance that contains all key/value pairs of
* [other].
*
* The keys must all be assignable to [K] and the values to [V].
@@ -87,7 +87,7 @@
* `operator==` and `hashCode`, and it allows null as a key.
* It iterates in key insertion order.
*
- * For each element of the [iterable] this constructor computes a key-value
+ * For each element of the [iterable] this constructor computes a key/value
* pair, by applying [key] and [value] respectively.
*
* The example below creates a new Map from a List. The keys of `map` are
@@ -160,6 +160,45 @@
new CastMap<K, V, K2, V2>(source);
/**
+ * Creates a new map and adds all entries.
+ *
+ * Creates a new map like `new Map<K, V>()` and then adds the key
+ * and value of eacy entry in [entries] in iteration order.
+ */
+ factory Map.fromEntries(Iterable<MapEntry<K, V>> entries) =>
+ <K, V>{}..addEntries(entries);
+
+ /**
+ * Provides a view of this map as having [RK] keys and [RV] instances,
+ * if necessary.
+ *
+ * If this set contains only keys of type [RK] and values of type [RV],
+ * all read operations will work correctly.
+ * If any operation exposes a non-[RK] key or non-[RV] value,
+ * the operation will throw instead.
+ *
+ * Entries added to the map must be valid for both a `Map<K, V>` and a
+ * `Map<RK, RV>`.
+ */
+ Map<RK, RV> cast<RK, RV>();
+
+ /**
+ * Provides a view of this map as having [RK] keys and [RV] instances,
+ * if necessary.
+ *
+ * If this map is already a `Map<RK, RV>`, it is returned unchanged.
+ *
+ * If this set contains only keys of type [RK] and values of type [RV],
+ * all read operations will work correctly.
+ * If any operation exposes a non-[RK] key or non-[RV] value,
+ * the operation will throw instead.
+ *
+ * Entries added to the map must be valid for both a `Map<K, V>` and a
+ * `Map<RK, RV>`.
+ */
+ Map<RK, RV> retype<RK, RV>();
+
+ /**
* Returns true if this map contains the given [value].
*
* Returns true if any of the values in the map are equal to `value`
@@ -191,11 +230,61 @@
* Associates the [key] with the given [value].
*
* If the key was already in the map, its associated value is changed.
- * Otherwise the key-value pair is added to the map.
+ * Otherwise the key/value pair is added to the map.
*/
void operator []=(K key, V value);
/**
+ * The map entries of [this].
+ */
+ Iterable<MapEntry<K, V>> get entries;
+
+ /**
+ * Returns a new map where all entries of this map are transformed by
+ * the given [f] function.
+ */
+ Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> f(K key, V value));
+
+ /**
+ * Adds all key/value pairs of [newEntries] to this map.
+ *
+ * If a key of [other] is already in this map,
+ * the corresponding value is overwritten.
+ *
+ * The operation is equivalent to doing `this[entry.key] = entry.value`
+ * for each [MapEntry] of the iterable.
+ */
+ void addEntries(Iterable<MapEntry<K, V>> newEntries);
+
+ /**
+ * Updates the value for the provided [key].
+ *
+ * Returns the new value of the key.
+ *
+ * If the key is present, invokes [update] with the current value and stores
+ * the new value in the map.
+ *
+ * If the key is not present and [ifAbsent] is provided, calls [ifAbsent]
+ * and adds the key with the returned value to the map.
+ *
+ * It's an error if the key is not present and [ifAbsent] is not provided.
+ */
+ V update(K key, V update(V value), {V ifAbsent()});
+
+ /**
+ * Updates all values.
+ *
+ * Iterates over all entries in the map and updates them with the result
+ * of invoking [update].
+ */
+ void updateAll(V update(K key, V value));
+
+ /**
+ * Removes all entries of this map that satisfy the given [predicate].
+ */
+ void removeWhere(bool predicate(K key, V value));
+
+ /**
* Look up the value of [key], or add a new value if it isn't there.
*
* Returns the value associated to [key], if there is one.
@@ -215,7 +304,7 @@
V putIfAbsent(K key, V ifAbsent());
/**
- * Adds all key-value pairs of [other] to this map.
+ * Adds all key/value pairs of [other] to this map.
*
* If a key of [other] is already in this map, its value is overwritten.
*
@@ -244,7 +333,7 @@
void clear();
/**
- * Applies [f] to each key-value pair of the map.
+ * Applies [f] to each key/value pair of the map.
*
* Calling `f` must not add or remove keys from the map.
*/
@@ -281,17 +370,33 @@
Iterable<V> get values;
/**
- * The number of key-value pairs in the map.
+ * The number of key/value pairs in the map.
*/
int get length;
/**
- * Returns true if there is no key-value pair in the map.
+ * Returns true if there is no key/value pair in the map.
*/
bool get isEmpty;
/**
- * Returns true if there is at least one key-value pair in the map.
+ * Returns true if there is at least one key/value pair in the map.
*/
bool get isNotEmpty;
}
+
+/**
+ * A key/value pair representing an entry in a [Map].
+ */
+class MapEntry<K, V> {
+ /** The key of the entry. */
+ final K key;
+
+ /** The value associated to [key] in the map. */
+ final V value;
+
+ /** Creates an entry with [key] and [value]. */
+ const factory MapEntry(K key, V value) = MapEntry<K, V>._;
+
+ const MapEntry._(this.key, this.value);
+}
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index aec8be6..e58ea10 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -102,6 +102,36 @@
new CastSet<S, T>(source, newSet);
/**
+ * Provides a view of this set as a set of [R] instances, if necessary.
+ *
+ * If this set is already a `Set<R>`, it is returned unchanged.
+ *
+ * If this set contains only instances of [R], all read operations
+ * will work correctly. If any operation tries to access an element
+ * that is not an instance of [R], the access will throw instead.
+ *
+ * Elements added to the set (e.g., by using [add] or [addAll])
+ * must be instance of [R] to be valid arguments to the adding function,
+ * and they must be instances of [E] as well to be accepted by
+ * this set as well.
+ */
+ Set<R> cast<R>();
+
+ /**
+ * Provides a view of this set as a set of [R] instances.
+ *
+ * If this set contains only instances of [R], all read operations
+ * will work correctly. If any operation tries to access an element
+ * that is not an instance of [R], the access will throw instead.
+ *
+ * Elements added to the set (e.g., by using [add] or [addAll])
+ * must be instance of [R] to be valid arguments to the adding function,
+ * and they must be instances of [E] as well to be accepted by
+ * this set as well.
+ */
+ Set<R> retype<R>();
+
+ /**
* Provides an iterator that iterates over the elements of this set.
*
* The order of iteration is defined by the individual `Set` implementation,
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 9a4ae55..aa24f6d 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -33081,7 +33081,7 @@
@DomName('Storage')
@Unstable()
@Native("Storage")
-class Storage extends Interceptor implements Map<String, String> {
+class Storage extends Interceptor with MapMixin<String, String> {
void addAll(Map<String, String> other) {
other.forEach((k, v) {
this[k] = v;
@@ -41453,7 +41453,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.
-abstract class _AttributeMap implements Map<String, String> {
+abstract class _AttributeMap extends MapBase<String, String> {
final Element _element;
_AttributeMap(this._element);
@@ -41464,6 +41464,13 @@
});
}
+ Map<K, V> cast<K, V>() {
+ Map<Object, Object> self = this;
+ return self is Map<K, V> ? self : Map.castFrom<String, String, K, V>(this);
+ }
+
+ Map<K, V> retype<K, V>() => Map.castFrom<String, String, K, V>(this);
+
bool containsValue(Object value) {
for (var v in this.values) {
if (value == v) {
@@ -41611,7 +41618,7 @@
* Provides a Map abstraction on top of data-* attributes, similar to the
* dataSet in the old DOM.
*/
-class _DataAttributeMap implements Map<String, String> {
+class _DataAttributeMap extends MapBase<String, String> {
final Map<String, String> _attributes;
_DataAttributeMap(this._attributes);
@@ -41624,6 +41631,13 @@
});
}
+ Map<K, V> cast<K, V>() {
+ Map<Object, Object> self = this;
+ return self is Map<K, V> ? self : Map.castFrom<String, String, K, V>(this);
+ }
+
+ Map<K, V> retype<K, V>() => Map.castFrom<String, String, K, V>(this);
+
// TODO: Use lazy iterator when it is available on Map.
bool containsValue(Object value) => values.any((v) => v == value);
@@ -43640,7 +43654,7 @@
return new FixedSizeListIterator<E>(this);
}
- // From Collection<E>:
+ // From List<E>:
void add(E value) {
throw new UnsupportedError("Cannot add to immutable List.");
}
@@ -43649,7 +43663,6 @@
throw new UnsupportedError("Cannot add to immutable List.");
}
- // From List<E>:
void sort([int compare(E a, E b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
diff --git a/sdk/lib/html/html_common/css_class_set.dart b/sdk/lib/html/html_common/css_class_set.dart
index 11c35cb..2286057 100644
--- a/sdk/lib/html/html_common/css_class_set.dart
+++ b/sdk/lib/html/html_common/css_class_set.dart
@@ -4,7 +4,7 @@
part of html_common;
-abstract class CssClassSetImpl implements CssClassSet {
+abstract class CssClassSetImpl extends SetBase<String> implements CssClassSet {
static final RegExp _validTokenRE = new RegExp(r'^\S+$');
String _validateToken(String value) {
@@ -200,8 +200,8 @@
readClasses().firstWhere(test, orElse: orElse);
String lastWhere(bool test(String value), {String orElse()}) =>
readClasses().lastWhere(test, orElse: orElse);
- String singleWhere(bool test(String value)) =>
- readClasses().singleWhere(test);
+ String singleWhere(bool test(String value), {String orElse()}) =>
+ readClasses().singleWhere(test, orElse: orElse);
String elementAt(int index) => readClasses().elementAt(index);
void clear() {
diff --git a/sdk/lib/internal/cast.dart b/sdk/lib/internal/cast.dart
index 4a39115..d871f40 100644
--- a/sdk/lib/internal/cast.dart
+++ b/sdk/lib/internal/cast.dart
@@ -180,14 +180,20 @@
/// Creates a new empty set of the same *kind* as [_source],
/// but with `<R>` as type argument.
- /// Used by [toSet] (and indirectly by [union]).
+ /// Used by [toSet] and [union].
final Set<R> Function<R>() _emptySet;
CastSet(this._source, this._emptySet);
static Set<R> _defaultEmptySet<R>() => new Set<R>();
- Set<R> cast<R>() => new CastSet<S, R>(_source, _emptySet);
+ Set<R> cast<R>() {
+ Set<Object> self = this;
+ if (self is Set<R>) return self;
+ return this.retype<R>();
+ }
+
+ Set<R> retype<R>() => new CastSet<S, R>(_source, _emptySet);
bool add(T value) => _source.add(value as S);
@@ -288,7 +294,7 @@
}
}
-class CastMap<SK, SV, K, V> implements Map<K, V> {
+class CastMap<SK, SV, K, V> extends MapBase<K, V> {
final Map<SK, SV> _source;
CastMap(this._source);
@@ -333,13 +339,43 @@
bool get isEmpty => _source.isEmpty;
bool get isNotEmpty => _source.isNotEmpty;
+
+ V update(K key, V update(V value), {V ifAbsent()}) {
+ return _source.update(key as SK, (SV value) => update(value as V) as SV,
+ ifAbsent: (ifAbsent == null) ? null : () => ifAbsent() as SV) as V;
+ }
+
+ void updateAll(V update(K key, V value)) {
+ _source.updateAll((SK key, SV value) => update(key as K, value as V) as SV);
+ }
+
+ Iterable<MapEntry<K, V>> get entries {
+ return _source.entries.map<MapEntry<K, V>>(
+ (MapEntry<SK, SV> e) => new MapEntry<K, V>(e.key as K, e.value as V));
+ }
+
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
+ for (var entry in entries) {
+ _source[entry.key as SK] = entry.value as SV;
+ }
+ }
+
+ void removeWhere(bool test(K key, V value)) {
+ _source.removeWhere((SK key, SV value) => test(key as K, value as V));
+ }
}
class CastQueue<S, T> extends _CastIterableBase<S, T>
with _CastQueueMixin<S, T> {
final Queue<S> _source;
CastQueue(this._source);
- Queue<R> cast<R>() => new CastQueue<S, R>(_source);
+ Queue<R> cast<R>() {
+ Queue<Object> self = this;
+ if (self is Queue<R>) return self;
+ return retype<R>();
+ }
+
+ Queue<R> retype<R>() => new CastQueue<S, R>(_source);
}
// TODO(lrn): Use when ListQueue implements List.
diff --git a/sdk/lib/internal/iterable.dart b/sdk/lib/internal/iterable.dart
index 7123c47..d8941c9 100644
--- a/sdk/lib/internal/iterable.dart
+++ b/sdk/lib/internal/iterable.dart
@@ -120,7 +120,7 @@
throw IterableElementError.noElement();
}
- E singleWhere(bool test(E element)) {
+ E singleWhere(bool test(E element), {E orElse()}) {
int length = this.length;
E match = null;
bool matchFound = false;
@@ -138,6 +138,7 @@
}
}
if (matchFound) return match;
+ if (orElse != null) return orElse();
throw IterableElementError.noElement();
}
@@ -210,7 +211,7 @@
List<E> toList({bool growable: true}) {
List<E> result;
if (growable) {
- result = new List<E>()..length = length;
+ result = <E>[]..length = length;
} else {
result = new List<E>(length);
}
diff --git a/sdk/lib/internal/list.dart b/sdk/lib/internal/list.dart
index 2903c96..e0ddd70 100644
--- a/sdk/lib/internal/list.dart
+++ b/sdk/lib/internal/list.dart
@@ -96,6 +96,14 @@
"Cannot change the length of an unmodifiable list");
}
+ set first(E element) {
+ throw new UnsupportedError("Cannot modify an unmodifiable list");
+ }
+
+ set last(E element) {
+ throw new UnsupportedError("Cannot modify an unmodifiable list");
+ }
+
/** This operation is not supported by an unmodifiable list. */
void setAll(int at, Iterable<E> iterable) {
throw new UnsupportedError("Cannot modify an unmodifiable list");
@@ -212,7 +220,7 @@
}
}
-class ListMapView<E> implements Map<int, E> {
+class ListMapView<E> extends UnmodifiableMapBase<int, E> {
List<E> _values;
ListMapView(this._values);
@@ -237,33 +245,6 @@
}
}
}
-
- /** This operation is not supported by an unmodifiable map. */
- void operator []=(int key, E value) {
- throw new UnsupportedError("Cannot modify an unmodifiable map");
- }
-
- /** This operation is not supported by an unmodifiable map. */
- E putIfAbsent(int key, E ifAbsent()) {
- throw new UnsupportedError("Cannot modify an unmodifiable map");
- }
-
- /** This operation is not supported by an unmodifiable map. */
- E remove(Object key) {
- throw new UnsupportedError("Cannot modify an unmodifiable map");
- }
-
- /** This operation is not supported by an unmodifiable map. */
- void clear() {
- throw new UnsupportedError("Cannot modify an unmodifiable map");
- }
-
- /** This operation is not supported by an unmodifiable map. */
- void addAll(Map<int, E> other) {
- throw new UnsupportedError("Cannot modify an unmodifiable map");
- }
-
- String toString() => Maps.mapToString(this);
}
class ReversedListIterable<E> extends ListIterable<E> {
diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart
index ce9dbd0..ad7e28d 100644
--- a/sdk/lib/io/io.dart
+++ b/sdk/lib/io/io.dart
@@ -196,7 +196,7 @@
import 'dart:async';
import 'dart:_internal' hide Symbol;
import 'dart:collection'
- show HashMap, HashSet, Queue, ListQueue, UnmodifiableMapView;
+ show HashMap, HashSet, Queue, ListQueue, MapBase, UnmodifiableMapView;
import 'dart:convert';
import 'dart:developer' hide log;
import 'dart:isolate';
diff --git a/sdk/lib/io/platform_impl.dart b/sdk/lib/io/platform_impl.dart
index 3ee7757..4dd898d 100644
--- a/sdk/lib/io/platform_impl.dart
+++ b/sdk/lib/io/platform_impl.dart
@@ -122,7 +122,7 @@
// Environment variables are case-insensitive on Windows. In order
// to reflect that we use a case-insensitive string map on Windows.
-class _CaseInsensitiveStringMap<V> implements Map<String, V> {
+class _CaseInsensitiveStringMap<V> extends MapBase<String, V> {
final Map<String, V> _map = new Map<String, V>();
bool containsKey(Object key) =>
@@ -142,6 +142,7 @@
}
V remove(Object key) => key is String ? _map.remove(key.toUpperCase()) : null;
+
void clear() {
_map.clear();
}
@@ -155,5 +156,22 @@
int get length => _map.length;
bool get isEmpty => _map.isEmpty;
bool get isNotEmpty => _map.isNotEmpty;
+
+ Iterable<MapEntry<String, V>> get entries => _map.entries;
+
+ Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> transform(String key, V value)) =>
+ _map.map(transform);
+
+ V update(String key, V update(V value), {V ifAbsent()}) =>
+ _map.update(key.toUpperCase(), update, ifAbsent: ifAbsent);
+
+ void updateAll(V update(String key, V value)) {
+ _map.updateAll(update);
+ }
+
+ void removeWhere(bool test(String key, V value)) {
+ _map.removeWhere(test);
+ }
+
String toString() => _map.toString();
}
diff --git a/sdk/lib/typed_data/typed_data.dart b/sdk/lib/typed_data/typed_data.dart
index f44f9cf..c15a3f0 100644
--- a/sdk/lib/typed_data/typed_data.dart
+++ b/sdk/lib/typed_data/typed_data.dart
@@ -383,6 +383,30 @@
ByteBuffer get buffer;
}
+abstract class _TypedIntList extends TypedData {
+ /**
+ * Returns the concatenation of this list and [other].
+ *
+ * If other is also a typed-data integer list, the returned list will
+ * be a type-data integer list capable of containing all the elements of
+ * this list and of [other].
+ * Otherwise the returned list will be a normal growable `List<int>`.
+ */
+ List<int> operator +(List<int> other);
+}
+
+abstract class _TypedFloatList extends TypedData {
+ /**
+ * Returns the concatenation of this list and [other].
+ *
+ * If other is also a typed-data floating point number list,
+ * the returned list will be a type-data float list capable of containing
+ * all the elements of this list and of [other].
+ * Otherwise the returned list will be a normal growable `List<double>`.
+ */
+ List<double> operator +(List<double> other);
+}
+
// TODO(lrn): Remove class for Dart 2.0.
/** Deprecated, use [Endian] instead. */
abstract class Endianness {
@@ -718,7 +742,7 @@
* interpreted as a signed 8-bit two's complement integer with values in the
* range -128 to +127.
*/
-abstract class Int8List implements List<int>, TypedData {
+abstract class Int8List implements List<int>, _TypedIntList {
/**
* Creates an [Int8List] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -768,7 +792,7 @@
* interpreted as an unsigned 8-bit integer with values in the
* range 0 to 255.
*/
-abstract class Uint8List implements List<int>, TypedData {
+abstract class Uint8List implements List<int>, _TypedIntList {
/**
* Creates a [Uint8List] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -803,6 +827,15 @@
return buffer.asUint8List(offsetInBytes, length);
}
+ /**
+ * Returns a concatenation of this list and [other].
+ *
+ * If [other] is also a typed-data list, then the return list will be a
+ * typed data list capable of holding both unsigned 8-bit integers and
+ * the elements of [other], otherwise it'll be a normal list of integers.
+ */
+ List<int> operator +(List<int> other);
+
/** Deprecated, use [bytesPerElement] instead. */
static const int BYTES_PER_ELEMENT = bytesPerElement;
static const int bytesPerElement = 1;
@@ -818,7 +851,7 @@
* That is, all values below zero are stored as zero
* and all values above 255 are stored as 255.
*/
-abstract class Uint8ClampedList implements List<int>, TypedData {
+abstract class Uint8ClampedList implements List<int>, _TypedIntList {
/**
* Creates a [Uint8ClampedList] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -870,7 +903,7 @@
* interpreted as a signed 16-bit two's complement integer with values in the
* range -32768 to +32767.
*/
-abstract class Int16List implements List<int>, TypedData {
+abstract class Int16List implements List<int>, _TypedIntList {
/**
* Creates an [Int16List] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -924,7 +957,7 @@
* interpreted as an unsigned 16-bit integer with values in the
* range 0 to 65535.
*/
-abstract class Uint16List implements List<int>, TypedData {
+abstract class Uint16List implements List<int>, _TypedIntList {
/**
* Creates a [Uint16List] of the specified length (in elements), all
* of whose elements are initially zero.
@@ -979,7 +1012,7 @@
* interpreted as a signed 32-bit two's complement integer with values in the
* range -2147483648 to 2147483647.
*/
-abstract class Int32List implements List<int>, TypedData {
+abstract class Int32List implements List<int>, _TypedIntList {
/**
* Creates an [Int32List] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -1033,7 +1066,7 @@
* interpreted as an unsigned 32-bit integer with values in the
* range 0 to 4294967295.
*/
-abstract class Uint32List implements List<int>, TypedData {
+abstract class Uint32List implements List<int>, _TypedIntList {
/**
* Creates a [Uint32List] of the specified length (in elements), all
* of whose elements are initially zero.
@@ -1088,7 +1121,7 @@
* interpreted as a signed 64-bit two's complement integer with values in the
* range -9223372036854775808 to +9223372036854775807.
*/
-abstract class Int64List implements List<int>, TypedData {
+abstract class Int64List implements List<int>, _TypedIntList {
/**
* Creates an [Int64List] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -1142,7 +1175,7 @@
* interpreted as an unsigned 64-bit integer with values in the
* range 0 to 18446744073709551615.
*/
-abstract class Uint64List implements List<int>, TypedData {
+abstract class Uint64List implements List<int>, _TypedIntList {
/**
* Creates a [Uint64List] of the specified length (in elements), all
* of whose elements are initially zero.
@@ -1198,7 +1231,7 @@
* single-precision value. Values read are converted to a double
* value with the same value.
*/
-abstract class Float32List implements List<double>, TypedData {
+abstract class Float32List implements List<double>, _TypedFloatList {
/**
* Creates a [Float32List] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -1249,7 +1282,7 @@
* implementation can be considerably more space- and time-efficient than
* the default [List] implementation.
*/
-abstract class Float64List implements List<double>, TypedData {
+abstract class Float64List implements List<double>, _TypedFloatList {
/**
* Creates a [Float64List] of the specified length (in elements), all of
* whose elements are initially zero.
@@ -1331,6 +1364,14 @@
return buffer.asFloat32x4List(offsetInBytes, length);
}
+ /**
+ * Returns the concatenation of this list and [other].
+ *
+ * If [other] is also a [Float32x4List], the result is a new [Float32x4List],
+ * otherwise the result is a normal growable `List<Float32x4>`.
+ */
+ List<Float32x4> operator +(List<Float32x4> other);
+
/** Deprecated, use [bytesPerElement] instead. */
static const int BYTES_PER_ELEMENT = bytesPerElement;
static const int bytesPerElement = 16;
@@ -1378,6 +1419,14 @@
return buffer.asInt32x4List(offsetInBytes, length);
}
+ /**
+ * Returns the concatenation of this list and [other].
+ *
+ * If [other] is also a [Int32x4List], the result is a new [Int32x4List],
+ * otherwise the result is a normal growable `List<Int32x4>`.
+ */
+ List<Int32x4> operator +(List<Int32x4> other);
+
/** Deprecated, use [bytesPerElement] instead. */
static const int BYTES_PER_ELEMENT = bytesPerElement;
static const int bytesPerElement = 16;
@@ -1404,6 +1453,14 @@
external factory Float64x2List.fromList(List<Float64x2> elements);
/**
+ * Returns the concatenation of this list and [other].
+ *
+ * If [other] is also a [Float64x2List], the result is a new [Float64x2List],
+ * otherwise the result is a normal growable `List<Float64x2>`.
+ */
+ List<Float64x2> operator +(List<Float64x2> other);
+
+ /**
* Creates a [Float64x2List] _view_ of the specified region in [buffer].
*
* Changes in the [Float64x2List] will be visible in the byte
diff --git a/sdk/lib/vmservice/asset.dart b/sdk/lib/vmservice/asset.dart
index c0c31fc..d5772e2 100644
--- a/sdk/lib/vmservice/asset.dart
+++ b/sdk/lib/vmservice/asset.dart
@@ -37,13 +37,13 @@
}
}
- static HashMap<String, Asset> request() {
+ static Map<String, Asset> request() {
Uint8List tarBytes = _requestAssets();
if (tarBytes == null) {
return null;
}
List assetList = _decodeAssets(tarBytes);
- HashMap<String, Asset> assets = new HashMap<String, Asset>();
+ Map<String, Asset> assets = new HashMap<String, Asset>();
for (int i = 0; i < assetList.length; i += 2) {
var a = new Asset(assetList[i], assetList[i + 1]);
assets[a.name] = a;
@@ -56,8 +56,8 @@
List _decodeAssets(Uint8List data) native "VMService_DecodeAssets";
-HashMap<String, Asset> _assets;
-HashMap<String, Asset> get assets {
+Map<String, Asset> _assets;
+Map<String, Asset> get assets {
if (_assets == null) {
try {
_assets = Asset.request();
diff --git a/tests/co19/co19-analyzer.status b/tests/co19/co19-analyzer.status
index a4810dd..352cb5c 100644
--- a/tests/co19/co19-analyzer.status
+++ b/tests/co19/co19-analyzer.status
@@ -55,8 +55,10 @@
Language/Expressions/Identifier_Reference/evaluation_type_parameter_t02: MissingCompileTimeError # Please triage this failure.
Language/Expressions/Instance_Creation/Const/abstract_class_t01/01: MissingCompileTimeError # Please triage this failure.
Language/Expressions/Instance_Creation/Const/abstract_class_t03/01: MissingCompileTimeError # Please triage this failure.
+Language/Expressions/Instance_Creation/Const/arguments_t03: MissingCompileTimeError # Please triage this failure.
Language/Expressions/Lookup/Method_Lookup/superclass_t07: StaticWarning # Please triage this failure.
Language/Expressions/Lookup/Method_Lookup/superclass_t08: StaticWarning # Please triage this failure.
+Language/Expressions/Maps/constant_map_t02: MissingCompileTimeError # Please triage this failure.
Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t01: MissingCompileTimeError # Issue 25496
Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t02: MissingCompileTimeError # Issue 25496
Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t03: StaticWarning # Please triage this failure.
@@ -501,5 +503,6 @@
WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-009_t01: StaticWarning # Please triage this failure.
WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: StaticWarning # Please triage this failure.
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
+
diff --git a/tests/co19/co19-co19.status b/tests/co19/co19-co19.status
index 2f30364..d6bebfe 100644
--- a/tests/co19/co19-co19.status
+++ b/tests/co19/co19-co19.status
@@ -8,9 +8,55 @@
#
# In order to qualify here these tests need to fail both on the VM and dart2js.
### GENERAL FAILURES ###
+LibTest/typed_data/Float32List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Float32List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Float64List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Float64List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int16List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int16List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int32List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int32List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int64List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int64List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int8List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Int8List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint16List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint16List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint32List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint32List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint64List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint64List/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint8ClampedList/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint8ClampedList/last_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint8List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Uint8List/last_A01_t02: RuntimeError # co19 issue 130
+
+# Tests that fail everywhere, including the analyzer.
+[ $compiler != fasta ]
+Language/Classes/Getters/type_object_t01: Fail # co19 issue 115
+Language/Classes/Getters/type_object_t02: Fail # co19 issue 115
+Language/Classes/Setters/type_object_t01: Fail # co19 issue 115
+Language/Classes/Setters/type_object_t02: Fail # co19 issue 115
+Language/Classes/Static_Methods/type_object_t01: Fail # co19 issue 115
+Language/Classes/Static_Methods/type_object_t02: Fail # co19 issue 115
+Language/Statements/Assert/syntax_t04: Pass, Fail # assert now has an optional second parameter.
+LibTest/async/Zone/bindBinaryCallback_A01_t02: Fail # co19 issue 126
+LibTest/async/Zone/bindCallback_A01_t02: Fail # co19 issue 126
+LibTest/async/Zone/bindUnaryCallback_A01_t02: Fail # co19 issue 126
+LibTest/core/RegExp/firstMatch_A01_t01: Fail # co19 issue 742
+LibTest/typed_data/ByteData/buffer_A01_t01: Fail # co19 r736 bug - sent comment.
+
+[ $strong ]
+Language/Expressions/Additive_Expressions/syntax_t01/07: CompileTimeError
+LibTest/typed_data/Float32x4List/first_A01_t02: CompileTimeError # co19 issue 130 + type error
+LibTest/typed_data/Float32x4List/last_A01_t02: CompileTimeError # co19 issue 130 + type error
+
+[ !$strong ]
+LibTest/typed_data/Float32x4List/first_A01_t02: RuntimeError # co19 issue 130
+LibTest/typed_data/Float32x4List/last_A01_t02: RuntimeError # co19 issue 130
# Tests that fail on every runtime, but not on the analyzer.
-[ $compiler != dart2analyzer ]
+[ $compiler != dart2analyzer && $compiler != fasta ]
Language/Classes/same_name_type_variable_t04: Pass, MissingCompileTimeError, Fail # Issue 14513,25525
Language/Classes/same_name_type_variable_t07: Pass, MissingCompileTimeError, Fail # Issue 14513,25525
Language/Expressions/Instance_Creation/Const/abstract_class_t01: Pass, Fail # co19 issue 66
@@ -59,18 +105,6 @@
LibTest/math/log_A01_t01: Pass, Fail, OK # Issue 26261
LibTest/math/tan_A01_t01: Pass, Fail, OK # Issue 26261
-# Tests that fail everywhere, including the analyzer.
-[ $runtime == vm || $runtime != vm ]
-Language/Classes/Getters/type_object_t01: Fail # co19 issue 115
-Language/Classes/Getters/type_object_t02: Fail # co19 issue 115
-Language/Classes/Setters/type_object_t01: Fail # co19 issue 115
-Language/Classes/Setters/type_object_t02: Fail # co19 issue 115
-Language/Classes/Static_Methods/type_object_t01: Fail # co19 issue 115
-Language/Classes/Static_Methods/type_object_t02: Fail # co19 issue 115
-Language/Statements/Assert/syntax_t04: Pass, Fail # assert now has an optional second parameter.
-LibTest/async/Zone/bindBinaryCallback_A01_t02: Fail # co19 issue 126
-LibTest/async/Zone/bindCallback_A01_t02: Fail # co19 issue 126
-LibTest/async/Zone/bindUnaryCallback_A01_t02: Fail # co19 issue 126
-LibTest/core/RegExp/firstMatch_A01_t01: Fail # co19 issue 742
-LibTest/typed_data/ByteData/buffer_A01_t01: Fail # co19 r736 bug - sent comment.
+[ !$checked && !$strong ]
+Language/Expressions/Additive_Expressions/syntax_t01/07: MissingRuntimeError # Unchecked mode allows List + anything-with-a-zero-length
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index ce7e564..873634c 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -1537,8 +1537,8 @@
LayoutTests/fast/canvas/webgl/attrib-location-length-limits_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/attrib-location-length-limits_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/canvas/webgl/bad-arguments-test_t01: Pass, RuntimeError # Issue 29634
-LayoutTests/fast/canvas/webgl/buffer-bind-test_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/canvas/webgl/buffer-bind-test_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/buffer-bind-test_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture_t01: Pass, RuntimeError # Issue 29634
@@ -1584,7 +1584,6 @@
LayoutTests/fast/canvas/webgl/gl-teximage_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: Pass, RuntimeError # Issue 29634
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib-zero-issues_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/gl-vertex-attrib-zero-issues_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: Pass, RuntimeError # Issue 29634
@@ -1615,7 +1614,6 @@
LayoutTests/fast/canvas/webgl/null-uniform-location_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/canvas/webgl/null-uniform-location_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/object-deletion-behaviour_t01: Pass, RuntimeError # Issue 29634
-LayoutTests/fast/canvas/webgl/object-deletion-behaviour_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError # Please triage this failure
@@ -1722,7 +1720,6 @@
LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-css-nonascii_t01: Pass, RuntimeError # Issue 29634
LayoutTests/fast/css/parsing-object-position_t01: Pass, RuntimeError # Issue 29634
-LayoutTests/fast/css/parsing-object-position_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Skip # Times out.
LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Skip # Times out.
LayoutTests/fast/css/selector-text-escape_t01: Pass, RuntimeError # Issue 29634
@@ -7066,3 +7063,7 @@
LibTest/typed_data/Uint8ClampedList/runtimeType_A01_t01: Fail # co19-roll r559: Please triage this failure
LibTest/typed_data/Uint8List/runtimeType_A01_t01: Fail # co19-roll r559: Please triage this failure
+[ $compiler == dart2js && !$strong ]
+LibTest/typed_data/Float32x4List/first_A01_t02: Pass # co19 issue 130 + type error
+LibTest/typed_data/Float32x4List/last_A01_t02: Pass # co19 issue 130 + type error
+
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status
index 2946921..93bda7c 100644
--- a/tests/co19/co19-kernel.status
+++ b/tests/co19/co19-kernel.status
@@ -3,44 +3,213 @@
# BSD-style license that can be found in the LICENSE file.
[ $compiler == dartk ]
-Language/Expressions/Constants/depending_on_itself_t03: Crash
Language/Expressions/Instance_Creation/Const/canonicalized_t05: RuntimeError
Language/Expressions/Object_Identity/string_t01: RuntimeError
Language/Expressions/Strings/adjacent_strings_t02: RuntimeError
-Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t03: CompileTimeError
Language/Metadata/before_type_param_t01: RuntimeError
-Language/Types/Type_Void/syntax_t02: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t04: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t05: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t08: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t09: MissingCompileTimeError # tests need fixing
LibTest/isolate/Isolate/spawnUri_A01_t03: Pass, Timeout
[ $compiler == dartkp ]
-Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: Pass
-Language/Classes/Superinterfaces/more_than_once_t01: MissingCompileTimeError # New entries after going from kernel-service to batch-mode compilation. Please investigate.
-Language/Classes/Superinterfaces/superclass_as_superinterface_t01: MissingCompileTimeError # New entries after going from kernel-service to batch-mode compilation. Please investigate.
Language/Classes/definition_t23: RuntimeError # New entries after going from kernel-service to batch-mode compilation. Please investigate.
-Language/Expressions/Constants/depending_on_itself_t01: MissingCompileTimeError
-Language/Expressions/Constants/depending_on_itself_t01: Crash # New entries after going from kernel-service to batch-mode compilation. Please investigate.
-Language/Expressions/Constants/depending_on_itself_t02: MissingCompileTimeError
-Language/Expressions/Constants/depending_on_itself_t02: Crash # New entries after going from kernel-service to batch-mode compilation. Please investigate.
-Language/Expressions/Constants/depending_on_itself_t03: Crash
-Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t03: CompileTimeError
Language/Mixins/Mixin_Application/syntax_t16: RuntimeError # New entries after going from kernel-service to batch-mode compilation. Please investigate.
-Language/Overview/Scoping/hiding_declaration_t11: Crash
-Language/Overview/Scoping/hiding_declaration_t11: Pass
-Language/Overview/Scoping/hiding_declaration_t12: Crash
-Language/Overview/Scoping/hiding_declaration_t12: Pass
-Language/Types/Type_Void/syntax_t02: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t04: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t05: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t08: MissingCompileTimeError # tests need fixing
-Language/Types/Type_Void/syntax_t09: MissingCompileTimeError # tests need fixing
+Language/Overview/Scoping/hiding_declaration_t11: Crash, Pass
+Language/Overview/Scoping/hiding_declaration_t12: Crash, Pass
+
+[ $compiler == fasta ]
+Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t01: MissingCompileTimeError
+Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t02: MissingCompileTimeError
+Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02: MissingCompileTimeError
+Language/Classes/Getters/same_name_method_t03: MissingCompileTimeError
+Language/Classes/Getters/same_name_method_t04: MissingCompileTimeError
+Language/Classes/Getters/same_name_method_t05: MissingCompileTimeError
+Language/Classes/Getters/same_name_method_t07: MissingCompileTimeError
+Language/Classes/Superinterfaces/more_than_once_t01: MissingCompileTimeError
+Language/Classes/Superinterfaces/superclass_as_superinterface_t01: MissingCompileTimeError
+Language/Classes/same_name_instance_and_static_members_t01: MissingCompileTimeError
+Language/Classes/same_name_instance_and_static_members_t02: MissingCompileTimeError
+Language/Classes/same_name_instance_and_static_members_t03: MissingCompileTimeError
+Language/Classes/same_name_instance_and_static_members_t04: MissingCompileTimeError
+Language/Expressions/Constants/bitwise_operators_t05: MissingCompileTimeError
+Language/Expressions/Constants/depending_on_itself_t01: MissingCompileTimeError
+Language/Expressions/Constants/depending_on_itself_t02: MissingCompileTimeError
+Language/Expressions/Constants/exception_t01: MissingCompileTimeError
+Language/Expressions/Constants/exception_t03: MissingCompileTimeError
+Language/Expressions/Constants/exception_t05: MissingCompileTimeError
+Language/Expressions/Constants/logical_expression_t02: MissingCompileTimeError
+Language/Expressions/Constants/logical_expression_t04: MissingCompileTimeError
+Language/Expressions/Constants/math_operators_t02: MissingCompileTimeError
+Language/Expressions/Constants/math_operators_t03: MissingCompileTimeError
+Language/Expressions/Constants/no_other_constant_expressions_t11: MissingCompileTimeError
+Language/Expressions/Constants/ternary_operator_t02: MissingCompileTimeError
+Language/Expressions/Instance_Creation/Const/exception_t01: MissingCompileTimeError
+Language/Metadata/compilation_t03: MissingCompileTimeError
+Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError
+Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError
+LayoutTests/*: CompileTimeError # TODO(ahe): Make dart:html available.
+LibTest/html/*: CompileTimeError # TODO(ahe): Make dart:html available.
+WebPlatformTest/*: CompileTimeError # TODO(ahe): Make dart:html available.
+WebPlatformTest/Utils/test/testFail_t01: Pass # TODO(ahe): Make dart:html available.
[ $fasta ]
+Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t03: MissingCompileTimeError
+Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01: MissingCompileTimeError
+Language/Classes/Constructors/Factories/const_modifier_t01: MissingCompileTimeError
+Language/Classes/Constructors/Factories/const_modifier_t02: MissingCompileTimeError
+Language/Classes/Constructors/Factories/default_value_t01: MissingCompileTimeError
+Language/Classes/Constructors/Factories/default_value_t02: MissingCompileTimeError
+Language/Classes/Constructors/Factories/name_t01: MissingCompileTimeError
+Language/Classes/Constructors/Factories/name_t03: MissingCompileTimeError
+Language/Classes/Constructors/Factories/name_t04: MissingCompileTimeError
+Language/Classes/Constructors/Factories/name_t05: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/execution_t04: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/execution_t05: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/execution_t06: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/execution_t07: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/execution_t12: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/redirection_t02: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/redirection_t03: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/redirection_t07: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/redirection_t08: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t02: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t03: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t05: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t06: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/syntax_t04: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/syntax_t05: MissingCompileTimeError
+Language/Classes/Instance_Variables/constant_t01: MissingCompileTimeError
+Language/Classes/Static_Methods/declaration_t01: MissingCompileTimeError
+Language/Classes/Superclasses/wrong_superclass_t08: MissingCompileTimeError
+Language/Classes/Superinterfaces/wrong_type_t05: MissingCompileTimeError
+Language/Classes/declarations_t06: MissingCompileTimeError
+Language/Classes/declarations_t08: MissingCompileTimeError
+Language/Classes/declarations_t33: MissingCompileTimeError
+Language/Classes/same_name_type_variable_t04: MissingCompileTimeError
+Language/Classes/same_name_type_variable_t07: MissingCompileTimeError
+Language/Expressions/Constants/bitwise_operators_t02: MissingCompileTimeError
+Language/Expressions/Constants/bitwise_operators_t03: MissingCompileTimeError
+Language/Expressions/Constants/bitwise_operators_t04: MissingCompileTimeError
+Language/Expressions/Constants/bitwise_operators_t06: MissingCompileTimeError
+Language/Expressions/Constants/constant_list_t02: MissingCompileTimeError
+Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError
+Language/Expressions/Constants/depending_on_itself_t03: MissingCompileTimeError
+Language/Expressions/Constants/equals_expression_t03: MissingCompileTimeError
+Language/Expressions/Constants/exception_t04: MissingCompileTimeError
+Language/Expressions/Constants/literal_number_t01: CompileTimeError
+Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError
+Language/Expressions/Constants/logical_expression_t03: MissingCompileTimeError
+Language/Expressions/Constants/math_operators_t01: CompileTimeError
+Language/Expressions/Constants/math_operators_t04: MissingCompileTimeError
+Language/Expressions/Constants/math_operators_t05: MissingCompileTimeError
+Language/Expressions/Constants/math_operators_t06: CompileTimeError
+Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t03: MissingCompileTimeError
+Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: MissingCompileTimeError
+Language/Expressions/Instance_Creation/Const/arguments_t03: MissingCompileTimeError
+Language/Expressions/Maps/constant_map_t02: MissingCompileTimeError
+Language/Expressions/Maps/key_value_equals_operator_t01: MissingCompileTimeError
+Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t01: MissingCompileTimeError
+Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t02: MissingCompileTimeError
+Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: MissingCompileTimeError
+Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03: MissingCompileTimeError
+Language/Expressions/Numbers/static_type_of_int_t01: CompileTimeError
+Language/Expressions/Numbers/syntax_t06: CompileTimeError
+Language/Expressions/Numbers/syntax_t09: CompileTimeError
+Language/Expressions/Numbers/syntax_t10: CompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t04: MissingCompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t05: MissingCompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError
+Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError
+Language/Expressions/This/placement_t04: MissingCompileTimeError
+Language/Expressions/Throw/syntax_t02: MissingCompileTimeError
+Language/Functions/Formal_Parameters/Optional_Formals/default_value_t01: MissingCompileTimeError
+Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: MissingCompileTimeError
+Language/Libraries_and_Scripts/Exports/reexport_t01: MissingCompileTimeError
+Language/Libraries_and_Scripts/Exports/reexport_t02: MissingCompileTimeError
+Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError
+Language/Libraries_and_Scripts/Imports/invalid_uri_t01: MissingCompileTimeError
+Language/Mixins/Mixin_Application/deferred_t01: MissingCompileTimeError
Language/Mixins/Mixin_Application/syntax_t20: CompileTimeError
+Language/Mixins/declaring_constructor_t05: MissingCompileTimeError
+Language/Mixins/declaring_constructor_t06: MissingCompileTimeError
+Language/Statements/Continue/label_t07: MissingCompileTimeError
+Language/Statements/For/syntax_t12: MissingCompileTimeError
+Language/Statements/For/syntax_t13: MissingCompileTimeError
+Language/Statements/For/syntax_t13: Crash
+Language/Statements/For/syntax_t19: MissingCompileTimeError
+Language/Statements/For/syntax_t20: Crash
+Language/Statements/For/syntax_t20: MissingCompileTimeError
+Language/Statements/Labels/scope_t05: MissingCompileTimeError
+Language/Statements/Switch/equal_operator_t01: MissingCompileTimeError
+Language/Statements/Switch/equal_operator_t02: MissingCompileTimeError
+Language/Statements/Switch/expressions_t01: MissingCompileTimeError
+Language/Statements/Switch/expressions_t02: MissingCompileTimeError
+Language/Statements/Switch/expressions_t03: MissingCompileTimeError
+Language/Statements/Switch/expressions_t04: MissingCompileTimeError
+Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t01: MissingCompileTimeError
+Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t03: MissingCompileTimeError
+Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t05: MissingCompileTimeError
Language/Types/Interface_Types/subtype_t30: CompileTimeError
+Language/Types/Type_Void/syntax_t01: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t02: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t04: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t05: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t08: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t09: MissingCompileTimeError
+Language/Variables/final_or_static_initialization_t02: MissingCompileTimeError
+Language/Variables/final_or_static_initialization_t03: MissingCompileTimeError
+LibTest/core/double/isInfinite_A01_t03: CompileTimeError
+LibTest/core/int/abs_A01_t01: CompileTimeError
+LibTest/core/int/ceilToDouble_A01_t01: CompileTimeError
+LibTest/core/int/ceil_A01_t01: CompileTimeError
+LibTest/core/int/compareTo_A01_t01: CompileTimeError
+LibTest/core/int/floorToDouble_A01_t01: CompileTimeError
+LibTest/core/int/floor_A01_t01: CompileTimeError
+LibTest/core/int/isEven_A01_t01: CompileTimeError
+LibTest/core/int/isInfinite_A01_t01: CompileTimeError
+LibTest/core/int/isNaN_A01_t01: CompileTimeError
+LibTest/core/int/isNegative_A01_t01: CompileTimeError
+LibTest/core/int/isOdd_A01_t01: CompileTimeError
+LibTest/core/int/operator_AND_A01_t01: CompileTimeError
+LibTest/core/int/operator_GE_A01_t01: CompileTimeError
+LibTest/core/int/operator_GT_A01_t01: CompileTimeError
+LibTest/core/int/operator_LE_A01_t01: CompileTimeError
+LibTest/core/int/operator_LT_A01_t01: CompileTimeError
+LibTest/core/int/operator_NOT_A01_t01: CompileTimeError
+LibTest/core/int/operator_OR_A01_t01: CompileTimeError
+LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
+LibTest/core/int/operator_addition_A01_t01: CompileTimeError
+LibTest/core/int/operator_division_A01_t01: CompileTimeError
+LibTest/core/int/operator_left_shift_A01_t01: CompileTimeError
+LibTest/core/int/operator_multiplication_A01_t01: CompileTimeError
+LibTest/core/int/operator_remainder_A01_t01: CompileTimeError
+LibTest/core/int/operator_remainder_A01_t02: CompileTimeError
+LibTest/core/int/operator_right_shift_A01_t01: CompileTimeError
+LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError
+LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError
+LibTest/core/int/operator_truncating_division_A01_t02: CompileTimeError
+LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
+LibTest/core/int/parse_A01_t01: CompileTimeError
+LibTest/core/int/remainder_A01_t01: CompileTimeError
+LibTest/core/int/remainder_A01_t02: CompileTimeError
+LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
+LibTest/core/int/round_A01_t01: CompileTimeError
+LibTest/core/int/toDouble_A01_t01: CompileTimeError
+LibTest/core/int/toInt_A01_t01: CompileTimeError
+LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
+LibTest/core/int/truncate_A01_t01: CompileTimeError
+LibTest/math/pow_A10_t01: CompileTimeError
+LibTest/typed_data/ByteData/getUint64_A01_t01: CompileTimeError
+LibTest/typed_data/ByteData/setUint64_A01_t01: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t01: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t02: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A01_t01: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A01_t02: CompileTimeError
+
+[ $arch == simarm && $compiler == dartkp ]
+LibTest/typed_data/Float32x4/operator_division_A01_t02: RuntimeError
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
@@ -94,75 +263,20 @@
Language/Types/Static_Types/malformed_type_t04: RuntimeError
[ $compiler == dartk || $compiler == dartkp ]
-Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t03: MissingCompileTimeError
-Language/Classes/Constructors/Factories/const_modifier_t01: MissingCompileTimeError
-Language/Classes/Constructors/Factories/const_modifier_t02: MissingCompileTimeError
-Language/Classes/Constructors/Factories/default_value_t01: MissingCompileTimeError
-Language/Classes/Constructors/Factories/default_value_t02: MissingCompileTimeError
-Language/Classes/Constructors/Factories/name_t01: MissingCompileTimeError
-Language/Classes/Constructors/Factories/name_t03: MissingCompileTimeError
-Language/Classes/Constructors/Factories/name_t04: MissingCompileTimeError
-Language/Classes/Constructors/Factories/name_t05: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/execution_t04: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/execution_t05: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/execution_t06: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/execution_t07: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/execution_t12: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/redirection_t02: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/redirection_t03: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/redirection_t07: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/redirection_t08: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t02: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t03: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t05: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t06: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/syntax_t04: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/syntax_t05: MissingCompileTimeError
-Language/Classes/Instance_Variables/constant_t01: MissingCompileTimeError
-Language/Classes/Static_Methods/declaration_t01: MissingCompileTimeError
-Language/Classes/Superclasses/wrong_superclass_t08: MissingCompileTimeError
-Language/Classes/Superinterfaces/wrong_type_t05: MissingCompileTimeError
-Language/Classes/declarations_t06: MissingCompileTimeError
-Language/Classes/declarations_t08: MissingCompileTimeError
-Language/Classes/declarations_t33: MissingCompileTimeError
Language/Classes/definition_t23: CompileTimeError
Language/Expressions/Constants/bitwise_operators_t02: Crash
Language/Expressions/Constants/bitwise_operators_t03: Crash
Language/Expressions/Constants/bitwise_operators_t04: Crash
Language/Expressions/Constants/bitwise_operators_t06: Crash
-Language/Expressions/Constants/equals_expression_t03: MissingCompileTimeError
-Language/Expressions/Constants/exception_t04: MissingCompileTimeError
-Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError
-Language/Expressions/Constants/logical_expression_t03: MissingCompileTimeError
+Language/Expressions/Constants/depending_on_itself_t03: Crash
Language/Expressions/Constants/math_operators_t04: Crash
Language/Expressions/Constants/math_operators_t05: Crash
-Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t03: MissingCompileTimeError
-Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: MissingCompileTimeError
Language/Expressions/Instance_Creation/New/evaluation_t19: CompileTimeError # Issue 31938
Language/Expressions/Instance_Creation/New/evaluation_t20: CompileTimeError # Issue 31938
-Language/Expressions/Maps/key_value_equals_operator_t01: MissingCompileTimeError
-Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t01: MissingCompileTimeError # Issue 25496
-Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t02: MissingCompileTimeError # Issue 25496
-Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: MissingCompileTimeError
-Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03: MissingCompileTimeError
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError # Issue 24332
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError # Issue 24332
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError # Issue 24332
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t04: MissingCompileTimeError # Issue 24332
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t05: MissingCompileTimeError # Issue 24332
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError # Issue 24332
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Issue 24332
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Issue 24332
-Language/Expressions/This/placement_t04: MissingCompileTimeError
-Language/Expressions/Throw/syntax_t02: MissingCompileTimeError
Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError # Dartk Issue 28565
-Language/Functions/Formal_Parameters/Optional_Formals/default_value_t01: MissingCompileTimeError
-Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: MissingCompileTimeError
-Language/Libraries_and_Scripts/Exports/reexport_t01: MissingCompileTimeError
Language/Libraries_and_Scripts/Imports/deferred_import_t01: CompileTimeError # Deferred loading kernel issue 28335.
Language/Libraries_and_Scripts/Imports/deferred_import_t02: CompileTimeError # Deferred loading kernel issue 28335.
-Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError
-Language/Libraries_and_Scripts/Imports/invalid_uri_t01: MissingCompileTimeError
+Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t03: CompileTimeError
Language/Libraries_and_Scripts/Imports/same_name_t10: RuntimeError
Language/Libraries_and_Scripts/Imports/static_type_t01: Skip # No support for deferred libraries.
Language/Metadata/before_export_t01: RuntimeError # Issue 28434: Kernel IR misses these annotations.
@@ -178,29 +292,13 @@
Language/Metadata/before_param_t08: RuntimeError # Issue 28434: Kernel IR misses these annotations.
Language/Metadata/before_param_t09: RuntimeError # Issue 28434: Kernel IR misses these annotations.
Language/Metadata/before_typedef_t01: RuntimeError # Issue 28434: Kernel IR misses these annotations.
-Language/Mixins/Mixin_Application/deferred_t01: MissingCompileTimeError
Language/Mixins/Mixin_Application/syntax_t16: CompileTimeError # Issue 25765
-Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Issue 24767
-Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Issue 24767
-Language/Statements/Continue/label_t07: MissingCompileTimeError
-Language/Statements/For/syntax_t12: MissingCompileTimeError
-Language/Statements/For/syntax_t13: MissingCompileTimeError
-Language/Statements/For/syntax_t19: MissingCompileTimeError
-Language/Statements/For/syntax_t20: MissingCompileTimeError
-Language/Statements/Labels/scope_t05: MissingCompileTimeError
-Language/Statements/Switch/equal_operator_t01: MissingCompileTimeError
-Language/Statements/Switch/equal_operator_t02: MissingCompileTimeError
-Language/Statements/Switch/expressions_t01: MissingCompileTimeError
-Language/Statements/Switch/expressions_t02: MissingCompileTimeError
-Language/Statements/Switch/expressions_t03: MissingCompileTimeError
-Language/Statements/Switch/expressions_t04: MissingCompileTimeError
-Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t01: MissingCompileTimeError # Issue 25495
-Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t03: MissingCompileTimeError # Issue 25495
-Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t05: MissingCompileTimeError # Issue 25495
-Language/Types/Dynamic_Type_System/deferred_type_error_t01: CompileTimeError # Issue 31938
+Language/Types/Dynamic_Type_System/deferred_type_error_t01: CompileTimeError
Language/Types/Type_Void/syntax_t01: Pass # Issue 30470
-Language/Variables/final_or_static_initialization_t02: MissingCompileTimeError
-Language/Variables/final_or_static_initialization_t03: MissingCompileTimeError
LibTest/async/DeferredLibrary/DeferredLibrary_A01_t01: Skip # No support for deferred libraries.
LibTest/isolate/Isolate/spawnUri_A01_t06: Skip
+[ $compiler == dartkp || $compiler == fasta ]
+Language/Classes/Superinterfaces/more_than_once_t01: MissingCompileTimeError
+Language/Classes/Superinterfaces/superclass_as_superinterface_t01: MissingCompileTimeError
+
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index 7190664..2fbfd8a 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -9,7 +9,6 @@
LibTest/core/Uri/encodeQueryComponent_A01_t02: Pass, Timeout
[ $runtime == dart_precompiled ]
-Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: CompileTimeError # Issue 114
Language/Expressions/Null/instance_of_class_null_t01: Skip # Uses dart:mirrors
Language/Metadata/*: SkipByDesign # Uses dart:mirrors
LibTest/isolate/Isolate/spawnUri*: SkipByDesign # Isolate.spawnUri
@@ -200,6 +199,10 @@
[ $builder_tag == asan && $mode == debug && ($runtime == dart_precompiled || $runtime == vm) ]
Language/Types/Interface_Types/subtype_t27: Skip # Issue 21174.
+[ $compiler != dart2js && !$strong ]
+LibTest/typed_data/Float32x4List/first_A01_t02: RuntimeError # co19 issue 130 + type error
+LibTest/typed_data/Float32x4List/last_A01_t02: RuntimeError # co19 issue 130 + type error
+
[ $compiler != dartk && $compiler != dartkp && ($runtime == dart_precompiled || $runtime == flutter || $runtime == vm) ]
Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t01: MissingCompileTimeError # Issue 25496
Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t02: MissingCompileTimeError # Issue 25496
@@ -245,6 +248,9 @@
[ $mode == release && $runtime == vm && $system == linux && ($arch == ia32 || $arch == x64) ]
LibTest/isolate/Isolate/spawn_A04_t05: Pass, Slow
+[ $runtime == dart_precompiled && !$fasta ]
+Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: CompileTimeError # Issue 114
+
# Obfuscated mode expectations
[ $runtime == dart_precompiled && $minified ]
Language/Enums/declaration_equivalent_t01: Skip # Enum.toString is obfuscated.
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index 5ae9e53..cb6325d 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -17,7 +17,7 @@
inference/simple_inferrer_const_closure2_test: Fail # Issue 16507
inference/simple_inferrer_const_closure_test: Fail # Issue 16507
inference/simple_inferrer_global_field_closure_test: Fail # Issue 16507
-inference/swarm_test: Slow, Pass
+inference/swarm_test: Slow, Pass, Fail #
inlining/inlining_test: Slow, Pass
kernel/*: Slow, Pass
kernel/compile_from_dill_fast_startup_test: RuntimeError # Test must be updated to support FE with patching.
@@ -25,7 +25,7 @@
mirrors/library_exports_hidden_test: Fail
mirrors/library_exports_shown_test: Fail
mirrors/library_imports_hidden_test: Fail
-mirrors/library_imports_prefixed_show_hide_test: Fail
+mirrors/library_imports_prefixed_show_hide_test: Fail # Issue 32057
mirrors/library_imports_prefixed_test: Fail
mirrors/library_imports_shown_test: Fail
no_such_method_enabled_test: Pass, Slow
@@ -36,7 +36,7 @@
old_frontend/patch_test/bug: RuntimeError # Issue 21132
packages/*: Skip # Skip packages folder
quarantined/http_test: Pass, Slow
-rti/rti_need_test: Pass, Slow
+rti/rti_need_test: Pass, Slow, Fail # Issue 32055
serialization/analysis1_test: Skip # Skip most serialization tests. These are very slow and are no longer a priority.
serialization/analysis3_test: Skip # Skip most serialization tests. These are very slow and are no longer a priority.
serialization/analysis4_test: Skip # Skip most serialization tests. These are very slow and are no longer a priority.
diff --git a/tests/compiler/dart2js/generic_methods/function_type_variable_test.dart b/tests/compiler/dart2js/generic_methods/function_type_variable_test.dart
index c302094..dd18bd0 100644
--- a/tests/compiler/dart2js/generic_methods/function_type_variable_test.dart
+++ b/tests/compiler/dart2js/generic_methods/function_type_variable_test.dart
@@ -4,6 +4,7 @@
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/elements/entities.dart';
import 'package:compiler/src/elements/types.dart';
import 'package:expect/expect.dart';
import '../type_test_helper.dart';
@@ -26,6 +27,10 @@
.create(createTypedefs(existentialTypeData, additionalData: """
class C1 {}
class C2 {}
+ class C3<T> {
+ factory C3.fact() => C3.gen();
+ C3.gen();
+ }
"""), compileMode: CompileMode.kernel, options: [Flags.strongMode]);
testToString(FunctionType type, String expectedToString) {
@@ -181,5 +186,16 @@
testRelations(F1.typeVariables.first, F1.typeVariables.first,
areEqual: true);
testRelations(F1.typeVariables.first, F2.typeVariables.first);
+
+ ClassEntity cls = env.getClass('C3');
+ env.elementEnvironment.forEachConstructor(cls,
+ (ConstructorEntity constructor) {
+ List<TypeVariableType> functionTypeVariables =
+ env.elementEnvironment.getFunctionTypeVariables(constructor);
+ Expect.isTrue(
+ functionTypeVariables.isEmpty,
+ "Function type variables found on constructor $constructor: "
+ "$functionTypeVariables");
+ });
});
}
diff --git a/tests/compiler/dart2js/mirrors/mirrors_used_test.dart b/tests/compiler/dart2js/mirrors/mirrors_used_test.dart
index 6aa3ca8..aef17ca 100644
--- a/tests/compiler/dart2js/mirrors/mirrors_used_test.dart
+++ b/tests/compiler/dart2js/mirrors/mirrors_used_test.dart
@@ -70,7 +70,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 = 478;
+ int expectedMethodCount = 486;
Expect.isTrue(
generatedCode.length <= expectedMethodCount,
'Too many compiled methods: '
diff --git a/tests/compiler/dart2js/model/call_structure_namer_test.dart b/tests/compiler/dart2js/model/call_structure_namer_test.dart
new file mode 100644
index 0000000..4c1826a
--- /dev/null
+++ b/tests/compiler/dart2js/model/call_structure_namer_test.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2018, 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:async_helper/async_helper.dart';
+import 'package:compiler/src/js_backend/namer.dart';
+import 'package:compiler/src/universe/call_structure.dart';
+import 'package:expect/expect.dart';
+
+main() {
+ asyncTest(() async {
+ test(List<String> expectedSuffixes,
+ {int positionalParameters: 0,
+ int typeParameters: 0,
+ List<String> namedParameters: const <String>[]}) {
+ CallStructure callStructure = new CallStructure(
+ positionalParameters + namedParameters.length,
+ namedParameters,
+ typeParameters);
+ List<String> actualSuffixes = Namer.callSuffixForStructure(callStructure);
+ Expect.listEquals(
+ expectedSuffixes,
+ actualSuffixes,
+ "Unexpected suffixes for $callStructure. "
+ "Expected: $expectedSuffixes, actual: $actualSuffixes.");
+ }
+
+ test(['0']);
+ test(['1'], positionalParameters: 1);
+ test(['2'], positionalParameters: 2);
+ test(['1', 'a'], namedParameters: ['a']);
+ test(['2', 'a', 'b'], namedParameters: ['a', 'b']);
+ test(['2', 'b', 'c'], namedParameters: ['c', 'b']);
+ test(['2', 'a'], positionalParameters: 1, namedParameters: ['a']);
+
+ test(['1', '0'], typeParameters: 1);
+ test(['1', '1'], positionalParameters: 1, typeParameters: 1);
+ test(['1', '2'], positionalParameters: 2, typeParameters: 1);
+ test(['1', '1', 'a'], namedParameters: ['a'], typeParameters: 1);
+ test(['1', '2', 'a', 'b'], namedParameters: ['a', 'b'], typeParameters: 1);
+ test(['1', '2', 'b', 'c'], namedParameters: ['c', 'b'], typeParameters: 1);
+ test(['1', '2', 'a'],
+ positionalParameters: 1, namedParameters: ['a'], typeParameters: 1);
+
+ test(['2', '0'], typeParameters: 2);
+ test(['2', '1'], positionalParameters: 1, typeParameters: 2);
+ test(['2', '2'], positionalParameters: 2, typeParameters: 2);
+ test(['2', '1', 'a'], namedParameters: ['a'], typeParameters: 2);
+ test(['2', '2', 'a', 'b'], namedParameters: ['a', 'b'], typeParameters: 2);
+ test(['2', '2', 'b', 'c'], namedParameters: ['c', 'b'], typeParameters: 2);
+ test(['2', '2', 'a'],
+ positionalParameters: 1, namedParameters: ['a'], typeParameters: 2);
+ });
+}
diff --git a/tests/compiler/dart2js/old_frontend/analyze_api_test.dart b/tests/compiler/dart2js/old_frontend/analyze_api_test.dart
index 458824e..c74aee2 100644
--- a/tests/compiler/dart2js/old_frontend/analyze_api_test.dart
+++ b/tests/compiler/dart2js/old_frontend/analyze_api_test.dart
@@ -18,7 +18,25 @@
* the error/warning message in the list of white-listings for each file.
*/
// TODO(johnniwinther): Support canonical URIs as keys.
-const Map<String, List<String>> WHITE_LIST = const {};
+const Map<String, List<String>> WHITE_LIST = const {
+ "sdk/lib/_internal/js_runtime/lib/js_array.dart": const [
+ "Method type variables do not have a runtime value.",
+ ],
+ "sdk/lib/collection/iterable.dart": const [
+ "Method type variables do not have a runtime value.",
+ ],
+ "sdk/lib/collection/list.dart": const [
+ "Method type variables do not have a runtime value.",
+ "Method type variables are treated as `dynamic` in `as` expressions.",
+ ],
+ "sdk/lib/collection/set.dart": const [
+ "Method type variables do not have a runtime value.",
+ ],
+ "sdk/lib/core/iterable.dart": const [
+ "Method type variables do not have a runtime value.",
+ "Method type variables are treated as `dynamic` in `as` expressions.",
+ ],
+};
void main() {
var uriList = new List<Uri>();
diff --git a/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart b/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart
index e289b2c..5f4a8e0 100644
--- a/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart
+++ b/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart
@@ -61,6 +61,23 @@
"pkg/kernel/lib/binary/ast_from_binary.dart": const [
"Library 'dart:core' doesn't export a 'MapEntry' declaration.",
],
+ "sdk/lib/_internal/js_runtime/lib/js_array.dart": const [
+ "Method type variables do not have a runtime value.",
+ ],
+ "sdk/lib/collection/iterable.dart": const [
+ "Method type variables do not have a runtime value.",
+ ],
+ "sdk/lib/collection/list.dart": const [
+ "Method type variables do not have a runtime value.",
+ "Method type variables are treated as `dynamic` in `as` expressions.",
+ ],
+ "sdk/lib/collection/set.dart": const [
+ "Method type variables do not have a runtime value.",
+ ],
+ "sdk/lib/core/iterable.dart": const [
+ "Method type variables do not have a runtime value.",
+ "Method type variables are treated as `dynamic` in `as` expressions.",
+ ],
};
void main() {
diff --git a/tests/compiler/dart2js/old_frontend/analyze_test_test.dart b/tests/compiler/dart2js/old_frontend/analyze_test_test.dart
index 573c380..3cf3f42 100644
--- a/tests/compiler/dart2js/old_frontend/analyze_test_test.dart
+++ b/tests/compiler/dart2js/old_frontend/analyze_test_test.dart
@@ -23,30 +23,6 @@
"pkg/kernel/lib/transformations/closure/": const [
"Duplicated library name 'kernel.transformations.closure.converter'",
],
- "pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/front_end/lib/src/fasta/kernel/body_builder.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/visitor.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/text/ast_to_text.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/target/vm.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/clone.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/binary/ast_to_binary.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/binary/ast_from_binary.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
};
const List<String> SKIP_LIST = const <String>[
diff --git a/tests/compiler/dart2js/old_frontend/analyze_unused_dart2js_test.dart b/tests/compiler/dart2js/old_frontend/analyze_unused_dart2js_test.dart
index 6ee6b5c..f0e1c8d 100644
--- a/tests/compiler/dart2js/old_frontend/analyze_unused_dart2js_test.dart
+++ b/tests/compiler/dart2js/old_frontend/analyze_unused_dart2js_test.dart
@@ -58,30 +58,6 @@
"pkg/kernel/lib/transformations/closure/": const [
"Duplicated library name 'kernel.transformations.closure.converter'",
],
- "pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/front_end/lib/src/fasta/kernel/body_builder.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/visitor.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/text/ast_to_text.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/target/vm.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/clone.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/binary/ast_to_binary.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/binary/ast_from_binary.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
};
void main() {
diff --git a/tests/compiler/dart2js/old_frontend/diagnose_ambiguous_test.dart b/tests/compiler/dart2js/old_frontend/diagnose_ambiguous_test.dart
index 7617530..8af9a96 100644
--- a/tests/compiler/dart2js/old_frontend/diagnose_ambiguous_test.dart
+++ b/tests/compiler/dart2js/old_frontend/diagnose_ambiguous_test.dart
@@ -28,11 +28,18 @@
"memory:library.dart:41:47:'hest' is defined here.:info",
"MessageKind.DUPLICATE_IMPORT:"
"memory:main.dart:86:92:Duplicate import of 'hest'.:warning",
+ "MessageKind.HIDDEN_WARNINGS:"
+ "null:null:null:1 warning(s) suppressed in dart:_interceptors.:hint",
+ "MessageKind.HIDDEN_WARNINGS_HINTS:"
+ "null:null:null:1 warning(s) and 1 hint(s) suppressed in dart:core.:hint",
+ "MessageKind.HIDDEN_WARNINGS_HINTS:"
+ "null:null:null:3 warning(s) and 1 hint(s) suppressed in dart:collection.:hint",
"MessageKind.IMPORTED_HERE:"
"memory:main.dart:0:22:'hest' is imported here.:info",
"MessageKind.IMPORTED_HERE:"
"memory:main.dart:23:46:'hest' is imported here.:info",
];
+ print(">>\n$diagnostics\n<<");
Expect.listEquals(expected, diagnostics);
Expect.isTrue(result.isSuccess);
});
diff --git a/tests/compiler/dart2js/old_frontend/duplicate_library_test.dart b/tests/compiler/dart2js/old_frontend/duplicate_library_test.dart
index 8dce246..44c81c8 100644
--- a/tests/compiler/dart2js/old_frontend/duplicate_library_test.dart
+++ b/tests/compiler/dart2js/old_frontend/duplicate_library_test.dart
@@ -56,6 +56,10 @@
"""
}, warnings: [
MessageKind.DUPLICATED_LIBRARY_RESOURCE
+ ], hints: [
+ MessageKind.HIDDEN_WARNINGS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
]);
await test({
@@ -75,6 +79,10 @@
"""
}, warnings: [
MessageKind.DUPLICATED_LIBRARY_RESOURCE
+ ], hints: [
+ MessageKind.HIDDEN_WARNINGS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
]);
await test({
@@ -94,6 +102,10 @@
"""
}, warnings: [
MessageKind.DUPLICATED_LIBRARY_RESOURCE
+ ], hints: [
+ MessageKind.HIDDEN_WARNINGS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
]);
await test({
@@ -118,6 +130,10 @@
"""
}, warnings: [
MessageKind.DUPLICATED_LIBRARY_RESOURCE
+ ], hints: [
+ MessageKind.HIDDEN_WARNINGS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
]);
await test({
@@ -131,7 +147,10 @@
// No library tag.
"""
}, hints: [
- MessageKind.DUPLICATED_RESOURCE
+ MessageKind.DUPLICATED_RESOURCE,
+ MessageKind.HIDDEN_WARNINGS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
]);
await test({
@@ -150,5 +169,9 @@
}, warnings: [
MessageKind.DUPLICATED_LIBRARY_NAME,
MessageKind.DUPLICATED_LIBRARY_NAME
+ ], hints: [
+ MessageKind.HIDDEN_WARNINGS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
+ MessageKind.HIDDEN_WARNINGS_HINTS,
]);
}
diff --git a/tests/compiler/dart2js/old_frontend/parser_helper.dart b/tests/compiler/dart2js/old_frontend/parser_helper.dart
index e90b525..55a4f34 100644
--- a/tests/compiler/dart2js/old_frontend/parser_helper.dart
+++ b/tests/compiler/dart2js/old_frontend/parser_helper.dart
@@ -128,7 +128,8 @@
}
Node parseMember(String text, {DiagnosticReporter reporter}) {
- return parseBodyCode(text, (parser, tokens) => parser.parseMember(tokens),
+ return parseBodyCode(
+ text, (parser, tokens) => parser.parseClassMember(tokens),
reporter: reporter);
}
diff --git a/tests/compiler/dart2js/rti/data/list_to_set.dart b/tests/compiler/dart2js/rti/data/list_to_set.dart
index fd08537..b8598de 100644
--- a/tests/compiler/dart2js/rti/data/list_to_set.dart
+++ b/tests/compiler/dart2js/rti/data/list_to_set.dart
@@ -2,8 +2,8 @@
// 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.
-/*class: global#List:deps=[Class],explicit=[List],indirect,needsArgs*/
-/*class: global#JSArray:checked,deps=[List],explicit=[JSArray],implicit=[JSArray.E],indirect,needsArgs*/
+/*class: global#List:deps=[Class,EmptyIterable,Iterable,JSArray,ListIterable,SetMixin,SubListIterable],explicit=[List],implicit=[List.E],indirect,needsArgs*/
+/*class: global#JSArray:checked,deps=[EmptyIterable,List,ListIterable,SetMixin,SubListIterable],explicit=[JSArray],implicit=[JSArray.E],indirect,needsArgs*/
main() {
var c = new Class<int>();
diff --git a/tests/compiler/dart2js/rti/data/map_literal_checked.dart b/tests/compiler/dart2js/rti/data/map_literal_checked.dart
index a6dc521..d7534bf 100644
--- a/tests/compiler/dart2js/rti/data/map_literal_checked.dart
+++ b/tests/compiler/dart2js/rti/data/map_literal_checked.dart
@@ -4,7 +4,7 @@
/*class: global#Map:checked,explicit=[Map],indirect,needsArgs*/
/*class: global#LinkedHashMap:checked,deps=[Map],explicit=[LinkedHashMap<LinkedHashMap.K,LinkedHashMap.V>],implicit=[LinkedHashMap.K,LinkedHashMap.V],indirect,needsArgs*/
-/*class: global#JsLinkedHashMap:checked,deps=[LinkedHashMap],direct,explicit=[JsLinkedHashMap.K,JsLinkedHashMap.V,JsLinkedHashMap<JsLinkedHashMap.K,JsLinkedHashMap.V>,void Function(JsLinkedHashMap.K,JsLinkedHashMap.V)],implicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],needsArgs*/
+/*class: global#JsLinkedHashMap:checked,deps=[LinkedHashMap],direct,explicit=[Iterable<JsLinkedHashMap.K>,JsLinkedHashMap.K,JsLinkedHashMap.V,JsLinkedHashMap<JsLinkedHashMap.K,JsLinkedHashMap.V>,void Function(JsLinkedHashMap.K,JsLinkedHashMap.V)],implicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],needsArgs*/
/*class: global#double:arg,checked,explicit=[double],implicit=[double]*/
/*class: global#JSDouble:*/
diff --git a/tests/compiler/dart2js/type_representation_test.dart b/tests/compiler/dart2js/type_representation_test.dart
index 9e20cbb..b334504 100644
--- a/tests/compiler/dart2js/type_representation_test.dart
+++ b/tests/compiler/dart2js/type_representation_test.dart
@@ -52,7 +52,7 @@
var closedWorld = closedWorldRefiner.closedWorld;
env.compiler.startCodegen(closedWorld);
TypeRepresentationGenerator typeRepresentation =
- new TypeRepresentationGenerator(env.compiler.backend.namer);
+ new TypeRepresentationGenerator(env.compiler.backend.namer, false);
Expression onVariable(TypeVariableType _variable) {
ResolutionTypeVariableType variable = _variable;
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index 441c6d5..61e0619 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -23,7 +23,7 @@
[ $runtime == none ]
timer_negative_test: Fail, OK # A negative runtime test.
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $strong && $compiler == dart2analyzer ]
dummy_compiler_test: Skip # Issue 28649
recursive_import_test: Skip # Issue 28649
diff --git a/tests/compiler/dart2js_extra/regress_32069_test.dart b/tests/compiler/dart2js_extra/regress_32069_test.dart
new file mode 100644
index 0000000..4f13dfc
--- /dev/null
+++ b/tests/compiler/dart2js_extra/regress_32069_test.dart
@@ -0,0 +1,16 @@
+// 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.
+
+import 'package:expect/expect.dart';
+
+main() {
+ var m1 = {
+ 'hello': ['hi', 'howdy'],
+ 'bye': []
+ };
+ var m = new Map<String, List<String>>.unmodifiable(m1);
+ print(m);
+ Expect.isTrue(m is Map<String, List<String>>);
+ Expect.isFalse(m is Map<List<String>, String>);
+}
diff --git a/tests/compiler/dart2js_extra/rti_need_for_closure_signature_test.dart b/tests/compiler/dart2js_extra/rti_need_for_closure_signature_test.dart
new file mode 100644
index 0000000..61fda79
--- /dev/null
+++ b/tests/compiler/dart2js_extra/rti_need_for_closure_signature_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2018, 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.
+
+/// User-facing regression test: ensure we correctly record when a closure needs
+/// runtime type information for a type parameter that may be used or
+/// .runtimeType.
+
+// This test should be run in strong mode to ensure we have not regressed on
+// this failure.
+class Bar<Q> {
+ Q aVar;
+
+ Bar(this.aVar);
+
+ baz(onThing(Q value)) {
+ onThing(aVar);
+ }
+}
+
+foo<T>(Bar<T> bar) {
+ bar.baz((T value) {
+ print('hi');
+ });
+}
+
+main() {
+ foo<int>(new Bar<int>(3));
+}
diff --git a/tests/compiler/dart2js_extra/rti_need_for_runtime_type_test.dart b/tests/compiler/dart2js_extra/rti_need_for_runtime_type_test.dart
new file mode 100644
index 0000000..48c20e4
--- /dev/null
+++ b/tests/compiler/dart2js_extra/rti_need_for_runtime_type_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2018, 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.
+
+/// User-facing regression test: ensure we correctly record when a closure needs
+/// runtime type information for a type parameter that may be used or
+/// .runtimeType.
+class A<T> {
+ final f;
+ A() : f = (() => new C<T>());
+}
+
+class C<T> {}
+
+main() => print(new A<int>().f().runtimeType);
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 0fa1d5c..f1bd513 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -101,11 +101,21 @@
string_case_test/01: RuntimeError # jsshell does not recognize character 223 aka \xdf
unicode_test: RuntimeError # jsshell does not recognize character 223 aka \xdf
+[ $runtime != none ]
+map_from_test: Fail # Assumes LinkedHashMap implements HashMap.
+
[ $runtime == safari ]
double_round3_test: RuntimeError
double_round_to_double2_test: Pass, Fail, OK
string_trimlr_test/unicode63: RuntimeError # Uses Unicode 6.2.0 or earlier.
+[ $fasta ]
+symbol_reserved_word_test/04: MissingCompileTimeError
+symbol_reserved_word_test/07: MissingCompileTimeError
+symbol_reserved_word_test/10: MissingCompileTimeError
+symbol_test/02: MissingCompileTimeError
+symbol_test/03: MissingCompileTimeError
+
[ $strong ]
*: SkipByDesign # tests/corelib_2 has the strong mode versions of these tests.
@@ -116,9 +126,6 @@
[ $arch == x64 && $system == windows ]
stopwatch_test: Skip # Flaky test due to expected performance behaviour.
-[ $builder_tag == strong && $compiler == dart2analyzer ]
-*: Skip # Issue 28649
-
# Analyzer's implementation of fromEnvironment assumes that undefined
# environment variables have an unspecified value (rather than being
# null) because it is expected that the user will supply a value when
@@ -132,6 +139,9 @@
from_environment_const_type_undefined_test/14: CompileTimeError
from_environment_const_type_undefined_test/16: CompileTimeError
+[ $compiler == dart2analyzer && $strong ]
+*: Skip # Issue 28649
+
[ $compiler != dart2analyzer && $runtime != dart_precompiled && $runtime != vm ]
data_resource_test: RuntimeError # Issue 23825 (not implemented yet).
file_resource_test: Skip, OK # VM specific test, uses dart:io.
@@ -155,23 +165,9 @@
[ $compiler == dart2js && $checked && $dart2js_with_kernel ]
apply3_test: RuntimeError
-big_integer_arith_vm_test/add: RuntimeError
-big_integer_arith_vm_test/div: RuntimeError
-big_integer_arith_vm_test/gcd: RuntimeError
-big_integer_arith_vm_test/mod: RuntimeError
-big_integer_arith_vm_test/modInv: RuntimeError
-big_integer_arith_vm_test/modPow: RuntimeError
-big_integer_arith_vm_test/mul: RuntimeError
-big_integer_arith_vm_test/negate: RuntimeError
-big_integer_arith_vm_test/none: RuntimeError
-big_integer_arith_vm_test/overflow: RuntimeError
-big_integer_arith_vm_test/shift: RuntimeError
-big_integer_arith_vm_test/sub: RuntimeError
-big_integer_arith_vm_test/trunDiv: RuntimeError
big_integer_parsed_arith_vm_test: RuntimeError
big_integer_parsed_div_rem_vm_test: RuntimeError
big_integer_parsed_mul_div_vm_test: RuntimeError
-bit_twiddling_bigint_test: RuntimeError
compare_to2_test: RuntimeError
double_parse_test/01: RuntimeError
error_stack_trace1_test: RuntimeError # Issue 12399
@@ -194,27 +190,16 @@
from_environment_const_type_undefined_test/07: MissingCompileTimeError
from_environment_const_type_undefined_test/08: MissingCompileTimeError
hash_set_test/01: RuntimeError
-int_modulo_arith_test/bignum: RuntimeError
-int_modulo_arith_test/modPow: RuntimeError
int_parse_radix_test/01: RuntimeError
-int_parse_radix_test/02: RuntimeError
-integer_to_radix_string_test: RuntimeError
-integer_to_string_test/01: RuntimeError
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
iterable_to_list_test/01: RuntimeError
map_test: Crash # tests/corelib/map_test.dart:866:7: Internal problem: Unhandled Null in installDefaultConstructor.
nan_infinity_test/01: RuntimeError
-regress_r21715_test: RuntimeError
string_base_vm_test: RuntimeError
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
+[ $compiler == dart2js && $dart2js_with_kernel ]
big_integer_arith_vm_test/add: RuntimeError
big_integer_arith_vm_test/div: RuntimeError
big_integer_arith_vm_test/gcd: RuntimeError
@@ -228,120 +213,66 @@
big_integer_arith_vm_test/shift: RuntimeError
big_integer_arith_vm_test/sub: RuntimeError
big_integer_arith_vm_test/trunDiv: RuntimeError
+bit_twiddling_bigint_test: RuntimeError
+int_modulo_arith_test/bignum: RuntimeError
+int_modulo_arith_test/modPow: RuntimeError
+int_parse_radix_test/02: RuntimeError
+integer_to_radix_string_test: RuntimeError
+integer_to_string_test/01: RuntimeError
+regress_r21715_test: RuntimeError
+
+[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
big_integer_parsed_arith_vm_test: RuntimeError
big_integer_parsed_div_rem_vm_test: RuntimeError
big_integer_parsed_mul_div_vm_test: RuntimeError
-bit_twiddling_bigint_test: RuntimeError
compare_to2_test: RuntimeError
double_parse_test/01: RuntimeError
hash_set_test/01: RuntimeError
-int_modulo_arith_test/bignum: RuntimeError
-int_modulo_arith_test/modPow: RuntimeError
int_parse_radix_test/01: RuntimeError
-int_parse_radix_test/02: RuntimeError
-integer_to_radix_string_test: RuntimeError
-integer_to_string_test/01: RuntimeError
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
iterable_to_list_test/01: RuntimeError
map_test: Crash # tests/corelib/map_test.dart:866:7: Internal problem: Unhandled Null in installDefaultConstructor.
nan_infinity_test/01: RuntimeError
-regress_r21715_test: RuntimeError
string_base_vm_test: RuntimeError
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
apply3_test: CompileTimeError
-big_integer_arith_vm_test/add: RuntimeError
-big_integer_arith_vm_test/div: RuntimeError
-big_integer_arith_vm_test/gcd: RuntimeError
-big_integer_arith_vm_test/mod: RuntimeError
-big_integer_arith_vm_test/modInv: RuntimeError
-big_integer_arith_vm_test/modPow: RuntimeError
-big_integer_arith_vm_test/mul: RuntimeError
-big_integer_arith_vm_test/negate: RuntimeError
-big_integer_arith_vm_test/none: RuntimeError
-big_integer_arith_vm_test/overflow: RuntimeError
-big_integer_arith_vm_test/shift: RuntimeError
-big_integer_arith_vm_test/sub: RuntimeError
-big_integer_arith_vm_test/trunDiv: RuntimeError
big_integer_parsed_arith_vm_test: RuntimeError
big_integer_parsed_div_rem_vm_test: RuntimeError
big_integer_parsed_mul_div_vm_test: RuntimeError
-bit_twiddling_bigint_test: RuntimeError
compare_to2_test: RuntimeError
double_parse_test/01: RuntimeError
error_stack_trace1_test: RuntimeError # Issue 12399
hash_set_test/01: RuntimeError
-int_modulo_arith_test/bignum: RuntimeError
-int_modulo_arith_test/modPow: RuntimeError
int_parse_radix_test/01: RuntimeError
-int_parse_radix_test/02: RuntimeError
-integer_to_radix_string_test: RuntimeError
-integer_to_string_test/01: RuntimeError
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
iterable_to_list_test/01: RuntimeError
map_test: Crash # Issue 27394
nan_infinity_test/01: RuntimeError
-regress_r21715_test: RuntimeError
string_base_vm_test: RuntimeError
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
apply3_test: CompileTimeError
-big_integer_arith_vm_test/add: RuntimeError
-big_integer_arith_vm_test/div: RuntimeError
-big_integer_arith_vm_test/gcd: RuntimeError
-big_integer_arith_vm_test/mod: RuntimeError
-big_integer_arith_vm_test/modInv: RuntimeError
-big_integer_arith_vm_test/modPow: RuntimeError
-big_integer_arith_vm_test/mul: RuntimeError
-big_integer_arith_vm_test/negate: RuntimeError
-big_integer_arith_vm_test/none: RuntimeError
-big_integer_arith_vm_test/overflow: RuntimeError
-big_integer_arith_vm_test/shift: RuntimeError
-big_integer_arith_vm_test/sub: RuntimeError
-big_integer_arith_vm_test/trunDiv: RuntimeError
big_integer_parsed_arith_vm_test: RuntimeError
big_integer_parsed_div_rem_vm_test: RuntimeError
big_integer_parsed_mul_div_vm_test: RuntimeError
-bit_twiddling_bigint_test: RuntimeError
compare_to2_test: RuntimeError
double_parse_test/01: RuntimeError
error_stack_trace1_test: RuntimeError
hash_set_test/01: RuntimeError
-int_modulo_arith_test/bignum: RuntimeError
-int_modulo_arith_test/modPow: RuntimeError
int_parse_radix_test/01: RuntimeError
-int_parse_radix_test/02: RuntimeError
-integer_to_radix_string_test: RuntimeError
-integer_to_string_test/01: RuntimeError
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
iterable_to_list_test/01: RuntimeError
-map_test: Crash # Issue 27394
nan_infinity_test/01: RuntimeError
-regress_r21715_test: RuntimeError
string_base_vm_test: RuntimeError
symbol_operator_test/03: RuntimeError # Issue 27394
symbol_operator_test/none: RuntimeError
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
[ $compiler == dart2js && !$dart2js_with_kernel ]
big_integer_*: Skip # VM specific test.
@@ -373,6 +304,63 @@
[ $compiler == dart2js && $fast_startup ]
apply3_test: Fail # mirrors not supported
+[ $compiler != dart2js && $fasta ]
+big_integer_arith_vm_test/add: CompileTimeError
+big_integer_arith_vm_test/div: CompileTimeError
+big_integer_arith_vm_test/gcd: CompileTimeError
+big_integer_arith_vm_test/mod: CompileTimeError
+big_integer_arith_vm_test/modInv: CompileTimeError
+big_integer_arith_vm_test/modPow: CompileTimeError
+big_integer_arith_vm_test/mul: CompileTimeError
+big_integer_arith_vm_test/negate: CompileTimeError
+big_integer_arith_vm_test/none: CompileTimeError
+big_integer_arith_vm_test/overflow: CompileTimeError
+big_integer_arith_vm_test/shift: CompileTimeError
+big_integer_arith_vm_test/sub: CompileTimeError
+big_integer_arith_vm_test/trunDiv: CompileTimeError
+bit_twiddling_bigint_test: CompileTimeError
+bit_twiddling_test: CompileTimeError
+bool_from_environment2_test/01: MissingCompileTimeError
+bool_from_environment2_test/02: MissingCompileTimeError
+bool_from_environment2_test/03: MissingCompileTimeError
+bool_from_environment2_test/04: MissingCompileTimeError
+bool_from_environment2_test/05: MissingCompileTimeError
+double_ceil_test: CompileTimeError
+double_floor_test: CompileTimeError
+double_round_test: CompileTimeError
+double_truncate_test: CompileTimeError
+int_ceil_test: CompileTimeError
+int_ceil_to_double_test: CompileTimeError
+int_floor_test: CompileTimeError
+int_floor_to_double_test: CompileTimeError
+int_from_environment3_test/01: MissingCompileTimeError
+int_from_environment3_test/02: MissingCompileTimeError
+int_from_environment3_test/03: MissingCompileTimeError
+int_from_environment3_test/04: MissingCompileTimeError
+int_from_environment3_test/05: MissingCompileTimeError
+int_from_environment_test: CompileTimeError
+int_modulo_arith_test/bignum: CompileTimeError
+int_modulo_arith_test/modPow: CompileTimeError
+int_modulo_arith_test/none: CompileTimeError
+int_parse_radix_test/02: CompileTimeError
+int_round_test: CompileTimeError
+int_round_to_double_test: CompileTimeError
+int_to_int_test: CompileTimeError
+int_truncate_test: CompileTimeError
+int_truncate_to_double_test: CompileTimeError
+integer_to_radix_string_test: CompileTimeError
+integer_to_string_test/01: CompileTimeError
+num_parse_test/01: CompileTimeError
+num_parse_test/none: CompileTimeError
+num_sign_test: CompileTimeError
+regress_r21715_test: CompileTimeError
+string_from_environment3_test/01: MissingCompileTimeError
+string_from_environment3_test/02: MissingCompileTimeError
+string_from_environment3_test/03: MissingCompileTimeError
+string_from_environment3_test/04: MissingCompileTimeError
+string_from_environment3_test/05: MissingCompileTimeError
+symbol_test/01: MissingCompileTimeError
+
[ $runtime != d8 && $runtime != dart_precompiled && $runtime != vm ]
regexp/*: Skip # The regexp tests are not verified to work on non d8/vm platforms yet.
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index 3ba808b..fa02dc6c 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -16,15 +16,9 @@
bool_from_environment2_test/03: Crash
int_modulo_arith_test/modPow: RuntimeError
int_modulo_arith_test/none: RuntimeError
-map_test: Crash # crash in front_end.
null_nosuchmethod_test/01: CompileTimeError
null_nosuchmethod_test/none: CompileTimeError
string_from_environment3_test/03: Crash
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
[ $compiler == precompiler ]
int_parse_radix_test: Pass, Timeout # --no_intrinsify
@@ -70,6 +64,13 @@
double_round_to_double2_test: Fail, OK # Runtime rounds 0.49999999999999994 to 1.
string_trimlr_test/unicode63: RuntimeError # Uses Unicode 6.2.0 or earlier.
+[ $fasta ]
+symbol_reserved_word_test/04: MissingCompileTimeError
+symbol_reserved_word_test/07: MissingCompileTimeError
+symbol_reserved_word_test/10: MissingCompileTimeError
+symbol_test/02: MissingCompileTimeError
+symbol_test/03: MissingCompileTimeError
+
[ !$strong ]
cast_test: SkipByDesign # Uses generic method parameters.
@@ -181,18 +182,13 @@
from_environment_const_type_undefined_test/08: MissingCompileTimeError
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
+iterable_to_list_test/01: Crash # Wrong number of template arguments, given 2, expected 1
+iterable_to_list_test/none: Crash # Wrong number of template arguments, given 2, expected 1
list_replace_range_test: RuntimeError # Issue 32010
list_test/01: Crash # Unsupported operation: Unsupported type parameter type node T.
list_test/none: Crash # Unsupported operation: Unsupported type parameter type node T.
map_test: Crash # tests/corelib_2/map_test.dart:903:7: Internal problem: Unhandled Null in installDefaultConstructor.
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/05: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
[ $compiler == dart2js && $checked && $dart2js_with_kernel && !$strong ]
*: SkipByDesign
@@ -204,28 +200,20 @@
[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup && $strong ]
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
+iterable_to_list_test/01: Crash # Wrong number of template arguments, given 2, expected 1
+iterable_to_list_test/none: Crash # Wrong number of template arguments, given 2, expected 1
list_test/01: Crash # Unsupported operation: Unsupported type parameter type node T.
list_test/none: Crash # Unsupported operation: Unsupported type parameter type node T.
map_test: Crash # tests/corelib_2/map_test.dart:903:7: Internal problem: Unhandled Null in installDefaultConstructor.
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/05: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
uri_base_test: Crash # RangeError (index): Invalid value: Valid value range is empty: 0
[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup && !$strong ]
*: SkipByDesign
[ $compiler == dart2js && $dart2js_with_kernel && $host_checked && $strong ]
-apply2_test: RuntimeError
apply3_test: CompileTimeError
-apply_test: RuntimeError
cast_test: RuntimeError
-collection_length_test: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [HRef(phi 55), HRef(literal: NullConstant)].
collection_removes_test: RuntimeError
dynamic_nosuchmethod_test: CompileTimeError
error_stack_trace1_test: RuntimeError # Issue 12399
@@ -244,8 +232,8 @@
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
iterable_return_type_test/none: RuntimeError
-iterable_to_list_test/01: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic getter: selector=Selector(getter, length, arity=0), mask=Container([exact=JSExtendableArray], element: [null|subclass=Object], length: null), literal: NullConstant].
-iterable_to_list_test/none: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [HRef(phi 48), HRef(parameter E)].
+iterable_to_list_test/01: RuntimeError
+iterable_to_list_test/none: RuntimeError
iterable_to_set_test: RuntimeError
linked_hash_map_from_iterable_test: RuntimeError
linked_hash_map_from_iterables_test: RuntimeError
@@ -256,11 +244,10 @@
list_set_all_test: RuntimeError
list_test/01: RuntimeError
list_test/none: RuntimeError
-list_unmodifiable_test: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic getter: selector=Selector(getter, length, arity=0), mask=[subtype=SetMixin], HTypeInfoReadVariable(SetMixin.E)].
map_from_iterable_test: RuntimeError
map_from_iterables_test: RuntimeError
map_keys2_test: RuntimeError
-map_test: Crash # type 'DillClassBuilder' is not a subtype of type 'SourceClassBuilder' of 'named' where
+map_test: RuntimeError
map_values2_test: RuntimeError
map_values3_test: RuntimeError
map_values4_test: RuntimeError
@@ -274,22 +261,15 @@
string_replace_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
string_split_test/checkedstore: RuntimeError
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
uri_base_test: RuntimeError
+uri_query_test: Crash # Assertion failure: Cannot find value local(testQueryParameters#normalizedQuery) in (BoxLocal(_box_0)) for j:signature(testQueryParameters_test.$signature).
[ $compiler == dart2js && $dart2js_with_kernel && $host_checked && !$strong ]
*: SkipByDesign
[ $compiler == dart2js && $dart2js_with_kernel && $minified && $strong ]
-apply2_test: RuntimeError
apply3_test: CompileTimeError
-apply_test: RuntimeError
cast_test: RuntimeError
-collection_length_test: Crash # Wrong number of template arguments, given 2, expected 1
collection_removes_test: RuntimeError
dynamic_nosuchmethod_test: CompileTimeError
error_stack_trace1_test: RuntimeError
@@ -304,49 +284,32 @@
iterable_empty_test: RuntimeError
iterable_fold_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
iterable_generate_test/01: RuntimeError
-iterable_generate_test/none: RuntimeError
iterable_reduce_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
iterable_return_type_test/01: RuntimeError
iterable_return_type_test/02: RuntimeError
-iterable_return_type_test/none: RuntimeError
-iterable_to_list_test/01: Crash # Wrong number of template arguments, given 2, expected 1
-iterable_to_list_test/none: Crash # Wrong number of template arguments, given 2, expected 1
+iterable_to_list_test/01: RuntimeError
+iterable_to_list_test/none: RuntimeError
iterable_to_set_test: RuntimeError
-linked_hash_map_from_iterable_test: RuntimeError
-linked_hash_map_from_iterables_test: RuntimeError
list_concurrent_modify_test: RuntimeError
-list_filled_type_argument_test: RuntimeError
list_insert_all_test: RuntimeError
list_replace_range_test: RuntimeError # Issue 32010
list_set_all_test: RuntimeError # Issue 32010
list_test/01: RuntimeError
list_test/none: RuntimeError
-list_unmodifiable_test: Crash # Wrong number of template arguments, given 2, expected 1
-map_from_iterable_test: RuntimeError
-map_from_iterables_test: RuntimeError
map_keys2_test: RuntimeError
-map_test: Crash # tests/map_test.dart:870:7: Internal problem: Unhandled Null in installDefaultConstructor.
-map_values2_test: RuntimeError
-map_values3_test: RuntimeError
-map_values4_test: RuntimeError
nan_infinity_test/01: RuntimeError
null_nosuchmethod_test/01: CompileTimeError
null_nosuchmethod_test/none: CompileTimeError
queue_test: RuntimeError
splay_tree_from_iterable_test: RuntimeError
-splay_tree_from_iterables_test: RuntimeError
stacktrace_fromstring_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
string_replace_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
string_split_test/checkedstore: RuntimeError
symbol_operator_test/03: RuntimeError
symbol_operator_test/none: RuntimeError
symbol_reserved_word_test/03: RuntimeError
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-symbol_test/02: MissingCompileTimeError
-symbol_test/03: MissingCompileTimeError
uri_base_test: RuntimeError
+uri_query_test: Crash # Assertion failure: Cannot find value local(testQueryParameters#normalizedQuery) in (BoxLocal(_box_0)) for j:signature(testQueryParameters_test.$signature).
[ $compiler == dart2js && $dart2js_with_kernel && $minified && !$strong ]
*: SkipByDesign
@@ -385,6 +348,10 @@
[ $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp && ($compiler != dart2analyzer || !$strong) ]
iterable_mapping_test/01: MissingCompileTimeError
+[ $compiler != dart2js && $fasta ]
+bool_from_environment2_test/03: MissingCompileTimeError
+string_from_environment3_test/03: MissingCompileTimeError
+
[ $compiler == dartdevc && $runtime != none ]
compare_to2_test: CompileTimeError # invalid test
symbol_operator_test: RuntimeError # Issue 29921
@@ -410,42 +377,30 @@
# ===== dartk + vm status lines =====
[ $compiler == dartk && $runtime == vm && $strong ]
apply3_test: CompileTimeError # Issue 31402 (Invocation arguments)
-bool_from_environment2_test/03: MissingCompileTimeError
-iterable_to_list_test/01: RuntimeError
-iterable_to_list_test/none: RuntimeError
+iterable_fold_test/02: RuntimeError
+iterable_reduce_test/01: CompileTimeError # Issue 31533
+iterable_reduce_test/none: RuntimeError
null_nosuchmethod_test/01: CompileTimeError # Issue 31402 (Invocation arguments)
null_nosuchmethod_test/none: CompileTimeError # Issue 31402 (Invocation arguments)
-string_from_environment3_test/03: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_operator_test/03: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_reserved_word_test/04: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_reserved_word_test/06: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_reserved_word_test/07: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_reserved_word_test/09: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_reserved_word_test/10: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_reserved_word_test/12: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_test/02: MissingCompileTimeError # Issue 31936 - throwing const constructors.
-symbol_test/03: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_test/none: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
unicode_test: RuntimeError # Issue 18061: German double S.
# ===== dartkp + dart_precompiled status lines =====
[ $compiler == dartkp && $runtime == dart_precompiled && $strong ]
-bool_from_environment2_test/03: MissingCompileTimeError
-iterable_to_list_test/01: RuntimeError
-iterable_to_list_test/none: RuntimeError
+iterable_fold_test/02: RuntimeError
+iterable_reduce_test/01: CompileTimeError # Issue 31533
+iterable_reduce_test/none: RuntimeError
null_nosuchmethod_test/01: CompileTimeError # Issue 31402 (Invocation arguments)
null_nosuchmethod_test/none: CompileTimeError # Issue 31402 (Invocation arguments)
regexp/stack-overflow_test: RuntimeError
-string_from_environment3_test/03: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_operator_test/03: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_reserved_word_test/04: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_reserved_word_test/06: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_reserved_word_test/07: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_reserved_word_test/09: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_reserved_word_test/10: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_reserved_word_test/12: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
-symbol_test/02: MissingCompileTimeError # Issue 31936 - throwing const constructors.
-symbol_test/03: MissingCompileTimeError # Issue 31936 - throwing const constructors.
symbol_test/none: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
unicode_test: RuntimeError # Issue 18061: German double S.
@@ -515,7 +470,6 @@
integer_to_radix_string_test: RuntimeError # Issue 29921
integer_to_string_test/01: RuntimeError # Issue 29921
iterable_return_type_test/02: RuntimeError # Issue 29921
-iterable_to_list_test/*: RuntimeError
list_concurrent_modify_test: RuntimeError # DDC uses ES6 array iterators so it does not issue this
list_removeat_test: RuntimeError # Issue 29921
main_test: RuntimeError # Issue 29921
@@ -604,6 +558,43 @@
[ !$checked && ($compiler == app_jit || $compiler == none || $compiler == precompiler) && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign
+[ $fasta && !$strong ]
+bool_from_environment2_test/01: MissingCompileTimeError
+bool_from_environment2_test/02: MissingCompileTimeError
+bool_from_environment2_test/04: MissingCompileTimeError
+bool_from_environment2_test/05: MissingCompileTimeError
+from_environment_const_type_test/02: MissingCompileTimeError
+from_environment_const_type_test/03: MissingCompileTimeError
+from_environment_const_type_test/04: MissingCompileTimeError
+from_environment_const_type_test/06: MissingCompileTimeError
+from_environment_const_type_test/07: MissingCompileTimeError
+from_environment_const_type_test/08: MissingCompileTimeError
+from_environment_const_type_test/09: MissingCompileTimeError
+from_environment_const_type_test/11: MissingCompileTimeError
+from_environment_const_type_test/12: MissingCompileTimeError
+from_environment_const_type_test/13: MissingCompileTimeError
+from_environment_const_type_test/14: MissingCompileTimeError
+from_environment_const_type_test/16: MissingCompileTimeError
+from_environment_const_type_undefined_test/02: MissingCompileTimeError
+from_environment_const_type_undefined_test/03: MissingCompileTimeError
+from_environment_const_type_undefined_test/04: MissingCompileTimeError
+from_environment_const_type_undefined_test/06: MissingCompileTimeError
+from_environment_const_type_undefined_test/07: MissingCompileTimeError
+from_environment_const_type_undefined_test/08: MissingCompileTimeError
+from_environment_const_type_undefined_test/09: MissingCompileTimeError
+from_environment_const_type_undefined_test/11: MissingCompileTimeError
+from_environment_const_type_undefined_test/12: MissingCompileTimeError
+from_environment_const_type_undefined_test/13: MissingCompileTimeError
+from_environment_const_type_undefined_test/14: MissingCompileTimeError
+from_environment_const_type_undefined_test/16: MissingCompileTimeError
+int_parse_radix_bad_handler_test: MissingCompileTimeError
+string_from_environment3_test/01: MissingCompileTimeError
+string_from_environment3_test/02: MissingCompileTimeError
+string_from_environment3_test/04: MissingCompileTimeError
+string_from_environment3_test/05: MissingCompileTimeError
+symbol_reserved_word_test/05: MissingCompileTimeError
+symbol_test/01: MissingCompileTimeError
+
# Sections for dartk and dartkp.
#
# Note: these sections are normalized so we can update them with automated
diff --git a/tests/corelib_2/growable_list_test.dart b/tests/corelib_2/growable_list_test.dart
index 90e71e2..f6787ff 100644
--- a/tests/corelib_2/growable_list_test.dart
+++ b/tests/corelib_2/growable_list_test.dart
@@ -36,6 +36,8 @@
: super(length, count, callbackIndex, callback);
// Avoid warnings because we don't actually implement Set.
noSuchMethod(i) => super.noSuchMethod(i);
+ Set<R> cast<R>() => throw "not used by test";
+ Set<R> retype<R>() => throw "not used by test";
}
class CallbackIterator implements Iterator<int> {
diff --git a/tests/corelib_2/iterable_return_type_test.dart b/tests/corelib_2/iterable_return_type_test.dart
index dbbd662..257a574 100644
--- a/tests/corelib_2/iterable_return_type_test.dart
+++ b/tests/corelib_2/iterable_return_type_test.dart
@@ -11,8 +11,8 @@
import 'dart:typed_data';
testIntIterable(iterable) {
- Expect.isTrue(iterable is Iterable<int>);
- Expect.isFalse(iterable is Iterable<String>);
+ Expect.isTrue(iterable is Iterable<int>, "${iterable.runtimeType}");
+ Expect.isFalse(iterable is Iterable<String>, "${iterable.runtimeType}");
}
void testIterable(Iterable<int> iterable, [int depth = 3]) {
diff --git a/tests/corelib_2/iterable_to_list_test.dart b/tests/corelib_2/iterable_to_list_test.dart
index d812978..4ceb6c8 100644
--- a/tests/corelib_2/iterable_to_list_test.dart
+++ b/tests/corelib_2/iterable_to_list_test.dart
@@ -9,16 +9,16 @@
main() {
// testIterable takes an iterable and a list expected to be equal to
// the iterable's toList result, including the type parameter of the list.
- testIterable([], []);
+ testIterable(<dynamic>[], <dynamic>[]);
testIterable(<int>[], <int>[]);
testIterable(<String>[], <String>[]);
testIterable([1, 2, 3], [1, 2, 3]);
testIterable(<int>[1, 2, 3], <int>[1, 2, 3]);
testIterable(const [1, 2], [1, 2]);
testIterable(const <int>[1, 2], <int>[1, 2]);
- testIterable({"x": 1, "y": 1}.keys, ["x", "y"]);
+ testIterable(<dynamic, dynamic>{"x": 1, "y": 1}.keys, <dynamic>["x", "y"]);
testIterable(<String, int>{"x": 1, "y": 1}.keys, <String>["x", "y"]);
- testIterable({"x": 2, "y": 3}.values, [2, 3]);
+ testIterable(<dynamic, dynamic>{"x": 2, "y": 3}.values, <dynamic>[2, 3]);
testIterable(<String, int>{"x": 2, "y": 3}.values, <int>[2, 3]);
testIterable(new Iterable.generate(3), [0, 1, 2]);
testIterable(new Iterable<int>.generate(3), <int>[0, 1, 2]);
@@ -29,9 +29,9 @@
testIterable(new Queue.from([1, 2, 3]), [1, 2, 3]);
testIterable(new Queue<int>.from(<int>[1, 2, 3]), <int>[1, 2, 3]);
testIterable(new Uint8List.fromList(<int>[1, 2, 3]), // //# 01: ok
- <int>[1, 2, 3]); // //# 01: continued
+ <int>[1, 2, 3]); // //# 01: continued
testIterable(new Float32List.fromList([1.0, 2.0, 3.0]), // //# 01: continued
- <double>[1.0, 2.0, 3.0]); // //# 01: continued
+ <double>[1.0, 2.0, 3.0]); // //# 01: continued
testIterable("abc".codeUnits, <int>[97, 98, 99]); // //# 01: continued
testIterable("abc".runes, <int>[97, 98, 99]);
}
diff --git a/tests/corelib_2/json_map_test.dart b/tests/corelib_2/json_map_test.dart
index ed0544c..d5d417f 100644
--- a/tests/corelib_2/json_map_test.dart
+++ b/tests/corelib_2/json_map_test.dart
@@ -301,12 +301,15 @@
}
void testType() {
+ var map = jsonify({});
+ var type = "${map.runtimeType}";
+
// The documentation of json.decode doesn't actually specify that it returns
// a map (it's marked dynamic), but it's a reasonable expectation if you
// don't provide a reviver function.
- Expect.isTrue(jsonify({}) is Map);
- Expect.isTrue(jsonify({}) is Map<String, dynamic>);
- Expect.isFalse(jsonify({}) is Map<int, dynamic>);
+ Expect.isTrue(map is Map, type);
+ Expect.isTrue(map is Map<String, dynamic>, type);
+ Expect.isFalse(map is Map<int, dynamic>, type);
}
void testClear() {
diff --git a/tests/corelib_2/map_from_test.dart b/tests/corelib_2/map_from_test.dart
index f64bec3..0cff956 100644
--- a/tests/corelib_2/map_from_test.dart
+++ b/tests/corelib_2/map_from_test.dart
@@ -18,7 +18,6 @@
var map = const {'b': 42, 'a': 43};
var otherMap = new Map.from(map);
Expect.isTrue(otherMap is Map);
- Expect.isTrue(otherMap is HashMap);
Expect.isTrue(otherMap is LinkedHashMap);
Expect.equals(2, otherMap.length);
@@ -41,7 +40,6 @@
var map = {'b': 42, 'a': 43};
var otherMap = new Map.from(map);
Expect.isTrue(otherMap is Map);
- Expect.isTrue(otherMap is HashMap);
Expect.isTrue(otherMap is LinkedHashMap);
Expect.equals(2, otherMap.length);
@@ -91,7 +89,6 @@
var map = const {'b': 1, 'a': 2, 'c': 3};
var otherMap = new LinkedHashMap.from(map);
Expect.isTrue(otherMap is Map);
- Expect.isTrue(otherMap is HashMap);
Expect.isTrue(otherMap is LinkedHashMap);
var i = 1;
for (var val in map.values) {
diff --git a/tests/html/html.status b/tests/html/html.status
index 1b449b0..e85d676 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -52,6 +52,9 @@
wrapping_collections_test: SkipByDesign # Testing an issue that is only relevant to Dartium
xhr_test/xhr: Pass, RuntimeError # Roll 50 failure
+[ $compiler == fasta ]
+*: CompileTimeError # TODO(ahe): Support dart:html in Fasta.
+
[ $runtime == drt ]
webgl_extensions_test: Skip # webgl does not work properly on DRT, which is 'headless'.
@@ -159,7 +162,7 @@
[ $strong ]
*: SkipByDesign
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
[ $compiler == dart2js && $runtime == chrome ]
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index 9ff8edb..c97a6b0 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -27,6 +27,13 @@
spawn_uri_vm_test: SkipByDesign # Test uses a ".dart" URI.
stacktrace_message_test: RuntimeError # Fails to send stacktrace object.
+[ $compiler == fasta ]
+browser/compute_this_script_browser_test: CompileTimeError # TODO(ahe): Support dart:html in Fasta.
+browser/package_resolve_browser_hook2_test: CompileTimeError # TODO(ahe): Support dart:html in Fasta.
+browser/package_resolve_browser_hook_test: CompileTimeError # TODO(ahe): Support dart:html in Fasta.
+browser/package_resolve_browser_test: CompileTimeError # TODO(ahe): Support dart:html in Fasta.
+isolate_stress_test: CompileTimeError # TODO(ahe): Support dart:html in Fasta.
+
[ $mode == product ]
issue_24243_parent_isolate_test: Skip # Requires checked mode
@@ -39,6 +46,9 @@
browser/package_resolve_browser_hook_test: SkipByDesign # Test written in a way that violates CSP.
deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
+[ $fasta ]
+compile_time_error_test/01: MissingCompileTimeError
+
[ $jscl ]
spawn_uri_multi_test/none: RuntimeError # Issue 13544
@@ -48,7 +58,7 @@
[ $strong ]
*: SkipByDesign
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
[ $compiler == dart2js && $runtime == chrome ]
@@ -162,7 +172,6 @@
checked_test: Skip # Unsupported.
[ $compiler == dartk || $compiler == dartkp ]
-compile_time_error_test/01: MissingCompileTimeError
deferred_in_isolate2_test: Skip # Timeout. Deferred loading kernel issue 28335.
deferred_in_isolate_test: Skip # Timeout. Deferred loading kernel issue 28335.
issue_21398_parent_isolate2_test/01: Skip # Timeout. Deferred loading kernel issue 28335.
diff --git a/tests/kernel/kernel.status b/tests/kernel/kernel.status
index 9c3de36..b74d5fa 100644
--- a/tests/kernel/kernel.status
+++ b/tests/kernel/kernel.status
@@ -12,8 +12,17 @@
[ !$strong ]
unsorted/invocation_errors_test: RuntimeError
-[ $builder_tag == strong && $compiler == dart2analyzer ]
-*: Skip # Issue 28649
+[ $arch == simarm && $compiler == dartkp && $strong ]
+unsorted/invocation_errors_test: CompileTimeError
+unsorted/nsm_dispatcher_test: CompileTimeError
+unsorted/super_mixin_test: CompileTimeError
+unsorted/types_test: RuntimeError
+
+[ $arch == simarm64 && $compiler == dartkp && $strong ]
+unsorted/invocation_errors_test: CompileTimeError
+unsorted/nsm_dispatcher_test: CompileTimeError
+unsorted/super_mixin_test: CompileTimeError
+unsorted/types_test: RuntimeError
[ $compiler == dart2analyzer && $runtime == none ]
unsorted/invocation_errors_test: StaticWarning
@@ -21,9 +30,11 @@
unsorted/simple_literal_test: CompileTimeError # int64
unsorted/super_mixin_test: CompileTimeError
+[ $compiler == dart2analyzer && $strong ]
+*: Skip # Issue 28649
+
[ $compiler == dartk && $strong ]
unsorted/invocation_errors_test: CompileTimeError
-unsorted/loop_test: RuntimeError
unsorted/nsm_dispatcher_test: CompileTimeError
unsorted/super_mixin_test: CompileTimeError
unsorted/types_test: RuntimeError
@@ -31,7 +42,7 @@
[ $runtime == dart_precompiled && $minified ]
unsorted/symbol_literal_test: Skip # Expects unobfuscated Symbol.toString.
-[ $runtime == dart_precompiled || $runtime == vm || $compiler == dart2js && $dart2js_with_kernel ]
-unsorted/loop_test: CompileTimeError # Large integer literal
-unsorted/simple_literal_test: CompileTimeError # Large integer literal
+[ $runtime == dart_precompiled || $runtime == vm || $fasta ]
+unsorted/loop_test: CompileTimeError
+unsorted/simple_literal_test: CompileTimeError
diff --git a/tests/language/language.status b/tests/language/language.status
index ebde631..78000d4 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -310,9 +310,6 @@
[ $arch == ia32 && ($compiler == app_jit || $compiler == none || $compiler == precompiler) && ($runtime == dart_precompiled || $runtime == vm) ]
vm/regress_24517_test: Pass, Fail # Issue 24517.
-[ $compiler == app_jit && $mode == debug && $runtime == vm ]
-cyclic_type_test/03: Pass, Crash # Issue 31945
-
[ $compiler == app_jit && $runtime == vm && !$checked ]
assertion_initializer_const_error_test/01: MissingCompileTimeError
assertion_initializer_const_function_error_test/01: MissingCompileTimeError
@@ -460,9 +457,6 @@
vm/causal_async_exception_stack2_test: SkipByDesign # Causal async stacks are not supported in product mode
vm/causal_async_exception_stack_test: SkipByDesign # Causal async stacks are not supported in product mode
-[ $runtime == dart_precompiled || $runtime == flutter || $runtime == vm ]
-cyclic_type_test/03: Pass, Fail, Crash # Issue 31944
-
[ $runtime == dart_precompiled || $runtime == vm ]
arithmetic_test: CompileTimeError # Large integer literal
bit_operations_test: CompileTimeError # Large integer literal
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index b567887..67463f9 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -398,9 +398,6 @@
vm/type_vm_test: StaticWarning
void_type_test: StaticWarning
-[ $builder_tag == strong && $compiler == dart2analyzer ]
-*: Skip # Issue 28649
-
[ $compiler == dart2analyzer && $runtime == none ]
arithmetic_test: CompileTimeError # int64
bit_operations_test/01: CompileTimeError # int64
@@ -424,3 +421,6 @@
[ $compiler == dart2analyzer && $runtime == none && !$checked ]
assertion_initializer_const_function_error_test/01: MissingCompileTimeError
+[ $compiler == dart2analyzer && $strong ]
+*: Skip # Issue 28649
+
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index e2e9167..ad5f14a 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -225,7 +225,6 @@
malformed2_test/00: RuntimeError
malformed2_test/01: MissingCompileTimeError
map_literal1_test/01: MissingCompileTimeError
-method_name_test: CompileTimeError
method_override5_test: RuntimeError
method_override7_test/00: MissingCompileTimeError
method_override7_test/01: MissingCompileTimeError
@@ -591,7 +590,6 @@
main_not_a_function_test/01: CompileTimeError
many_overridden_no_such_method_test: RuntimeError
map_literal4_test: RuntimeError
-method_name_test: CompileTimeError
method_override5_test: RuntimeError
method_override7_test/00: MissingCompileTimeError
method_override7_test/01: MissingCompileTimeError
@@ -900,7 +898,6 @@
main_not_a_function_test/01: CompileTimeError
many_overridden_no_such_method_test: CompileTimeError
map_literal4_test: RuntimeError
-method_name_test: CompileTimeError
method_override5_test: RuntimeError
method_override7_test/00: MissingCompileTimeError
method_override7_test/01: MissingCompileTimeError
@@ -1212,7 +1209,6 @@
main_not_a_function_test/01: CompileTimeError
many_overridden_no_such_method_test: CompileTimeError
map_literal4_test: RuntimeError
-method_name_test: CompileTimeError
method_override5_test: RuntimeError
method_override7_test/00: MissingCompileTimeError
method_override7_test/01: MissingCompileTimeError
@@ -1460,7 +1456,6 @@
library_env_test/has_no_mirror_support: RuntimeError, OK # The following tests are supposed to fail. In testing-mode, dart2js supports all dart:X libraries (because it uses '--categories=all').
list_literal4_test: RuntimeError # Issue 12890
malformed_test/none: Fail # Expect failure in lib/_internal/js_runtime/lib/preambles/d8.js
-method_name_test: Fail # issue 25574
method_override5_test: RuntimeError # Issue 12809
mint_arithmetic_test: RuntimeError # Issue 1533
mixin_forwarding_constructor4_test/01: MissingCompileTimeError # Issue 15101
diff --git a/tests/language/language_kernel.status b/tests/language/language_kernel.status
index d8dd7aa..40ddb5e 100644
--- a/tests/language/language_kernel.status
+++ b/tests/language/language_kernel.status
@@ -2,10 +2,209 @@
# 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.
+[ $compiler == fasta ]
+prefix5_negative_test: Fail
+
[ $fasta ]
+bad_override_test/03: MissingCompileTimeError
+bad_override_test/04: MissingCompileTimeError
+bad_override_test/05: MissingCompileTimeError
+bit_operations_test/01: CompileTimeError
+bit_operations_test/02: CompileTimeError
+bit_operations_test/03: CompileTimeError
+bit_operations_test/04: CompileTimeError
+bit_operations_test/none: CompileTimeError
+check_member_static_test/02: MissingCompileTimeError
+class_cycle_test/02: MissingCompileTimeError
+class_cycle_test/03: MissingCompileTimeError
+config_import_test: Crash
+const_error_multiply_initialized_test/02: MissingCompileTimeError
+const_error_multiply_initialized_test/04: MissingCompileTimeError
+const_factory_with_body_test/01: MissingCompileTimeError
+const_instance_field_test/01: MissingCompileTimeError
+const_map2_test/00: MissingCompileTimeError
+const_map3_test/00: MissingCompileTimeError
+const_switch2_test/01: MissingCompileTimeError
+constants_test/05: MissingCompileTimeError
+constructor_redirect1_negative_test: Fail
+constructor_redirect2_negative_test: Fail
+constructor_redirect2_test/01: MissingCompileTimeError
+constructor_redirect_test/01: MissingCompileTimeError
+cyclic_constructor_test/01: MissingCompileTimeError
+deferred_inheritance_constraints_test/extends: MissingCompileTimeError
+deferred_inheritance_constraints_test/implements: MissingCompileTimeError
+deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
+duplicate_export_negative_test: Fail
+duplicate_implements_test/01: MissingCompileTimeError
+duplicate_implements_test/02: MissingCompileTimeError
+duplicate_implements_test/03: MissingCompileTimeError
+duplicate_implements_test/04: MissingCompileTimeError
+factory_redirection_test/07: MissingCompileTimeError
+fauxverride_test/03: MissingCompileTimeError
+fauxverride_test/05: MissingCompileTimeError
+field_override3_test/00: MissingCompileTimeError
+field_override3_test/01: MissingCompileTimeError
+field_override3_test/02: MissingCompileTimeError
+field_override3_test/03: MissingCompileTimeError
+field_override4_test/02: MissingCompileTimeError
+final_attempt_reinitialization_test/01: MissingCompileTimeError
+final_attempt_reinitialization_test/02: MissingCompileTimeError
+getter_override2_test/02: MissingCompileTimeError
+getter_override_test/00: MissingCompileTimeError
+getter_override_test/01: MissingCompileTimeError
+getter_override_test/02: MissingCompileTimeError
+identical_closure2_test: CompileTimeError
+method_override7_test/00: MissingCompileTimeError
+method_override7_test/01: MissingCompileTimeError
+method_override7_test/02: MissingCompileTimeError
+method_override8_test/00: MissingCompileTimeError
+method_override8_test/01: MissingCompileTimeError
+mixin_forwarding_constructor4_test/01: MissingCompileTimeError
+mixin_forwarding_constructor4_test/02: MissingCompileTimeError
+mixin_forwarding_constructor4_test/03: MissingCompileTimeError
+mixin_illegal_super_use_test/01: MissingCompileTimeError
+mixin_illegal_super_use_test/02: MissingCompileTimeError
+mixin_illegal_super_use_test/03: MissingCompileTimeError
+mixin_illegal_super_use_test/04: MissingCompileTimeError
+mixin_illegal_super_use_test/05: MissingCompileTimeError
+mixin_illegal_super_use_test/06: MissingCompileTimeError
+mixin_illegal_super_use_test/07: MissingCompileTimeError
+mixin_illegal_super_use_test/08: MissingCompileTimeError
+mixin_illegal_super_use_test/09: MissingCompileTimeError
+mixin_illegal_super_use_test/10: MissingCompileTimeError
+mixin_illegal_super_use_test/11: MissingCompileTimeError
+mixin_illegal_superclass_test/01: MissingCompileTimeError
+mixin_illegal_superclass_test/02: MissingCompileTimeError
+mixin_illegal_superclass_test/03: MissingCompileTimeError
+mixin_illegal_superclass_test/04: MissingCompileTimeError
+mixin_illegal_superclass_test/05: MissingCompileTimeError
+mixin_illegal_superclass_test/06: MissingCompileTimeError
+mixin_illegal_superclass_test/07: MissingCompileTimeError
+mixin_illegal_superclass_test/08: MissingCompileTimeError
+mixin_illegal_superclass_test/09: MissingCompileTimeError
+mixin_illegal_superclass_test/10: MissingCompileTimeError
+mixin_illegal_superclass_test/11: MissingCompileTimeError
+mixin_illegal_superclass_test/12: MissingCompileTimeError
+mixin_illegal_superclass_test/13: MissingCompileTimeError
+mixin_illegal_superclass_test/14: MissingCompileTimeError
+mixin_illegal_superclass_test/15: MissingCompileTimeError
+mixin_illegal_superclass_test/16: MissingCompileTimeError
+mixin_illegal_superclass_test/17: MissingCompileTimeError
+mixin_illegal_superclass_test/18: MissingCompileTimeError
+mixin_illegal_superclass_test/19: MissingCompileTimeError
+mixin_illegal_superclass_test/20: MissingCompileTimeError
+mixin_illegal_superclass_test/21: MissingCompileTimeError
+mixin_illegal_superclass_test/22: MissingCompileTimeError
+mixin_illegal_superclass_test/23: MissingCompileTimeError
+mixin_illegal_superclass_test/24: MissingCompileTimeError
+mixin_illegal_superclass_test/25: MissingCompileTimeError
+mixin_illegal_superclass_test/26: MissingCompileTimeError
+mixin_illegal_superclass_test/27: MissingCompileTimeError
+mixin_illegal_superclass_test/28: MissingCompileTimeError
+mixin_illegal_superclass_test/29: MissingCompileTimeError
+mixin_illegal_superclass_test/30: MissingCompileTimeError
+mixin_super_bound2_test/01: CompileTimeError
+mixin_super_bound2_test/none: CompileTimeError
+mixin_super_constructor_named_test/01: MissingCompileTimeError
+mixin_super_constructor_positionals_test/01: MissingCompileTimeError
+multiline_newline_test/04: MissingCompileTimeError
+multiline_newline_test/04r: MissingCompileTimeError
+multiline_newline_test/05: MissingCompileTimeError
+multiline_newline_test/05r: MissingCompileTimeError
+multiline_newline_test/06: MissingCompileTimeError
+multiline_newline_test/06r: MissingCompileTimeError
+named_parameters_default_eq_test/02: MissingCompileTimeError
+override_field_method1_negative_test: Fail
+override_field_method2_negative_test: Fail
+override_field_method4_negative_test: Fail
+override_field_method5_negative_test: Fail
+override_field_test/01: MissingCompileTimeError
+override_inheritance_mixed_test/01: MissingCompileTimeError
+override_inheritance_mixed_test/02: MissingCompileTimeError
+override_inheritance_mixed_test/03: MissingCompileTimeError
+override_inheritance_mixed_test/04: MissingCompileTimeError
+override_method_with_field_test/01: MissingCompileTimeError
+private_super_constructor_test/01: MissingCompileTimeError
+redirecting_factory_default_values_test/01: MissingCompileTimeError
+redirecting_factory_default_values_test/02: MissingCompileTimeError
+regress_20394_test/01: MissingCompileTimeError
regress_22976_test/*: CompileTimeError # Issue 31935
+regress_27617_test/1: MissingCompileTimeError
+regress_28217_test/01: MissingCompileTimeError
+regress_28217_test/none: MissingCompileTimeError
+setter_override_test/00: MissingCompileTimeError
+setter_override_test/03: MissingCompileTimeError
+switch_bad_case_test/01: MissingCompileTimeError
+switch_bad_case_test/02: MissingCompileTimeError
+switch_case_test/00: MissingCompileTimeError
+switch_case_test/01: MissingCompileTimeError
+switch_case_test/02: MissingCompileTimeError
+syntax_test/none: CompileTimeError
+try_catch_test/01: MissingCompileTimeError
+type_variable_conflict2_test/02: MissingCompileTimeError
+vm/debug_break_enabled_vm_test/01: CompileTimeError
+vm/debug_break_enabled_vm_test/none: CompileTimeError
+vm/regress_14903_test: CompileTimeError
+vm/regress_27201_test: CompileTimeError
+
+[ $compiler != dart2js && $fasta ]
+arithmetic_test: CompileTimeError
+assertion_initializer_const_function_error_test/01: MissingCompileTimeError
+assign_instance_method_negative_test: Fail
+closure_call_wrong_argument_count_negative_test: Fail
+compile_time_constant_c_test/02: MissingCompileTimeError
+const_conditional_test/08: MissingCompileTimeError
+const_constructor_nonconst_field_test/01: MissingCompileTimeError
+const_error_multiply_initialized_test/01: MissingCompileTimeError
+const_error_multiply_initialized_test/03: MissingCompileTimeError
+const_native_factory_test/01: MissingCompileTimeError
+const_optional_args_negative_test: Fail
+const_syntax_test/05: MissingCompileTimeError
+const_syntax_test/08: MissingCompileTimeError
+const_syntax_test/09: MissingCompileTimeError
+const_syntax_test/10: MissingCompileTimeError
+constructor3_negative_test: Fail
+constructor_call_wrong_argument_count_negative_test: Fail
+deferred_constraints_constants_test/default_argument2: MissingCompileTimeError
+deopt_inlined_function_lazy_test: CompileTimeError
+duplicate_interface_negative_test: Fail
+export_ambiguous_main_negative_test: Fail
+field3a_negative_test: Fail
+field_method4_negative_test: Fail
+final_syntax_test/09: MissingCompileTimeError
+function_type_parameter2_negative_test: Fail
+function_type_parameter_negative_test: Fail
+guess_cid_test: CompileTimeError
+import_combinators_negative_test: Fail
+instance_call_wrong_argument_count_negative_test: Fail
+instance_method2_negative_test: Fail
+instance_method_negative_test: Fail
+int2_test: CompileTimeError
+interface_static_non_final_fields_negative_test: Fail
+mint_compares_test: CompileTimeError
+no_such_method_negative_test: Fail
+number_identity_test: CompileTimeError
+prefix10_negative_test: Fail
+prefix11_negative_test: Fail
+prefix12_negative_test: Fail
+prefix1_negative_test: Fail
+prefix2_negative_test: Fail
+prefix3_negative_test: Fail
+prefix4_negative_test: Fail
+prefix6_negative_test: Fail
+prefix8_negative_test: Fail
+private_member1_negative_test: Fail
+private_member2_negative_test: Fail
+private_member3_negative_test: Fail
+static_call_wrong_argument_count_negative_test: Fail
+switch4_negative_test: Crash
+type_variable_static_context_negative_test: Fail
+unresolved_in_factory_negative_test: Fail
+unresolved_top_level_method_negative_test: Fail
+unresolved_top_level_var_negative_test: Fail
# We skip all the Dart 1.0 tests in dartk and dartkp mode as these
# modes are intended only for Dart 2.0 with strong mode enabled.
[ $compiler == dartk || $compiler == dartkp ]
*: Skip
+
diff --git a/tests/language_2/extract_type_arguments_test.dart b/tests/language_2/extract_type_arguments_test.dart
index e63bbf3..ee6d405 100644
--- a/tests/language_2/extract_type_arguments_test.dart
+++ b/tests/language_2/extract_type_arguments_test.dart
@@ -83,73 +83,15 @@
class Two<A, B> {}
-// Implementing Iterable from scratch is kind of a chore, but ensures the API
-// works even if the class never bottoms out on a concrete class defining in a
-// "dart:" library.
class CustomIterable implements Iterable<String> {
- bool any(Function test) => throw new UnimplementedError();
- bool contains(Object element) => throw new UnimplementedError();
- String elementAt(int index) => throw new UnimplementedError();
- bool every(Function test) => throw new UnimplementedError();
- Iterable<T> expand<T>(Function f) => throw new UnimplementedError();
- String get first => throw new UnimplementedError();
- String firstWhere(Function test, {Function orElse}) =>
- throw new UnimplementedError();
- T fold<T>(T initialValue, Function combine) => throw new UnimplementedError();
- void forEach(Function f) => throw new UnimplementedError();
- bool get isEmpty => throw new UnimplementedError();
- bool get isNotEmpty => throw new UnimplementedError();
- Iterator<String> get iterator => throw new UnimplementedError();
- String join([String separator = ""]) => throw new UnimplementedError();
- String get last => throw new UnimplementedError();
- String lastWhere(Function test, {Function orElse}) =>
- throw new UnimplementedError();
- int get length => throw new UnimplementedError();
- Iterable<T> map<T>(Function f) => throw new UnimplementedError();
- String reduce(Function combine) => throw new UnimplementedError();
- String get single => throw new UnimplementedError();
- String singleWhere(Function test) => throw new UnimplementedError();
- Iterable<String> skip(int count) => throw new UnimplementedError();
- Iterable<String> skipWhile(Function test) => throw new UnimplementedError();
- Iterable<String> take(int count) => throw new UnimplementedError();
- Iterable<String> takeWhile(Function test) => throw new UnimplementedError();
- List<String> toList({bool growable: true}) => throw new UnimplementedError();
- Set<String> toSet() => throw new UnimplementedError();
- Iterable<String> where(Function test) => throw new UnimplementedError();
+ noSuchMethod(i) => throw new UnimplementedError();
}
class CustomMap implements Map<int, bool> {
- bool operator [](Object key) => throw new UnimplementedError();
- void operator []=(int key, bool value) => throw new UnimplementedError();
- void addAll(Map<int, bool> other) => throw new UnimplementedError();
- void clear() => throw new UnimplementedError();
- bool containsKey(Object key) => throw new UnimplementedError();
- bool containsValue(Object value) => throw new UnimplementedError();
- void forEach(Function f) => throw new UnimplementedError();
- bool get isEmpty => throw new UnimplementedError();
- bool get isNotEmpty => throw new UnimplementedError();
- Iterable<int> get keys => throw new UnimplementedError();
- int get length => throw new UnimplementedError();
- bool putIfAbsent(int key, Function ifAbsent) =>
- throw new UnimplementedError();
- bool remove(Object key) => throw new UnimplementedError();
- Iterable<bool> get values => throw new UnimplementedError();
+ noSuchMethod(i) => throw new UnimplementedError();
}
// Note: Flips order of type parameters.
class FlippedMap<V, K> implements Map<K, V> {
- V operator [](Object key) => throw new UnimplementedError();
- void operator []=(K key, V value) => throw new UnimplementedError();
- void addAll(Map<K, V> other) => throw new UnimplementedError();
- void clear() => throw new UnimplementedError();
- bool containsKey(Object key) => throw new UnimplementedError();
- bool containsValue(Object value) => throw new UnimplementedError();
- void forEach(Function f) => throw new UnimplementedError();
- bool get isEmpty => throw new UnimplementedError();
- bool get isNotEmpty => throw new UnimplementedError();
- Iterable<K> get keys => throw new UnimplementedError();
- int get length => throw new UnimplementedError();
- V putIfAbsent(K key, Function ifAbsent) => throw new UnimplementedError();
- V remove(Object key) => throw new UnimplementedError();
- Iterable<V> get values => throw new UnimplementedError();
+ noSuchMethod(i) => throw new UnimplementedError();
}
diff --git a/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_named_test.dart
index 05f81c4..d3f7601 100644
--- a/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_named_test.dart
+++ b/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_named_test.dart
@@ -28,7 +28,7 @@
var c2 = (const [C<int>.named(42)])[0]; // List element.
var c3 = (const {C<int>.named(42): 0}).keys.first; // Map key.
var c4 = (const {0: C<int>.named(42)}).values.first; // Map value.
- var c5 = (const C(C<int>.named(42))).x; // Constructor argument.
+ var c5 = (const C.named(C<int>.named(42))).x; // Constructor argument.
Expect.identical(c0, c1);
Expect.identical(c0, c2);
@@ -46,7 +46,7 @@
// Annotation argument.
// (Cannot check that it's const, just that it's accepted).
- @C(C<int>.named(42))
+ @C.named(C<int>.named(42))
void foo() {}
foo(); // avoid "unused" hints.
-}
\ No newline at end of file
+}
diff --git a/tests/language_2/implicit_creation/implicit_const_context_constructor_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_constructor_named_test.dart
index 54fed54..e523ca4 100644
--- a/tests/language_2/implicit_creation/implicit_const_context_constructor_named_test.dart
+++ b/tests/language_2/implicit_creation/implicit_const_context_constructor_named_test.dart
@@ -28,7 +28,7 @@
var c2 = (const [C.named(42)])[0]; // List element.
var c3 = (const {C.named(42): 0}).keys.first; // Map key.
var c4 = (const {0: C.named(42)}).values.first; // Map value.
- var c5 = (const C(C.named(42))).x; // Constructor argument.
+ var c5 = (const C.named(C.named(42))).x; // Constructor argument.
Expect.identical(c0, c1);
Expect.identical(c0, c2);
@@ -48,7 +48,7 @@
// Annotation argument.
// (Cannot check that it's const, just that it's accepted).
- @C(C.named(42))
+ @C.named(C.named(42))
void foo() {}
foo(); // avoid "unused" hints.
}
diff --git a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_named_test.dart
index 7115352..4ab25f6 100644
--- a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_named_test.dart
+++ b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_named_test.dart
@@ -4,7 +4,7 @@
import "package:expect/expect.dart";
-import "implicit_const_context_prefix_construct_generic_named_test.dart"
+import "implicit_const_context_prefix_constructor_generic_named_test.dart"
as prefix;
// Test that constructor invocations are constant
@@ -31,7 +31,7 @@
var c2 = (const [prefix.C<int>.named(42)])[0]; // List element.
var c3 = (const {prefix.C<int>.named(42): 0}).keys.first; // Map key.
var c4 = (const {0: prefix.C<int>.named(42)}).values.first; // Map value.
- var c5 = (const C(prefix.C<int>.named(42))).x; // Constructor argument.
+ var c5 = (const C.named(prefix.C<int>.named(42))).x; // Constructor argument.
Expect.identical(c0, c1);
Expect.identical(c0, c2);
@@ -49,7 +49,7 @@
// Annotation argument.
// (Cannot check that it's const, just that it's accepted).
- @C(prefix.C<int>.named(42))
+ @C.named(prefix.C<int>.named(42))
void foo() {}
foo(); // avoid "unused" hints.
-}
\ No newline at end of file
+}
diff --git a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_named_test.dart
index 4990bb8..a865f0f 100644
--- a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_named_test.dart
+++ b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_named_test.dart
@@ -30,7 +30,7 @@
var c2 = (const [prefix.C.named(42)])[0]; // List element.
var c3 = (const {prefix.C.named(42): 0}).keys.first; // Map key.
var c4 = (const {0: prefix.C.named(42)}).values.first; // Map value.
- var c5 = (const C(prefix.C.named(42))).x; // Constructor argument.
+ var c5 = (const C.named(prefix.C.named(42))).x; // Constructor argument.
Expect.identical(c0, c1);
Expect.identical(c0, c2);
@@ -50,7 +50,7 @@
// Annotation argument.
// (Cannot check that it's const, just that it's accepted).
- @C(prefix.C.named(42))
+ @C.named(prefix.C.named(42))
void foo() {}
foo(); // avoid "unused" hints.
}
diff --git a/tests/language_2/implicit_creation/implicit_new_constructor_generic_named_test.dart b/tests/language_2/implicit_creation/implicit_new_constructor_generic_named_test.dart
index 45dc880..a05d29c 100644
--- a/tests/language_2/implicit_creation/implicit_new_constructor_generic_named_test.dart
+++ b/tests/language_2/implicit_creation/implicit_new_constructor_generic_named_test.dart
@@ -4,7 +4,7 @@
import "package:expect/expect.dart";
-import "implicit_new_generic_class_test.dart" as prefix;
+import "implicit_new_constructor_generic_named_test.dart" as prefix;
// Test that an omitted `new` is allowed for a generic constructor invocation.
diff --git a/tests/language_2/implicit_creation/implicit_new_constructor_generic_test.dart b/tests/language_2/implicit_creation/implicit_new_constructor_generic_test.dart
index 4621a7c..8994682 100644
--- a/tests/language_2/implicit_creation/implicit_new_constructor_generic_test.dart
+++ b/tests/language_2/implicit_creation/implicit_new_constructor_generic_test.dart
@@ -4,7 +4,7 @@
import "package:expect/expect.dart";
-import "implicit_new_generic_class_test.dart" as prefix;
+import "implicit_new_constructor_generic_test.dart" as prefix;
// Test that an omitted `new` is allowed for a generic constructor invocation.
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index fea64fd..3e36e64 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -22,10 +22,10 @@
stacktrace_demangle_ctors_test: SkipByDesign # Names are not scrubbed.
type_checks_in_factory_method_test: SkipByDesign # Requires checked mode.
-[ $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp && $strong ]
+[ $compiler != dart2js && $compiler != dartdevc && !$fasta && $strong ]
type_promotion_functions_test: CompileTimeError # Issue 30895: This test requires a complete rewrite for 2.0.
-[ $compiler != dart2js && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp && $strong ]
+[ $compiler != dart2js && !$fasta && $strong ]
compile_time_constant_static5_test/11: CompileTimeError # Issue 30546
compile_time_constant_static5_test/16: CompileTimeError # Issue 30546
compile_time_constant_static5_test/21: CompileTimeError # Issue 30546
@@ -231,9 +231,6 @@
[ $compiler == app_jit || $compiler == none ]
library_env_test/has_no_mirror_support: RuntimeError, OK
-[ $runtime == dart_precompiled || $runtime == flutter || $runtime == vm ]
-cyclic_type_test/03: Pass, Fail, Crash # Issue 31944
-
[ $hot_reload || $hot_reload_rollback ]
cha_deopt1_test: Crash # Requires deferred libraries
cha_deopt2_test: Crash # Requires deferred libraries
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index 29ec35a..d231e1f 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -1651,6 +1651,15 @@
malformed_test/23: MissingCompileTimeError
malformed_test/24: MissingCompileTimeError
malformed_type_test: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/03: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_test/06: MissingCompileTimeError
+mixin_type_parameter_inference_test/07: MissingCompileTimeError
+mixin_type_parameter_inference_test/11: MissingCompileTimeError
+mixin_type_parameter_inference_test/14: MissingCompileTimeError
+mixin_type_parameter_inference_test/15: MissingCompileTimeError
multiple_interface_inheritance_test: StaticWarning # Issue 30552
named_parameters_test/01: MissingCompileTimeError
named_parameters_test/02: MissingCompileTimeError
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index 16de69c..29af3d6 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -32,6 +32,7 @@
[ $compiler == dart2js && $runtime == d8 && $dart2js_with_kernel ]
assertion_test: RuntimeError
+implicit_creation/implicit_new_constructor_generic_test: Pass
[ $compiler == dart2js && $runtime == drt && $checked && !$dart2js_with_kernel ]
regress_30339_test: RuntimeError # Issue 30393
@@ -319,6 +320,21 @@
mixin_forwarding_constructor4_test/01: MissingCompileTimeError # Issue 15101
mixin_forwarding_constructor4_test/02: MissingCompileTimeError # Issue 15101
mixin_forwarding_constructor4_test/03: MissingCompileTimeError # Issue 15101
+mixin_type_parameter_inference_error_test/none: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/01: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/none: CompileTimeError
+mixin_type_parameter_inference_test/01: CompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/08: CompileTimeError
+mixin_type_parameter_inference_test/09: CompileTimeError
+mixin_type_parameter_inference_test/10: CompileTimeError
+mixin_type_parameter_inference_test/12: CompileTimeError
+mixin_type_parameter_inference_test/13: CompileTimeError
+mixin_type_parameter_inference_test/16: CompileTimeError
+mixin_type_parameter_inference_test/none: CompileTimeError
not_enough_positional_arguments_test/00: MissingCompileTimeError
not_enough_positional_arguments_test/03: MissingCompileTimeError
not_enough_positional_arguments_test/06: MissingCompileTimeError
@@ -904,6 +920,21 @@
instantiate_tearoff_after_contravariance_check_test: RuntimeError
instantiate_tearoff_of_call_test: RuntimeError
instantiate_tearoff_test: RuntimeError
+mixin_type_parameter_inference_error_test/none: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/01: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/none: CompileTimeError
+mixin_type_parameter_inference_test/01: CompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/08: CompileTimeError
+mixin_type_parameter_inference_test/09: CompileTimeError
+mixin_type_parameter_inference_test/10: CompileTimeError
+mixin_type_parameter_inference_test/12: CompileTimeError
+mixin_type_parameter_inference_test/13: CompileTimeError
+mixin_type_parameter_inference_test/16: CompileTimeError
+mixin_type_parameter_inference_test/none: CompileTimeError
[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup && $strong ]
assertion_initializer_const_error2_test/none: CompileTimeError
@@ -1338,112 +1369,37 @@
argument_assignability_function_typed_test/05: RuntimeError
assertion_initializer_test: CompileTimeError
assertion_test: RuntimeError
-async_and_or_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_catch_regression_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_foreign_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a03b: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a05b: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a11c: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a11d: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a12g: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b11c: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b11d: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b12g: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c10a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_await_syntax_test/c10a: MissingCompileTimeError
async_await_syntax_test/d08b: MissingCompileTimeError
-async_await_syntax_test/d09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d10a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_await_syntax_test/d10a: MissingCompileTimeError
async_await_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/03: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_break_in_finally_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_call_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_cascade_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_local_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_method_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_top_level_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_unnamed_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_body: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_condition: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_init: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_update: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_control_structures_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_finally_rethrow_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_congruence_local_test/none: RuntimeError
+async_congruence_method_test/none: RuntimeError
+async_congruence_top_level_test: RuntimeError
+async_congruence_unnamed_test/none: RuntimeError
async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
-async_regression_23058_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_rethrow_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/nestedFuture: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/tooManyTypeParameters: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/wrongReturnType: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_return_types_test/nestedFuture: MissingCompileTimeError
+async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
+async_return_types_test/wrongReturnType: MissingCompileTimeError
async_star_await_pauses_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_cancel_and_throw_in_finally_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_cancel_while_paused_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_no_cancel2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_no_cancel_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_pause_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_star_cancel_while_paused_test: RuntimeError
async_star_regression_2238_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_regression_23116_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_regression_fisk_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_star_stream_take_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_take_reyield_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_star_test/01: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/02: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/03: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/04: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/05: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/none: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
-async_switch_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_switch_test/withDefault: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_this_bound_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_throw_in_catch_test/forceAwait: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_throw_in_catch_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_concat_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
asyncstar_throw_in_catch_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_yield_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_yieldstar_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_and_ifnull_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_backwards_compatibility_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_exceptions_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_for_cancel_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
await_for_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_for_use_local_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_future_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_in_cascade_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_nonfuture_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
await_not_started_immediately_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_null_aware_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_postfix_expr_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_regression_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_started_immediately_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
bad_named_parameters2_test/01: MissingCompileTimeError
bad_named_parameters_test/01: MissingCompileTimeError
bad_named_parameters_test/02: MissingCompileTimeError
@@ -1469,9 +1425,6 @@
call_with_no_such_method_test: CompileTimeError
callable_test/none: CompileTimeError
canonical_const2_test: RuntimeError
-cha_deopt1_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-cha_deopt2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-cha_deopt3_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
check_member_static_test/01: MissingCompileTimeError
check_member_static_test/02: MissingCompileTimeError
class_cycle_test/02: MissingCompileTimeError
@@ -1479,7 +1432,6 @@
class_literal_static_test/01: MissingCompileTimeError
class_literal_static_test/03: MissingCompileTimeError
class_literal_static_test/07: MissingCompileTimeError
-classes_static_method_clash_test: RuntimeError
closure_in_constructor_test: RuntimeError
closure_invoked_through_interface_target_field_test: MissingCompileTimeError
closure_invoked_through_interface_target_getter_test: MissingCompileTimeError
@@ -1545,9 +1497,7 @@
covariant_subtyping_unsafe_call2_test: RuntimeError
covariant_subtyping_unsafe_call3_test: RuntimeError
ct_const_test: CompileTimeError
-custom_await_stack_trace_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
cyclic_constructor_test/01: Crash # Issue 30856
-cyclic_default_values_test: RuntimeError
cyclic_type_variable_test/01: MissingCompileTimeError
cyclic_type_variable_test/02: MissingCompileTimeError
cyclic_type_variable_test/03: MissingCompileTimeError
@@ -1556,43 +1506,17 @@
cyclic_typedef_test/11: Crash # Stack Overflow
default_factory2_test/01: MissingCompileTimeError
default_factory_test/01: MissingCompileTimeError
-deferred_closurize_load_library_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constant_list_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_constraints_constants_test/none: CompileTimeError
deferred_constraints_constants_test/reference_after_load: CompileTimeError
-deferred_constraints_type_annotation_test/new: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/new_generic1: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/static_method: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/type_annotation_non_deferred: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_function_type_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_global_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_import_core_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_inheritance_constraints_test/extends: MissingCompileTimeError
deferred_inheritance_constraints_test/implements: MissingCompileTimeError
deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
-deferred_inlined_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_load_constants_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_load_inval_code_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_load_library_wrong_args_test/01: CompileTimeError
-deferred_load_library_wrong_args_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_mixin_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_no_such_method_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_not_loaded_check_test: RuntimeError
-deferred_only_constant_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_optimized_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_redirecting_factory_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_regression_22995_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_regression_28678_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_shadow_load_library_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+deferred_redirecting_factory_test: RuntimeError
deferred_shared_and_unshared_classes_test: CompileTimeError
-deferred_static_seperate_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_super_dependency_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/as: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/is: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/type_annotation: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+deferred_type_dependency_test/type_annotation: RuntimeError
double_int_to_string_test: RuntimeError
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
@@ -1628,19 +1552,10 @@
field_override4_test/02: MissingCompileTimeError
field_override_test/00: MissingCompileTimeError
field_override_test/01: MissingCompileTimeError
-flatten_test/01: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/03: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/04: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/05: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/06: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/07: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/08: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/09: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/10: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/11: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/12: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+flatten_test/05: MissingRuntimeError
+flatten_test/08: MissingRuntimeError
+flatten_test/09: MissingRuntimeError
+flatten_test/12: MissingRuntimeError
full_stacktrace1_test: RuntimeError
full_stacktrace2_test: RuntimeError
full_stacktrace3_test: RuntimeError
@@ -1682,7 +1597,7 @@
function_subtype_typearg2_test: RuntimeError
function_subtype_typearg3_test: RuntimeError
function_subtype_typearg5_test: RuntimeError
-function_type2_test: RuntimeError
+function_type2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(B.T) in (local(B.#)) for j:signature(B_closure.$signature).
function_type_alias2_test: RuntimeError
function_type_alias3_test: RuntimeError
function_type_alias4_test: RuntimeError
@@ -1690,8 +1605,6 @@
function_type_call_getter2_test/none: RuntimeError
function_type_test: RuntimeError
fuzzy_arrows_test/03: RuntimeError
-generic_async_star_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-generic_async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
generic_closure_test/01: RuntimeError
generic_closure_test/none: RuntimeError
generic_field_mixin6_test/none: RuntimeError
@@ -1699,9 +1612,11 @@
generic_function_dcall_test: Crash # Unsupported operation: Unsupported type parameter type node T.
generic_function_type_as_type_argument_test/01: MissingCompileTimeError
generic_function_type_as_type_argument_test/02: MissingCompileTimeError
+generic_function_type_as_type_argument_test/03: RuntimeError
generic_function_typedef_test/01: RuntimeError
generic_instanceof_test: RuntimeError
generic_method_types_test/02: RuntimeError
+generic_method_types_test/03: RuntimeError
generic_methods_bounds_test/01: MissingCompileTimeError
generic_methods_bounds_test/02: MissingRuntimeError
generic_methods_dynamic_test/02: MissingRuntimeError
@@ -1713,6 +1628,7 @@
generic_methods_optional_parameters_test: RuntimeError
generic_methods_overriding_test/01: MissingCompileTimeError
generic_methods_recursive_bound_test/02: MissingCompileTimeError
+generic_methods_recursive_bound_test/03: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/metadata_collector.dart': Failed assertion: line 100 pos 12: 'isBound': is not true.
generic_methods_simple_as_expression_test/02: MissingRuntimeError
generic_methods_tearoff_specialization_test: Crash # Assertion failure: kind=special,memberName=instantiate,callStructure:CallStructure(arity=0, types=1)
generic_methods_type_expression_test: RuntimeError
@@ -1721,6 +1637,7 @@
generic_no_such_method_dispatcher_test: CompileTimeError
generic_tearoff_test: CompileTimeError
generic_test: RuntimeError
+generic_typedef_test: RuntimeError
getter_override2_test/02: MissingCompileTimeError
getter_override_test/00: MissingCompileTimeError
getter_override_test/01: MissingCompileTimeError
@@ -1767,15 +1684,13 @@
invocation_mirror_test: CompileTimeError
issue18628_2_test/01: MissingCompileTimeError
issue21079_test: CompileTimeError
-issue23244_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+issue23244_test: RuntimeError
issue31596_override_test/07: MissingCompileTimeError
issue31596_override_test/08: MissingCompileTimeError
issue31596_super_test/01: CompileTimeError
issue31596_super_test/03: CompileTimeError
-issue_1751477_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
issue_25671a_test/01: CompileTimeError
issue_25671b_test/01: CompileTimeError
-known_identifier_usage_error_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
left_shift_test: RuntimeError
library_env_test/has_mirror_support: RuntimeError
library_env_test/has_no_html_support: RuntimeError
@@ -1953,6 +1868,7 @@
null_test/none: CompileTimeError
number_identity2_test: RuntimeError
numbers_test: RuntimeError
+operator2_negative_test: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
operator4_test: RuntimeError
operator_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
optional_named_parameters_test/02: MissingCompileTimeError
@@ -2029,36 +1945,21 @@
regress_13462_0_test: CompileTimeError
regress_13462_1_test: CompileTimeError
regress_18535_test: CompileTimeError
-regress_22443_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22445_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22579_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22728_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22777_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_23089_test: Crash # Stack Overflow
regress_23408_test: CompileTimeError
-regress_23498_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_23500_test/01: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_23500_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_23500_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_23650_test: RuntimeError
-regress_23996_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_24283_test: RuntimeError
-regress_24935_test/01: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_24935_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_25550_test: CompileTimeError
regress_26175_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_26668_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_26948_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
-regress_27659_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_28255_test: CompileTimeError
-regress_28278_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_29025_test: CompileTimeError
regress_29405_test: CompileTimeError
regress_29784_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in () for j:constructor(A.ok).
regress_29784_test/02: MissingCompileTimeError # Issue 29784
regress_30339_test: CompileTimeError
regress_31591_test: RuntimeError
+regress_32012_test: Crash # Unsupported operation: Unsupported type parameter type node B.
runtime_type_function_test: RuntimeError
setter4_test: MissingCompileTimeError
setter_no_getter_call_test/01: CompileTimeError
@@ -2067,7 +1968,6 @@
setter_override_test/01: MissingCompileTimeError
setter_override_test/02: MissingCompileTimeError
setter_override_test/03: MissingCompileTimeError
-shadow_parameter_and_local_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
stacktrace_demangle_ctors_test: RuntimeError # Issue 12698
stacktrace_rethrow_error_test/none: RuntimeError
stacktrace_rethrow_error_test/withtraceparameter: RuntimeError
@@ -2080,12 +1980,6 @@
super_bound_closure_test/none: CompileTimeError
super_call4_test: CompileTimeError
super_getter_setter_test: CompileTimeError
-super_in_async1_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async3_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async4_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async5_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async6_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
super_no_such_method1_test: CompileTimeError
super_no_such_method2_test: CompileTimeError
super_no_such_method3_test: CompileTimeError
@@ -2103,8 +1997,28 @@
switch_case_test/02: MissingCompileTimeError
sync_generator2_test/41: Crash # 'file:*/pkg/compiler/lib/src/kernel/element_map_impl.dart': Failed assertion: line 939 pos 18: 'asyncMarker == AsyncMarker.SYNC': is not true.
sync_generator2_test/52: Crash # 'file:*/pkg/compiler/lib/src/kernel/element_map_impl.dart': Failed assertion: line 939 pos 18: 'asyncMarker == AsyncMarker.SYNC': is not true.
-sync_generator2_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-syncstar_yieldstar_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+syntax_test/04: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/05: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/06: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/07: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/08: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/09: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/10: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/11: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/13: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/14: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/15: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/16: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/17: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/18: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/19: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/20: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/21: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/22: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/23: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/24: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/25: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+syntax_test/26: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
syntax_test/28: MissingCompileTimeError
syntax_test/29: MissingCompileTimeError
syntax_test/30: MissingCompileTimeError
@@ -2145,7 +2059,6 @@
type_variable_nested_test/01: RuntimeError
type_variable_promotion_test: RuntimeError
typevariable_substitution2_test/02: RuntimeError
-unused_overridden_async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/async_await_catch_stacktrace_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/causal_async_exception_stack2_test: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
vm/causal_async_exception_stack_test: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
@@ -2157,15 +2070,13 @@
vm/no_such_method_error_message_callable_vm_test: RuntimeError
vm/no_such_method_error_message_vm_test: RuntimeError
vm/optimization_test: RuntimeError
-vm/optimized_await_regress_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/optimized_guarded_field_isolates_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/optimized_list_constructor_test: RuntimeError
vm/reflect_core_vm_test: CompileTimeError
vm/regress_22480_test: RuntimeError
vm/regress_23238_test: RuntimeError
vm/regress_27201_test: CompileTimeError
-vm/regress_28325_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-vm/regress_29145_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+vm/regress_28325_test: RuntimeError
vm/store_to_load_forwarding_phis_vm_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/type_cast_vm_test: RuntimeError
vm/type_vm_test/28: MissingRuntimeError
@@ -2218,7 +2129,6 @@
void_type_usage_test/paren_null_equals2: Crash # 'package:front_end/src/fasta/type_inference/type_schema_environment.dart': Failed assertion: line 214 pos 12: 'false': is not true.
wrong_number_type_arguments_test/01: MissingCompileTimeError
wrong_number_type_arguments_test/none: Pass
-yieldstar_pause_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
[ $compiler == dart2js && $dart2js_with_kernel && $host_checked && !$strong ]
*: SkipByDesign
@@ -2238,112 +2148,38 @@
argument_assignability_function_typed_test/05: RuntimeError
assertion_initializer_test: CompileTimeError
assertion_test: RuntimeError
-async_and_or_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_catch_regression_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_foreign_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a03b: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a05b: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a11c: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a11d: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a12g: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b11c: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b11d: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/b12g: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/c10a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d01a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d02a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d03a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d05a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d06a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_await_syntax_test/c10a: MissingCompileTimeError
async_await_syntax_test/d08b: MissingCompileTimeError
-async_await_syntax_test/d09a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/d10a: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_await_syntax_test/d10a: MissingCompileTimeError
async_await_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/03: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_break_in_finally_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_call_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_cascade_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_local_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_method_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_top_level_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_unnamed_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_body: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_condition: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_init: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/await_in_update: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_continue_label_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_control_structures_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_finally_rethrow_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_congruence_local_test/none: RuntimeError
+async_congruence_method_test/none: RuntimeError
+async_congruence_top_level_test: RuntimeError
+async_congruence_unnamed_test/none: RuntimeError
+async_error_timing_test: Pass
async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
-async_regression_23058_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_rethrow_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/nestedFuture: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/tooManyTypeParameters: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_return_types_test/wrongReturnType: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_return_types_test/nestedFuture: MissingCompileTimeError
+async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
+async_return_types_test/wrongReturnType: MissingCompileTimeError
async_star_await_pauses_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_cancel_and_throw_in_finally_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_cancel_while_paused_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_no_cancel2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_no_cancel_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_pause_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+async_star_cancel_while_paused_test: RuntimeError
async_star_regression_2238_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_regression_23116_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_regression_fisk_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_star_stream_take_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_take_reyield_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_star_test/01: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/02: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/03: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/04: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/05: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/none: Crash # Wrong number of template arguments, given 2, expected 1
-async_switch_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_switch_test/withDefault: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_this_bound_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_throw_in_catch_test/forceAwait: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_throw_in_catch_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_concat_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
asyncstar_throw_in_catch_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_yield_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_yieldstar_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_and_ifnull_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_backwards_compatibility_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_exceptions_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_for_cancel_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
await_for_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_for_use_local_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_future_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_in_cascade_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_nonfuture_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
await_not_started_immediately_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_null_aware_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_postfix_expr_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_regression_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_started_immediately_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
bad_named_parameters2_test/01: MissingCompileTimeError
bad_named_parameters_test/01: MissingCompileTimeError
bad_named_parameters_test/02: MissingCompileTimeError
@@ -2368,9 +2204,6 @@
call_with_no_such_method_test: CompileTimeError
callable_test/none: CompileTimeError
canonical_const2_test: RuntimeError
-cha_deopt1_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-cha_deopt2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-cha_deopt3_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
check_member_static_test/01: MissingCompileTimeError
check_member_static_test/02: MissingCompileTimeError
class_cycle_test/02: MissingCompileTimeError
@@ -2378,8 +2211,6 @@
class_literal_static_test/01: MissingCompileTimeError
class_literal_static_test/03: MissingCompileTimeError
class_literal_static_test/07: MissingCompileTimeError
-classes_static_method_clash_test: RuntimeError
-closure_in_constructor_test: RuntimeError
closure_invoked_through_interface_target_field_test: MissingCompileTimeError
closure_invoked_through_interface_target_getter_test: MissingCompileTimeError
closure_type_test: RuntimeError
@@ -2443,9 +2274,7 @@
covariant_subtyping_unsafe_call2_test: RuntimeError
covariant_subtyping_unsafe_call3_test: RuntimeError
ct_const_test: CompileTimeError
-custom_await_stack_trace_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
cyclic_constructor_test/01: Crash # Issue 30856
-cyclic_default_values_test: RuntimeError
cyclic_type_variable_test/01: MissingCompileTimeError
cyclic_type_variable_test/02: MissingCompileTimeError
cyclic_type_variable_test/03: MissingCompileTimeError
@@ -2454,43 +2283,17 @@
cyclic_typedef_test/11: Crash # Stack Overflow
default_factory2_test/01: MissingCompileTimeError
default_factory_test/01: MissingCompileTimeError
-deferred_closurize_load_library_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constant_list_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_constraints_constants_test/none: CompileTimeError
deferred_constraints_constants_test/reference_after_load: CompileTimeError
-deferred_constraints_type_annotation_test/new: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/new_generic1: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/static_method: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_constraints_type_annotation_test/type_annotation_non_deferred: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_function_type_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_global_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_import_core_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_inheritance_constraints_test/extends: MissingCompileTimeError
deferred_inheritance_constraints_test/implements: MissingCompileTimeError
deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
-deferred_inlined_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_load_constants_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_load_inval_code_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_load_library_wrong_args_test/01: CompileTimeError
-deferred_load_library_wrong_args_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_mixin_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_no_such_method_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
deferred_not_loaded_check_test: RuntimeError
-deferred_only_constant_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_optimized_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_redirecting_factory_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_regression_22995_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_regression_28678_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_shadow_load_library_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+deferred_redirecting_factory_test: RuntimeError
deferred_shared_and_unshared_classes_test: CompileTimeError
-deferred_static_seperate_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_super_dependency_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/as: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/is: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-deferred_type_dependency_test/type_annotation: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+deferred_type_dependency_test/type_annotation: RuntimeError
double_int_to_string_test: RuntimeError
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
@@ -2527,19 +2330,10 @@
field_override4_test/02: MissingCompileTimeError
field_override_test/00: MissingCompileTimeError
field_override_test/01: MissingCompileTimeError
-flatten_test/01: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/03: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/04: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/05: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/06: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/07: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/08: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/09: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/10: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/11: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/12: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-flatten_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+flatten_test/05: MissingRuntimeError
+flatten_test/08: MissingRuntimeError
+flatten_test/09: MissingRuntimeError
+flatten_test/12: MissingRuntimeError
full_stacktrace1_test: RuntimeError # Issue 12698
full_stacktrace2_test: RuntimeError # Issue 12698
full_stacktrace3_test: RuntimeError # Issue 12698
@@ -2560,7 +2354,6 @@
function_subtype_checked0_test: RuntimeError
function_subtype_closure0_test: RuntimeError
function_subtype_closure1_test: RuntimeError
-function_subtype_factory0_test: RuntimeError
function_subtype_factory1_test: RuntimeError
function_subtype_inline1_test: RuntimeError
function_subtype_inline2_test: RuntimeError
@@ -2581,7 +2374,7 @@
function_subtype_typearg2_test: RuntimeError
function_subtype_typearg3_test: RuntimeError
function_subtype_typearg5_test: RuntimeError
-function_type2_test: RuntimeError
+function_type2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(B.T) in (local(B.#)) for j:signature(B_closure.$signature).
function_type_alias2_test: RuntimeError
function_type_alias3_test: RuntimeError
function_type_alias4_test: RuntimeError
@@ -2589,16 +2382,16 @@
function_type_call_getter2_test/none: RuntimeError
function_type_test: RuntimeError
fuzzy_arrows_test/03: RuntimeError
-generic_async_star_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-generic_async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
generic_field_mixin6_test/none: RuntimeError
generic_function_bounds_test: Crash # Unsupported operation: Unsupported type parameter type node U.
generic_function_dcall_test: RuntimeError
generic_function_type_as_type_argument_test/01: MissingCompileTimeError
generic_function_type_as_type_argument_test/02: MissingCompileTimeError
+generic_function_type_as_type_argument_test/03: RuntimeError
generic_function_typedef_test/01: RuntimeError
generic_instanceof_test: RuntimeError
generic_method_types_test/02: RuntimeError
+generic_method_types_test/03: RuntimeError
generic_methods_bounds_test/01: MissingCompileTimeError
generic_methods_bounds_test/02: MissingRuntimeError
generic_methods_dynamic_test/02: MissingRuntimeError
@@ -2606,10 +2399,10 @@
generic_methods_generic_class_tearoff_test: RuntimeError
generic_methods_generic_function_result_test/01: MissingCompileTimeError
generic_methods_named_parameters_test: RuntimeError
-generic_methods_new_test: RuntimeError
generic_methods_optional_parameters_test: RuntimeError
generic_methods_overriding_test/01: MissingCompileTimeError
generic_methods_recursive_bound_test/02: MissingCompileTimeError
+generic_methods_recursive_bound_test/03: Crash # NoSuchMethodError: The method 'markSeen' was called on null.
generic_methods_simple_as_expression_test/02: MissingRuntimeError
generic_methods_tearoff_specialization_test: RuntimeError
generic_methods_type_expression_test: RuntimeError
@@ -2617,6 +2410,7 @@
generic_no_such_method_dispatcher_simple_test: CompileTimeError
generic_no_such_method_dispatcher_test: CompileTimeError
generic_tearoff_test: CompileTimeError
+generic_typedef_test: RuntimeError
getter_override2_test/02: MissingCompileTimeError
getter_override_test/00: MissingCompileTimeError
getter_override_test/01: MissingCompileTimeError
@@ -2661,15 +2455,13 @@
invocation_mirror_test: CompileTimeError
issue18628_2_test/01: MissingCompileTimeError
issue21079_test: CompileTimeError
-issue23244_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+issue23244_test: RuntimeError
issue31596_override_test/07: MissingCompileTimeError
issue31596_override_test/08: MissingCompileTimeError
issue31596_super_test/01: CompileTimeError
issue31596_super_test/03: CompileTimeError
-issue_1751477_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
issue_25671a_test/01: CompileTimeError
issue_25671b_test/01: CompileTimeError
-known_identifier_usage_error_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
left_shift_test: RuntimeError
library_env_test/has_mirror_support: RuntimeError
library_env_test/has_no_html_support: RuntimeError
@@ -2925,36 +2717,20 @@
regress_13462_1_test: CompileTimeError
regress_18535_test: CompileTimeError
regress_21795_test: RuntimeError
-regress_22443_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22445_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22579_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22728_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_22777_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_23089_test: Crash # Stack Overflow
regress_23408_test: CompileTimeError
-regress_23498_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_23500_test/01: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_23500_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_23500_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_23650_test: RuntimeError
-regress_23996_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_24283_test: RuntimeError, OK # Requires 64 bit numbers.
-regress_24935_test/01: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_24935_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_25550_test: CompileTimeError
regress_26175_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_26668_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-regress_26948_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
-regress_27659_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_28255_test: CompileTimeError
-regress_28278_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
regress_29025_test: CompileTimeError
regress_29405_test: CompileTimeError
regress_29784_test/01: Crash # Issue 29784
regress_29784_test/02: MissingCompileTimeError # Issue 29784
regress_30339_test: CompileTimeError
regress_31591_test: RuntimeError
+regress_32012_test: Crash # Issue 32078
runtime_type_function_test: RuntimeError
setter4_test: MissingCompileTimeError
setter_no_getter_call_test/01: CompileTimeError
@@ -2963,7 +2739,6 @@
setter_override_test/01: MissingCompileTimeError
setter_override_test/02: MissingCompileTimeError
setter_override_test/03: MissingCompileTimeError
-shadow_parameter_and_local_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
stack_trace_test: RuntimeError
stacktrace_demangle_ctors_test: RuntimeError # Issue 12698
stacktrace_rethrow_error_test/none: RuntimeError # Issue 12698
@@ -2977,12 +2752,6 @@
super_bound_closure_test/none: CompileTimeError
super_call4_test: CompileTimeError
super_getter_setter_test: CompileTimeError
-super_in_async1_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async2_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async3_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async4_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async5_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-super_in_async6_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
super_no_such_method1_test: CompileTimeError
super_no_such_method2_test: CompileTimeError
super_no_such_method3_test: CompileTimeError
@@ -2999,8 +2768,6 @@
switch_case_test/01: MissingCompileTimeError
switch_case_test/02: MissingCompileTimeError
symbol_conflict_test: RuntimeError
-sync_generator2_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-syncstar_yieldstar_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
syntax_test/28: MissingCompileTimeError
syntax_test/29: MissingCompileTimeError
syntax_test/30: MissingCompileTimeError
@@ -3013,7 +2780,6 @@
type_error_test: RuntimeError
type_literal_prefix_call_test/00: MissingCompileTimeError
type_literal_test: RuntimeError
-type_parameter_test/none: RuntimeError
type_promotion_functions_test/02: CompileTimeError
type_promotion_functions_test/03: CompileTimeError
type_promotion_functions_test/04: CompileTimeError
@@ -3036,12 +2802,9 @@
type_variable_bounds_test/06: MissingCompileTimeError
type_variable_bounds_test/08: MissingCompileTimeError
type_variable_bounds_test/11: MissingCompileTimeError
-type_variable_closure2_test: RuntimeError
-type_variable_closure4_test: RuntimeError
type_variable_nested_test/01: RuntimeError
type_variable_promotion_test: RuntimeError
typevariable_substitution2_test/02: RuntimeError
-unused_overridden_async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/async_await_catch_stacktrace_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/causal_async_exception_stack2_test: Crash # Wrong number of template arguments, given 2, expected 1
vm/causal_async_exception_stack_test: Crash # Wrong number of template arguments, given 2, expected 1
@@ -3053,15 +2816,13 @@
vm/no_such_method_error_message_callable_vm_test: RuntimeError
vm/no_such_method_error_message_vm_test: RuntimeError
vm/optimization_test: RuntimeError
-vm/optimized_await_regress_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/optimized_guarded_field_isolates_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/optimized_list_constructor_test: RuntimeError
vm/reflect_core_vm_test: CompileTimeError
vm/regress_22480_test: RuntimeError
vm/regress_23238_test: RuntimeError
vm/regress_27201_test: CompileTimeError
-vm/regress_28325_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-vm/regress_29145_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+vm/regress_28325_test: RuntimeError
vm/store_to_load_forwarding_phis_vm_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/type_cast_vm_test: RuntimeError
vm/type_vm_test/28: MissingRuntimeError
@@ -3078,7 +2839,6 @@
void_type_usage_test/conditional_return_to_void: MissingCompileTimeError
wrong_number_type_arguments_test/01: MissingCompileTimeError
wrong_number_type_arguments_test/none: Pass
-yieldstar_pause_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
[ $compiler == dart2js && $dart2js_with_kernel && $minified && !$strong ]
*: SkipByDesign
@@ -3637,8 +3397,6 @@
malformed_test/23: MissingCompileTimeError
malformed_test/24: MissingCompileTimeError
malformed_type_test: MissingCompileTimeError
-method_name_test: Fail # issue 25574
-method_name_test: Pass
method_override2_test/*: MissingCompileTimeError
method_override2_test/none: Pass
method_override3_test/*: MissingCompileTimeError
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index 6cee575..5e36a0c 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -42,18 +42,11 @@
getter_setter_in_lib_test: CompileTimeError
implicit_creation/implicit_const_context_constructor_generic_named_test: CompileTimeError
implicit_creation/implicit_const_context_constructor_generic_test: CompileTimeError
-implicit_creation/implicit_const_context_constructor_named_test: CompileTimeError
-implicit_creation/implicit_const_context_list_test: CompileTimeError
-implicit_creation/implicit_const_context_map_test: CompileTimeError
implicit_creation/implicit_const_context_prefix_constructor_generic_named_test: CompileTimeError
implicit_creation/implicit_const_context_prefix_constructor_generic_test: CompileTimeError
-implicit_creation/implicit_const_context_prefix_constructor_named_test: CompileTimeError
-implicit_creation/implicit_new_constructor_generic_named_test: CompileTimeError
-implicit_creation/implicit_new_constructor_generic_test: CompileTimeError
-implicit_creation/implicit_new_or_const_composite_test: CompileTimeError
+implicit_creation/implicit_new_or_const_composite_test: RuntimeError
implicit_creation/implicit_new_or_const_generic_test: RuntimeError
implicit_creation/implicit_new_or_const_test: RuntimeError
-implicit_creation/implicit_new_prefix_constructor_generic_test: CompileTimeError
import_core_prefix_test: CompileTimeError
import_private_test/01: MissingCompileTimeError # Issue 29920
initializing_formal_final_test: MissingCompileTimeError
@@ -78,6 +71,17 @@
mixin_super_2_test/03: MissingCompileTimeError
mixin_supertype_subclass_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/01: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: RuntimeError
+mixin_type_parameter_inference_test/01: CompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/06: MissingCompileTimeError
+mixin_type_parameter_inference_test/07: MissingCompileTimeError
+mixin_type_parameter_inference_test/08: RuntimeError
+mixin_type_parameter_inference_test/09: RuntimeError
mock_writable_final_private_field_test: CompileTimeError # Issue 30848
multiline_newline_test/01: CompileTimeError
multiline_newline_test/01r: CompileTimeError
@@ -120,7 +124,6 @@
try_catch_on_syntax_test/11: MissingCompileTimeError
type_inference_circularity_test: MissingCompileTimeError
type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_literal_prefix_call_test: RuntimeError
type_promotion_functions_test/02: CompileTimeError # Issue 30895
type_promotion_functions_test/03: CompileTimeError # Issue 30895
type_promotion_functions_test/04: CompileTimeError # Issue 30895
@@ -611,6 +614,23 @@
mixin_super_use_test: RuntimeError
mixin_supertype_subclass_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/01: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/02: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: RuntimeError
+mixin_type_parameter_inference_test/01: CompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/06: Crash
+mixin_type_parameter_inference_test/07: Crash
+mixin_type_parameter_inference_test/08: Crash
+mixin_type_parameter_inference_test/09: Crash
+mixin_type_parameter_inference_test/10: Crash
+mixin_type_parameter_inference_test/12: Crash
+mixin_type_parameter_inference_test/13: Crash
+mixin_type_parameter_inference_test/16: Crash
+mixin_type_parameter_inference_test/none: Crash
mixin_type_parameters_errors_test/01: MissingCompileTimeError
mixin_type_parameters_errors_test/02: MissingCompileTimeError
mixin_type_parameters_errors_test/03: MissingCompileTimeError
@@ -812,6 +832,7 @@
[ $compiler == dartdevk && $checked ]
assertion_initializer_const_error2_test/*: MissingCompileTimeError
assertion_initializer_const_error2_test/none: Pass
+implicit_creation/implicit_new_constructor_generic_test: Pass
[ $compiler == dartdevk && !$checked ]
assertion_initializer_const_error2_test/*: SkipByDesign # DDC does not support non-checked mode.
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index 981f39d..20d84c2 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -11,11 +11,124 @@
# to add them.
[ $compiler == dartkp ]
+class_cycle_test/02: MissingCompileTimeError
+class_cycle_test/03: MissingCompileTimeError
+duplicate_implements_test/01: MissingCompileTimeError
+duplicate_implements_test/02: MissingCompileTimeError
+generic_methods_generic_function_result_test/01: MissingCompileTimeError
generic_no_such_method_dispatcher_test: RuntimeError # Issue 31424
+mixin_type_parameter_inference_error_test/01: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/02: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: RuntimeError
+mixin_type_parameter_inference_test/01: CompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/06: MissingCompileTimeError
+mixin_type_parameter_inference_test/07: MissingCompileTimeError
+mixin_type_parameter_inference_test/08: RuntimeError
+mixin_type_parameter_inference_test/09: RuntimeError
mock_writable_final_field_test: RuntimeError # Issue 31424
no_such_method_subtype_test: RuntimeError # Issue 31424
[ $fasta ]
+abstract_factory_constructor_test/00: MissingCompileTimeError # Issue 32013.
+abstract_getter_test/01: MissingCompileTimeError # Issue 32013.
+abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32013.
+abstract_override_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
+abstract_override_adds_optional_args_supercall_test: MissingCompileTimeError # Issue 32014.
+abstract_syntax_test/00: MissingCompileTimeError # Issue 32013.
+additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32014.
+additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
+additional_interface_adds_optional_args_supercall_test: MissingCompileTimeError # Issue 32014.
+async_await_syntax_test/c10a: MissingCompileTimeError
+async_await_syntax_test/d08b: MissingCompileTimeError
+async_await_syntax_test/d10a: MissingCompileTimeError
+async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
+async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
+async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
+async_return_types_test/nestedFuture: MissingCompileTimeError
+async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
+async_return_types_test/wrongReturnType: MissingCompileTimeError
+bad_named_parameters2_test/01: MissingCompileTimeError
+bad_named_parameters_test/01: MissingCompileTimeError
+bad_named_parameters_test/02: MissingCompileTimeError
+bad_named_parameters_test/03: MissingCompileTimeError
+bad_named_parameters_test/04: MissingCompileTimeError
+bad_named_parameters_test/05: MissingCompileTimeError
+bad_override_test/01: MissingCompileTimeError
+bad_override_test/02: MissingCompileTimeError
+built_in_identifier_type_annotation_test/52: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/53: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/54: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/55: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/57: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/58: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/59: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/60: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/61: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/62: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/63: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/64: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/65: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/66: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/67: MissingCompileTimeError # Issue 28814
+built_in_identifier_type_annotation_test/68: MissingCompileTimeError # Issue 28814
+call_non_method_field_test/01: MissingCompileTimeError
+call_non_method_field_test/02: MissingCompileTimeError
+check_member_static_test/01: MissingCompileTimeError
+closure_invoked_through_interface_target_field_test: MissingCompileTimeError
+closure_invoked_through_interface_target_getter_test: MissingCompileTimeError
+compile_time_constant_o_test/01: MissingCompileTimeError
+compile_time_constant_o_test/02: MissingCompileTimeError
+const_constructor2_test/20: MissingCompileTimeError
+const_constructor2_test/22: MissingCompileTimeError
+const_constructor2_test/24: MissingCompileTimeError
+const_dynamic_type_literal_test/02: MissingCompileTimeError
+const_factory_with_body_test/01: MissingCompileTimeError # Fasta bug: Const factory with body.
+const_instance_field_test/01: MissingCompileTimeError # Fasta bug: Const instance field.
+const_map2_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+const_map3_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+const_switch2_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+const_types_test/34: MissingCompileTimeError
+const_types_test/35: MissingCompileTimeError
+const_types_test/39: MissingCompileTimeError
+const_types_test/40: MissingCompileTimeError
+constructor_redirect1_negative_test/01: MissingCompileTimeError
+constructor_redirect2_negative_test: MissingCompileTimeError
+constructor_redirect2_test/01: MissingCompileTimeError # Fasta bug: Body on redirecting constructor.
+constructor_redirect_test/01: MissingCompileTimeError # Fasta bug: Initializer refers to this.
+covariant_subtyping_test: CompileTimeError
+cyclic_constructor_test/01: MissingCompileTimeError # Fasta bug: Cyclic constructor redirection.
+cyclic_type_variable_test/01: MissingCompileTimeError
+cyclic_type_variable_test/02: MissingCompileTimeError
+cyclic_type_variable_test/03: MissingCompileTimeError
+cyclic_type_variable_test/04: MissingCompileTimeError
+default_factory2_test/01: MissingCompileTimeError
+default_factory_test/01: MissingCompileTimeError
+deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
+deferred_inheritance_constraints_test/implements: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
+deferred_inheritance_constraints_test/mixin: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
+deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
+duplicate_export_negative_test: Fail # Issue 6134
+f_bounded_quantification_test/01: MissingCompileTimeError
+f_bounded_quantification_test/02: MissingCompileTimeError
+factory2_test/03: MissingCompileTimeError
+factory4_test/00: MissingCompileTimeError
+field3_test/01: MissingCompileTimeError
+field_method4_test: MissingCompileTimeError
+field_override2_test: MissingCompileTimeError
+field_override_test/00: MissingCompileTimeError
+field_override_test/01: MissingCompileTimeError
+generic_methods_bounds_test/01: MissingCompileTimeError
+generic_methods_overriding_test/01: MissingCompileTimeError
+generic_methods_recursive_bound_test/02: MissingCompileTimeError
+getter_override_test/03: MissingCompileTimeError
+identical_const_test/01: MissingCompileTimeError
+identical_const_test/02: MissingCompileTimeError
+identical_const_test/03: MissingCompileTimeError
+identical_const_test/04: MissingCompileTimeError
implicit_creation/implicit_const_context_constructor_generic_named_test: CompileTimeError
implicit_creation/implicit_const_context_constructor_generic_test: CompileTimeError
implicit_creation/implicit_const_context_constructor_named_test: CompileTimeError
@@ -30,10 +143,154 @@
implicit_creation/implicit_new_constructor_generic_test: CompileTimeError
implicit_creation/implicit_new_or_const_generic_test: CompileTimeError
implicit_creation/implicit_new_prefix_constructor_generic_named_test: CompileTimeError
+implicit_this_test/01: MissingCompileTimeError
+implicit_this_test/04: MissingCompileTimeError
+issue31596_override_test/07: MissingCompileTimeError
+issue31596_override_test/08: MissingCompileTimeError
+issue31596_super_test/02: MissingCompileTimeError
+issue31596_super_test/04: MissingCompileTimeError
+local_function_test/01: MissingCompileTimeError
+local_function_test/02: MissingCompileTimeError
+malbounded_instantiation_test/01: MissingCompileTimeError
+malbounded_instantiation_test/02: MissingCompileTimeError
+malbounded_instantiation_test/03: MissingCompileTimeError
+malbounded_redirecting_factory_test/02: MissingCompileTimeError
+malbounded_redirecting_factory_test/03: MissingCompileTimeError
+malbounded_redirecting_factory_test/04: MissingCompileTimeError
+malbounded_redirecting_factory_test/05: MissingCompileTimeError
+malbounded_type_cast2_test: MissingCompileTimeError
+malbounded_type_cast_test/00: MissingCompileTimeError
+malbounded_type_cast_test/01: MissingCompileTimeError
+malbounded_type_cast_test/02: MissingCompileTimeError
+malbounded_type_literal_test/00: MissingCompileTimeError
+malbounded_type_test2_test/00: MissingCompileTimeError
+malbounded_type_test_test/00: MissingCompileTimeError
+malbounded_type_test_test/01: MissingCompileTimeError
+malbounded_type_test_test/02: MissingCompileTimeError
+method_override7_test/03: MissingCompileTimeError
+method_override8_test/03: MissingCompileTimeError
+mixin_forwarding_constructor4_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
+mixin_forwarding_constructor4_test/02: MissingCompileTimeError # KernelVM bug: Issue 15101
+mixin_forwarding_constructor4_test/03: MissingCompileTimeError # KernelVM bug: Issue 15101
+mixin_invalid_bound2_test/02: MissingCompileTimeError
+mixin_invalid_bound2_test/03: MissingCompileTimeError
+mixin_invalid_bound2_test/04: MissingCompileTimeError
+mixin_invalid_bound2_test/05: MissingCompileTimeError
+mixin_invalid_bound2_test/06: MissingCompileTimeError
+mixin_invalid_bound2_test/07: MissingCompileTimeError
+mixin_invalid_bound2_test/08: MissingCompileTimeError
+mixin_invalid_bound2_test/09: MissingCompileTimeError
+mixin_invalid_bound2_test/10: MissingCompileTimeError
+mixin_invalid_bound2_test/11: MissingCompileTimeError
+mixin_invalid_bound2_test/12: MissingCompileTimeError
+mixin_invalid_bound2_test/13: MissingCompileTimeError
+mixin_invalid_bound2_test/14: MissingCompileTimeError
+mixin_invalid_bound2_test/15: MissingCompileTimeError
+mixin_invalid_bound_test/02: MissingCompileTimeError
+mixin_invalid_bound_test/03: MissingCompileTimeError
+mixin_invalid_bound_test/04: MissingCompileTimeError
+mixin_invalid_bound_test/05: MissingCompileTimeError
+mixin_invalid_bound_test/06: MissingCompileTimeError
+mixin_invalid_bound_test/07: MissingCompileTimeError
+mixin_invalid_bound_test/08: MissingCompileTimeError
+mixin_invalid_bound_test/09: MissingCompileTimeError
+mixin_invalid_bound_test/10: MissingCompileTimeError
+mixin_super_bound_test/01: MissingCompileTimeError
+mixin_super_bound_test/02: MissingCompileTimeError
+mixin_super_constructor_named_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
+mixin_super_constructor_positionals_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
+mixin_type_parameters_errors_test/01: MissingCompileTimeError
+mixin_type_parameters_errors_test/02: MissingCompileTimeError
+mixin_type_parameters_errors_test/03: MissingCompileTimeError
+mixin_type_parameters_errors_test/04: MissingCompileTimeError
+mixin_type_parameters_errors_test/05: MissingCompileTimeError
+named_constructor_test/01: MissingCompileTimeError
+named_parameters_default_eq_test/02: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
+named_parameters_test/02: MissingCompileTimeError
+named_parameters_test/04: MissingCompileTimeError
+named_parameters_test/06: MissingCompileTimeError
+named_parameters_test/08: MissingCompileTimeError
+named_parameters_test/10: MissingCompileTimeError
+nsm5_test: MissingCompileTimeError
+optional_named_parameters_test/02: MissingCompileTimeError
+optional_named_parameters_test/04: MissingCompileTimeError
+optional_named_parameters_test/06: MissingCompileTimeError
+optional_named_parameters_test/08: MissingCompileTimeError
+override_field_test/02: MissingCompileTimeError
+override_field_test/03: MissingCompileTimeError
+override_inheritance_abstract_test/02: MissingCompileTimeError
+override_inheritance_abstract_test/03: MissingCompileTimeError
+override_inheritance_abstract_test/04: MissingCompileTimeError
+override_inheritance_abstract_test/08: MissingCompileTimeError
+override_inheritance_abstract_test/09: MissingCompileTimeError
+override_inheritance_abstract_test/10: MissingCompileTimeError
+override_inheritance_abstract_test/11: MissingCompileTimeError
+override_inheritance_abstract_test/12: MissingCompileTimeError
+override_inheritance_abstract_test/13: MissingCompileTimeError
+override_inheritance_abstract_test/14: MissingCompileTimeError
+override_inheritance_abstract_test/17: MissingCompileTimeError
+override_inheritance_abstract_test/19: MissingCompileTimeError
+override_inheritance_abstract_test/20: MissingCompileTimeError
+override_inheritance_abstract_test/21: MissingCompileTimeError
+override_inheritance_abstract_test/22: MissingCompileTimeError
+override_inheritance_abstract_test/23: MissingCompileTimeError
+override_inheritance_abstract_test/24: MissingCompileTimeError
+override_inheritance_abstract_test/25: MissingCompileTimeError
+override_inheritance_abstract_test/26: MissingCompileTimeError
+override_inheritance_field_test/44: MissingCompileTimeError
+override_inheritance_field_test/47: MissingCompileTimeError
+override_inheritance_field_test/48: MissingCompileTimeError
+override_inheritance_field_test/53: MissingCompileTimeError
+override_inheritance_field_test/54: MissingCompileTimeError
+override_inheritance_mixed_test/06: MissingCompileTimeError
+override_inheritance_mixed_test/07: MissingCompileTimeError
+override_inheritance_mixed_test/09: MissingCompileTimeError
+override_inheritance_no_such_method_test/01: MissingCompileTimeError
+override_inheritance_no_such_method_test/02: MissingCompileTimeError
+override_inheritance_no_such_method_test/05: MissingCompileTimeError
+override_inheritance_no_such_method_test/06: MissingCompileTimeError
+override_inheritance_no_such_method_test/07: MissingCompileTimeError
+override_inheritance_no_such_method_test/09: MissingCompileTimeError
+override_inheritance_no_such_method_test/10: MissingCompileTimeError
+override_inheritance_no_such_method_test/12: MissingCompileTimeError
+override_inheritance_no_such_method_test/13: MissingCompileTimeError
+redirecting_factory_default_values_test/01: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
+redirecting_factory_default_values_test/02: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
regress_22976_test/*: CompileTimeError # Issue 31935
+regress_27617_test/1: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
+regress_29784_test/01: MissingCompileTimeError
+regress_29784_test/02: MissingCompileTimeError
+setter4_test: MissingCompileTimeError # Issue 14736
+setter_override_test/01: MissingCompileTimeError
+setter_override_test/02: MissingCompileTimeError
+switch_bad_case_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+switch_bad_case_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+switch_case_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+switch_case_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+switch_case_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
+syntax_test/28: MissingCompileTimeError
+syntax_test/29: MissingCompileTimeError
+syntax_test/30: MissingCompileTimeError
+syntax_test/31: MissingCompileTimeError
+syntax_test/32: MissingCompileTimeError
+syntax_test/33: MissingCompileTimeError
syntax_test/60: MissingCompileTimeError
syntax_test/61: MissingCompileTimeError
syntax_test/62: MissingCompileTimeError
+type_variable_bounds2_test: MissingCompileTimeError
+type_variable_bounds3_test/00: MissingCompileTimeError
+type_variable_bounds4_test/01: MissingCompileTimeError
+type_variable_bounds_test/01: MissingCompileTimeError
+type_variable_bounds_test/02: MissingCompileTimeError
+type_variable_bounds_test/03: MissingCompileTimeError
+type_variable_bounds_test/04: MissingCompileTimeError
+type_variable_bounds_test/05: MissingCompileTimeError
+type_variable_bounds_test/06: MissingCompileTimeError
+type_variable_bounds_test/08: MissingCompileTimeError
+type_variable_bounds_test/11: MissingCompileTimeError
+vm/debug_break_enabled_vm_test/01: CompileTimeError # KernelVM bug: Bad test using extended break syntax.
+vm/debug_break_enabled_vm_test/none: CompileTimeError # KernelVM bug: Bad test using extended break syntax.
+vm/regress_27201_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
void_type_callbacks_test/00: MissingCompileTimeError
void_type_callbacks_test/01: MissingCompileTimeError
void_type_function_types_test/04: MissingCompileTimeError
@@ -263,6 +520,28 @@
void_type_usage_test/paren_void_init: MissingCompileTimeError
void_type_usage_test/paren_while: MissingCompileTimeError
+[ $arch == simarm && $compiler == dartkp && $strong ]
+await_test: RuntimeError
+
+[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && $compiler == dartk ]
+export_ambiguous_main_test: MissingCompileTimeError
+
+[ $compiler != dart2js && $fasta ]
+compile_time_constant_c_test/02: MissingCompileTimeError
+const_constructor_nonconst_field_test/01: MissingCompileTimeError
+const_optional_args_test/01: MissingCompileTimeError
+const_syntax_test/05: MissingCompileTimeError
+mixin_of_mixin_test/01: MissingCompileTimeError
+mixin_of_mixin_test/02: MissingCompileTimeError
+mixin_of_mixin_test/03: MissingCompileTimeError
+mixin_of_mixin_test/04: MissingCompileTimeError
+mixin_of_mixin_test/05: MissingCompileTimeError
+mixin_of_mixin_test/06: MissingCompileTimeError
+mixin_super_2_test/01: MissingCompileTimeError
+mixin_super_2_test/03: MissingCompileTimeError
+mixin_supertype_subclass_test/02: MissingCompileTimeError
+mixin_supertype_subclass_test/05: MissingCompileTimeError
+
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
bad_named_parameters_test/01: Crash # Issue(http://dartbug.com/31630)
bad_named_parameters_test/02: Crash # Issue(http://dartbug.com/31630)
@@ -288,7 +567,6 @@
deferred_not_loaded_check_test: CompileTimeError
vm/causal_async_exception_stack2_test: SkipByDesign
vm/causal_async_exception_stack_test: SkipByDesign
-vm/regress_27201_test: Fail
vm/type_vm_test/28: MissingRuntimeError
vm/type_vm_test/29: MissingRuntimeError
vm/type_vm_test/30: MissingRuntimeError
@@ -322,9 +600,6 @@
async_await_test/none: RuntimeError
async_return_types_test/nestedFuture: Fail
compile_time_constant_checked_test/02: MissingCompileTimeError
-const_constructor2_test/20: MissingCompileTimeError
-const_constructor2_test/22: MissingCompileTimeError
-const_constructor2_test/24: MissingCompileTimeError
covariance_type_parameter_test/01: RuntimeError
covariance_type_parameter_test/02: RuntimeError
covariance_type_parameter_test/03: RuntimeError
@@ -346,99 +621,38 @@
regress_22728_test: Fail # Dartk Issue 28498
regress_22728_test: RuntimeError
regress_30339_test: RuntimeError
-setter_override_test/01: MissingCompileTimeError
-setter_override_test/02: MissingCompileTimeError
type_variable_bounds4_test/01: RuntimeError
[ $compiler == dartk && $runtime == vm && !$checked && $strong ]
bool_check_test: RuntimeError
bool_condition_check_test: RuntimeError
callable_test/none: RuntimeError
-checked_setter2_test: RuntimeError
-checked_setter_test: RuntimeError
compile_time_constant_static2_test/04: MissingCompileTimeError
compile_time_constant_static3_test/04: MissingCompileTimeError
conditional_rewrite_test: RuntimeError # Issue 31402 (Not)
-covariance_field_test/01: RuntimeError
-covariance_field_test/02: RuntimeError
-covariance_field_test/03: RuntimeError
-covariance_field_test/04: RuntimeError
-covariance_field_test/05: RuntimeError
field_override_optimization_test: RuntimeError
-field_type_check2_test/01: MissingRuntimeError
-function_subtype_setter0_test: RuntimeError
if_null_precedence_test/none: RuntimeError
type_error_test: RuntimeError # Issue 31402 (Variable declaration)
# ===== dartk + vm status lines =====
[ $compiler == dartk && $runtime == vm && $strong ]
-abstract_factory_constructor_test/00: MissingCompileTimeError # Issue 32013.
-abstract_getter_test/01: MissingCompileTimeError # Issue 32013.
-abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32013.
-abstract_override_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
-abstract_override_adds_optional_args_supercall_test: MissingCompileTimeError # Issue 32014.
-abstract_syntax_test/00: MissingCompileTimeError # Issue 32013.
-additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32014.
-additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
-additional_interface_adds_optional_args_supercall_test: MissingCompileTimeError # Issue 32014.
arithmetic2_test: RuntimeError # Throws CastError instead of TypeError
-async_await_syntax_test/c10a: MissingCompileTimeError
-async_await_syntax_test/d08b: MissingCompileTimeError
-async_await_syntax_test/d10a: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
-async_return_types_test/nestedFuture: MissingCompileTimeError
-async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
-async_return_types_test/wrongReturnType: MissingCompileTimeError
async_star_cancel_while_paused_test: RuntimeError
async_star_pause_test: Fail, OK
async_star_test/02: RuntimeError # Issue 31402 (Invocation arguments)
-bad_named_parameters2_test/01: MissingCompileTimeError
-bad_named_parameters_test/01: MissingCompileTimeError
-bad_named_parameters_test/02: MissingCompileTimeError
-bad_named_parameters_test/03: MissingCompileTimeError
-bad_named_parameters_test/04: MissingCompileTimeError
-bad_named_parameters_test/05: MissingCompileTimeError
-bad_override_test/01: MissingCompileTimeError
-bad_override_test/02: MissingCompileTimeError
built_in_identifier_prefix_test: CompileTimeError
built_in_identifier_type_annotation_test/22: DartkCrash # Issue 28814
-built_in_identifier_type_annotation_test/52: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/53: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/54: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/55: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/57: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/58: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/59: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/60: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/61: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/62: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/63: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/64: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/65: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/66: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/67: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/68: MissingCompileTimeError # Issue 28814
call_function2_test: CompileTimeError # Issue 31402 (map literal)
call_function_apply_test: CompileTimeError # Issue 31402 (Invocation arguments)
call_function_test: CompileTimeError
-call_non_method_field_test/01: MissingCompileTimeError
-call_non_method_field_test/02: MissingCompileTimeError
call_with_no_such_method_test: CompileTimeError # Issue 31402 (Invocation arguments)
callable_test/none: CompileTimeError # Issue 31402 (Variable declaration)
cha_deopt1_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
cha_deopt1_test: RuntimeError
-check_member_static_test/01: MissingCompileTimeError
-closure_invoked_through_interface_target_field_test: MissingCompileTimeError
-closure_invoked_through_interface_target_getter_test: MissingCompileTimeError
-compile_time_constant_c_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
compile_time_constant_k_test/01: MissingCompileTimeError
compile_time_constant_k_test/02: MissingCompileTimeError
compile_time_constant_k_test/03: MissingCompileTimeError
-compile_time_constant_o_test/01: MissingCompileTimeError
compile_time_constant_o_test/01: RuntimeError # KernelVM bug: Constant map duplicated key.
-compile_time_constant_o_test/02: MissingCompileTimeError
compile_time_constant_o_test/02: RuntimeError # KernelVM bug: Constant map duplicated key.
compile_time_constant_static5_test/11: CompileTimeError # Issue 31537
compile_time_constant_static5_test/16: CompileTimeError # Issue 31537
@@ -450,51 +664,22 @@
config_import_test: RuntimeError # KernelVM bug: Configurable imports.
const_constructor2_test/11: CompileTimeError # Issue 31402 (Invocation arguments)
const_constructor2_test/12: CompileTimeError # Issue 31402 (Invocation arguments)
-const_constructor2_test/20: MissingCompileTimeError
-const_constructor2_test/22: MissingCompileTimeError
-const_constructor2_test/24: MissingCompileTimeError
-const_constructor_nonconst_field_test/01: MissingCompileTimeError # Fasta bug: Non-const expression in field initializer.
-const_dynamic_type_literal_test/02: MissingCompileTimeError
const_dynamic_type_literal_test/02: RuntimeError # KernelVM bug: Constant map duplicated key.
-const_factory_with_body_test/01: MissingCompileTimeError # Fasta bug: Const factory with body.
-const_instance_field_test/01: MissingCompileTimeError # Fasta bug: Const instance field.
const_list_test: RuntimeError
const_locals_test: RuntimeError
-const_map2_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-const_map3_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
const_map4_test: RuntimeError
const_nested_test: RuntimeError # KernelVM bug: Constant evaluation.
-const_optional_args_test/01: MissingCompileTimeError # Fasta bug: Default parameter values must be const.
const_redirecting_factory_test: CompileTimeError # Issue 31402 (Field declaration)
const_string_test: RuntimeError
-const_switch2_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-const_syntax_test/05: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-const_types_test/34: MissingCompileTimeError
-const_types_test/35: MissingCompileTimeError
-const_types_test/39: MissingCompileTimeError
-const_types_test/40: MissingCompileTimeError
constructor12_test: RuntimeError
constructor3_test: Fail, OK, Pass
-constructor_redirect1_negative_test/01: MissingCompileTimeError
-constructor_redirect2_negative_test: MissingCompileTimeError
-constructor_redirect2_test/01: MissingCompileTimeError # Fasta bug: Body on redirecting constructor.
-constructor_redirect_test/01: MissingCompileTimeError # Fasta bug: Initializer refers to this.
-covariant_subtyping_test: CompileTimeError
-covariant_subtyping_test: RuntimeError
ct_const2_test: Pass, Crash # Flaky
ct_const_test: RuntimeError
-cyclic_constructor_test/01: MissingCompileTimeError # Fasta bug: Cyclic constructor redirection.
cyclic_type2_test: RuntimeError, CompileTimeError
cyclic_type_test/02: RuntimeError, CompileTimeError
cyclic_type_test/04: RuntimeError, CompileTimeError
-cyclic_type_variable_test/01: MissingCompileTimeError
-cyclic_type_variable_test/02: MissingCompileTimeError
-cyclic_type_variable_test/03: MissingCompileTimeError
-cyclic_type_variable_test/04: MissingCompileTimeError
cyclic_typedef_test/10: Crash
cyclic_typedef_test/11: Crash
-default_factory2_test/01: MissingCompileTimeError
-default_factory_test/01: MissingCompileTimeError
deferred_call_empty_before_load_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_closurize_load_library_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_constant_list_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
@@ -509,10 +694,6 @@
deferred_function_type_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_global_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_import_core_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/implements: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/mixin: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
deferred_inlined_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_constants_test/none: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_inval_code_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
@@ -529,29 +710,18 @@
deferred_shadow_load_library_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_shared_and_unshared_classes_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_static_seperate_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
-deferred_super_dependency_test/01: Pass # Passes by mistake. KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/as: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/is: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/none: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/type_annotation: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
disassemble_test: Pass, Slow
-duplicate_export_negative_test: Fail # Issue 6134
dynamic_prefix_core_test/none: CompileTimeError
emit_const_fields_test: CompileTimeError # Issue 31533
example_constructor_test: Fail, OK
external_test/10: MissingRuntimeError # KernelVM bug: Unbound external.
external_test/13: MissingRuntimeError # KernelVM bug: Unbound external.
external_test/20: MissingRuntimeError # KernelVM bug: Unbound external.
-f_bounded_quantification_test/01: MissingCompileTimeError
-f_bounded_quantification_test/02: MissingCompileTimeError
-factory2_test/03: MissingCompileTimeError
-factory4_test/00: MissingCompileTimeError
-field3_test/01: MissingCompileTimeError
field_initialization_order_test: Fail, OK
-field_method4_test: MissingCompileTimeError
-field_override2_test: MissingCompileTimeError
-field_override_test/00: MissingCompileTimeError
-field_override_test/01: MissingCompileTimeError
flatten_test/05: MissingRuntimeError
flatten_test/08: MissingRuntimeError
flatten_test/09: MissingRuntimeError
@@ -565,37 +735,22 @@
function_subtype_inline2_test: RuntimeError
function_type2_test: RuntimeError
function_type_alias6_test/none: RuntimeError
-generic_function_bounds_test: Crash # Issue 32012
generic_function_dcall_test: RuntimeError
generic_instanceof2_test: RuntimeError
generic_is_check_test: RuntimeError
-generic_methods_bounds_test/01: MissingCompileTimeError
-generic_methods_overriding_test/01: MissingCompileTimeError
-generic_methods_recursive_bound_test/02: MissingCompileTimeError
generic_no_such_method_dispatcher_simple_test: CompileTimeError # Issue 31533
generic_no_such_method_dispatcher_test: CompileTimeError # Issue 31533
generic_tearoff_test: CompileTimeError
generic_tearoff_test: RuntimeError
-generic_test/01: MissingCompileTimeError # front end does not validate `extends`
-getter_override_test/03: MissingCompileTimeError
-identical_const_test/01: MissingCompileTimeError
-identical_const_test/02: MissingCompileTimeError
-identical_const_test/03: MissingCompileTimeError
-identical_const_test/04: MissingCompileTimeError
if_null_evaluation_order_test: Pass
-implicit_this_test/01: MissingCompileTimeError
-implicit_this_test/04: MissingCompileTimeError
+implicit_creation/implicit_new_constructor_generic_test: Pass
initializing_formal_type_annotation_test/01: MissingCompileTimeError
initializing_formal_type_annotation_test/02: MissingCompileTimeError
instantiate_tearoff_of_call_test: CompileTimeError
invocation_mirror_test: CompileTimeError # Issue 31402 (Invocation arguments)
issue18628_2_test/01: MissingCompileTimeError
-issue31596_override_test/07: MissingCompileTimeError
-issue31596_override_test/08: MissingCompileTimeError
issue31596_super_test/01: CompileTimeError
-issue31596_super_test/02: MissingCompileTimeError
issue31596_super_test/03: CompileTimeError
-issue31596_super_test/04: MissingCompileTimeError
issue31596_super_test/05: RuntimeError
issue_1751477_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
issue_25671a_test/01: CompileTimeError # Test assumes Dart 1.0 semantics
@@ -606,28 +761,10 @@
library_env_test/has_no_mirror_support: RuntimeError
local_function2_test/none: RuntimeError
local_function3_test/none: RuntimeError
-local_function_test/01: MissingCompileTimeError
-local_function_test/02: MissingCompileTimeError
local_function_test/none: RuntimeError
main_not_a_function_test: Skip
main_not_a_function_test: DartkCrash
main_test/03: RuntimeError
-malbounded_instantiation_test/01: MissingCompileTimeError
-malbounded_instantiation_test/02: MissingCompileTimeError
-malbounded_instantiation_test/03: MissingCompileTimeError
-malbounded_redirecting_factory_test/02: MissingCompileTimeError
-malbounded_redirecting_factory_test/03: MissingCompileTimeError
-malbounded_redirecting_factory_test/04: MissingCompileTimeError
-malbounded_redirecting_factory_test/05: MissingCompileTimeError
-malbounded_type_cast2_test: MissingCompileTimeError
-malbounded_type_cast_test/00: MissingCompileTimeError
-malbounded_type_cast_test/01: MissingCompileTimeError
-malbounded_type_cast_test/02: MissingCompileTimeError
-malbounded_type_literal_test/00: MissingCompileTimeError
-malbounded_type_test2_test/00: MissingCompileTimeError
-malbounded_type_test_test/00: MissingCompileTimeError
-malbounded_type_test_test/01: MissingCompileTimeError
-malbounded_type_test_test/02: MissingCompileTimeError
map_literal3_test/01: MissingCompileTimeError
map_literal3_test/02: MissingCompileTimeError
map_literal3_test/03: MissingCompileTimeError
@@ -640,127 +777,40 @@
method_override6_test/01: MissingCompileTimeError
method_override6_test/02: MissingCompileTimeError
method_override6_test/03: MissingCompileTimeError
-method_override7_test/03: MissingCompileTimeError
-method_override8_test/03: MissingCompileTimeError
method_override_test: CompileTimeError # Issue 31616
-mixin_forwarding_constructor4_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_forwarding_constructor4_test/02: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_forwarding_constructor4_test/03: MissingCompileTimeError # KernelVM bug: Issue 15101
mixin_illegal_super_use_test: Skip # Issues 24478 and 23773
mixin_illegal_superclass_test: Skip # Issues 24478 and 23773
-mixin_invalid_bound2_test/02: MissingCompileTimeError
-mixin_invalid_bound2_test/03: MissingCompileTimeError
-mixin_invalid_bound2_test/04: MissingCompileTimeError
-mixin_invalid_bound2_test/05: MissingCompileTimeError
-mixin_invalid_bound2_test/06: MissingCompileTimeError
-mixin_invalid_bound2_test/07: MissingCompileTimeError
-mixin_invalid_bound2_test/08: MissingCompileTimeError
-mixin_invalid_bound2_test/09: MissingCompileTimeError
-mixin_invalid_bound2_test/10: MissingCompileTimeError
-mixin_invalid_bound2_test/11: MissingCompileTimeError
-mixin_invalid_bound2_test/12: MissingCompileTimeError
-mixin_invalid_bound2_test/13: MissingCompileTimeError
-mixin_invalid_bound2_test/14: MissingCompileTimeError
-mixin_invalid_bound2_test/15: MissingCompileTimeError
-mixin_invalid_bound_test/02: MissingCompileTimeError
-mixin_invalid_bound_test/03: MissingCompileTimeError
-mixin_invalid_bound_test/04: MissingCompileTimeError
-mixin_invalid_bound_test/05: MissingCompileTimeError
-mixin_invalid_bound_test/06: MissingCompileTimeError
-mixin_invalid_bound_test/07: MissingCompileTimeError
-mixin_invalid_bound_test/08: MissingCompileTimeError
-mixin_invalid_bound_test/09: MissingCompileTimeError
-mixin_invalid_bound_test/10: MissingCompileTimeError
-mixin_of_mixin_test/01: MissingCompileTimeError
-mixin_of_mixin_test/02: MissingCompileTimeError
-mixin_of_mixin_test/03: MissingCompileTimeError
-mixin_of_mixin_test/04: MissingCompileTimeError
-mixin_of_mixin_test/05: MissingCompileTimeError
-mixin_of_mixin_test/06: MissingCompileTimeError
-mixin_super_2_test/01: MissingCompileTimeError
-mixin_super_2_test/03: MissingCompileTimeError
-mixin_super_bound_test/01: MissingCompileTimeError
-mixin_super_bound_test/02: MissingCompileTimeError
-mixin_super_constructor_named_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_super_constructor_positionals_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_supertype_subclass_test/02: MissingCompileTimeError
-mixin_supertype_subclass_test/05: MissingCompileTimeError
-mixin_type_parameters_errors_test/01: MissingCompileTimeError
-mixin_type_parameters_errors_test/02: MissingCompileTimeError
-mixin_type_parameters_errors_test/03: MissingCompileTimeError
-mixin_type_parameters_errors_test/04: MissingCompileTimeError
-mixin_type_parameters_errors_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/01: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/02: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: RuntimeError
+mixin_type_parameter_inference_test/01: CompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/06: MissingCompileTimeError
+mixin_type_parameter_inference_test/07: MissingCompileTimeError
+mixin_type_parameter_inference_test/08: RuntimeError
+mixin_type_parameter_inference_test/09: RuntimeError
mock_writable_final_private_field_test: RuntimeError # Issue 30849
-named_constructor_test/01: MissingCompileTimeError
named_constructor_test/01: MissingRuntimeError # Fasta bug: Bad compilation of constructor reference.
-named_parameters_default_eq_test/02: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
named_parameters_default_eq_test/none: RuntimeError
-named_parameters_test/02: MissingCompileTimeError
-named_parameters_test/04: MissingCompileTimeError
-named_parameters_test/06: MissingCompileTimeError
-named_parameters_test/08: MissingCompileTimeError
-named_parameters_test/10: MissingCompileTimeError
nested_generic_closure_test: RuntimeError
no_main_test/01: DartkCrash
no_main_test/01: Skip
nosuchmethod_forwarding/nosuchmethod_forwarding_test/05: RuntimeError # Issue #31426
nosuchmethod_forwarding/nosuchmethod_forwarding_test/06: RuntimeError # Issue #31426
-nsm5_test: MissingCompileTimeError
null_no_such_method_test: CompileTimeError # Issue 31533
-optional_named_parameters_test/02: MissingCompileTimeError
-optional_named_parameters_test/04: MissingCompileTimeError
-optional_named_parameters_test/06: MissingCompileTimeError
-optional_named_parameters_test/08: MissingCompileTimeError
-override_field_test/02: MissingCompileTimeError
-override_field_test/03: MissingCompileTimeError
-override_inheritance_abstract_test/02: MissingCompileTimeError
-override_inheritance_abstract_test/03: MissingCompileTimeError
-override_inheritance_abstract_test/04: MissingCompileTimeError
-override_inheritance_abstract_test/08: MissingCompileTimeError
-override_inheritance_abstract_test/09: MissingCompileTimeError
-override_inheritance_abstract_test/10: MissingCompileTimeError
-override_inheritance_abstract_test/11: MissingCompileTimeError
-override_inheritance_abstract_test/12: MissingCompileTimeError
-override_inheritance_abstract_test/13: MissingCompileTimeError
-override_inheritance_abstract_test/14: MissingCompileTimeError
-override_inheritance_abstract_test/17: MissingCompileTimeError
-override_inheritance_abstract_test/19: MissingCompileTimeError
-override_inheritance_abstract_test/20: MissingCompileTimeError
-override_inheritance_abstract_test/21: MissingCompileTimeError
-override_inheritance_abstract_test/22: MissingCompileTimeError
-override_inheritance_abstract_test/23: MissingCompileTimeError
-override_inheritance_abstract_test/24: MissingCompileTimeError
-override_inheritance_abstract_test/25: MissingCompileTimeError
-override_inheritance_abstract_test/26: MissingCompileTimeError
override_inheritance_field_test/04: CompileTimeError # Issue 31616
override_inheritance_field_test/06: CompileTimeError # Issue 31616
override_inheritance_field_test/26: CompileTimeError # Issue 31616
override_inheritance_field_test/29: CompileTimeError # Issue 31616
-override_inheritance_field_test/44: MissingCompileTimeError
-override_inheritance_field_test/47: MissingCompileTimeError
-override_inheritance_field_test/48: MissingCompileTimeError
-override_inheritance_field_test/53: MissingCompileTimeError
-override_inheritance_field_test/54: MissingCompileTimeError
override_inheritance_generic_test/02: CompileTimeError
override_inheritance_method_test/17: CompileTimeError
override_inheritance_method_test/18: CompileTimeError
override_inheritance_method_test/28: CompileTimeError
override_inheritance_method_test/29: CompileTimeError
-override_inheritance_mixed_test/06: MissingCompileTimeError
-override_inheritance_mixed_test/07: MissingCompileTimeError
-override_inheritance_mixed_test/09: MissingCompileTimeError
-override_inheritance_no_such_method_test/01: MissingCompileTimeError
-override_inheritance_no_such_method_test/02: MissingCompileTimeError
-override_inheritance_no_such_method_test/05: MissingCompileTimeError
-override_inheritance_no_such_method_test/06: MissingCompileTimeError
-override_inheritance_no_such_method_test/07: MissingCompileTimeError
-override_inheritance_no_such_method_test/09: MissingCompileTimeError
-override_inheritance_no_such_method_test/10: MissingCompileTimeError
-override_inheritance_no_such_method_test/12: MissingCompileTimeError
-override_inheritance_no_such_method_test/13: MissingCompileTimeError
parser_quirks_test: CompileTimeError # Issue 31533
-redirecting_factory_default_values_test/01: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
-redirecting_factory_default_values_test/02: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
redirecting_factory_default_values_test/03: MissingCompileTimeError
redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
redirecting_factory_long_test: RuntimeError # Fasta bug: Bad compilation of type arguments for redirecting factory.
@@ -770,16 +820,10 @@
regress_23408_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
regress_23408_test: RuntimeError
regress_25550_test: CompileTimeError # Issue 31402 (Variable declaration)
-regress_27617_test/1: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
regress_28278_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
regress_29025_test: CompileTimeError # Issue 31402 (Variable declaration)
regress_29405_test: CompileTimeError # Issue 31402 (Invocation arguments)
-regress_29784_test/01: MissingCompileTimeError
-regress_29784_test/02: MissingCompileTimeError
regress_30339_test: CompileTimeError # Issue 31402 (Variable declaration)
-setter4_test: MissingCompileTimeError # Issue 14736
-setter_override_test/01: MissingCompileTimeError
-setter_override_test/02: MissingCompileTimeError
string_interpolate_test: CompileTimeError # Issue 31533
string_interpolation_and_buffer_test: RuntimeError # Issue 31402 (Return and yield statements)
string_split_test: CompileTimeError # Issue 31616
@@ -797,17 +841,6 @@
super_operator_index7_test: CompileTimeError
super_operator_index8_test: CompileTimeError
super_test: Fail, OK
-switch_bad_case_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_bad_case_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_case_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_case_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_case_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-syntax_test/28: MissingCompileTimeError
-syntax_test/29: MissingCompileTimeError
-syntax_test/30: MissingCompileTimeError
-syntax_test/31: MissingCompileTimeError
-syntax_test/32: MissingCompileTimeError
-syntax_test/33: MissingCompileTimeError
type_literal_test: RuntimeError
type_promotion_functions_test/02: CompileTimeError # Issue 31537
type_promotion_functions_test/03: CompileTimeError # Issue 31537
@@ -820,22 +853,8 @@
type_promotion_functions_test/none: CompileTimeError # Issue 31537
type_promotion_logical_and_test/01: MissingCompileTimeError
type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
-type_variable_bounds2_test: MissingCompileTimeError
-type_variable_bounds3_test/00: MissingCompileTimeError
-type_variable_bounds4_test/01: MissingCompileTimeError
-type_variable_bounds_test/01: MissingCompileTimeError
-type_variable_bounds_test/02: MissingCompileTimeError
-type_variable_bounds_test/03: MissingCompileTimeError
-type_variable_bounds_test/04: MissingCompileTimeError
-type_variable_bounds_test/05: MissingCompileTimeError
-type_variable_bounds_test/06: MissingCompileTimeError
-type_variable_bounds_test/08: MissingCompileTimeError
-type_variable_bounds_test/11: MissingCompileTimeError
vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
-vm/debug_break_enabled_vm_test/01: CompileTimeError # KernelVM bug: Bad test using extended break syntax.
-vm/debug_break_enabled_vm_test/none: CompileTimeError # KernelVM bug: Bad test using extended break syntax.
vm/optimized_guarded_field_isolates_test: RuntimeError # Issue 31402 (Variable declaration)
-vm/regress_27201_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
vm/regress_29145_test: Skip # Issue 29145
vm/type_cast_vm_test: RuntimeError
void_block_return_test/00: MissingCompileTimeError
@@ -869,13 +888,8 @@
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
[ $compiler == dartk && $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
-deferred_constraints_constants_test/default_argument2: MissingCompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
-duplicate_implements_test/02: Slow, Pass
least_upper_bound_expansive_test/none: RuntimeError # Please triage.
-[ $compiler == dartk && !$strong ]
-*: SkipByDesign # language_2 is only supported in strong mode.
-
[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
bad_named_parameters_test/01: Crash
bad_named_parameters_test/02: Crash
@@ -943,9 +957,6 @@
async_await_test: RuntimeError
async_return_types_test/nestedFuture: Fail
compile_time_constant_checked_test/02: MissingCompileTimeError
-const_constructor2_test/20: MissingCompileTimeError
-const_constructor2_test/22: MissingCompileTimeError
-const_constructor2_test/24: MissingCompileTimeError
covariance_type_parameter_test/01: RuntimeError
covariance_type_parameter_test/02: RuntimeError
covariance_type_parameter_test/03: RuntimeError
@@ -957,7 +968,6 @@
function_subtype_factory1_test: Pass
function_subtype_inline1_test: Pass
function_subtype_inline2_test: Pass
-function_subtype_setter0_test: Pass
function_type2_test: RuntimeError
generic_functions_test: Pass # Issue 25869
generic_local_functions_test: Pass # Issue 25869
@@ -981,8 +991,6 @@
regress_22728_test: Fail # Dartk Issue 28498
regress_22728_test: RuntimeError
regress_30339_test: Crash
-setter_override_test/01: MissingCompileTimeError
-setter_override_test/02: MissingCompileTimeError
type_variable_bounds4_test/01: RuntimeError
[ $compiler == dartkp && $runtime == dart_precompiled && !$checked && $strong ]
@@ -991,18 +999,10 @@
bool_check_test: RuntimeError
bool_condition_check_test: RuntimeError
callable_test/none: RuntimeError
-checked_setter2_test: RuntimeError
-checked_setter_test: RuntimeError
compile_time_constant_static2_test/04: MissingCompileTimeError
compile_time_constant_static3_test/04: MissingCompileTimeError
conditional_rewrite_test: RuntimeError # Issue 31402 (Not)
-covariance_field_test/01: RuntimeError
-covariance_field_test/02: RuntimeError
-covariance_field_test/03: RuntimeError
-covariance_field_test/04: RuntimeError
-covariance_field_test/05: RuntimeError
field_override_optimization_test: RuntimeError
-field_type_check2_test/01: MissingRuntimeError
if_null_precedence_test/none: RuntimeError
implicit_downcast_during_combiner_test: RuntimeError
implicit_downcast_during_compound_assignment_test: RuntimeError
@@ -1029,82 +1029,29 @@
# ==== dartkp + dart_precompiled status lines ====
[ $compiler == dartkp && $runtime == dart_precompiled && $strong ]
-abstract_factory_constructor_test/00: MissingCompileTimeError # Issue 32013.
-abstract_getter_test/01: MissingCompileTimeError # Issue 32013.
-abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32013.
-abstract_override_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
-abstract_override_adds_optional_args_supercall_test: MissingCompileTimeError # Issue 32014.
-abstract_syntax_test/00: MissingCompileTimeError # Issue 32013.
-additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32014.
-additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
-additional_interface_adds_optional_args_supercall_test: MissingCompileTimeError # Issue 32014.
assert_with_type_test_or_cast_test: Pass, Crash
assertion_initializer_const_error_test/01: Pass
-async_await_syntax_test/c10a: MissingCompileTimeError
-async_await_syntax_test/d08b: MissingCompileTimeError
-async_await_syntax_test/d10a: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
-async_return_types_test/nestedFuture: MissingCompileTimeError
-async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
-async_return_types_test/wrongReturnType: MissingCompileTimeError
async_star_cancel_while_paused_test: RuntimeError
async_star_pause_test: Fail, OK
async_star_test/02: RuntimeError, CompileTimeError # Issue 31402 (Invocation arguments)
-bad_named_parameters2_test/01: MissingCompileTimeError
-bad_named_parameters_test/01: MissingCompileTimeError
-bad_named_parameters_test/02: MissingCompileTimeError
-bad_named_parameters_test/03: MissingCompileTimeError
bad_named_parameters_test/04: Crash
-bad_named_parameters_test/04: MissingCompileTimeError
-bad_named_parameters_test/05: MissingCompileTimeError
-bad_override_test/01: MissingCompileTimeError
-bad_override_test/02: MissingCompileTimeError
built_in_identifier_prefix_test: CompileTimeError
-built_in_identifier_type_annotation_test/22: Crash # Issue 28814
built_in_identifier_type_annotation_test/22: DartkCrash # Issue 28814
-built_in_identifier_type_annotation_test/52: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/53: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/54: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/55: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/57: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/58: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/59: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/60: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/61: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/62: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/63: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/64: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/65: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/66: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/67: MissingCompileTimeError # Issue 28814
-built_in_identifier_type_annotation_test/68: MissingCompileTimeError # Issue 28814
call_function2_test: CompileTimeError # Issue 31402 (map literal)
call_function_apply_test: CompileTimeError # Issue 31402 (Invocation arguments)
call_function_test: CompileTimeError
-call_non_method_field_test/01: MissingCompileTimeError
-call_non_method_field_test/02: MissingCompileTimeError
call_with_no_such_method_test: CompileTimeError # Issue 31402 (Invocation arguments)
callable_test/none: CompileTimeError # Issue 31402 (Variable declaration)
cha_deopt1_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
cha_deopt2_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
cha_deopt3_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
-check_member_static_test/01: MissingCompileTimeError
checked_setter3_test/01: MissingCompileTimeError
checked_setter3_test/02: MissingCompileTimeError
checked_setter3_test/03: MissingCompileTimeError
-class_cycle_test/02: MissingCompileTimeError
-class_cycle_test/03: MissingCompileTimeError
-closure_invoked_through_interface_target_field_test: MissingCompileTimeError
-closure_invoked_through_interface_target_getter_test: MissingCompileTimeError
-compile_time_constant_c_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
compile_time_constant_k_test/01: MissingCompileTimeError
compile_time_constant_k_test/02: MissingCompileTimeError
compile_time_constant_k_test/03: MissingCompileTimeError
-compile_time_constant_o_test/01: MissingCompileTimeError
compile_time_constant_o_test/01: RuntimeError # KernelVM bug: Constant map duplicated key.
-compile_time_constant_o_test/02: MissingCompileTimeError
compile_time_constant_o_test/02: RuntimeError # KernelVM bug: Constant map duplicated key.
compile_time_constant_static5_test/11: CompileTimeError # Issue 31537
compile_time_constant_static5_test/16: CompileTimeError # Issue 31537
@@ -1116,51 +1063,23 @@
config_import_test: RuntimeError # KernelVM bug: Configurable imports.
const_constructor2_test/11: CompileTimeError # Issue 31402 (Invocation arguments)
const_constructor2_test/12: CompileTimeError # Issue 31402 (Invocation arguments)
-const_constructor2_test/20: MissingCompileTimeError
-const_constructor2_test/22: MissingCompileTimeError
-const_constructor2_test/24: MissingCompileTimeError
-const_constructor_nonconst_field_test/01: MissingCompileTimeError # Fasta bug: Non-const expression in field initializer.
const_dynamic_type_literal_test/02: RuntimeError # KernelVM bug: Constant map duplicated key.
-const_dynamic_type_literal_test/02: MissingCompileTimeError
const_evaluation_test: SkipByDesign
-const_factory_with_body_test/01: MissingCompileTimeError # Fasta bug: Const factory with body.
-const_instance_field_test/01: MissingCompileTimeError # Fasta bug: Const instance field.
const_list_test: RuntimeError
-const_map2_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-const_map3_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
const_map4_test: RuntimeError
const_nested_test: RuntimeError # KernelVM bug: Constant evaluation.
-const_optional_args_test/01: MissingCompileTimeError # Fasta bug: Default parameter values must be const.
const_redirecting_factory_test: CompileTimeError # Issue 31402 (Field declaration)
-const_switch2_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-const_syntax_test/05: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-const_types_test/34: MissingCompileTimeError
-const_types_test/35: MissingCompileTimeError
-const_types_test/39: MissingCompileTimeError
-const_types_test/40: MissingCompileTimeError
constructor12_test: RuntimeError
constructor3_test: Fail, OK, Pass
-constructor_redirect1_negative_test/01: MissingCompileTimeError
-constructor_redirect2_negative_test: MissingCompileTimeError
-constructor_redirect2_test/01: MissingCompileTimeError # Fasta bug: Body on redirecting constructor.
-constructor_redirect_test/01: MissingCompileTimeError # Fasta bug: Initializer refers to this.
-covariant_subtyping_test: CompileTimeError
ct_const2_test: Skip # Incompatible flag: --compile_all
ct_const_test: RuntimeError
-cyclic_constructor_test/01: MissingCompileTimeError # Fasta bug: Cyclic constructor redirection.
cyclic_type2_test: Fail, OK
cyclic_type_test/02: Fail, OK # Non-contractive types are not supported in the vm.
cyclic_type_test/04: Fail, OK
-cyclic_type_variable_test/01: MissingCompileTimeError
-cyclic_type_variable_test/02: MissingCompileTimeError
-cyclic_type_variable_test/03: MissingCompileTimeError
-cyclic_type_variable_test/04: MissingCompileTimeError
cyclic_typedef_test/10: Crash
cyclic_typedef_test/11: Crash
deep_nesting1_negative_test: Skip # Issue 31158
deep_nesting2_negative_test: Skip # Issue 31158
-default_factory2_test/01: MissingCompileTimeError
-default_factory_test/01: MissingCompileTimeError
deferred_call_empty_before_load_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
deferred_closurize_load_library_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_constant_list_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
@@ -1177,10 +1096,6 @@
deferred_global_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_global_test: Fail
deferred_import_core_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/implements: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/mixin: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
-deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
deferred_inlined_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_constants_test/none: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_inval_code_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
@@ -1197,38 +1112,24 @@
deferred_shadow_load_library_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_shared_and_unshared_classes_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_static_seperate_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
-deferred_super_dependency_test/01: Pass # Passes by mistake. KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/as: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/is: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/none: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_type_dependency_test/type_annotation: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot
-duplicate_export_negative_test: Fail # Issue 6134
-duplicate_implements_test/01: MissingCompileTimeError
-duplicate_implements_test/02: MissingCompileTimeError
dynamic_prefix_core_test/none: CompileTimeError
emit_const_fields_test: CompileTimeError # Issue 31533
enum_mirror_test: SkipByDesign
example_constructor_test: Fail, OK
-export_ambiguous_main_negative_test: Skip # Issue 29895 Fail Issue 14763
+export_ambiguous_main_test: Skip # Issue 29895 Fail Issue 14763
export_double_same_main_test: Skip # Issue 29895 Crash Issue 29895
external_test/10: MissingRuntimeError # KernelVM bug: Unbound external.
external_test/13: MissingRuntimeError # KernelVM bug: Unbound external.
external_test/20: MissingRuntimeError # KernelVM bug: Unbound external.
-external_test/24: Pass, CompileTimeError # Started to pass after switching to batch-mode.
-f_bounded_quantification_test/01: MissingCompileTimeError
-f_bounded_quantification_test/02: MissingCompileTimeError
-factory2_test/03: MissingCompileTimeError
factory3_test/01: Pass
-factory4_test/00: MissingCompileTimeError
-field3_test/01: MissingCompileTimeError
field_increment_bailout_test: SkipByDesign
field_initialization_order_test: Fail, OK
field_method4_test: Crash
-field_method4_test: MissingCompileTimeError
-field_override2_test: MissingCompileTimeError
-field_override_test/00: MissingCompileTimeError
-field_override_test/01: MissingCompileTimeError
flatten_test/05: MissingRuntimeError
flatten_test/08: MissingRuntimeError
flatten_test/09: MissingRuntimeError
@@ -1240,17 +1141,11 @@
function_subtype_call2_test: RuntimeError
function_subtype_cast0_test: RuntimeError
function_subtype_inline2_test: RuntimeError
-function_subtype_setter0_test: RuntimeError
function_type2_test: RuntimeError
function_type_alias6_test/none: RuntimeError
-generic_function_bounds_test: Crash # Issue 32012
generic_function_dcall_test: RuntimeError
generic_instanceof2_test: RuntimeError
generic_is_check_test: RuntimeError
-generic_methods_bounds_test/01: MissingCompileTimeError
-generic_methods_generic_function_result_test/01: MissingCompileTimeError
-generic_methods_overriding_test/01: MissingCompileTimeError
-generic_methods_recursive_bound_test/02: MissingCompileTimeError
generic_methods_recursive_bound_test/03: Crash, Pass
generic_methods_recursive_bound_test/03: MissingRuntimeError
generic_methods_recursive_bound_test/03: Pass
@@ -1260,14 +1155,9 @@
generic_no_such_method_dispatcher_simple_test: CompileTimeError # Issue 31533
generic_no_such_method_dispatcher_test: CompileTimeError # Issue 31533
generic_tearoff_test: CompileTimeError
-generic_test/01: MissingCompileTimeError # front end does not validate `extends`
-getter_override_test/03: MissingCompileTimeError
hello_dart_test: Skip # Incompatible flag: --compile_all
-identical_const_test/01: MissingCompileTimeError
-identical_const_test/02: MissingCompileTimeError
-identical_const_test/03: MissingCompileTimeError
-identical_const_test/04: MissingCompileTimeError
implicit_closure_test: Skip # Incompatible flag: --use_slow_path
+implicit_creation/implicit_new_constructor_generic_test: Pass
implicit_downcast_during_assignment_test: Pass # Correctly passes.
implicit_downcast_during_combiner_test: Pass # Correctly passes.
implicit_downcast_during_compound_assignment_test: Pass # Correctly passes.
@@ -1288,8 +1178,6 @@
implicit_downcast_during_while_statement_test: Pass # Correctly passes.
implicit_downcast_during_yield_star_test: Pass # Correctly passes.
implicit_downcast_during_yield_test: Pass # Correctly passes.
-implicit_this_test/01: MissingCompileTimeError
-implicit_this_test/04: MissingCompileTimeError
initializing_formal_type_annotation_test/01: MissingCompileTimeError
initializing_formal_type_annotation_test/02: MissingCompileTimeError
instance_creation_in_function_annotation_test: SkipByDesign
@@ -1300,12 +1188,8 @@
invocation_mirror_test: CompileTimeError # Issue 31402 (Invocation arguments)
issue18628_2_test/01: MissingCompileTimeError
issue21079_test: SkipByDesign
-issue31596_override_test/07: MissingCompileTimeError
-issue31596_override_test/08: MissingCompileTimeError
issue31596_super_test/01: CompileTimeError
-issue31596_super_test/02: MissingCompileTimeError
issue31596_super_test/03: CompileTimeError
-issue31596_super_test/04: MissingCompileTimeError
issue31596_super_test/05: RuntimeError
issue_1751477_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
issue_25671a_test/01: CompileTimeError # Test assumes Dart 1.0 semantics
@@ -1316,27 +1200,9 @@
library_env_test/has_no_io_support: RuntimeError # KernelVM bug: Configurable imports.
local_function2_test/none: RuntimeError
local_function3_test/none: RuntimeError
-local_function_test/01: MissingCompileTimeError
-local_function_test/02: MissingCompileTimeError
local_function_test/none: RuntimeError
main_not_a_function_test: Skip
main_test/03: RuntimeError
-malbounded_instantiation_test/01: MissingCompileTimeError
-malbounded_instantiation_test/02: MissingCompileTimeError
-malbounded_instantiation_test/03: MissingCompileTimeError
-malbounded_redirecting_factory_test/02: MissingCompileTimeError
-malbounded_redirecting_factory_test/03: MissingCompileTimeError
-malbounded_redirecting_factory_test/04: MissingCompileTimeError
-malbounded_redirecting_factory_test/05: MissingCompileTimeError
-malbounded_type_cast2_test: MissingCompileTimeError
-malbounded_type_cast_test/00: MissingCompileTimeError
-malbounded_type_cast_test/01: MissingCompileTimeError
-malbounded_type_cast_test/02: MissingCompileTimeError
-malbounded_type_literal_test/00: MissingCompileTimeError
-malbounded_type_test2_test/00: MissingCompileTimeError
-malbounded_type_test_test/00: MissingCompileTimeError
-malbounded_type_test_test/01: MissingCompileTimeError
-malbounded_type_test_test/02: MissingCompileTimeError
many_overridden_no_such_method_test: SkipByDesign
map_literal3_test/01: MissingCompileTimeError
map_literal3_test/02: MissingCompileTimeError
@@ -1350,65 +1216,11 @@
method_override6_test/01: MissingCompileTimeError
method_override6_test/02: MissingCompileTimeError
method_override6_test/03: MissingCompileTimeError
-method_override7_test/03: MissingCompileTimeError
-method_override8_test/03: MissingCompileTimeError
method_override_test: CompileTimeError # Issue 31616
-mixin_forwarding_constructor4_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_forwarding_constructor4_test/02: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_forwarding_constructor4_test/03: MissingCompileTimeError # KernelVM bug: Issue 15101
mixin_illegal_super_use_test: Skip # Issues 24478 and 23773
mixin_illegal_superclass_test: Skip # Issues 24478 and 23773
-mixin_invalid_bound2_test/02: MissingCompileTimeError
-mixin_invalid_bound2_test/03: MissingCompileTimeError
-mixin_invalid_bound2_test/04: MissingCompileTimeError
-mixin_invalid_bound2_test/05: MissingCompileTimeError
-mixin_invalid_bound2_test/06: MissingCompileTimeError
-mixin_invalid_bound2_test/07: MissingCompileTimeError
-mixin_invalid_bound2_test/08: MissingCompileTimeError
-mixin_invalid_bound2_test/09: MissingCompileTimeError
-mixin_invalid_bound2_test/10: MissingCompileTimeError
-mixin_invalid_bound2_test/11: MissingCompileTimeError
-mixin_invalid_bound2_test/12: MissingCompileTimeError
-mixin_invalid_bound2_test/13: MissingCompileTimeError
-mixin_invalid_bound2_test/14: MissingCompileTimeError
-mixin_invalid_bound2_test/15: MissingCompileTimeError
-mixin_invalid_bound_test/02: MissingCompileTimeError
-mixin_invalid_bound_test/03: MissingCompileTimeError
-mixin_invalid_bound_test/04: MissingCompileTimeError
-mixin_invalid_bound_test/05: MissingCompileTimeError
-mixin_invalid_bound_test/06: MissingCompileTimeError
-mixin_invalid_bound_test/07: MissingCompileTimeError
-mixin_invalid_bound_test/08: MissingCompileTimeError
-mixin_invalid_bound_test/09: MissingCompileTimeError
-mixin_invalid_bound_test/10: MissingCompileTimeError
-mixin_of_mixin_test/01: MissingCompileTimeError
-mixin_of_mixin_test/02: MissingCompileTimeError
-mixin_of_mixin_test/03: MissingCompileTimeError
-mixin_of_mixin_test/04: MissingCompileTimeError
-mixin_of_mixin_test/05: MissingCompileTimeError
-mixin_of_mixin_test/06: MissingCompileTimeError
-mixin_super_2_test/01: MissingCompileTimeError
-mixin_super_2_test/03: MissingCompileTimeError
-mixin_super_bound_test/01: MissingCompileTimeError
-mixin_super_bound_test/02: MissingCompileTimeError
-mixin_super_constructor_named_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_super_constructor_positionals_test/01: MissingCompileTimeError # KernelVM bug: Issue 15101
-mixin_supertype_subclass_test/02: MissingCompileTimeError
-mixin_supertype_subclass_test/05: MissingCompileTimeError
-mixin_type_parameters_errors_test/01: MissingCompileTimeError
-mixin_type_parameters_errors_test/02: MissingCompileTimeError
-mixin_type_parameters_errors_test/03: MissingCompileTimeError
-mixin_type_parameters_errors_test/04: MissingCompileTimeError
-mixin_type_parameters_errors_test/05: MissingCompileTimeError
mock_writable_final_private_field_test: RuntimeError # Issue 30849
-named_constructor_test/01: MissingCompileTimeError
-named_parameters_default_eq_test/02: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
named_parameters_default_eq_test/none: RuntimeError
-named_parameters_test/02: MissingCompileTimeError
-named_parameters_test/04: MissingCompileTimeError
-named_parameters_test/06: MissingCompileTimeError
-named_parameters_test/08: MissingCompileTimeError
-named_parameters_test/10: MissingCompileTimeError
nested_generic_closure_test: RuntimeError
no_main_test/01: Skip
no_such_method_mock_test: RuntimeError
@@ -1416,68 +1228,22 @@
nosuchmethod_forwarding/nosuchmethod_forwarding_test/04: RuntimeError # Issue #31911
nosuchmethod_forwarding/nosuchmethod_forwarding_test/05: RuntimeError # Issue #31426
nosuchmethod_forwarding/nosuchmethod_forwarding_test/06: RuntimeError # Issue #31426
-nsm5_test: MissingCompileTimeError
null_no_such_method_test: CompileTimeError # Issue 31533
null_test/mirrors: Skip # Uses mirrors.
null_test/none: SkipByDesign
-optional_named_parameters_test/02: MissingCompileTimeError
-optional_named_parameters_test/04: MissingCompileTimeError
-optional_named_parameters_test/06: MissingCompileTimeError
-optional_named_parameters_test/08: MissingCompileTimeError
overridden_no_such_method_test: SkipByDesign
-override_field_test/02: MissingCompileTimeError
-override_field_test/03: MissingCompileTimeError
-override_inheritance_abstract_test/02: MissingCompileTimeError
-override_inheritance_abstract_test/03: MissingCompileTimeError
-override_inheritance_abstract_test/04: MissingCompileTimeError
-override_inheritance_abstract_test/08: MissingCompileTimeError
-override_inheritance_abstract_test/09: MissingCompileTimeError
-override_inheritance_abstract_test/10: MissingCompileTimeError
-override_inheritance_abstract_test/11: MissingCompileTimeError
-override_inheritance_abstract_test/12: MissingCompileTimeError
-override_inheritance_abstract_test/13: MissingCompileTimeError
-override_inheritance_abstract_test/14: MissingCompileTimeError
-override_inheritance_abstract_test/17: MissingCompileTimeError
-override_inheritance_abstract_test/19: MissingCompileTimeError
-override_inheritance_abstract_test/20: MissingCompileTimeError
-override_inheritance_abstract_test/21: MissingCompileTimeError
-override_inheritance_abstract_test/22: MissingCompileTimeError
-override_inheritance_abstract_test/23: MissingCompileTimeError
-override_inheritance_abstract_test/24: MissingCompileTimeError
-override_inheritance_abstract_test/25: MissingCompileTimeError
-override_inheritance_abstract_test/26: MissingCompileTimeError
override_inheritance_field_test/04: CompileTimeError # Issue 31616
override_inheritance_field_test/06: CompileTimeError # Issue 31616
override_inheritance_field_test/26: CompileTimeError # Issue 31616
override_inheritance_field_test/29: CompileTimeError # Issue 31616
-override_inheritance_field_test/44: MissingCompileTimeError
-override_inheritance_field_test/47: MissingCompileTimeError
-override_inheritance_field_test/48: MissingCompileTimeError
-override_inheritance_field_test/53: MissingCompileTimeError
-override_inheritance_field_test/54: MissingCompileTimeError
override_inheritance_generic_test/02: CompileTimeError
override_inheritance_method_test/17: CompileTimeError
override_inheritance_method_test/18: CompileTimeError
override_inheritance_method_test/28: CompileTimeError
override_inheritance_method_test/29: CompileTimeError
-override_inheritance_mixed_test/06: MissingCompileTimeError
-override_inheritance_mixed_test/07: MissingCompileTimeError
-override_inheritance_mixed_test/08: MissingCompileTimeError
override_inheritance_mixed_test/08: Pass # Correctly passes.
-override_inheritance_mixed_test/09: MissingCompileTimeError
-override_inheritance_no_such_method_test/01: MissingCompileTimeError
-override_inheritance_no_such_method_test/02: MissingCompileTimeError
-override_inheritance_no_such_method_test/05: MissingCompileTimeError
-override_inheritance_no_such_method_test/06: MissingCompileTimeError
-override_inheritance_no_such_method_test/07: MissingCompileTimeError
-override_inheritance_no_such_method_test/09: MissingCompileTimeError
-override_inheritance_no_such_method_test/10: MissingCompileTimeError
-override_inheritance_no_such_method_test/12: MissingCompileTimeError
-override_inheritance_no_such_method_test/13: MissingCompileTimeError
parser_quirks_test: CompileTimeError # Issue 31533
recursive_mixin_test: Crash
-redirecting_factory_default_values_test/01: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
-redirecting_factory_default_values_test/02: MissingCompileTimeError # Fasta bug: Default values are not allowed on redirecting factory constructors.
redirecting_factory_default_values_test/03: MissingCompileTimeError
redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
redirecting_factory_long_test: RuntimeError # Fasta bug: Bad compilation of type arguments for redirecting factory.
@@ -1491,18 +1257,12 @@
regress_23408_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
regress_23408_test: RuntimeError
regress_25550_test: CompileTimeError # Issue 31402 (Variable declaration)
-regress_27617_test/1: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
regress_28255_test: SkipByDesign
regress_28278_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
regress_29025_test: CompileTimeError # Issue 31402 (Variable declaration)
regress_29405_test: CompileTimeError # Issue 31402 (Invocation arguments)
-regress_29784_test/01: MissingCompileTimeError
-regress_29784_test/02: MissingCompileTimeError
regress_30339_test: CompileTimeError # Issue 31402 (Variable declaration)
-setter4_test: MissingCompileTimeError # Issue 14736
setter_no_getter_test/01: Pass, CompileTimeError # Issue 31533 (started passing after switching to batch-mode)
-setter_override_test/01: MissingCompileTimeError
-setter_override_test/02: MissingCompileTimeError
stacktrace_demangle_ctors_test: RuntimeError
string_interpolate_test: CompileTimeError # Issue 31533
string_interpolation_and_buffer_test: RuntimeError # Issue 31402 (Return and yield statements)
@@ -1521,18 +1281,7 @@
super_operator_index7_test: CompileTimeError
super_operator_index8_test: CompileTimeError
super_test: Fail, OK
-switch_bad_case_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_bad_case_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_case_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_case_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
-switch_case_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
syntax_test/00: MissingCompileTimeError
-syntax_test/28: MissingCompileTimeError
-syntax_test/29: MissingCompileTimeError
-syntax_test/30: MissingCompileTimeError
-syntax_test/31: MissingCompileTimeError
-syntax_test/32: MissingCompileTimeError
-syntax_test/33: MissingCompileTimeError
type_literal_test: RuntimeError
type_promotion_functions_test/02: CompileTimeError # Issue 31537
type_promotion_functions_test/03: CompileTimeError # Issue 31537
@@ -1545,29 +1294,13 @@
type_promotion_functions_test/none: CompileTimeError # Issue 31537
type_promotion_logical_and_test/01: MissingCompileTimeError
type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
-type_variable_bounds2_test: MissingCompileTimeError
-type_variable_bounds3_test/00: MissingCompileTimeError
-type_variable_bounds4_test/01: MissingCompileTimeError
-type_variable_bounds_test/01: MissingCompileTimeError
-type_variable_bounds_test/02: MissingCompileTimeError
-type_variable_bounds_test/03: MissingCompileTimeError
-type_variable_bounds_test/04: MissingCompileTimeError
-type_variable_bounds_test/05: MissingCompileTimeError
-type_variable_bounds_test/06: MissingCompileTimeError
-type_variable_bounds_test/08: MissingCompileTimeError
-type_variable_bounds_test/11: MissingCompileTimeError
vm/causal_async_exception_stack2_test: SkipByDesign
vm/causal_async_exception_stack_test: SkipByDesign
vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
-vm/debug_break_enabled_vm_test/01: Crash, OK # Expected to hit breakpoint.
-vm/debug_break_enabled_vm_test/01: CompileTimeError # KernelVM bug: Bad test using extended break syntax.
-vm/debug_break_enabled_vm_test/none: CompileTimeError # KernelVM bug: Bad test using extended break syntax.
vm/optimized_guarded_field_isolates_test: RuntimeError
vm/optimized_stacktrace_test: Crash
vm/optimized_stacktrace_test: Skip # Issue 30198
vm/reflect_core_vm_test: SkipByDesign
-vm/regress_27201_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
-vm/regress_27201_test: Fail
vm/regress_27671_test: Skip # Unsupported
vm/regress_27671_test: Crash
vm/regress_29145_test: Skip # Issue 29145
@@ -1602,10 +1335,796 @@
void_type_usage_test/conditional_return_to_void: MissingCompileTimeError
wrong_number_type_arguments_test/01: MissingCompileTimeError
-[ $compiler == dartkp && !$strong ]
-*: SkipByDesign # language_2 is only supported in strong mode.
+[ $compiler == fasta && $strong ]
+deferred_super_dependency_test/01: MissingCompileTimeError
[ $runtime == vm && $fasta ]
implicit_creation/implicit_new_or_const_composite_test: RuntimeError
implicit_creation/implicit_new_or_const_test: RuntimeError
+[ $fasta && $strong ]
+compile_time_constant_k_test/01: MissingCompileTimeError
+compile_time_constant_k_test/02: MissingCompileTimeError
+compile_time_constant_k_test/03: MissingCompileTimeError
+compile_time_constant_static2_test/04: MissingCompileTimeError
+compile_time_constant_static3_test/04: MissingCompileTimeError
+generic_function_bounds_test: CompileTimeError
+initializing_formal_type_annotation_test/01: MissingCompileTimeError
+initializing_formal_type_annotation_test/02: MissingCompileTimeError
+issue18628_2_test/01: MissingCompileTimeError
+map_literal3_test/01: MissingCompileTimeError
+map_literal3_test/02: MissingCompileTimeError
+map_literal3_test/03: MissingCompileTimeError
+redirecting_factory_default_values_test/03: MissingCompileTimeError
+redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
+redirecting_factory_malbounded_test/01: MissingCompileTimeError
+type_promotion_logical_and_test/01: MissingCompileTimeError
+void_block_return_test/00: MissingCompileTimeError
+void_type_usage_test/conditional2_return_to_void: MissingCompileTimeError
+void_type_usage_test/conditional3_return_to_void: MissingCompileTimeError
+void_type_usage_test/conditional_return_to_void: MissingCompileTimeError
+wrong_number_type_arguments_test/01: MissingCompileTimeError
+
+[ $fasta && !$strong ]
+abstract_beats_arguments_test: MissingCompileTimeError
+abstract_exact_selector_test/01: MissingCompileTimeError
+argument_assignability_function_typed_test/01: MissingCompileTimeError
+argument_assignability_function_typed_test/02: MissingCompileTimeError
+assertion_initializer_const_function_test/01: MissingCompileTimeError
+assign_static_type_test/01: MissingCompileTimeError
+assign_static_type_test/02: MissingCompileTimeError
+assign_static_type_test/03: MissingCompileTimeError
+assign_static_type_test/04: MissingCompileTimeError
+assign_static_type_test/05: MissingCompileTimeError
+assign_static_type_test/06: MissingCompileTimeError
+assign_to_type_test/01: MissingCompileTimeError
+assign_to_type_test/02: MissingCompileTimeError
+assign_to_type_test/03: MissingCompileTimeError
+assign_to_type_test/04: MissingCompileTimeError
+assign_top_method_test: MissingCompileTimeError
+async_await_syntax_test/a10a: MissingCompileTimeError
+async_await_syntax_test/b10a: MissingCompileTimeError
+async_congruence_local_test/01: MissingCompileTimeError
+async_congruence_local_test/02: MissingCompileTimeError
+async_congruence_method_test/01: MissingCompileTimeError
+async_congruence_unnamed_test/01: MissingCompileTimeError
+async_congruence_unnamed_test/02: MissingCompileTimeError
+async_return_types_test/wrongTypeParameter: MissingCompileTimeError
+bad_override_test/03: MissingCompileTimeError
+bad_override_test/04: MissingCompileTimeError
+bad_override_test/05: MissingCompileTimeError
+bad_override_test/06: MissingCompileTimeError
+built_in_identifier_type_annotation_test/22: Crash # Issue 28814
+call_constructor_on_unresolvable_class_test/01: MissingCompileTimeError
+call_constructor_on_unresolvable_class_test/02: MissingCompileTimeError
+call_constructor_on_unresolvable_class_test/03: MissingCompileTimeError
+call_nonexistent_constructor_test/01: MissingCompileTimeError
+call_nonexistent_constructor_test/02: MissingCompileTimeError
+call_nonexistent_static_test/01: MissingCompileTimeError
+call_nonexistent_static_test/02: MissingCompileTimeError
+call_nonexistent_static_test/03: MissingCompileTimeError
+call_nonexistent_static_test/04: MissingCompileTimeError
+call_nonexistent_static_test/05: MissingCompileTimeError
+call_nonexistent_static_test/06: MissingCompileTimeError
+call_nonexistent_static_test/07: MissingCompileTimeError
+call_nonexistent_static_test/08: MissingCompileTimeError
+call_nonexistent_static_test/09: MissingCompileTimeError
+call_nonexistent_static_test/10: MissingCompileTimeError
+call_through_getter_test/01: MissingCompileTimeError
+call_through_getter_test/02: MissingCompileTimeError
+callable_test/00: MissingCompileTimeError
+callable_test/01: MissingCompileTimeError
+cast_test/04: MissingCompileTimeError
+cast_test/05: MissingCompileTimeError
+check_member_static_test/02: MissingCompileTimeError
+check_method_override_test/01: MissingCompileTimeError
+check_method_override_test/02: MissingCompileTimeError
+checked_null_test/01: MissingCompileTimeError
+class_cycle_test/02: MissingCompileTimeError
+class_cycle_test/03: MissingCompileTimeError
+class_literal_test/02: MissingCompileTimeError
+class_literal_test/04: MissingCompileTimeError
+class_literal_test/05: MissingCompileTimeError
+class_literal_test/06: MissingCompileTimeError
+class_literal_test/08: MissingCompileTimeError
+class_literal_test/09: MissingCompileTimeError
+class_literal_test/10: MissingCompileTimeError
+class_literal_test/11: MissingCompileTimeError
+class_literal_test/12: MissingCompileTimeError
+class_literal_test/13: MissingCompileTimeError
+class_literal_test/14: MissingCompileTimeError
+class_literal_test/15: MissingCompileTimeError
+class_literal_test/16: MissingCompileTimeError
+class_literal_test/17: MissingCompileTimeError
+class_literal_test/18: MissingCompileTimeError
+class_literal_test/19: MissingCompileTimeError
+class_literal_test/20: MissingCompileTimeError
+class_literal_test/21: MissingCompileTimeError
+class_literal_test/22: MissingCompileTimeError
+class_literal_test/23: MissingCompileTimeError
+class_literal_test/24: MissingCompileTimeError
+class_literal_test/25: MissingCompileTimeError
+conditional_method_invocation_test/05: MissingCompileTimeError
+conditional_method_invocation_test/06: MissingCompileTimeError
+conditional_method_invocation_test/07: MissingCompileTimeError
+conditional_method_invocation_test/08: MissingCompileTimeError
+conditional_method_invocation_test/12: MissingCompileTimeError
+conditional_method_invocation_test/13: MissingCompileTimeError
+conditional_method_invocation_test/18: MissingCompileTimeError
+conditional_method_invocation_test/19: MissingCompileTimeError
+conditional_property_access_test/04: MissingCompileTimeError
+conditional_property_access_test/05: MissingCompileTimeError
+conditional_property_access_test/06: MissingCompileTimeError
+conditional_property_access_test/10: MissingCompileTimeError
+conditional_property_access_test/11: MissingCompileTimeError
+conditional_property_access_test/16: MissingCompileTimeError
+conditional_property_access_test/17: MissingCompileTimeError
+conditional_property_assignment_test/04: MissingCompileTimeError
+conditional_property_assignment_test/05: MissingCompileTimeError
+conditional_property_assignment_test/06: MissingCompileTimeError
+conditional_property_assignment_test/10: MissingCompileTimeError
+conditional_property_assignment_test/11: MissingCompileTimeError
+conditional_property_assignment_test/12: MissingCompileTimeError
+conditional_property_assignment_test/13: MissingCompileTimeError
+conditional_property_assignment_test/27: MissingCompileTimeError
+conditional_property_assignment_test/28: MissingCompileTimeError
+conditional_property_assignment_test/32: MissingCompileTimeError
+conditional_property_assignment_test/33: MissingCompileTimeError
+conditional_property_assignment_test/34: MissingCompileTimeError
+conditional_property_assignment_test/35: MissingCompileTimeError
+conditional_property_increment_decrement_test/04: MissingCompileTimeError
+conditional_property_increment_decrement_test/08: MissingCompileTimeError
+conditional_property_increment_decrement_test/12: MissingCompileTimeError
+conditional_property_increment_decrement_test/16: MissingCompileTimeError
+conditional_property_increment_decrement_test/21: MissingCompileTimeError
+conditional_property_increment_decrement_test/22: MissingCompileTimeError
+conditional_property_increment_decrement_test/27: MissingCompileTimeError
+conditional_property_increment_decrement_test/28: MissingCompileTimeError
+conditional_property_increment_decrement_test/33: MissingCompileTimeError
+conditional_property_increment_decrement_test/34: MissingCompileTimeError
+conditional_property_increment_decrement_test/39: MissingCompileTimeError
+conditional_property_increment_decrement_test/40: MissingCompileTimeError
+config_import_test: Crash
+const_conditional_test/08: MissingCompileTimeError
+const_constructor2_test/05: MissingCompileTimeError
+const_constructor2_test/06: MissingCompileTimeError
+const_constructor2_test/13: MissingCompileTimeError
+const_constructor2_test/14: MissingCompileTimeError
+const_constructor2_test/15: MissingCompileTimeError
+const_constructor2_test/16: MissingCompileTimeError
+const_constructor2_test/17: MissingCompileTimeError
+const_constructor2_test/18: MissingCompileTimeError
+const_constructor3_test/02: MissingCompileTimeError
+const_constructor3_test/04: MissingCompileTimeError
+const_error_multiply_initialized_test/01: MissingCompileTimeError
+const_error_multiply_initialized_test/02: MissingCompileTimeError
+const_error_multiply_initialized_test/03: MissingCompileTimeError
+const_error_multiply_initialized_test/04: MissingCompileTimeError
+const_init2_test/02: MissingCompileTimeError
+const_native_factory_test: MissingCompileTimeError
+const_syntax_test/08: MissingCompileTimeError
+const_syntax_test/09: MissingCompileTimeError
+const_syntax_test/10: MissingCompileTimeError
+const_types_test/01: MissingCompileTimeError
+const_types_test/02: MissingCompileTimeError
+const_types_test/03: MissingCompileTimeError
+const_types_test/04: MissingCompileTimeError
+const_types_test/05: MissingCompileTimeError
+const_types_test/06: MissingCompileTimeError
+const_types_test/13: MissingCompileTimeError
+constants_test/05: MissingCompileTimeError
+constructor13_test/01: MissingCompileTimeError
+constructor13_test/02: MissingCompileTimeError
+constructor_call_wrong_argument_count_negative_test: Fail
+constructor_duplicate_final_test/01: MissingCompileTimeError
+constructor_duplicate_final_test/02: MissingCompileTimeError
+constructor_named_arguments_test/01: MissingCompileTimeError
+constructor_redirect1_negative_test/none: MissingCompileTimeError
+create_unresolved_type_test/01: MissingCompileTimeError
+cyclic_typedef_test/13: MissingCompileTimeError
+deferred_constraints_constants_test/default_argument2: MissingCompileTimeError
+deferred_constraints_type_annotation_test/as_operation: MissingCompileTimeError
+deferred_constraints_type_annotation_test/catch_check: MissingCompileTimeError
+deferred_constraints_type_annotation_test/is_check: MissingCompileTimeError
+deferred_constraints_type_annotation_test/new_before_load: MissingCompileTimeError
+deferred_constraints_type_annotation_test/new_generic2: MissingCompileTimeError
+deferred_constraints_type_annotation_test/new_generic3: MissingCompileTimeError
+deferred_constraints_type_annotation_test/type_annotation1: MissingCompileTimeError
+deferred_constraints_type_annotation_test/type_annotation_generic1: MissingCompileTimeError
+deferred_constraints_type_annotation_test/type_annotation_generic2: MissingCompileTimeError
+deferred_constraints_type_annotation_test/type_annotation_generic3: MissingCompileTimeError
+deferred_constraints_type_annotation_test/type_annotation_generic4: MissingCompileTimeError
+deferred_constraints_type_annotation_test/type_annotation_null: MissingCompileTimeError
+deferred_constraints_type_annotation_test/type_annotation_top_level: MissingCompileTimeError
+duplicate_implements_test/01: MissingCompileTimeError
+duplicate_implements_test/02: MissingCompileTimeError
+duplicate_implements_test/03: MissingCompileTimeError
+duplicate_implements_test/04: MissingCompileTimeError
+duplicate_interface_negative_test: Fail
+dynamic_field_test/01: MissingCompileTimeError
+dynamic_field_test/02: MissingCompileTimeError
+dynamic_prefix_core_test/01: MissingCompileTimeError
+empty_block_case_test: MissingCompileTimeError
+enum_private_test/02: MissingCompileTimeError
+error_stacktrace_test/00: MissingCompileTimeError
+export_ambiguous_main_test: MissingCompileTimeError
+external_test/21: CompileTimeError
+external_test/24: CompileTimeError
+factory1_test/00: MissingCompileTimeError
+factory1_test/01: MissingCompileTimeError
+factory2_test/none: MissingCompileTimeError
+factory3_test/none: MissingCompileTimeError
+factory5_test/00: MissingCompileTimeError
+factory6_test/00: MissingCompileTimeError
+factory_redirection_test/01: MissingCompileTimeError
+factory_redirection_test/02: MissingCompileTimeError
+factory_redirection_test/03: MissingCompileTimeError
+factory_redirection_test/05: MissingCompileTimeError
+factory_redirection_test/06: MissingCompileTimeError
+factory_redirection_test/07: MissingCompileTimeError
+factory_redirection_test/08: MissingCompileTimeError
+factory_redirection_test/09: MissingCompileTimeError
+factory_redirection_test/10: MissingCompileTimeError
+factory_redirection_test/11: MissingCompileTimeError
+factory_redirection_test/12: MissingCompileTimeError
+factory_redirection_test/13: MissingCompileTimeError
+factory_redirection_test/14: MissingCompileTimeError
+factory_redirection_test/none: MissingCompileTimeError
+factory_return_type_checked_test/00: MissingCompileTimeError
+fauxverride_test/03: MissingCompileTimeError
+fauxverride_test/05: MissingCompileTimeError
+field_initialization_order_test/01: MissingCompileTimeError
+field_override3_test/00: MissingCompileTimeError
+field_override3_test/01: MissingCompileTimeError
+field_override3_test/02: MissingCompileTimeError
+field_override3_test/03: MissingCompileTimeError
+field_override4_test/02: MissingCompileTimeError
+field_override_test/02: MissingCompileTimeError
+field_override_test/none: MissingCompileTimeError
+field_type_check_test/01: MissingCompileTimeError
+final_attempt_reinitialization_test/01: MissingCompileTimeError
+final_attempt_reinitialization_test/02: MissingCompileTimeError
+final_for_in_variable_test: MissingCompileTimeError
+final_param_test: MissingCompileTimeError
+final_super_field_set_test: MissingCompileTimeError
+final_syntax_test/09: MissingCompileTimeError
+final_syntax_test/10: MissingCompileTimeError
+final_variable_assignment_test/01: MissingCompileTimeError
+final_variable_assignment_test/02: MissingCompileTimeError
+final_variable_assignment_test/03: MissingCompileTimeError
+final_variable_assignment_test/04: MissingCompileTimeError
+first_class_types_literals_test/03: MissingCompileTimeError
+first_class_types_literals_test/04: MissingCompileTimeError
+first_class_types_literals_test/05: MissingCompileTimeError
+first_class_types_literals_test/06: MissingCompileTimeError
+first_class_types_literals_test/07: MissingCompileTimeError
+first_class_types_literals_test/08: MissingCompileTimeError
+first_class_types_literals_test/09: MissingCompileTimeError
+first_class_types_literals_test/10: MissingCompileTimeError
+first_class_types_literals_test/11: MissingCompileTimeError
+first_class_types_literals_test/12: MissingCompileTimeError
+for_in3_test: MissingCompileTimeError
+function_malformed_result_type_test/00: MissingCompileTimeError
+function_type_call_getter2_test/00: MissingCompileTimeError
+function_type_call_getter2_test/01: MissingCompileTimeError
+function_type_call_getter2_test/02: MissingCompileTimeError
+function_type_call_getter2_test/03: MissingCompileTimeError
+function_type_call_getter2_test/04: MissingCompileTimeError
+function_type_call_getter2_test/05: MissingCompileTimeError
+function_type_parameter2_negative_test: Fail
+function_type_parameter_negative_test: Fail
+fuzzy_arrows_test/01: MissingCompileTimeError
+generic_constructor_mixin2_test/01: MissingCompileTimeError
+generic_constructor_mixin3_test/01: MissingCompileTimeError
+generic_constructor_mixin_test/01: MissingCompileTimeError
+generic_field_mixin6_test/01: MissingCompileTimeError
+generic_function_type_as_type_argument_test/01: MissingCompileTimeError
+generic_function_type_as_type_argument_test/02: MissingCompileTimeError
+generic_function_typedef2_test/04: MissingCompileTimeError
+generic_methods_dynamic_test/01: MissingCompileTimeError
+generic_methods_dynamic_test/03: MissingCompileTimeError
+generic_methods_generic_function_result_test/01: MissingCompileTimeError
+generic_methods_overriding_test/03: MissingCompileTimeError
+getter_no_setter2_test/00: MissingCompileTimeError
+getter_no_setter2_test/01: MissingCompileTimeError
+getter_no_setter2_test/03: MissingCompileTimeError
+getter_no_setter_test/00: MissingCompileTimeError
+getter_no_setter_test/01: MissingCompileTimeError
+getter_no_setter_test/03: MissingCompileTimeError
+getter_override2_test/02: MissingCompileTimeError
+getter_override_test/00: MissingCompileTimeError
+getter_override_test/01: MissingCompileTimeError
+getter_override_test/02: MissingCompileTimeError
+getters_setters2_test/02: MissingCompileTimeError
+if_null_assignment_behavior_test/03: MissingCompileTimeError
+if_null_assignment_behavior_test/13: MissingCompileTimeError
+if_null_assignment_behavior_test/15: MissingCompileTimeError
+if_null_assignment_static_test/02: MissingCompileTimeError
+if_null_assignment_static_test/04: MissingCompileTimeError
+if_null_assignment_static_test/06: MissingCompileTimeError
+if_null_assignment_static_test/07: MissingCompileTimeError
+if_null_assignment_static_test/09: MissingCompileTimeError
+if_null_assignment_static_test/11: MissingCompileTimeError
+if_null_assignment_static_test/13: MissingCompileTimeError
+if_null_assignment_static_test/14: MissingCompileTimeError
+if_null_assignment_static_test/16: MissingCompileTimeError
+if_null_assignment_static_test/18: MissingCompileTimeError
+if_null_assignment_static_test/20: MissingCompileTimeError
+if_null_assignment_static_test/21: MissingCompileTimeError
+if_null_assignment_static_test/23: MissingCompileTimeError
+if_null_assignment_static_test/25: MissingCompileTimeError
+if_null_assignment_static_test/27: MissingCompileTimeError
+if_null_assignment_static_test/28: MissingCompileTimeError
+if_null_assignment_static_test/30: MissingCompileTimeError
+if_null_assignment_static_test/32: MissingCompileTimeError
+if_null_assignment_static_test/34: MissingCompileTimeError
+if_null_assignment_static_test/35: MissingCompileTimeError
+if_null_assignment_static_test/37: MissingCompileTimeError
+if_null_assignment_static_test/39: MissingCompileTimeError
+if_null_assignment_static_test/41: MissingCompileTimeError
+if_null_assignment_static_test/42: MissingCompileTimeError
+if_null_precedence_test/06: MissingCompileTimeError
+if_null_precedence_test/07: MissingCompileTimeError
+implicit_this_test/02: MissingCompileTimeError
+import_combinators2_test/00: MissingCompileTimeError
+import_self_test/01: MissingCompileTimeError
+inferrer_constructor5_test/01: MissingCompileTimeError
+initializing_formal_final_test: MissingCompileTimeError
+initializing_formal_type_test: MissingCompileTimeError
+instance_call_wrong_argument_count_negative_test: Fail
+instance_method2_negative_test: Fail
+instance_method_negative_test: Fail
+interface_static_non_final_fields_negative_test: Fail
+interface_test/00: MissingCompileTimeError
+invalid_cast_test/01: MissingCompileTimeError
+invalid_cast_test/02: MissingCompileTimeError
+invalid_cast_test/03: MissingCompileTimeError
+invalid_cast_test/04: MissingCompileTimeError
+invalid_cast_test/07: MissingCompileTimeError
+invalid_cast_test/08: MissingCompileTimeError
+invalid_cast_test/09: MissingCompileTimeError
+invalid_cast_test/10: MissingCompileTimeError
+invalid_cast_test/11: MissingCompileTimeError
+issue31596_override_test/05: MissingCompileTimeError
+issue31596_override_test/06: MissingCompileTimeError
+least_upper_bound_expansive_test/01: MissingCompileTimeError
+least_upper_bound_expansive_test/02: MissingCompileTimeError
+least_upper_bound_expansive_test/03: MissingCompileTimeError
+least_upper_bound_expansive_test/04: MissingCompileTimeError
+least_upper_bound_expansive_test/05: MissingCompileTimeError
+least_upper_bound_expansive_test/06: MissingCompileTimeError
+least_upper_bound_expansive_test/07: MissingCompileTimeError
+least_upper_bound_expansive_test/08: MissingCompileTimeError
+least_upper_bound_expansive_test/09: MissingCompileTimeError
+least_upper_bound_expansive_test/10: MissingCompileTimeError
+least_upper_bound_expansive_test/11: MissingCompileTimeError
+least_upper_bound_expansive_test/12: MissingCompileTimeError
+least_upper_bound_test/03: MissingCompileTimeError
+least_upper_bound_test/04: MissingCompileTimeError
+least_upper_bound_test/10: MissingCompileTimeError
+least_upper_bound_test/19: MissingCompileTimeError
+least_upper_bound_test/20: MissingCompileTimeError
+least_upper_bound_test/23: MissingCompileTimeError
+least_upper_bound_test/24: MissingCompileTimeError
+least_upper_bound_test/29: MissingCompileTimeError
+least_upper_bound_test/30: MissingCompileTimeError
+least_upper_bound_test/32: MissingCompileTimeError
+library_ambiguous_test/00: MissingCompileTimeError
+library_ambiguous_test/01: MissingCompileTimeError
+library_ambiguous_test/02: MissingCompileTimeError
+library_ambiguous_test/03: MissingCompileTimeError
+library_ambiguous_test/04: MissingCompileTimeError
+list_literal1_test/01: MissingCompileTimeError
+list_literal4_test/00: MissingCompileTimeError
+list_literal4_test/01: MissingCompileTimeError
+list_literal4_test/03: MissingCompileTimeError
+list_literal4_test/04: MissingCompileTimeError
+list_literal4_test/05: MissingCompileTimeError
+list_literal_syntax_test/01: MissingCompileTimeError
+list_literal_syntax_test/02: MissingCompileTimeError
+list_literal_syntax_test/03: MissingCompileTimeError
+local_function2_test/01: MissingCompileTimeError
+local_function2_test/02: MissingCompileTimeError
+local_function3_test/01: MissingCompileTimeError
+local_function_test/03: MissingCompileTimeError
+local_function_test/04: MissingCompileTimeError
+logical_expression3_test: MissingCompileTimeError
+malformed2_test/00: MissingCompileTimeError
+malformed2_test/01: MissingCompileTimeError
+malformed2_test/02: MissingCompileTimeError
+malformed2_test/03: MissingCompileTimeError
+malformed2_test/04: MissingCompileTimeError
+malformed2_test/05: MissingCompileTimeError
+malformed2_test/06: MissingCompileTimeError
+malformed2_test/07: MissingCompileTimeError
+malformed2_test/08: MissingCompileTimeError
+malformed2_test/09: MissingCompileTimeError
+malformed2_test/10: MissingCompileTimeError
+malformed2_test/11: MissingCompileTimeError
+malformed2_test/12: MissingCompileTimeError
+malformed2_test/13: MissingCompileTimeError
+malformed_bound_test/00: MissingCompileTimeError
+malformed_bound_test/01: MissingCompileTimeError
+malformed_inheritance_test/01: MissingCompileTimeError
+malformed_inheritance_test/03: MissingCompileTimeError
+malformed_inheritance_test/05: MissingCompileTimeError
+malformed_test/00: MissingCompileTimeError
+malformed_test/01: MissingCompileTimeError
+malformed_test/02: MissingCompileTimeError
+malformed_test/03: MissingCompileTimeError
+malformed_test/04: MissingCompileTimeError
+malformed_test/05: MissingCompileTimeError
+malformed_test/06: MissingCompileTimeError
+malformed_test/07: MissingCompileTimeError
+malformed_test/08: MissingCompileTimeError
+malformed_test/09: MissingCompileTimeError
+malformed_test/10: MissingCompileTimeError
+malformed_test/11: MissingCompileTimeError
+malformed_test/12: MissingCompileTimeError
+malformed_test/13: MissingCompileTimeError
+malformed_test/14: MissingCompileTimeError
+malformed_test/15: MissingCompileTimeError
+malformed_test/16: MissingCompileTimeError
+malformed_test/17: MissingCompileTimeError
+malformed_test/18: MissingCompileTimeError
+malformed_test/19: MissingCompileTimeError
+malformed_test/20: MissingCompileTimeError
+malformed_test/21: MissingCompileTimeError
+malformed_test/22: MissingCompileTimeError
+malformed_test/23: MissingCompileTimeError
+malformed_test/24: MissingCompileTimeError
+malformed_type_test: MissingCompileTimeError
+method_override2_test/00: MissingCompileTimeError
+method_override2_test/01: MissingCompileTimeError
+method_override2_test/02: MissingCompileTimeError
+method_override2_test/03: MissingCompileTimeError
+method_override3_test/00: MissingCompileTimeError
+method_override3_test/01: MissingCompileTimeError
+method_override3_test/02: MissingCompileTimeError
+method_override7_test/00: MissingCompileTimeError
+method_override7_test/01: MissingCompileTimeError
+method_override7_test/02: MissingCompileTimeError
+method_override8_test/00: MissingCompileTimeError
+method_override8_test/01: MissingCompileTimeError
+mixin_illegal_constructor_test/13: MissingCompileTimeError
+mixin_illegal_constructor_test/14: MissingCompileTimeError
+mixin_illegal_constructor_test/15: MissingCompileTimeError
+mixin_illegal_constructor_test/16: MissingCompileTimeError
+mixin_illegal_static_access_test/01: MissingCompileTimeError
+mixin_illegal_static_access_test/02: MissingCompileTimeError
+mixin_illegal_super_use_test/01: MissingCompileTimeError
+mixin_illegal_super_use_test/02: MissingCompileTimeError
+mixin_illegal_super_use_test/03: MissingCompileTimeError
+mixin_illegal_super_use_test/04: MissingCompileTimeError
+mixin_illegal_super_use_test/05: MissingCompileTimeError
+mixin_illegal_super_use_test/06: MissingCompileTimeError
+mixin_illegal_super_use_test/07: MissingCompileTimeError
+mixin_illegal_super_use_test/08: MissingCompileTimeError
+mixin_illegal_super_use_test/09: MissingCompileTimeError
+mixin_illegal_super_use_test/10: MissingCompileTimeError
+mixin_illegal_super_use_test/11: MissingCompileTimeError
+mixin_illegal_superclass_test/01: MissingCompileTimeError
+mixin_illegal_superclass_test/02: MissingCompileTimeError
+mixin_illegal_superclass_test/03: MissingCompileTimeError
+mixin_illegal_superclass_test/04: MissingCompileTimeError
+mixin_illegal_superclass_test/05: MissingCompileTimeError
+mixin_illegal_superclass_test/06: MissingCompileTimeError
+mixin_illegal_superclass_test/07: MissingCompileTimeError
+mixin_illegal_superclass_test/08: MissingCompileTimeError
+mixin_illegal_superclass_test/09: MissingCompileTimeError
+mixin_illegal_superclass_test/10: MissingCompileTimeError
+mixin_illegal_superclass_test/11: MissingCompileTimeError
+mixin_illegal_superclass_test/12: MissingCompileTimeError
+mixin_illegal_superclass_test/13: MissingCompileTimeError
+mixin_illegal_superclass_test/14: MissingCompileTimeError
+mixin_illegal_superclass_test/15: MissingCompileTimeError
+mixin_illegal_superclass_test/16: MissingCompileTimeError
+mixin_illegal_superclass_test/17: MissingCompileTimeError
+mixin_illegal_superclass_test/18: MissingCompileTimeError
+mixin_illegal_superclass_test/19: MissingCompileTimeError
+mixin_illegal_superclass_test/20: MissingCompileTimeError
+mixin_illegal_superclass_test/21: MissingCompileTimeError
+mixin_illegal_superclass_test/22: MissingCompileTimeError
+mixin_illegal_superclass_test/23: MissingCompileTimeError
+mixin_illegal_superclass_test/24: MissingCompileTimeError
+mixin_illegal_superclass_test/25: MissingCompileTimeError
+mixin_illegal_superclass_test/26: MissingCompileTimeError
+mixin_illegal_superclass_test/27: MissingCompileTimeError
+mixin_illegal_superclass_test/28: MissingCompileTimeError
+mixin_illegal_superclass_test/29: MissingCompileTimeError
+mixin_illegal_superclass_test/30: MissingCompileTimeError
+mixin_illegal_syntax_test/13: MissingCompileTimeError
+mixin_with_two_implicit_constructors_test: MissingCompileTimeError
+multiline_newline_test/04: MissingCompileTimeError
+multiline_newline_test/04r: MissingCompileTimeError
+multiline_newline_test/05: MissingCompileTimeError
+multiline_newline_test/05r: MissingCompileTimeError
+multiline_newline_test/06: MissingCompileTimeError
+multiline_newline_test/06r: MissingCompileTimeError
+named_constructor_test/03: MissingCompileTimeError
+named_parameters2_test: MissingCompileTimeError
+named_parameters3_test: MissingCompileTimeError
+named_parameters4_test: MissingCompileTimeError
+named_parameters_aggregated_test/05: MissingCompileTimeError
+named_parameters_test/01: MissingCompileTimeError
+named_parameters_test/03: MissingCompileTimeError
+named_parameters_test/05: MissingCompileTimeError
+named_parameters_test/07: MissingCompileTimeError
+named_parameters_test/09: MissingCompileTimeError
+named_parameters_type_test/01: MissingCompileTimeError
+named_parameters_type_test/02: MissingCompileTimeError
+named_parameters_type_test/03: MissingCompileTimeError
+new_expression_type_args_test/00: MissingCompileTimeError
+new_expression_type_args_test/01: MissingCompileTimeError
+new_expression_type_args_test/02: MissingCompileTimeError
+new_prefix_test/01: MissingCompileTimeError
+no_such_constructor_test/01: MissingCompileTimeError
+no_such_method_negative_test: Fail
+not_enough_positional_arguments_test/00: MissingCompileTimeError
+not_enough_positional_arguments_test/01: MissingCompileTimeError
+not_enough_positional_arguments_test/02: MissingCompileTimeError
+not_enough_positional_arguments_test/03: MissingCompileTimeError
+not_enough_positional_arguments_test/05: MissingCompileTimeError
+not_enough_positional_arguments_test/06: MissingCompileTimeError
+not_enough_positional_arguments_test/07: MissingCompileTimeError
+object_has_no_call_method_test/02: MissingCompileTimeError
+object_has_no_call_method_test/05: MissingCompileTimeError
+object_has_no_call_method_test/08: MissingCompileTimeError
+optional_named_parameters_test/01: MissingCompileTimeError
+optional_named_parameters_test/03: MissingCompileTimeError
+optional_named_parameters_test/05: MissingCompileTimeError
+optional_named_parameters_test/07: MissingCompileTimeError
+optional_named_parameters_test/09: MissingCompileTimeError
+override_field_method1_negative_test: Fail
+override_field_method2_negative_test: Fail
+override_field_method4_negative_test: Fail
+override_field_method5_negative_test: Fail
+override_field_test/01: MissingCompileTimeError
+override_inheritance_abstract_test/28: MissingCompileTimeError
+override_inheritance_field_test/05: MissingCompileTimeError
+override_inheritance_field_test/07: MissingCompileTimeError
+override_inheritance_field_test/08: MissingCompileTimeError
+override_inheritance_field_test/09: MissingCompileTimeError
+override_inheritance_field_test/10: MissingCompileTimeError
+override_inheritance_field_test/11: MissingCompileTimeError
+override_inheritance_field_test/28: MissingCompileTimeError
+override_inheritance_field_test/30: MissingCompileTimeError
+override_inheritance_field_test/31: MissingCompileTimeError
+override_inheritance_field_test/32: MissingCompileTimeError
+override_inheritance_field_test/33: MissingCompileTimeError
+override_inheritance_field_test/33a: MissingCompileTimeError
+override_inheritance_field_test/34: MissingCompileTimeError
+override_inheritance_generic_test/04: MissingCompileTimeError
+override_inheritance_generic_test/06: MissingCompileTimeError
+override_inheritance_generic_test/07: MissingCompileTimeError
+override_inheritance_generic_test/08: MissingCompileTimeError
+override_inheritance_generic_test/09: MissingCompileTimeError
+override_inheritance_generic_test/10: MissingCompileTimeError
+override_inheritance_method_test/04: MissingCompileTimeError
+override_inheritance_method_test/05: MissingCompileTimeError
+override_inheritance_method_test/06: MissingCompileTimeError
+override_inheritance_method_test/11: MissingCompileTimeError
+override_inheritance_method_test/12: MissingCompileTimeError
+override_inheritance_method_test/13: MissingCompileTimeError
+override_inheritance_method_test/14: MissingCompileTimeError
+override_inheritance_method_test/19: MissingCompileTimeError
+override_inheritance_method_test/20: MissingCompileTimeError
+override_inheritance_method_test/21: MissingCompileTimeError
+override_inheritance_method_test/27: MissingCompileTimeError
+override_inheritance_method_test/30: MissingCompileTimeError
+override_inheritance_method_test/31: MissingCompileTimeError
+override_inheritance_method_test/32: MissingCompileTimeError
+override_inheritance_method_test/33: MissingCompileTimeError
+override_inheritance_mixed_test/01: MissingCompileTimeError
+override_inheritance_mixed_test/02: MissingCompileTimeError
+override_inheritance_mixed_test/03: MissingCompileTimeError
+override_inheritance_mixed_test/04: MissingCompileTimeError
+override_inheritance_mixed_test/08: MissingCompileTimeError
+override_method_with_field_test/01: MissingCompileTimeError
+override_method_with_field_test/02: MissingCompileTimeError
+part2_test/01: MissingCompileTimeError
+positional_parameters_type_test/01: MissingCompileTimeError
+positional_parameters_type_test/02: MissingCompileTimeError
+prefix10_negative_test: Fail
+prefix11_negative_test: Fail
+prefix12_negative_test: Fail
+prefix16_test/00: MissingCompileTimeError
+prefix16_test/01: MissingCompileTimeError
+prefix1_negative_test: Fail
+prefix22_test/00: MissingCompileTimeError
+prefix23_test/00: MissingCompileTimeError
+prefix2_negative_test: Fail
+prefix3_negative_test: Fail
+prefix4_negative_test: Fail
+prefix5_negative_test: Fail
+prefix6_negative_test: Fail
+prefix8_negative_test: Fail
+private_access_test/01: MissingCompileTimeError
+private_access_test/02: MissingCompileTimeError
+private_access_test/03: MissingCompileTimeError
+private_access_test/04: MissingCompileTimeError
+private_access_test/05: MissingCompileTimeError
+private_access_test/06: MissingCompileTimeError
+private_member1_negative_test: Fail
+private_member2_negative_test: Fail
+private_member3_negative_test: Fail
+private_super_constructor_test/01: MissingCompileTimeError
+regress_12561_test: MissingCompileTimeError
+regress_13494_test: MissingCompileTimeError
+regress_17382_test: MissingCompileTimeError
+regress_19413_test: MissingCompileTimeError
+regress_19728_test: MissingCompileTimeError
+regress_20394_test/01: MissingCompileTimeError
+regress_21793_test/01: MissingCompileTimeError
+regress_21912_test/01: MissingCompileTimeError
+regress_21912_test/02: MissingCompileTimeError
+regress_22438_test: MissingCompileTimeError
+regress_22936_test: MissingCompileTimeError
+regress_23089_test: MissingCompileTimeError
+regress_26133_test: MissingCompileTimeError
+regress_27572_test: MissingCompileTimeError
+regress_28217_test/01: MissingCompileTimeError
+regress_28217_test/none: MissingCompileTimeError
+return_type_test: MissingCompileTimeError
+rewrite_implicit_this_test/01: MissingCompileTimeError
+setter_override_test/00: MissingCompileTimeError
+setter_override_test/03: MissingCompileTimeError
+static_call_wrong_argument_count_negative_test: Fail
+static_field1_test/01: MissingCompileTimeError
+static_field1a_test/01: MissingCompileTimeError
+static_field3_test/01: MissingCompileTimeError
+static_field3_test/02: MissingCompileTimeError
+static_field3_test/03: MissingCompileTimeError
+static_field3_test/04: MissingCompileTimeError
+static_field_test/01: MissingCompileTimeError
+static_field_test/02: MissingCompileTimeError
+static_field_test/03: MissingCompileTimeError
+static_field_test/04: MissingCompileTimeError
+static_final_field2_test/01: MissingCompileTimeError
+static_getter_no_setter1_test/01: MissingCompileTimeError
+static_getter_no_setter2_test/01: MissingCompileTimeError
+static_initializer_type_error_test: MissingCompileTimeError
+static_setter_get_test/01: MissingCompileTimeError
+string_interpolation_test/01: MissingCompileTimeError
+string_no_operator_test/01: MissingCompileTimeError
+string_no_operator_test/02: MissingCompileTimeError
+string_no_operator_test/03: MissingCompileTimeError
+string_no_operator_test/04: MissingCompileTimeError
+string_no_operator_test/05: MissingCompileTimeError
+string_no_operator_test/06: MissingCompileTimeError
+string_no_operator_test/07: MissingCompileTimeError
+string_no_operator_test/08: MissingCompileTimeError
+string_no_operator_test/09: MissingCompileTimeError
+string_no_operator_test/10: MissingCompileTimeError
+string_no_operator_test/11: MissingCompileTimeError
+string_no_operator_test/12: MissingCompileTimeError
+string_no_operator_test/13: MissingCompileTimeError
+string_no_operator_test/14: MissingCompileTimeError
+string_no_operator_test/15: MissingCompileTimeError
+string_no_operator_test/16: MissingCompileTimeError
+string_test/01: MissingCompileTimeError
+substring_test/01: MissingCompileTimeError
+super_assign_test/01: MissingCompileTimeError
+super_bound_closure_test/01: MissingCompileTimeError
+super_operator_index_test/01: MissingCompileTimeError
+super_operator_index_test/02: MissingCompileTimeError
+super_operator_index_test/03: MissingCompileTimeError
+super_operator_index_test/04: MissingCompileTimeError
+super_operator_index_test/05: MissingCompileTimeError
+super_operator_index_test/06: MissingCompileTimeError
+super_operator_index_test/07: MissingCompileTimeError
+switch4_negative_test: Crash
+switch_fallthru_test/01: MissingCompileTimeError
+symbol_literal_test/01: MissingCompileTimeError
+sync_generator1_test/01: MissingCompileTimeError
+syntax_test/59: MissingCompileTimeError
+top_level_getter_no_setter1_test: MissingCompileTimeError
+top_level_getter_no_setter2_test: MissingCompileTimeError
+transitive_private_library_access_test: MissingCompileTimeError
+try_catch_on_syntax_test/07: MissingCompileTimeError
+try_catch_on_syntax_test/10: MissingCompileTimeError
+try_catch_on_syntax_test/11: MissingCompileTimeError
+try_catch_syntax_test/08: MissingCompileTimeError
+try_catch_test/01: MissingCompileTimeError
+type_check_const_function_typedef2_test: MissingCompileTimeError
+type_checks_in_factory_method_test/01: MissingCompileTimeError
+type_inference_accessor_ref_test/03: MissingCompileTimeError
+type_inference_accessor_ref_test/06: MissingCompileTimeError
+type_inference_circularity_test: MissingCompileTimeError
+type_inference_inconsistent_inheritance_test: MissingCompileTimeError
+type_promotion_functions_test/01: MissingCompileTimeError
+type_promotion_functions_test/05: MissingCompileTimeError
+type_promotion_functions_test/06: MissingCompileTimeError
+type_promotion_functions_test/07: MissingCompileTimeError
+type_promotion_functions_test/08: MissingCompileTimeError
+type_promotion_functions_test/10: MissingCompileTimeError
+type_promotion_parameter_test/01: MissingCompileTimeError
+type_promotion_parameter_test/02: MissingCompileTimeError
+type_promotion_parameter_test/03: MissingCompileTimeError
+type_promotion_parameter_test/04: MissingCompileTimeError
+type_promotion_parameter_test/05: MissingCompileTimeError
+type_promotion_parameter_test/06: MissingCompileTimeError
+type_promotion_parameter_test/07: MissingCompileTimeError
+type_promotion_parameter_test/08: MissingCompileTimeError
+type_promotion_parameter_test/09: MissingCompileTimeError
+type_promotion_parameter_test/10: MissingCompileTimeError
+type_promotion_parameter_test/11: MissingCompileTimeError
+type_promotion_parameter_test/12: MissingCompileTimeError
+type_promotion_parameter_test/13: MissingCompileTimeError
+type_promotion_parameter_test/14: MissingCompileTimeError
+type_promotion_parameter_test/15: MissingCompileTimeError
+type_promotion_parameter_test/16: MissingCompileTimeError
+type_promotion_parameter_test/17: MissingCompileTimeError
+type_promotion_parameter_test/18: MissingCompileTimeError
+type_promotion_parameter_test/19: MissingCompileTimeError
+type_promotion_parameter_test/20: MissingCompileTimeError
+type_promotion_parameter_test/21: MissingCompileTimeError
+type_promotion_parameter_test/22: MissingCompileTimeError
+type_promotion_parameter_test/23: MissingCompileTimeError
+type_promotion_parameter_test/24: MissingCompileTimeError
+type_promotion_parameter_test/25: MissingCompileTimeError
+type_promotion_parameter_test/26: MissingCompileTimeError
+type_promotion_parameter_test/27: MissingCompileTimeError
+type_promotion_parameter_test/28: MissingCompileTimeError
+type_promotion_parameter_test/29: MissingCompileTimeError
+type_promotion_parameter_test/30: MissingCompileTimeError
+type_promotion_parameter_test/31: MissingCompileTimeError
+type_promotion_parameter_test/32: MissingCompileTimeError
+type_promotion_parameter_test/33: MissingCompileTimeError
+type_promotion_parameter_test/34: MissingCompileTimeError
+type_promotion_parameter_test/35: MissingCompileTimeError
+type_promotion_parameter_test/36: MissingCompileTimeError
+type_promotion_parameter_test/37: MissingCompileTimeError
+type_promotion_parameter_test/38: MissingCompileTimeError
+type_promotion_parameter_test/39: MissingCompileTimeError
+type_promotion_parameter_test/40: MissingCompileTimeError
+type_promotion_parameter_test/41: MissingCompileTimeError
+type_promotion_parameter_test/42: MissingCompileTimeError
+type_promotion_parameter_test/43: MissingCompileTimeError
+type_promotion_parameter_test/44: MissingCompileTimeError
+type_promotion_parameter_test/45: MissingCompileTimeError
+type_promotion_parameter_test/46: MissingCompileTimeError
+type_promotion_parameter_test/47: MissingCompileTimeError
+type_promotion_parameter_test/48: MissingCompileTimeError
+type_promotion_parameter_test/49: MissingCompileTimeError
+type_promotion_parameter_test/50: MissingCompileTimeError
+type_promotion_parameter_test/51: MissingCompileTimeError
+type_promotion_parameter_test/52: MissingCompileTimeError
+type_promotion_parameter_test/54: MissingCompileTimeError
+type_promotion_parameter_test/55: MissingCompileTimeError
+type_promotion_parameter_test/56: MissingCompileTimeError
+type_variable_bounds_test/00: MissingCompileTimeError
+type_variable_bounds_test/07: MissingCompileTimeError
+type_variable_bounds_test/09: MissingCompileTimeError
+type_variable_bounds_test/10: MissingCompileTimeError
+type_variable_conflict2_test/01: MissingCompileTimeError
+type_variable_conflict2_test/02: MissingCompileTimeError
+type_variable_conflict2_test/03: MissingCompileTimeError
+type_variable_conflict2_test/04: MissingCompileTimeError
+type_variable_conflict2_test/05: MissingCompileTimeError
+type_variable_conflict2_test/07: MissingCompileTimeError
+type_variable_conflict2_test/09: MissingCompileTimeError
+type_variable_identifier_expression_test: MissingCompileTimeError
+type_variable_scope2_test: MissingCompileTimeError
+type_variable_scope_test/00: MissingCompileTimeError
+type_variable_scope_test/01: MissingCompileTimeError
+type_variable_scope_test/02: MissingCompileTimeError
+type_variable_scope_test/03: MissingCompileTimeError
+type_variable_scope_test/04: MissingCompileTimeError
+type_variable_scope_test/05: MissingCompileTimeError
+type_variable_static_context_test: MissingCompileTimeError
+typed_selector2_test: MissingCompileTimeError
+unbound_getter_test: MissingCompileTimeError
+unhandled_exception_negative_test: Fail
+unresolved_default_constructor_test/01: MissingCompileTimeError
+unresolved_in_factory_test: MissingCompileTimeError
+unresolved_top_level_method_test: MissingCompileTimeError
+unresolved_top_level_var_test: MissingCompileTimeError
+
+[ !$strong && ($compiler == dartk || $compiler == dartkp) ]
+*: SkipByDesign # language_2 is only supported in strong mode.
+
+[ $compiler == dartk || $compiler == dartkp ]
+generic_function_bounds_test: RuntimeError # Issue 32076
+generic_test/01: MissingCompileTimeError
+
diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status
index 139219d..355e83e 100644
--- a/tests/language_2/language_2_precompiled.status
+++ b/tests/language_2/language_2_precompiled.status
@@ -376,7 +376,6 @@
function_type_call_getter2_test/05: MissingCompileTimeError
fuzzy_arrows_test/01: MissingCompileTimeError
fuzzy_arrows_test/03: RuntimeError
-generic_closure_test: RuntimeError
generic_constructor_mixin2_test/01: MissingCompileTimeError
generic_constructor_mixin3_test/01: MissingCompileTimeError
generic_constructor_mixin_test/01: MissingCompileTimeError
@@ -658,6 +657,22 @@
mixin_super_bound_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/01: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/02: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/03: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/03: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: RuntimeError
+mixin_type_parameter_inference_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_test/06: MissingCompileTimeError
+mixin_type_parameter_inference_test/07: MissingCompileTimeError
+mixin_type_parameter_inference_test/08: RuntimeError
+mixin_type_parameter_inference_test/09: RuntimeError
+mixin_type_parameter_inference_test/11: MissingCompileTimeError
+mixin_type_parameter_inference_test/14: MissingCompileTimeError
+mixin_type_parameter_inference_test/15: MissingCompileTimeError
mixin_type_parameters_errors_test/01: MissingCompileTimeError
mixin_type_parameters_errors_test/02: MissingCompileTimeError
mixin_type_parameters_errors_test/03: MissingCompileTimeError
diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status
index dc3c9fe..a0203fb 100644
--- a/tests/language_2/language_2_vm.status
+++ b/tests/language_2/language_2_vm.status
@@ -673,6 +673,22 @@
mixin_super_bound_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/01: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/02: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/03: MissingCompileTimeError
+mixin_type_parameter_inference_error_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/03: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: RuntimeError
+mixin_type_parameter_inference_test/04: MissingCompileTimeError
+mixin_type_parameter_inference_test/05: MissingCompileTimeError
+mixin_type_parameter_inference_test/06: MissingCompileTimeError
+mixin_type_parameter_inference_test/07: MissingCompileTimeError
+mixin_type_parameter_inference_test/08: RuntimeError
+mixin_type_parameter_inference_test/09: RuntimeError
+mixin_type_parameter_inference_test/11: MissingCompileTimeError
+mixin_type_parameter_inference_test/14: MissingCompileTimeError
+mixin_type_parameter_inference_test/15: MissingCompileTimeError
mixin_type_parameters_errors_test/01: MissingCompileTimeError
mixin_type_parameters_errors_test/02: MissingCompileTimeError
mixin_type_parameters_errors_test/03: MissingCompileTimeError
diff --git a/tests/language_2/mixin_type_parameter_inference_error_test.dart b/tests/language_2/mixin_type_parameter_inference_error_test.dart
new file mode 100644
index 0000000..fe1914e
--- /dev/null
+++ b/tests/language_2/mixin_type_parameter_inference_error_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2018, 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.
+// SharedOptions=--supermixin
+
+abstract class A<T> {}
+
+class B {}
+
+class M<T> extends A<T> {}
+
+// No matching class from which to infer the type parameter of M
+class C extends Object with M {} //# 01: compile-time error
+
+class C = Object with M; //# 02: compile-time error
+
+// Satisfying the constraint in the "implements" clause is not sufficient
+class C extends Object with M implements A<B> {} //# 03: compile-time error
+
+class C = Object with M implements A<B>; //# 04: compile-time error
+
+main() {}
diff --git a/tests/language_2/mixin_type_parameter_inference_previous_mixin_test.dart b/tests/language_2/mixin_type_parameter_inference_previous_mixin_test.dart
new file mode 100644
index 0000000..01ac846
--- /dev/null
+++ b/tests/language_2/mixin_type_parameter_inference_previous_mixin_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2018, 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.
+// SharedOptions=--supermixin
+
+import "package:expect/expect.dart";
+
+abstract class A<T> {
+ // This is ok because type inference will ensure that in C, A and M are
+ // instantiated with the same T.
+ T f(T x) => x; //# 01: ok
+}
+
+class B {}
+
+abstract class M1 implements A<B> {}
+
+class M2<T> extends A<T> {
+ T f(T x) => x;
+ T g(T x) => x;
+ Type h() => T;
+}
+
+// Inferred as `class C extends Object with M1, M2<B>`
+class C extends Object with M1, M2 {}
+
+main() {
+ C c = new C();
+
+ // M is instantiated with B, so C.g has type (B) -> B.
+ B Function(B) x = c.g; //# 02: ok
+ Null Function(Null) x = c.g; //# 03: compile-time error
+ Object Function(Object) x = c.g; //# 04: compile-time error
+
+ // And verify that the runtime system has the right type for the type
+ // parameter
+ Expect.equals(c.h(), B); //# 05: ok
+}
diff --git a/tests/language_2/mixin_type_parameter_inference_test.dart b/tests/language_2/mixin_type_parameter_inference_test.dart
new file mode 100644
index 0000000..1c2400c
--- /dev/null
+++ b/tests/language_2/mixin_type_parameter_inference_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2018, 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.
+// SharedOptions=--supermixin
+
+import "package:expect/expect.dart";
+
+abstract class A<T> {
+ // This is ok because type inference will ensure that in C, A and M are
+ // instantiated with the same T.
+ T f(T x) => x; //# 01: ok
+}
+
+class B {}
+
+class M1<T> extends A<T> {
+ T f(T x) => x;
+ T g(T x) => x;
+ Type h() => T;
+}
+
+class M2<T> {
+ T g(T x) => x;
+ Type h() => T;
+}
+
+// Inferred as `class C extends A<B> with M1<B>`
+class C extends A<B> with M1 {}
+
+// Inferred as `class D = A<B> with M1<B>`
+class D = A<B> with M1;
+
+// Inferred as `class E extends Object with M2<dynamic>`
+class E extends Object with M2 {}
+
+// Ok because a type parameter is supplied
+class F extends Object with M2<B> {}
+
+main() {
+ C c = new C();
+ D d = new D();
+ E e = new E();
+ F f = new F();
+
+ // M1 is instantiated with B, so C.g has type (B) -> B.
+ B Function(B) x = c.g; //# 02: ok
+ B Function(B) x = d.g; //# 03: ok
+ Null Function(Null) x = c.g; //# 04: compile-time error
+ Null Function(Null) x = d.g; //# 05: compile-time error
+ Object Function(Object) x = c.g; //# 06: compile-time error
+ Object Function(Object) x = d.g; //# 07: compile-time error
+
+ // And verify that the runtime system has the right type for the type
+ // parameter
+ Expect.equals(c.h(), B); //# 08: ok
+ Expect.equals(c.h(), B); //# 09: ok
+
+ // M2 is instantiated with dynamic, so E.g has type (dynamic) -> dynamic.
+ dynamic Function(dynamic) x = e.g; //# 10: ok
+ B Function(B) x = e.g; //# 11: compile-time error
+
+ // And verify that the runtime system has the right type for the type
+ // parameter
+ Expect.equals(e.h(), dynamic); //# 12: ok
+
+ // M2 is instantiated with B, so F.g has type (B) -> B.
+ B Function(B) x = f.g; //# 13: ok
+ Null Function(Null) x = f.g; //# 14: compile-time error
+ Object Function(Object) x = f.g; //# 15: compile-time error
+
+ // And verify that the runtime system has the right type for the type
+ // parameter
+ Expect.equals(f.h(), B); //# 16: ok
+}
diff --git a/tests/language_2/regress_32012_test.dart b/tests/language_2/regress_32012_test.dart
new file mode 100644
index 0000000..3e38419
--- /dev/null
+++ b/tests/language_2/regress_32012_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2018, 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 C {
+ int x;
+
+ int bar() {
+ return 19;
+ }
+}
+
+main() {
+ B foo<A extends B, B extends C>(A a) {
+ int bar<Q>(B b) {
+ return 23 + b.bar();
+ }
+
+ a.x = bar(a);
+ return a;
+ }
+
+ var x = <A extends B, B>(A a) {
+ return a;
+ };
+
+ Expect.equals(x(foo(new C())).x, 42);
+}
diff --git a/tests/lib/analyzer/analyze_library.status b/tests/lib/analyzer/analyze_library.status
index 55060cf..b3b42a8 100644
--- a/tests/lib/analyzer/analyze_library.status
+++ b/tests/lib/analyzer/analyze_library.status
@@ -25,7 +25,7 @@
lib/web_sql/dart2js/web_sql_dart2js: CompileTimeError # Issue 16522
lib/web_sql/dartium/web_sql_dartium: Skip # TODO: Remove Dartium
-[ $builder_tag == strong && $compiler == dart2analyzer ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
[ $compiler == dart2analyzer && $use_sdk ]
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index e6defdc..4af0127 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -131,8 +131,6 @@
[ $compiler == dartk ]
mirrors/invoke_throws_test: Crash
-mirrors/list_constructor_test/01: Crash
-mirrors/list_constructor_test/none: Crash
mirrors/mirrors_test: Crash
mirrors/redirecting_factory_test/01: Crash
mirrors/redirecting_factory_test/02: Crash
@@ -141,6 +139,12 @@
[ $compiler == dartkp ]
mirrors/*: Skip # mirrors are not supported by under precompilation
+[ $compiler == fasta ]
+mirrors/library_imports_bad_metadata_test/01: Crash
+mirrors/metadata_allowed_values_test/02: MissingCompileTimeError
+mirrors/metadata_allowed_values_test/27: MissingCompileTimeError
+mirrors/metadata_constructor_arguments_test/04: MissingCompileTimeError
+
[ $compiler == precompiler ]
convert/chunked_conversion_utf88_test: Pass, Timeout
convert/utf85_test: Pass, Timeout
@@ -174,8 +178,18 @@
mirrors/redirecting_factory_different_type_test: SkipByDesign # Tests type checks.
[ $fasta ]
+convert/base64_test/01: CompileTimeError
+convert/utf82_test: CompileTimeError
+js/datetime_roundtrip_test: CompileTimeError
+js/null_test: CompileTimeError
+math/double_pow_test: CompileTimeError
+mirrors/metadata_allowed_values_test/13: MissingCompileTimeError
+mirrors/metadata_allowed_values_test/14: MissingCompileTimeError
mirrors/metadata_nested_constructor_call_test/03: MissingCompileTimeError
mirrors/metadata_nested_constructor_call_test/04: MissingCompileTimeError
+mirrors/native_class_test: CompileTimeError
+mirrors/variable_is_const_test/01: MissingCompileTimeError
+typed_data/int32x4_bigint_test: CompileTimeError
[ $hot_reload ]
async/timer_regress22626_test: Pass, RuntimeError # Timing dependent.
@@ -207,12 +221,12 @@
typed_data/setRange_3_test: Fail # Safari doesn't fully implement spec for TypedArray.set
typed_data/setRange_4_test: Fail # Safari doesn't fully implement spec for TypedArray.set
-[ $builder_tag == strong && $compiler == dart2analyzer ]
-*: Skip # Issue 28649
-
[ $compiler == dart2analyzer && $checked ]
mirrors/regress_16321_test/01: MissingCompileTimeError # Issue 16391
+[ $compiler == dart2analyzer && $strong ]
+*: Skip # Issue 28649
+
[ $compiler == dart2js && $mode == debug ]
mirrors/native_class_test: Pass, Slow
@@ -422,8 +436,6 @@
mirrors/library_imports_shown_test: RuntimeError
mirrors/library_metadata_test: RuntimeError
mirrors/load_library_test: CompileTimeError
-mirrors/metadata_allowed_values_test/13: MissingCompileTimeError
-mirrors/metadata_allowed_values_test/14: MissingCompileTimeError
mirrors/metadata_allowed_values_test/16: Skip # Flaky, crashes.
mirrors/metadata_constructed_constant_test: Crash
mirrors/metadata_scope_test/none: RuntimeError
@@ -472,7 +484,6 @@
mirrors/typedef_reflected_type_test/none: RuntimeError
mirrors/typedef_test: RuntimeError
mirrors/typevariable_mirror_metadata_test: RuntimeError
-mirrors/variable_is_const_test/01: MissingCompileTimeError
[ $runtime == chrome || $runtime == ff ]
async/stream_timeout_test: SkipSlow # Times out. Issue 22050
diff --git a/tests/lib_2/async/periodic_timer2_test.dart b/tests/lib_2/async/periodic_timer2_test.dart
new file mode 100644
index 0000000..a1b7da1
--- /dev/null
+++ b/tests/lib_2/async/periodic_timer2_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2011, 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 'dart:async';
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+
+const ms = const Duration(milliseconds: 1);
+
+expectGTE(min, actual, msg) {
+ if (actual >= min) return;
+ Expect.fail(msg.replaceAll('{0}', "$min").replaceAll('{1}', "$actual"));
+}
+
+main() {
+ int interval = 20;
+ asyncStart();
+ var sw = new Stopwatch()..start();
+ int nextTick = 1;
+ new Timer.periodic(ms * interval, (t) {
+ expectGTE(nextTick, t.tick, "tick {1} before expect next tick {0}.");
+ nextTick = t.tick + 1; // Always increment tick by at least one.
+ int time = sw.elapsedMilliseconds;
+ int minTime = interval * t.tick;
+ expectGTE(minTime, time, "Actual time {1} before {0} at tick ${t.tick}");
+ if (t.tick > 20) {
+ t.cancel();
+ asyncEnd();
+ }
+ });
+}
diff --git a/tests/lib_2/async/periodic_timer3_test.dart b/tests/lib_2/async/periodic_timer3_test.dart
new file mode 100644
index 0000000..d09e636
--- /dev/null
+++ b/tests/lib_2/async/periodic_timer3_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2011, 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 timer_test;
+
+import 'dart:async';
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+
+const ms = const Duration(milliseconds: 1);
+
+expectGTE(min, actual, msg) {
+ if (actual >= min) return;
+ Expect.fail(msg.replaceAll('{0}', "$min").replaceAll('{1}', "$actual"));
+}
+
+main() {
+ int interval = 20;
+ asyncStart();
+ var sw = new Stopwatch()..start();
+ int nextTick = 1;
+ new Timer.periodic(ms * interval, (t) {
+ expectGTE(nextTick, t.tick, "tick {1} before expect next tick {0}.");
+ int time = sw.elapsedMilliseconds;
+ int minTime = interval * t.tick;
+ expectGTE(minTime, time, "Actual time {1} before {0} at tick ${t.tick}");
+ while (sw.elapsedMilliseconds < time + 3 * interval) {
+ // idle.
+ }
+ nextTick = t.tick + 2; // At least increment by two, probably more.
+ if (t.tick > 20) {
+ t.cancel();
+ asyncEnd();
+ }
+ });
+}
diff --git a/tests/lib_2/async/periodic_timer4_test.dart b/tests/lib_2/async/periodic_timer4_test.dart
new file mode 100644
index 0000000..12b9b31
--- /dev/null
+++ b/tests/lib_2/async/periodic_timer4_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2011, 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 timer_test;
+
+import 'dart:async';
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+
+const ms = const Duration(milliseconds: 1);
+
+expectGTE(min, actual, msg) {
+ if (actual >= min) return;
+ Expect.fail(msg.replaceAll('{0}', "$min").replaceAll('{1}', "$actual"));
+}
+
+main() {
+ int interval = 20;
+ asyncStart();
+ var sw = new Stopwatch()..start();
+ int nextTick = 1;
+ bool running = true;
+ var timer = new Timer.periodic(ms * interval, (t) {
+ expectGTE(nextTick, t.tick, "tick {1} before expect next tick {0}.");
+ nextTick += 1;
+ int time = sw.elapsedMilliseconds;
+ int minTime = interval * t.tick;
+ expectGTE(minTime, time, "Actual time {1} before {0} at tick ${t.tick}");
+ if (t.tick > 20) {
+ running = false;
+ t.cancel();
+ asyncEnd();
+ }
+ });
+
+ /// Test that ticks still happen when the rest of the system is slow.
+ delay() {
+ int time = new DateTime.now().millisecondsSinceEpoch;
+ int limit = time + 3 * interval;
+ while (new DateTime.now().millisecondsSinceEpoch < limit) {
+ // Idle.
+ }
+ nextTick = timer.tick + 2; // At least increment by two, probably more.
+ if (running) Timer.run(delay);
+ }
+
+ Timer.run(delay);
+}
diff --git a/tests/lib_2/collection/list_test.dart b/tests/lib_2/collection/list_test.dart
index de572a3..31bb61b 100644
--- a/tests/lib_2/collection/list_test.dart
+++ b/tests/lib_2/collection/list_test.dart
@@ -5,7 +5,7 @@
import 'dart:collection';
import "package:expect/expect.dart";
-class MyList<E> extends Object with ListMixin<E> implements List<E> {
+class MyList<E> extends ListBase<E> {
List<E> _list;
MyList(List<E> this._list);
diff --git a/tests/lib_2/html/fileapi_file_entry_test.dart b/tests/lib_2/html/fileapi_file_entry_test.dart
index a047a01..bc8b798 100644
--- a/tests/lib_2/html/fileapi_file_entry_test.dart
+++ b/tests/lib_2/html/fileapi_file_entry_test.dart
@@ -47,8 +47,8 @@
var fileObj = await fileAndDir.file.file();
expect(fileObj.name, fileAndDir.file.name);
expect(fileObj.relativePath, '');
- expect(new DateTime.now().difference(fileObj.lastModifiedDate).inSeconds,
- lessThan(60));
+ expect(new DateTime.now().difference(fileObj.lastModifiedDate).inMinutes,
+ lessThan(30));
});
}
}
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index 40162ef..21354c7 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -1,6 +1,7 @@
# Copyright (c) 2017, 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.
+html/cross_frame_test: Skip # Issue 32039, test reloads itself (not by design - investigate)
[ $arch == simarm64 ]
convert/utf85_test: Skip # Pass, Slow Issue 20111.
@@ -115,16 +116,6 @@
[ $jscl ]
isolate/spawn_uri_multi_test/none: RuntimeError # Issue 13544
-[ $strong ]
-mirrors/redirecting_factory_test: CompileTimeError # Issue 30855
-
-[ !$strong ]
-isolate/isolate_import_test/01: MissingCompileTimeError
-mirrors/top_level_accessors_test/01: MissingCompileTimeError
-typed_data/float32x4_static_test: MissingCompileTimeError
-typed_data/int32x4_static_test/01: MissingCompileTimeError
-typed_data/int32x4_static_test/02: MissingCompileTimeError
-
[ $builder_tag == mac10_7 && $runtime == safari ]
typed_data/setRange_2_test: Fail # Safari doesn't fully implement spec for TypedArray.set
typed_data/setRange_3_test: Fail # Safari doesn't fully implement spec for TypedArray.set
@@ -164,6 +155,16 @@
async/future_or_only_in_async_test/00: MissingCompileTimeError
async/multiple_timer_test: Pass, Fail # Timing related
+[ !$fasta && $strong ]
+mirrors/redirecting_factory_test: CompileTimeError # Issue 30855
+
+[ !$fasta && !$strong ]
+isolate/isolate_import_test/01: MissingCompileTimeError
+mirrors/top_level_accessors_test/01: MissingCompileTimeError
+typed_data/float32x4_static_test: MissingCompileTimeError
+typed_data/int32x4_static_test/01: MissingCompileTimeError
+typed_data/int32x4_static_test/02: MissingCompileTimeError
+
[ ($compiler != precompiler || $runtime != dart_precompiled) && ($runtime != vm || $compiler != dartk && $compiler != none) ]
isolate/vm_rehash_test: SkipByDesign
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status
index b909ec3..4c6228e 100644
--- a/tests/lib_2/lib_2_dart2js.status
+++ b/tests/lib_2/lib_2_dart2js.status
@@ -120,6 +120,7 @@
html/js_interop_constructor_name_error2_test: Fail # Issue 26838
[ $compiler == dart2js && $runtime == drt ]
+html/fileapi_entry_test: RuntimeError # DRT before DomError repl'd DomException
html/request_animation_frame_test: Skip # Async test hangs.
html/speechrecognition_test: RuntimeError # Please triage.
html/svg_test: RuntimeError # Please triage.
@@ -212,6 +213,9 @@
async/future_constructor2_test: Fail # Timer interface not supported: Issue 7728.
async/future_test: RuntimeError # Timer interface not supported; Issue 7728.
async/multiple_timer_test: RuntimeError, OK # Needs Timer to run.
+async/periodic_timer2_test: Fail # Timer interface not supported: Issue 7728.
+async/periodic_timer3_test: Fail # Timer interface not supported: Issue 7728.
+async/periodic_timer4_test: Fail # Timer interface not supported: Issue 7728.
async/run_zoned7_test: RuntimeError # Timer interface not supported: Issue 7728.
async/run_zoned8_test: Fail # Timer interface not supported: Issue 7728.
async/schedule_microtask3_test: RuntimeError
@@ -260,7 +264,7 @@
html/element_types_datalist_test: RuntimeError # Issue 29922
html/element_types_shadow_test: RuntimeError # Issue 29922
html/file_sample_test: Skip # FileSystem not supported on Safari.
-html/fileapi_supported_throws_test: skip # FileSystem not supported on Safari
+html/fileapi_supported_throws_test: Skip # FileSystem not supported on Safari
isolate/cross_isolate_message_test: Skip # Issue 12627
isolate/message_test: Skip # Issue 12627
@@ -568,6 +572,8 @@
html/event_customevent_test: RuntimeError
html/event_test: RuntimeError
html/exceptions_test: RuntimeError
+html/file_sample_test: RuntimeError
+html/fileapi_entry_test: RuntimeError
html/fileapi_supported_test: RuntimeError
html/filereader_test: RuntimeError
html/filteredelementlist_test: RuntimeError
@@ -758,6 +764,7 @@
convert/streamed_conversion_json_utf8_encode_test: SkipSlow # Times out. Issue 22050
convert/streamed_conversion_utf8_decode_test: SkipSlow # Times out. Issue 22050
isolate/kill_self_synchronously_test: RuntimeError
+periodic_timer4_test: Pass, RuntimeError # Flaky. Issue 32094.
[ $compiler == dart2js && ($runtime == d8 || $runtime == jsshell) ]
isolate/browser/issue_12474_test: RuntimeError # packageRoot not implemented.
diff --git a/tests/lib_2/lib_2_dartdevc.status b/tests/lib_2/lib_2_dartdevc.status
index 8afe594..dd36b16 100644
--- a/tests/lib_2/lib_2_dartdevc.status
+++ b/tests/lib_2/lib_2_dartdevc.status
@@ -4,7 +4,6 @@
[ $compiler == dartdevc ]
async/futures_test: RuntimeError # Issue 29922
-html/cross_frame_test: Skip # Issue 32039, test reloads itself (not by design - investigate)
html/xhr_test/xhr: RuntimeError # Issue 29922, strong mode cast failure
[ $compiler == dartdevk ]
diff --git a/tests/lib_2/lib_2_kernel.status b/tests/lib_2/lib_2_kernel.status
index 6c52840..4d36cfb 100644
--- a/tests/lib_2/lib_2_kernel.status
+++ b/tests/lib_2/lib_2_kernel.status
@@ -10,6 +10,23 @@
# missing a section you need, please reach out to sigmund@ to see the best way
# to add them.
+[ $fasta ]
+isolate/compile_time_error_test/01: MissingCompileTimeError
+mirrors/generic_bounded_by_type_parameter_test/02: MissingCompileTimeError
+mirrors/generic_bounded_test/01: MissingCompileTimeError
+mirrors/generic_bounded_test/02: MissingCompileTimeError
+mirrors/generic_interface_test/01: MissingCompileTimeError
+mirrors/generics_test/01: MissingCompileTimeError
+mirrors/metadata_allowed_values_test/13: MissingCompileTimeError
+mirrors/metadata_allowed_values_test/14: MissingCompileTimeError
+mirrors/reflected_type_classes_test/01: MissingCompileTimeError
+mirrors/reflected_type_classes_test/02: MissingCompileTimeError
+mirrors/reflected_type_classes_test/03: MissingCompileTimeError
+mirrors/reflected_type_test/01: MissingCompileTimeError
+mirrors/reflected_type_test/02: MissingCompileTimeError
+mirrors/reflected_type_test/03: MissingCompileTimeError
+mirrors/variable_is_const_test/01: MissingCompileTimeError
+
[ $arch == x64 && $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
mirrors/invocation_fuzz_test: Skip # Because it times out, issue 29439.
mirrors/variable_is_const_test/01: Crash
@@ -25,6 +42,9 @@
mirrors/library_imports_shown_test: Crash # 31916
mirrors/other_declarations_location_test: Crash # assertion error, TypeParameter not having position.
+[ $compiler == dartk && $mode == debug && $strong ]
+mirrors/instance_members_unimplemented_interface_test: Crash
+
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
@@ -36,12 +56,6 @@
mirrors/redirecting_factory_different_type_test/none: Crash # Issue 28424
mirrors/reflected_type_generics_test/02: Pass
-[ $compiler == dartk && $runtime == vm && !$checked && $strong ]
-mirrors/invocation_fuzz_test/emptyarray: Crash
-mirrors/invocation_fuzz_test/false: Crash
-mirrors/invocation_fuzz_test/none: Crash
-mirrors/invocation_fuzz_test/string: Crash
-
# ===== dartk + vm status lines =====
[ $compiler == dartk && $runtime == vm && $strong ]
async/async_await_sync_completer_test: RuntimeError
@@ -53,7 +67,6 @@
async/timer_not_available_test: RuntimeError
convert/streamed_conversion_json_utf8_decode_test: Pass, Slow # Infrequent timeouts.
html/*: SkipByDesign # dart:html not supported on VM.
-isolate/compile_time_error_test/01: MissingCompileTimeError
isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
isolate/issue_21398_parent_isolate1_test: RuntimeError # Issue 31402 (List literal)
@@ -61,12 +74,9 @@
isolate/message_test: CompileTimeError # Issue 31402 (Invocation arguments)
isolate/mint_maker_test: CompileTimeError # Issue 31402 (Invocation arguments)
isolate/ping_pause_test: Pass, Timeout
-isolate/spawn_function_custom_class_test: Pass, Timeout
+isolate/spawn_function_custom_class_test: Pass, Crash, Timeout # Crashes with --no-enable-malloc-hooks vm option
isolate/spawn_uri_nested_vm_test: Pass, Timeout
isolate/static_function_test: Skip # Times out. Issue 31855. CompileTimeError. Issue 31402
-js/datetime_roundtrip_test: CompileTimeError
-js/null_test: CompileTimeError
-js/prototype_access_test: CompileTimeError
mirrors/abstract_class_test: RuntimeError
mirrors/class_declarations_test/01: RuntimeError # Issue 31402 (Invocation arguments)
mirrors/class_declarations_test/none: RuntimeError # Issue 31402 (Invocation arguments)
@@ -76,24 +86,17 @@
mirrors/constructor_private_name_test: RuntimeError
mirrors/constructors_test: CompileTimeError # Issue 31402 (Invocation arguments)
mirrors/dart2js_mirrors_test: Crash # 31916
-mirrors/deferred_mirrors_metadata_test: RuntimeError
-mirrors/deferred_mirrors_metadata_test: CompileTimeError # Deferred loading kernel issue 28335.
+mirrors/deferred_mirrors_metadata_test: RuntimeError, CompileTimeError # Deferred loading kernel issue 28335.
mirrors/deferred_mirrors_metatarget_test: CompileTimeError # Deferred loading kernel issue 28335.
-mirrors/deferred_mirrors_metatarget_test: RuntimeError
mirrors/deferred_mirrors_test: Crash # 31916
-mirrors/deferred_mirrors_update_test: CompileTimeError # Deferred loading kernel issue 28335.
-mirrors/deferred_mirrors_update_test: RuntimeError
+mirrors/deferred_mirrors_update_test: RuntimeError, CompileTimeError # Deferred loading kernel issue 28335.
mirrors/deferred_type_test: CompileTimeError, RuntimeError
mirrors/empty_test: Crash, RuntimeError
mirrors/enum_test: RuntimeError # Issue 31402 (Invocation arguments)
mirrors/equality_test: RuntimeError
mirrors/function_type_mirror_test: RuntimeError
-mirrors/generic_bounded_by_type_parameter_test/02: MissingCompileTimeError
-mirrors/generic_bounded_test/01: MissingCompileTimeError
-mirrors/generic_bounded_test/02: MissingCompileTimeError
mirrors/generic_f_bounded_mixin_application_test: RuntimeError
mirrors/generic_function_typedef_test: RuntimeError
-mirrors/generic_interface_test/01: MissingCompileTimeError
mirrors/generic_interface_test/01: RuntimeError
mirrors/generic_interface_test/none: RuntimeError
mirrors/generic_mixin_applications_test: RuntimeError
@@ -102,7 +105,6 @@
mirrors/generics_double_substitution_test/none: RuntimeError
mirrors/generics_dynamic_test: RuntimeError
mirrors/generics_substitution_test: RuntimeError
-mirrors/generics_test/01: MissingCompileTimeError
mirrors/generics_test/none: RuntimeError
mirrors/hot_get_field_test: RuntimeError
mirrors/hot_set_field_test: RuntimeError
@@ -110,27 +112,19 @@
mirrors/invoke_private_test: RuntimeError
mirrors/invoke_private_wrong_library_test: RuntimeError
mirrors/library_declarations_test/none: RuntimeError # Issue 31402 (Invocation arguments)
-mirrors/library_enumeration_deferred_loading_test: RuntimeError
-mirrors/library_enumeration_deferred_loading_test: CompileTimeError # Deferred loading kernel issue 28335.
-mirrors/library_exports_hidden_test: RuntimeError, Crash
-mirrors/library_exports_hidden_test: CompileTimeError # Issue 31402 (Invocation arguments)
-mirrors/library_exports_shown_test: RuntimeError
-mirrors/library_exports_shown_test: CompileTimeError # Issue 31402 (Invocation arguments)
+mirrors/library_enumeration_deferred_loading_test: CompileTimeError
+mirrors/library_exports_hidden_test: RuntimeError, Crash, CompileTimeError # Issue 31402 (Invocation arguments)
+mirrors/library_exports_shown_test: RuntimeError, CompileTimeError # Issue 31402 (Invocation arguments)
mirrors/library_import_deferred_loading_test: CompileTimeError # Deferred loading kernel issue 28335.
mirrors/library_imports_bad_metadata_test/none: Crash
-mirrors/library_imports_deferred_test: CompileTimeError # Issue 31402 (Invocation arguments)
-mirrors/library_imports_deferred_test: RuntimeError
+mirrors/library_imports_deferred_test: RuntimeError, CompileTimeError # Issue 31402 (Invocation arguments)
mirrors/library_imports_hidden_test: RuntimeError # Issue 31402 (Invocation arguments)
mirrors/library_imports_metadata_test: RuntimeError # Issue 31402 (Invocation arguments)
mirrors/library_imports_prefixed_show_hide_test: RuntimeError # Issue 31402 (Invocation arguments)
mirrors/library_imports_prefixed_test: RuntimeError # Issue 31402 (Invocation arguments)
mirrors/library_imports_shown_test: RuntimeError # Issue 31402 (Invocation arguments)
mirrors/library_metadata_test: RuntimeError
-mirrors/list_constructor_test/01: Crash, RuntimeError
-mirrors/list_constructor_test/none: Crash, RuntimeError
mirrors/load_library_test: CompileTimeError
-mirrors/metadata_allowed_values_test/13: MissingCompileTimeError
-mirrors/metadata_allowed_values_test/14: MissingCompileTimeError
mirrors/metadata_allowed_values_test/16: Skip # Flaky, crashes.
mirrors/metadata_constructed_constant_test: Crash, RuntimeError
mirrors/metadata_scope_test/none: RuntimeError
@@ -164,7 +158,6 @@
mirrors/private_symbol_test: RuntimeError
mirrors/private_types_test: RuntimeError
mirrors/redirecting_factory_different_type_test/01: Crash
-mirrors/redirecting_factory_different_type_test/01: MissingCompileTimeError
mirrors/redirecting_factory_test/01: Crash
mirrors/redirecting_factory_test/02: Crash
mirrors/redirecting_factory_test/none: Crash
@@ -197,10 +190,6 @@
mirrors/typedef_reflected_type_test/none: RuntimeError
mirrors/typedef_test: RuntimeError
mirrors/typevariable_mirror_metadata_test: RuntimeError
-mirrors/variable_is_const_test/01: MissingCompileTimeError
-typed_data/float32x4_static_test: Pass # Issue 31402 (Invocation arguments)
-typed_data/int32x4_static_test/01: Pass # Issue 31402 (Invocation arguments)
-typed_data/int32x4_static_test/02: Pass # Issue 31402 (Invocation arguments)
[ $compiler == dartk && $strong ]
async/future_test/01: RuntimeError
@@ -244,8 +233,6 @@
mirrors/invoke_closurization2_test: RuntimeError
mirrors/invoke_throws_test: Crash
mirrors/library_imports_bad_metadata_test/none: RuntimeError
-mirrors/list_constructor_test/01: Crash
-mirrors/list_constructor_test/none: Crash
mirrors/metadata_const_map_test: Crash
mirrors/mixin_members_test: RuntimeError
mirrors/null_test: RuntimeError
@@ -255,19 +242,10 @@
mirrors/parameter_test/none: RuntimeError
mirrors/redirecting_factory_different_type_test/02: Crash
mirrors/redirecting_factory_different_type_test/none: Crash
-mirrors/reflected_type_classes_test/01: MissingCompileTimeError
-mirrors/reflected_type_classes_test/02: MissingCompileTimeError
-mirrors/reflected_type_classes_test/03: MissingCompileTimeError
-mirrors/reflected_type_test/01: MissingCompileTimeError
-mirrors/reflected_type_test/02: MissingCompileTimeError
-mirrors/reflected_type_test/03: MissingCompileTimeError
mirrors/regress_16321_test/none: Crash
mirrors/top_level_accessors_test/01: MissingCompileTimeError
mirrors/type_argument_is_type_variable_test: RuntimeError
mirrors/typearguments_mirror_test: RuntimeError
-typed_data/float32x4_static_test: MissingCompileTimeError
-typed_data/int32x4_static_test/01: MissingCompileTimeError
-typed_data/int32x4_static_test/02: MissingCompileTimeError
# Enabling of dartk for sim{arm,arm64,dbc64} revealed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
@@ -293,11 +271,6 @@
isolate/spawn_uri_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
isolate/spawn_uri_vm_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
isolate/unresolved_ports_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-mirrors/invocation_fuzz_test/emptyarray: CompileTimeError, Pass # Please triage.
-mirrors/invocation_fuzz_test/false: CompileTimeError, Pass # Please triage.
-mirrors/invocation_fuzz_test/none: CompileTimeError # Please triage.
-mirrors/invocation_fuzz_test/smi: CompileTimeError, DartkCrash, Crash, Pass # Please triage.
-mirrors/invocation_fuzz_test/string: CompileTimeError, Pass # Please triage.
mirrors/library_uri_io_test: RuntimeError # Please triage.
# ===== Skip dartk and darkp in !$strong mode ====
@@ -322,7 +295,6 @@
async/timer_not_available_test: RuntimeError
html/*: SkipByDesign # dart:html not supported on VM.
isolate/compile_time_error_test/01: Crash
-isolate/compile_time_error_test/01: MissingCompileTimeError
isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
@@ -332,11 +304,31 @@
isolate/ping_pause_test: Pass, Timeout
isolate/spawn_function_custom_class_test: Pass, Timeout
isolate/spawn_uri_nested_vm_test: Pass, Timeout
-js/datetime_roundtrip_test: CompileTimeError
-js/null_test: CompileTimeError
-js/prototype_access_test: CompileTimeError
mirrors/*: SkipByDesign # Mirrors are not supported in AOT mode.
[ $compiler == dartkp && !$strong ]
*: SkipByDesign
+[ $fasta && $strong ]
+mirrors/top_level_accessors_test/01: MissingCompileTimeError
+
+[ $fasta && !$strong ]
+isolate/browser/compute_this_script_browser_test: CompileTimeError
+isolate/browser/package_resolve_browser_hook2_test: CompileTimeError
+isolate/browser/package_resolve_browser_hook_test: CompileTimeError
+isolate/browser/package_resolve_browser_test: CompileTimeError
+isolate/isolate_stress_test: CompileTimeError
+mirrors/library_imports_bad_metadata_test/01: Crash
+mirrors/metadata_allowed_values_test/02: MissingCompileTimeError
+mirrors/metadata_allowed_values_test/27: MissingCompileTimeError
+mirrors/metadata_constructor_arguments_test/04: MissingCompileTimeError
+mirrors/native_class_test: CompileTimeError
+mirrors/redirecting_factory_different_type_test/01: MissingCompileTimeError
+mirrors/reflect_class_test/01: MissingCompileTimeError
+mirrors/reflect_class_test/02: MissingCompileTimeError
+mirrors/regress_16321_test/01: MissingCompileTimeError
+
+[ $compiler == dartk || $compiler == dartkp || $compiler == fasta ]
+html/*: CompileTimeError # TODO(ahe): Make dart:html available.
+js/*: CompileTimeError # TODO(ahe): Make dart:js available.
+
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 44429ad..f32ce9e 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -30,18 +30,18 @@
[ $builder_tag == swarming && $system == macos ]
io/*: Skip # Issue 30618
-[ $compiler == dart2analyzer && ($builder_tag == strong || $strong) ]
+[ $compiler == dart2analyzer && $strong ]
*: Skip # Issue 28649
[ $compiler == dartk && $strong ]
*: SkipByDesign
+[ $compiler != fasta && $compiler != none && $runtime != dart_precompiled && $runtime != vm ]
+no_assert_test: Fail, OK # This is testing a vm flag.
+
[ $compiler == none && $runtime == vm && $system == fuchsia ]
*: Skip # Not yet triaged.
-[ $compiler != none && $runtime != dart_precompiled && $runtime != vm ]
-no_assert_test: Fail, OK # This is testing a vm flag.
-
[ $mode == product && $runtime == dart_precompiled ]
dwarf_stack_trace_test: Pass, RuntimeError # Results will flake due to identical code folding
diff --git a/tests/standalone_2/io/issue_32052_test.dart b/tests/standalone_2/io/issue_32052_test.dart
new file mode 100644
index 0000000..b39f816
--- /dev/null
+++ b/tests/standalone_2/io/issue_32052_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2018, 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 'dart:async';
+import 'dart:cli';
+
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+
+main() {
+ asyncStart();
+ Completer<Null> c = new Completer<Null>();
+ Timer.run(() {
+ c.complete(null);
+ asyncEnd();
+ });
+ Null result = waitFor<Null>(c.future);
+ Expect.isNull(result);
+}
diff --git a/tests/standalone_2/standalone_2.status b/tests/standalone_2/standalone_2.status
index 8bde01d..0f8a69a 100644
--- a/tests/standalone_2/standalone_2.status
+++ b/tests/standalone_2/standalone_2.status
@@ -62,6 +62,9 @@
io/wait_for_event_zone_test: SkipByDesign # Uses mirrors.
io/wait_for_test: SkipByDesign # Uses mirrors.
+[ $runtime == none ]
+io/process_exit_negative_test: Fail, OK # Must be run to exit with non-zero exit code.
+
[ !$strong ]
float_array_static_test: MissingCompileTimeError
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 83be5c7..83359910 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -10,6 +10,18 @@
# missing a section you need, please reach out to sigmund@ to see the best way
# to add them.
+[ $fasta ]
+deferred_transitive_import_error_test: CompileTimeError
+package/package1_test: CompileTimeError
+package/package_isolate_test: Crash
+package/package_test: CompileTimeError
+package/scenarios/invalid/same_package_twice_test: CompileTimeError
+regress_29350_test/none: MissingCompileTimeError
+
+[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && $fasta ]
+package/scenarios/invalid/invalid_utf8_test: CompileTimeError # Issue 32085
+package/scenarios/invalid/non_existent_packages_file_test: CompileTimeError # Issue 32085
+
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
io/file_lock_test: Slow, Pass
io/raw_socket_test: Crash
@@ -24,14 +36,11 @@
io/compile_all_test: Crash
io/http_client_request_test: Pass, Timeout
io/http_compression_test: RuntimeError
+io/platform_resolved_executable_test/03: Pass, RuntimeError
+io/platform_resolved_executable_test/04: Pass, RuntimeError
io/secure_builtin_roots_test: Timeout
io/socket_finalizer_test: Pass, Timeout
no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
-package/package1_test: CompileTimeError
-package/package_test: CompileTimeError
-package/scenarios/invalid/invalid_utf8_test: CompileTimeError
-package/scenarios/invalid/non_existent_packages_file_test: CompileTimeError
-package/scenarios/invalid/same_package_twice_test: CompileTimeError
regress_29350_test: MissingCompileTimeError
regress_29350_test/none: Pass # Issue 31537
@@ -43,9 +52,6 @@
io/regress_7679_test: RuntimeError # Issue 31904
map_insert_remove_oom_test: Skip # Timeout
-[ $compiler == dartk && $system != windows && $strong ]
-map_insert_remove_oom_test: Crash
-
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
# batch mode.
@@ -56,9 +62,7 @@
io/platform_test: RuntimeError # Please triage.
io/test_extension_fail_test: RuntimeError # Please traige.
io/test_extension_test: RuntimeError # Please traige.
-map_insert_remove_oom_test: Pass # Please triage.
-package/scenarios/invalid/invalid_utf8_test: Pass # Please triage.
-package/scenarios/invalid/non_existent_packages_file_test: Pass # Please triage.
+map_insert_remove_oom_test: Crash # Please triage.
package/scenarios/packages_file_strange_formatting/empty_lines_test: CompileTimeError # Please triage.
package/scenarios/packages_file_strange_formatting/mixed_line_ends_test: CompileTimeError # Please triage.
package/scenarios/packages_option_only/packages_option_only_test: CompileTimeError # Please triage.
@@ -98,7 +102,7 @@
io/raw_datagram_socket_test: Skip # Flaky.
io/raw_secure_server_closing_test: Skip # Flaky
io/raw_socket_test: Crash
-io/secure_builtin_roots_test: Timeout, RuntimeError
+io/secure_builtin_roots_test: Timeout, Pass # Times out on bots.
io/secure_multiple_client_server_test: Skip # Flaky.
io/secure_server_closing_test: Skip # Flaky.
io/secure_server_socket_test: Skip # Flaky.
@@ -109,11 +113,6 @@
io/web_socket_test: Skip # Flaky.
map_insert_remove_oom_test: Crash
no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
-package/package1_test: CompileTimeError
-package/package_test: CompileTimeError
-package/scenarios/invalid/invalid_utf8_test: CompileTimeError
-package/scenarios/invalid/non_existent_packages_file_test: CompileTimeError
-package/scenarios/invalid/same_package_twice_test: CompileTimeError
regress_29350_test: MissingCompileTimeError
regress_29350_test/none: Pass # Issue 31537
diff --git a/tools/VERSION b/tools/VERSION
index 64a9361..a6b4427 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 0
PATCH 0
-PRERELEASE 21
+PRERELEASE 22
PRERELEASE_PATCH 0
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 0d597fd..82a859b 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -1,5 +1,23 @@
{
"filesets": {
+ "analyzer": [
+ "out/ReleaseX64/",
+ "xcodebuild/ReleaseX64/",
+ "tools/",
+ "tests/",
+ "pkg/",
+ "third_party/pkg/",
+ "third_party/pkg_tested/",
+ ".packages"
+ ],
+ "dart2js": [
+ "out/ReleaseX64/",
+ "xcodebuild/ReleaseX64/",
+ "tools/",
+ "tests/",
+ "pkg/",
+ ".packages"
+ ],
"vm_debug": [
"out/DebugIA32/",
"out/DebugX64/",
@@ -25,22 +43,41 @@
"sdk/",
".packages"
],
- "analyzer": [
+ "vm-kernel": [
+ "out/DebugIA32/",
+ "out/DebugSIMARM/",
+ "out/DebugSIMARM64/",
+ "out/DebugSIMDBC64/",
+ "out/DebugX64/",
+ "out/ReleaseIA32/",
+ "out/ReleaseSIMARM/",
+ "out/ReleaseSIMARM64/",
+ "out/ReleaseSIMDBC64/",
"out/ReleaseX64/",
+ "xcodebuild/DebugIA32/",
+ "xcodebuild/DebugX64/",
+ "xcodebuild/ReleaseIA32/",
"xcodebuild/ReleaseX64/",
+ "samples/",
+ "samples-dev/",
"tools/",
- "tests/",
- "pkg/",
"third_party/pkg/",
"third_party/pkg_tested/",
- ".packages"
- ],
- "dart2js": [
- "out/ReleaseX64/",
- "xcodebuild/ReleaseX64/",
- "tools/",
+ "third_party/observatory_pub_packages/packages/unittest/",
+ "third_party/observatory_pub_packages/packages/web_components/",
"tests/",
- "pkg/",
+ "pkg/async_helper/",
+ "pkg/dart_internal/",
+ "pkg/expect/",
+ "pkg/front_end/",
+ "pkg/js/",
+ "pkg/kernel/",
+ "pkg/meta/",
+ "pkg/pkg.status",
+ "pkg/status_file/",
+ "pkg/vm/",
+ "runtime/",
+ "sdk/",
".packages"
]
},
@@ -79,15 +116,11 @@
},
{
"name": "vm tests",
- "arguments": [],
- "fileset": "vm_debug",
- "shards": 3
+ "arguments": ["--builder-tag=swarming"]
},
{
"name": "checked vm tests",
- "arguments": ["--checked"],
- "fileset": "vm_debug",
- "shards": 3
+ "arguments": ["--builder-tag=swarming", "--checked"]
}
]
},
@@ -116,13 +149,12 @@
},
{
"builders": [
- "vm-kernel-precomp-linux-release-x64",
"vm-kernel-precomp-linux-release-simarm",
"vm-kernel-precomp-linux-release-simarm64",
"vm-kernel-precomp-win-release-x64"
],
"meta": {
- "description": "This configuration is used by the vm kernel release builder."
+ "description": "This configuration is used by the vm kernel precomp builders that require --use-blobs."
},
"steps": [
{
@@ -135,9 +167,43 @@
},
{
"name": "vm tests",
- "arguments": ["--compiler=dartkp", "--runtime=dart_precompiled"],
- "fileset": "vm_debug",
- "shards": 6
+ "arguments": [
+ "--compiler=dartkp",
+ "--runtime=dart_precompiled",
+ "--use-blobs"
+ ]
+ },
+ {
+ "name": "strong vm tests",
+ "arguments": [
+ "--compiler=dartkp",
+ "--runtime=dart_precompiled",
+ "--strong",
+ "--use-blobs"
+ ]
+ }
+ ]
+ },
+ {
+ "builders": [
+ "vm-kernel-precomp-linux-release-x64"
+ ],
+ "meta": {
+ "description": "This configuration is used by the vm kernel precomp builders."
+ },
+ "steps": [
+ {
+ "name": "build dart",
+ "script": "tools/build.py",
+ "arguments": [
+ "runtime_kernel",
+ "dart_precompiled_runtime"
+ ]
+ },
+ {
+ "name": "vm tests",
+ "arguments": [
+ "--compiler=dartkp","--runtime=dart_precompiled"]
},
{
"name": "strong vm tests",
@@ -145,9 +211,7 @@
"--compiler=dartkp",
"--runtime=dart_precompiled",
"--strong"
- ],
- "fileset": "vm_debug",
- "shards": 6
+ ]
}
]
},
@@ -173,9 +237,7 @@
"--compiler=dartkp",
"--runtime=dart_precompiled",
"--vm-options=--no-enable-malloc-hooks"
- ],
- "fileset": "vm_debug",
- "shards": 6
+ ]
},
{
"name": "strong vm tests",
@@ -184,9 +246,7 @@
"--runtime=dart_precompiled",
"--vm-options=--no-enable-malloc-hooks",
"--strong"
- ],
- "fileset": "vm_debug",
- "shards": 6
+ ]
}
]
},
@@ -248,6 +308,14 @@
"arguments": ["runtime_kernel"]
},
{
+ "name": "vm tests",
+ "arguments": ["--compiler=dartk"]
+ },
+ {
+ "name": "strong vm tests",
+ "arguments": ["--compiler=dartk", "--strong"]
+ },
+ {
"name": "front-end tests",
"arguments": [
"--compiler=none",
@@ -255,14 +323,6 @@
"--timeout=120"
],
"tests": ["pkg/front_end"]
- },
- {
- "name": "vm tests",
- "arguments": ["--compiler=dartk"]
- },
- {
- "name": "strong vm tests",
- "arguments": ["--compiler=dartk", "--strong"]
}
]
},
diff --git a/tools/dom/src/AttributeMap.dart b/tools/dom/src/AttributeMap.dart
index 15a5ee1..85aef19 100644
--- a/tools/dom/src/AttributeMap.dart
+++ b/tools/dom/src/AttributeMap.dart
@@ -4,7 +4,7 @@
part of html;
-abstract class _AttributeMap implements Map<String, String> {
+abstract class _AttributeMap extends MapBase<String, String> {
final Element _element;
_AttributeMap(this._element);
@@ -15,6 +15,13 @@
});
}
+ Map<K, V> cast<K, V>() {
+ Map<Object, Object> self = this;
+ return self is Map<K, V> ? self : Map.castFrom<String, String, K, V>(this);
+ }
+
+ Map<K, V> retype<K, V>() => Map.castFrom<String, String, K, V>(this);
+
bool containsValue(Object value) {
for (var v in this.values) {
if (value == v) {
@@ -162,7 +169,7 @@
* Provides a Map abstraction on top of data-* attributes, similar to the
* dataSet in the old DOM.
*/
-class _DataAttributeMap implements Map<String, String> {
+class _DataAttributeMap extends MapBase<String, String> {
final Map<String, String> _attributes;
_DataAttributeMap(this._attributes);
@@ -175,6 +182,13 @@
});
}
+ Map<K, V> cast<K, V>() {
+ Map<Object, Object> self = this;
+ return self is Map<K, V> ? self : Map.castFrom<String, String, K, V>(this);
+ }
+
+ Map<K, V> retype<K, V>() => Map.castFrom<String, String, K, V>(this);
+
// TODO: Use lazy iterator when it is available on Map.
bool containsValue(Object value) => values.any((v) => v == value);
diff --git a/tools/dom/src/ImmutableListMixin.dart b/tools/dom/src/ImmutableListMixin.dart
index ffdcc2c..ecf5e7c 100644
--- a/tools/dom/src/ImmutableListMixin.dart
+++ b/tools/dom/src/ImmutableListMixin.dart
@@ -13,7 +13,7 @@
return new FixedSizeListIterator<E>(this);
}
- // From Collection<E>:
+ // From List<E>:
void add(E value) {
throw new UnsupportedError("Cannot add to immutable List.");
}
@@ -22,7 +22,6 @@
throw new UnsupportedError("Cannot add to immutable List.");
}
- // From List<E>:
void sort([int compare(E a, E b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
diff --git a/tools/dom/templates/html/impl/impl_Storage.darttemplate b/tools/dom/templates/html/impl/impl_Storage.darttemplate
index b3c3ac9..5cd76ee 100644
--- a/tools/dom/templates/html/impl/impl_Storage.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Storage.darttemplate
@@ -30,7 +30,7 @@
* section of the library tour.
*/
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS
- implements Map<String, String> {
+ with MapMixin<String, String> {
void addAll(Map<String, String> other) {
other.forEach((k, v) { this[k] = v; });
diff --git a/tools/gardening/lib/src/results_workflow/fix_failing_test.dart b/tools/gardening/lib/src/results_workflow/fix_failing_test.dart
index 262330c..cb075ba 100644
--- a/tools/gardening/lib/src/results_workflow/fix_failing_test.dart
+++ b/tools/gardening/lib/src/results_workflow/fix_failing_test.dart
@@ -18,7 +18,7 @@
import '../util.dart';
import '../workflow.dart';
-final RegExp toggleSectionRegExp = new RegExp(r"^t(\d+)$");
+final RegExp toggleSectionRegExp = new RegExp(r"^(\d+)$");
/// This is the main workflow step, where the user is asked what to do with the
/// failure and input comments etc. For every test, [onShow] is called with the
@@ -30,8 +30,8 @@
// These fields are mutated to persist user input.
String _lastComment;
+ Set<_CustomSection> _customSections = new Set<_CustomSection>();
FixWorkingItem _lastWorkingItem;
- List<StatusSectionWithFile> _customSections = [];
StatusExpectations _statusExpectations;
FixFailingTest(this._testResult);
@@ -57,9 +57,8 @@
}
_currentWorkingItem = new FixWorkingItem(failingTest.result.name,
- failingTest, _statusExpectations, _lastComment, this._customSections);
+ failingTest, _statusExpectations, _lastComment, _customSections);
_currentWorkingItem.init();
-
print("");
print("${_remainingTests.length + 1} tests remaining.");
askAboutTest();
@@ -114,6 +113,7 @@
}
Future<WorkflowAction> _fixAllSimilarTests() async {
+ var unhandledTests = <FailingTest>[];
for (FailingTest similarTest in _remainingTests) {
_currentWorkingItem = new FixWorkingItem(similarTest.result.name,
similarTest, _statusExpectations, _lastComment, this._customSections);
@@ -131,15 +131,22 @@
currentConfigurations.length &&
lastConfigurations.every(
(configuration) => currentConfigurations.contains(configuration));
- if (outcomeIsSame && sameConfigurations) {
+ var sameFiles = _lastWorkingItem.statusFiles().every((last) {
+ return _currentWorkingItem.statusFiles().any((current) {
+ return current.path == last.path;
+ });
+ });
+ if (outcomeIsSame && sameConfigurations && sameFiles) {
_currentWorkingItem.currentSections = _lastWorkingItem.currentSections;
print("Auto-fixing ${_currentWorkingItem.name}");
var realLast = _lastWorkingItem;
await fixFailingTest(); // Sets _lastWorkingItem to _currentWorkingItem
_lastWorkingItem = realLast; // Might not be needed
+ } else {
+ unhandledTests.add(similarTest);
}
}
- return new NavigateStepWorkflowAction(this, const <FailingTest>[]);
+ return new NavigateStepWorkflowAction(this, unhandledTests);
}
@override
@@ -161,7 +168,7 @@
print("o : Modify outcomes.");
print("r : Reset to initial state.");
print("s : Skip this failure.");
- print("ti : Toggle selection of section, where i is the index.");
+ print("<n> : Toggle selection of the section with the index <n>.");
}
/// Fixes the failing test based on the data in [_currentWorkingItem].
@@ -213,7 +220,7 @@
orElse: () => null);
sectionToAdd ??= new StatusSection(expression, 0, []);
var section = new StatusSectionWithFile(statusFile, sectionToAdd);
- _customSections.add(section);
+ _customSections.add(new _CustomSection(section));
_currentWorkingItem.currentSections.add(section);
}
}
@@ -248,7 +255,7 @@
print(" ${i++}: ${statusFile.path}");
}
var input = stdin.readLineSync();
- var index = int.parse(input, onError: (_) => null);
+ var index = int.parse(input, onError: (_) => -1);
if (index >= 0 && index < statusFiles.length) {
return statusFiles[index];
}
@@ -295,8 +302,8 @@
final String name;
final FailingTest failingTest;
final StatusExpectations statusExpectations;
- final List<StatusSectionWithFile> customSections;
+ Iterable<StatusSectionWithFile> customSections;
List<StatusSectionWithFile> currentSections;
List<SectionsSuggestion> suggestedSections;
List<String> newOutcome;
@@ -304,7 +311,22 @@
String comment;
FixWorkingItem(this.name, this.failingTest, this.statusExpectations,
- this.comment, this.customSections) {}
+ this.comment, Iterable<_CustomSection> customSections) {
+ var files = statusFiles();
+ this.customSections = customSections.expand((customSection) {
+ var sectionWithFile = customSection._findSection(currentSections);
+ if (sectionWithFile != null) {
+ return [sectionWithFile];
+ }
+ var file = customSection._findStatusFile(files);
+ if (file != null) {
+ var section = customSection._findSectionInFile(file);
+ section ??= new StatusSection(customSection.condition, 0, []);
+ return [new StatusSectionWithFile(file, section)];
+ }
+ return [];
+ });
+ }
/// init resets all custom data to the standard values from the failing test,
/// except the comment and custom added sections.
@@ -394,7 +416,7 @@
suggestedSection.sections
.forEach((section) => _printSection(section, sectionCounter++));
});
- print(" ${new String.fromCharCode(groupCounter)}: Added sections");
+ print(" ${new String.fromCharCode(groupCounter)}: Added/Used sections");
customSections
.forEach((section) => _printSection(section, sectionCounter++));
}
@@ -414,3 +436,41 @@
}
}
}
+
+class _CustomSection {
+ final String path;
+ final Expression condition;
+
+ _CustomSection(StatusSectionWithFile section)
+ : path = section.statusFile.path,
+ condition = section.section.condition;
+
+ StatusFile _findStatusFile(Iterable<StatusFile> files) {
+ return files.firstWhere((f) => f.path == path, orElse: () => null);
+ }
+
+ StatusSection _findSectionInFile(StatusFile file) {
+ return file.sections
+ .firstWhere((s) => s.condition == condition, orElse: () => null);
+ }
+
+ StatusSectionWithFile _findSection(Iterable<StatusSectionWithFile> sections) {
+ return sections.firstWhere((s) => s.section.condition == condition,
+ orElse: () => null);
+ }
+
+ @override
+ String toString() {
+ return "{$path} [{$condition}]";
+ }
+
+ @override
+ bool operator ==(other) {
+ return other is _CustomSection && toString() == other.toString();
+ }
+
+ @override
+ int get hashCode {
+ return toString().hashCode;
+ }
+}
diff --git a/tools/patch_sdk.py b/tools/patch_sdk.py
deleted file mode 100755
index dfa0b60..0000000
--- a/tools/patch_sdk.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2016, 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 argparse
-import os
-import subprocess
-import sys
-import utils
-
-usage = """patch_sdk.py [options]"""
-
-def DisplayBootstrapWarning():
- print """\
-
-
-WARNING: Your system cannot run the checked-in Dart SDK. Using the
-bootstrap Dart executable will make debug builds slow.
-Please see the Wiki for instructions on replacing the checked-in Dart SDK.
-
-https://github.com/dart-lang/sdk/wiki/The-checked-in-SDK-in-tools
-
-"""
-
-def BuildArguments():
- result = argparse.ArgumentParser(usage=usage)
- result.add_argument("-q", "--quiet",
- help="emit no output",
- default=False,
- action="store_true")
- result.add_argument("--dart-executable",
- help="dart executable",
- default=None)
- result.add_argument("--script",
- help="patch script to run",
- default=None)
- return result
-
-def main():
- # Parse the options.
- parser = BuildArguments()
- (options, args) = parser.parse_known_args()
- if utils.CheckedInSdkCheckExecutable():
- options.dart_executable = utils.CheckedInSdkExecutable()
- elif options.dart_executable is not None:
- if not options.quiet:
- DisplayBootstrapWarning()
- options.dart_executable = os.path.abspath(options.dart_executable)
- else:
- print >> sys.stderr, 'ERROR: cannot locate dart executable'
- return -1
-
- if options.script is not None:
- dart_file = options.script
- else:
- dart_file = os.path.join(os.path.dirname(__file__), 'patch_sdk.dart')
-
- subprocess.check_call([options.dart_executable, dart_file] + args)
- return 0
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/tools/run_dart.py b/tools/run_dart.py
deleted file mode 100755
index a77d15f..0000000
--- a/tools/run_dart.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2017, 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 argparse
-import os
-import subprocess
-import sys
-import utils
-
-usage = """run_dart.py [--dart=<path>] <script> args..."""
-
-def DisplayBootstrapWarning():
- print """\
-
-
-WARNING: Your system cannot run the checked-in Dart SDK. Using the
-bootstrap Dart executable will make debug builds slow.
-Please see the Wiki for instructions on replacing the checked-in Dart SDK.
-
-https://github.com/dart-lang/sdk/wiki/The-checked-in-SDK-in-tools
-
-"""
-
-def BuildArguments():
- result = argparse.ArgumentParser(usage=usage)
- result.add_argument("--dart",
- help="dart executable",
- default=None)
- result.add_argument("-q", "--quiet",
- help="emit no output",
- default=False,
- action="store_true")
- return result
-
-def main():
- # Parse the options.
- parser = BuildArguments()
- (options, args) = parser.parse_known_args()
- if utils.CheckedInSdkCheckExecutable():
- options.dart = utils.CheckedInSdkExecutable()
- elif options.dart is not None:
- DisplayBootstrapWarning()
- options.dart = os.path.abspath(options.dart)
- else:
- print >> sys.stderr, 'ERROR: cannot locate dart executable'
- return -1
-
- if options.quiet:
- # Pipe output to /dev/null. See https://stackoverflow.com/a/14736249/9457.
- out = open(os.devnull, 'w')
- else:
- out = None
-
- return subprocess.call([options.dart] + args,
- stdout=out, stderr=out)
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 3bbb205..be259ac 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -86,6 +86,7 @@
return new SpecParserCompilerConfiguration(configuration);
case Compiler.none:
+ case Compiler.fasta: // TODO(ahe): Implement a real fasta compiler.
return new NoneCompilerConfiguration(configuration);
}
diff --git a/tools/testing/dart/configuration.dart b/tools/testing/dart/configuration.dart
index 1f3347d..1a1c66d 100644
--- a/tools/testing/dart/configuration.dart
+++ b/tools/testing/dart/configuration.dart
@@ -183,9 +183,10 @@
/// as the first stage of compilation.
bool get usesFasta {
var fastaCompilers = const [
+ Compiler.dartdevk,
Compiler.dartk,
Compiler.dartkp,
- Compiler.dartdevk
+ Compiler.fasta,
];
return fastaCompilers.contains(compiler) ||
compiler == Compiler.dart2js && useDart2JSWithKernel;
@@ -541,6 +542,7 @@
static const dartk = const Compiler._('dartk');
static const dartkp = const Compiler._('dartkp');
static const specParser = const Compiler._('spec_parser');
+ static const fasta = const Compiler._('fasta');
static final List<String> names = _all.keys.toList();
@@ -555,6 +557,7 @@
dartk,
dartkp,
specParser,
+ fasta,
], key: (compiler) => (compiler as Compiler).name);
static Compiler find(String name) {
@@ -611,6 +614,8 @@
return const [Runtime.dartPrecompiled];
case Compiler.specParser:
return const [Runtime.none];
+ case Compiler.fasta:
+ return const [Runtime.none];
case Compiler.none:
return const [
Runtime.vm,
diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni
index 10f3a35..314139d 100644
--- a/utils/application_snapshot.gni
+++ b/utils/application_snapshot.gni
@@ -56,7 +56,7 @@
]
abs_depfile = rebase_path(depfile)
- abs_output = rebase_path(output)
+ abs_output = rebase_path(output, root_build_dir)
args = [
"--deterministic",
diff --git a/utils/dartanalyzer/BUILD.gn b/utils/dartanalyzer/BUILD.gn
index 147a7bc..a07aca1 100644
--- a/utils/dartanalyzer/BUILD.gn
+++ b/utils/dartanalyzer/BUILD.gn
@@ -2,8 +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.
-import("../../build/compiled_action.gni")
-import("../../build/prebuilt_dart_sdk.gni")
+import("../../build/dart_action.gni")
import("../application_snapshot.gni")
group("dartanalyzer") {
@@ -48,42 +47,16 @@
assert(defined(invoker.type), "Must specify the summary type")
type = invoker.type
assert(type == "spec" || type == "strong")
- action(target_name) {
- if (!prebuilt_dart_exe_works) {
- deps = [ "../../runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
- }
-
- script = "../../tools/run_dart.py"
-
- args = []
- if (!prebuilt_dart_exe_works) {
- dart_out_dir = get_label_info(
- "../../runtime/bin:dart_bootstrap($dart_host_toolchain)",
- "root_out_dir")
- dart_bootstrap =
- rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
- args += [
- "--dart",
- dart_bootstrap,
- ]
- }
-
+ dart_action(target_name) {
+ script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart"
+ packages = "../../.packages"
inputs = sdk_lib_files + analyzer_files
-
output = "$root_gen_dir/$type.sum"
outputs = [
output,
]
-
- dot_packages = rebase_path("../../.packages")
- build_sdk_summaries =
- rebase_path("../../pkg/analyzer/tool/summary/build_sdk_summaries.dart")
-
- args += [
- "--quiet",
- "--packages=$dot_packages",
- build_sdk_summaries,
+ args = [
"build-$type",
rebase_path(output),
rebase_path("../../sdk"),
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index c6e913d9..23c945c 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -2,6 +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.
+import("../../build/dart_action.gni")
import("../../build/prebuilt_dart_sdk.gni")
import("../application_snapshot.gni")
import("../create_timestamp.gni")
@@ -127,7 +128,7 @@
# Apply dev_compiler's patch files to create the Dart version of the dartdevc
# SDK.
-action("dartdevc_patch_sdk") {
+dart_action("dartdevc_patch_sdk") {
# TODO(rnystrom): Unfork DDC's patch_sdk.dart script with the
# tools/patch_sdk.dart and then change this to use generate_patch_sdk().
deps = [
@@ -138,20 +139,10 @@
"../../pkg:pkg_files_stamp",
]
- if (!prebuilt_dart_exe_works) {
- deps += [ "../../runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
- }
-
- script = "../../tools/patch_sdk.py"
-
- # We list the `patch_sdk.dart` tool here because the [script] (which is
- # implicitly an input) will call it.
- inputs = [
- "../../pkg/dev_compiler/tool/patch_sdk.dart",
- ]
+ script = "../../pkg/dev_compiler/tool/patch_sdk.dart"
# The main SDK library sources.
- inputs += sdk_lib_files
+ inputs = sdk_lib_files
# dev_compiler's additional sources and patch files.
inputs += exec_script("../../tools/list_dart_files.py",
@@ -168,22 +159,7 @@
"$patched_sdk_dir/version",
]
- args = []
- if (!prebuilt_dart_exe_works) {
- dart_out_dir = get_label_info(
- "../../runtime/bin:dart_bootstrap($dart_host_toolchain)",
- "root_out_dir")
- dart_bootstrap =
- rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
- args += [
- "--dart-executable",
- dart_bootstrap,
- ]
- }
-
- args += [
- "--script",
- rebase_path("../../pkg/dev_compiler/tool/patch_sdk.dart"),
+ args = [
rebase_path("../../"),
rebase_path("../../pkg/dev_compiler/tool/input_sdk"),
rebase_path(patched_sdk_dir),
@@ -192,56 +168,14 @@
# Compiles the Dart core libraries and DDC runtime to an analyzer summary and
# JS.
-action("dartdevc_sdk") {
+dart_action("dartdevc_sdk") {
deps = [
":dartdevc_files_stamp",
":dartdevc_patch_sdk",
"../../pkg:pkg_files_stamp",
]
- if (!prebuilt_dart_exe_works) {
- deps += [ "../../runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
- }
-
- script = "../../tools/run_dart.py"
-
- args = []
- if (!prebuilt_dart_exe_works) {
- dart_out_dir = get_label_info(
- "../../runtime/bin:dart_bootstrap($dart_host_toolchain)",
- "root_out_dir")
- dart_bootstrap =
- rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
- args += [
- "--dart",
- dart_bootstrap,
- ]
- }
-
- args += [
- "--quiet",
- rebase_path("../../pkg/dev_compiler/tool/build_sdk.dart"),
- "--dart-sdk",
- rebase_path(patched_sdk_dir),
- "--dart-sdk-summary=build",
- "--summary-out",
- rebase_path(sdk_summary),
- "--source-map",
- "--source-map-comment",
- "--inline-source-map",
- "--modules=amd",
- "-o",
- rebase_path("$target_gen_dir/js/amd/dart_sdk.js"),
- "--modules=es6",
- "-o",
- rebase_path("$target_gen_dir/js/es6/dart_sdk.js"),
- "--modules=common",
- "-o",
- rebase_path("$target_gen_dir/js/common/dart_sdk.js"),
- "--modules=legacy",
- "-o",
- rebase_path("$target_gen_dir/js/legacy/dart_sdk.js"),
- ]
+ script = "../../pkg/dev_compiler/tool/build_sdk.dart"
inputs = [
"../../pkg/dev_compiler/tool/build_sdk.dart",
@@ -271,6 +205,29 @@
"$target_gen_dir/js/legacy/dart_sdk.js",
"$target_gen_dir/js/legacy/dart_sdk.js.map",
]
+
+ args = [
+ "--dart-sdk",
+ rebase_path(patched_sdk_dir),
+ "--dart-sdk-summary=build",
+ "--summary-out",
+ rebase_path(sdk_summary),
+ "--source-map",
+ "--source-map-comment",
+ "--inline-source-map",
+ "--modules=amd",
+ "-o",
+ rebase_path("$target_gen_dir/js/amd/dart_sdk.js"),
+ "--modules=es6",
+ "-o",
+ rebase_path("$target_gen_dir/js/es6/dart_sdk.js"),
+ "--modules=common",
+ "-o",
+ rebase_path("$target_gen_dir/js/common/dart_sdk.js"),
+ "--modules=legacy",
+ "-o",
+ rebase_path("$target_gen_dir/js/legacy/dart_sdk.js"),
+ ]
}
# Builds everything needed to run dartdevc and dartdevk tests using test.dart.
diff --git a/utils/generate_patch_sdk.gni b/utils/generate_patch_sdk.gni
index 95fdc46..3130eec 100644
--- a/utils/generate_patch_sdk.gni
+++ b/utils/generate_patch_sdk.gni
@@ -2,13 +2,13 @@
# 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("../build/dart_action.gni")
import("../build/dart_host_sdk_toolchain.gni")
import("../build/prebuilt_dart_sdk.gni")
_dart_root = get_path_info("..", "abspath")
-# Template to generate a patched_sdk folder. This invokes the tools/patch_sdk.py
-# script and sets up the right dependencies.
+# Template to generate a patched_sdk folder.
#
# This template expects four arguments:
# - mode: vm or dart2js (whether to build an sdk for the vm or for dart2js)
@@ -21,26 +21,15 @@
assert(defined(invoker.patched_sdk_dir),
"Need patched_sdk_dir in $target_name")
assert(defined(invoker.mode), "Need mode in $target_name")
- action(target_name) {
- if (defined(invoker.deps)) {
- deps = invoker.deps
- } else {
- deps = []
- }
- if (!prebuilt_dart_exe_works) {
- deps += [ "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
- }
+ dart_action(target_name) {
+ forward_variables_from(invoker, [
+ "deps",
+ ])
- script = "$_dart_root/tools/patch_sdk.py"
+ depfile = "$root_out_dir/${target_name}_patched_sdk.d"
- # We list the `patch_sdk.dart` tool here because the [script] (which is
- # implicitly an input) will call it.
- inputs = [
- "$_dart_root/tools/patch_sdk.dart",
- ]
-
- depfile = "$root_out_dir/${target_name}.d"
+ script = "$_dart_root/tools/patch_sdk.dart"
if (defined(invoker.outputs)) {
outputs = invoker.outputs
@@ -53,19 +42,7 @@
]
}
- args = [ "--quiet" ]
- if (!prebuilt_dart_exe_works) {
- dart_out_dir = get_label_info(
- "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)",
- "root_out_dir")
- dart_bootstrap =
- rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
- args += [
- "--dart-executable",
- dart_bootstrap,
- ]
- }
- args += [
+ args = [
invoker.mode,
rebase_path("$_dart_root/sdk"),
rebase_path(invoker.input_patches_dir),
diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn
index e31406d..7d1bfd1 100644
--- a/utils/kernel-service/BUILD.gn
+++ b/utils/kernel-service/BUILD.gn
@@ -2,6 +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.
+import("../../build/dart_action.gni")
import("../../build/dart_host_sdk_toolchain.gni")
import("../application_snapshot.gni")
@@ -23,18 +24,17 @@
":kernel-service",
]
sources = [
- rebase_path("$root_gen_dir/kernel-service.dart.snapshot"),
+ "$root_gen_dir/kernel-service.dart.snapshot",
]
outputs = [
"$root_out_dir/kernel-service.dart.snapshot",
]
}
-compiled_action("kernel_service_dill") {
+dart_action("kernel_service_dill") {
deps = [
"../../runtime/vm:vm_legacy_platform",
]
- tool = "../../runtime/bin:dart_bootstrap"
kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"
gen_kernel_script = "../../pkg/vm/bin/gen_kernel.dart"
@@ -47,11 +47,12 @@
"$root_gen_dir/kernel_service.dill",
]
+ script = gen_kernel_script
+
# TODO: Switch over to vm_platform_strong.dill and remove the
# flags --no-strong-mode once https://github.com/dart-lang/sdk/issues/31623
# is fixed.
args = [
- rebase_path(gen_kernel_script),
"--packages=file:///" + rebase_path("../../.packages"),
"--platform=file:///" + rebase_path("$root_out_dir/vm_platform.dill"),
"--no-aot",